[ARVADOS] updated: 1.3.0-13-gc6c4951ce
Git user
git at public.curoverse.com
Thu Feb 21 12:11:18 EST 2019
Summary of changes:
services/api/app/models/collection.rb | 1 +
.../arvados/v1/collections_controller_test.rb | 25 +++++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
via c6c4951cea8fbae29ebf88e2ce52ae79094869f9 (commit)
via 2e54f0e270d3f3d1365fbcbec788b1bc61636991 (commit)
from 7d14d47afbb36ed879fd007eba59b211a1136f10 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit c6c4951cea8fbae29ebf88e2ce52ae79094869f9
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Tue Feb 19 16:50:36 2019 -0300
14860: Fixes bug by assigning the signed manifest text to the snapshot being saved.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index 487043ee3..33c811319 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -262,6 +262,7 @@ class Collection < ArvadosModel
sync_past_versions if syncable_updates.any?
if snapshot
snapshot.attributes = self.syncable_updates
+ snapshot.manifest_text = snapshot.signed_manifest_text
snapshot.save
end
end
commit 2e54f0e270d3f3d1365fbcbec788b1bc61636991
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Tue Feb 19 15:24:46 2019 -0300
14860: Exposes the bug with a new test.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/services/api/test/functional/arvados/v1/collections_controller_test.rb b/services/api/test/functional/arvados/v1/collections_controller_test.rb
index 26b8290e6..997d89d5c 100644
--- a/services/api/test/functional/arvados/v1/collections_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb
@@ -1279,7 +1279,6 @@ EOS
version: 42,
current_version_uuid: collections(:collection_owned_by_active).uuid,
manifest_text: manifest_text,
- # portable_data_hash: "d30fe8ae534397864cb96c544f4cf102+47"
}
}
assert_response :success
@@ -1287,4 +1286,28 @@ EOS
assert_equal 1, resp['version']
assert_equal resp['uuid'], resp['current_version_uuid']
end
+
+ test "update collection with versioning enabled" do
+ Rails.configuration.collection_versioning = true
+ Rails.configuration.preserve_version_if_idle = 1 # 1 second
+
+ col = collections(:collection_owned_by_active)
+ assert_equal 2, col.version
+ assert col.modified_at < Time.now - 1.second
+
+ token = api_client_authorizations(:active).v2token
+ signed = Blob.sign_locator(
+ 'acbd18db4cc2f85cedef654fccc4a4d8+3',
+ key: Rails.configuration.blob_signing_key,
+ api_token: token)
+ authorize_with_token token
+ put :update, {
+ id: col.uuid,
+ collection: {
+ manifest_text: ". #{signed} 0:3:foo.txt\n",
+ },
+ }
+ assert_response :success
+ assert_equal 3, json_response['version']
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list