[ARVADOS] updated: ed9499404901d5e788054a770cc5cb6e8566554e
git at public.curoverse.com
git at public.curoverse.com
Fri Aug 22 16:51:32 EDT 2014
Summary of changes:
.../app/views/projects/_show_tab_contents.html.erb | 3 ++-
.../api/app/controllers/arvados/v1/jobs_controller.rb | 4 ++--
services/api/app/models/collection.rb | 6 +++++-
services/api/app/models/commit.rb | 15 +++++++++++----
services/api/app/models/locator.rb | 8 ++++++--
5 files changed, 26 insertions(+), 10 deletions(-)
via ed9499404901d5e788054a770cc5cb6e8566554e (commit)
via 8f46cb4ad6974b0fc54acc9c9f16fbea7573d75d (commit)
via d68db5e4755eb38482f251fec92fa975feae667d (commit)
via db88e7487f1fca50e00c5fc004e67b922a41ad29 (commit)
via b6487d6773406f0da6724e24ad5ce6a94e1009cd (commit)
via 44064fd5fd15cf053603276438d19941f3d8e892 (commit)
via d85ec3b1d45863839186537c6c832732784d5689 (commit)
via 82b77ceb5b9fa5035fc44372fb090769e61adba0 (commit)
from 68c3fbc94ecfa4115af4d6ccb95171b46432eb72 (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 ed9499404901d5e788054a770cc5cb6e8566554e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Aug 22 16:51:10 2014 -0400
Accomodate otherwise valid user-supplied portable data hashes with no size
hint, as provided by crunch.
diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index f15d031..d25536e 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -84,7 +84,11 @@ class Collection < ArvadosModel
begin
loc = Locator.parse!(self.portable_data_hash)
loc.strip_hints!
- self.portable_data_hash = loc.to_s
+ if loc.size
+ self.portable_data_hash = loc.to_s
+ else
+ self.portable_data_hash = "#{loc.hash}+#{self.manifest_text.length}"
+ end
rescue ArgumentError => e
errors.add(:portable_data_hash, "#{e}")
return false
diff --git a/services/api/app/models/locator.rb b/services/api/app/models/locator.rb
index 39a7aaf..22dfc2c 100644
--- a/services/api/app/models/locator.rb
+++ b/services/api/app/models/locator.rb
@@ -44,7 +44,7 @@ class Locator
raise ArgumentError.new "not a valid locator #{tok}"
end
unless m[2]
- raise ArgumentError.new "missing size hint on #{tok}"
+ Rails.logger.debug ArgumentError.new "missing size hint on #{tok}"
end
tokhash, _, toksize, _, trailer = m[1..5]
@@ -95,6 +95,10 @@ class Locator
end
def to_s
- [ @hash, @size, *@hints ].join('+')
+ if @size
+ [ @hash, @size, *@hints ].join('+')
+ else
+ [ @hash, *@hints ].join('+')
+ end
end
end
commit 8f46cb4ad6974b0fc54acc9c9f16fbea7573d75d
Merge: 68c3fbc d68db5e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Aug 22 16:14:03 2014 -0400
Merge branch 'master' into 3036-collection-uuids
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list