Bug #14860
closed[API] Cannot modify collection when versioning is enabled and idle time is expired
Description
This happens when logged in with a non-admin account and working with on a collection with files.
Updated by Lucas Di Pentima about 6 years ago
- Status changed from New to In Progress
Updated by Lucas Di Pentima about 6 years ago
After some more diagnosing, the issue seems to be happening when trying to save the snapshot collection on manage_versioning()
callback at Collection
class: The check_signatures()
callback on the newly created snapshot fails because manifest_text
has locators without signatures (fails at line 129)
Updated by Peter Amstutz about 6 years ago
Lucas Di Pentima wrote:
After some more diagnosing, the issue seems to be happening when trying to save the snapshot collection on
manage_versioning()
callback atCollection
class: Thecheck_signatures()
callback on the newly created snapshot fails becausemanifest_text
has locators without signatures (fails at line 129)
From chat:
The brute force solution would be to call signed_manifest_text to get manifest_text for the snapshot. Alternately you could wrap snapshot.save with act_as_system_user so long as that doesn't change any of the metadata fields (modified_by_user_uuid &c) or other behavior.
Updated by Lucas Di Pentima about 6 years ago
Updates at c1e1a7546 - branch 14860-fix-collection-versioning
Test run: https://ci.curoverse.com/job/developer-run-tests/1077/
Fixed the bug by assigning the signed manifest text to the snapshot being saved, as suggested by Peter. The act_as_system_user
approach didn't worked because the modified_by_user_uuid
field was being updated.
Updated by Peter Amstutz about 6 years ago
Lucas Di Pentima wrote:
Updates at c1e1a7546 - branch
14860-fix-collection-versioning
Test run: https://ci.curoverse.com/job/developer-run-tests/1077/Fixed the bug by assigning the signed manifest text to the snapshot being saved, as suggested by Peter. The
act_as_system_user
approach didn't worked because themodified_by_user_uuid
field was being updated.
This LGTM.
Updated by Lucas Di Pentima about 6 years ago
- Status changed from In Progress to Resolved
Applied in changeset arvados|9acc7690b9c734b7e31476ce66ef668bf7eb4bbf.