[ARVADOS] updated: 594e00f9311da95f73843f55b6e1c7c3ad55d8df
Git user
git at public.curoverse.com
Fri Mar 3 00:43:20 EST 2017
Summary of changes:
services/api/app/models/arvados_model.rb | 3 ++-
services/api/app/models/container.rb | 6 +++---
services/api/app/models/job.rb | 2 +-
services/api/test/integration/websocket_test.rb | 1 -
services/api/test/unit/create_superuser_token_test.rb | 1 +
5 files changed, 7 insertions(+), 6 deletions(-)
via 594e00f9311da95f73843f55b6e1c7c3ad55d8df (commit)
via 6fe6fb4a307dade78b4f64a3f0f06a9caa8a056d (commit)
via c7a44e530c2ecb036ac46d71a0306c6f64c439ee (commit)
via 345dfd5a605c9171182cd8acb2918e899f64160b (commit)
from 766ddd6d958826049c2811f6d058480246e423a6 (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 594e00f9311da95f73843f55b6e1c7c3ad55d8df
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Mar 3 00:26:20 2017 -0500
11168: Always deep-sort before comparing in where_serialized.
diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index b39c6ab..0419dad 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -456,7 +456,8 @@ class ArvadosModel < ActiveRecord::Base
end
def self.where_serialized(colname, value)
- where("#{colname.to_s} IN (?)", [value.to_yaml, SafeJSON.dump(value)])
+ sorted = deep_sort_hash(value)
+ where("#{colname.to_s} IN (?)", [sorted.to_yaml, SafeJSON.dump(sorted)])
end
Serializer = {
diff --git a/services/api/app/models/container.rb b/services/api/app/models/container.rb
index e6ce8f0..a3cc9c1 100644
--- a/services/api/app/models/container.rb
+++ b/services/api/app/models/container.rb
@@ -86,11 +86,11 @@ class Container < ArvadosModel
candidates = Container.
where_serialized(:command, attrs[:command]).
where('cwd = ?', attrs[:cwd]).
- where_serialized(:environment, self.deep_sort_hash(attrs[:environment])).
+ where_serialized(:environment, attrs[:environment]).
where('output_path = ?', attrs[:output_path]).
where('container_image = ?', attrs[:container_image]).
- where_serialized(:mounts, self.deep_sort_hash(attrs[:mounts])).
- where_serialized(:runtime_constraints, self.deep_sort_hash(attrs[:runtime_constraints]))
+ where_serialized(:mounts, attrs[:mounts]).
+ where_serialized(:runtime_constraints, attrs[:runtime_constraints])
# Check for Completed candidates whose output and log are both readable.
select_readable_pdh = Collection.
commit 6fe6fb4a307dade78b4f64a3f0f06a9caa8a056d
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Mar 3 00:25:57 2017 -0500
11168: Remove unused import.
diff --git a/services/api/test/integration/websocket_test.rb b/services/api/test/integration/websocket_test.rb
index 841a808..549bbc6 100644
--- a/services/api/test/integration/websocket_test.rb
+++ b/services/api/test/integration/websocket_test.rb
@@ -1,5 +1,4 @@
require 'database_cleaner'
-require 'oj'
require 'safe_json'
require 'test_helper'
commit c7a44e530c2ecb036ac46d71a0306c6f64c439ee
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Mar 3 00:17:43 2017 -0500
11168: Revert serialization change in order to avoid breaking job reuse.
diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb
index 55ae5c7..80a03e2 100644
--- a/services/api/app/models/job.rb
+++ b/services/api/app/models/job.rb
@@ -323,7 +323,7 @@ class Job < ArvadosModel
protected
def self.sorted_hash_digest h
- Digest::MD5.hexdigest(SafeJSON.dump(deep_sort_hash(h)))
+ Digest::MD5.hexdigest(Oj.dump(deep_sort_hash(h)))
end
def foreign_key_attributes
commit 345dfd5a605c9171182cd8acb2918e899f64160b
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Mar 1 18:07:14 2017 -0500
11168: Add missing require.
diff --git a/services/api/test/unit/create_superuser_token_test.rb b/services/api/test/unit/create_superuser_token_test.rb
index bd55b15..122ae51 100644
--- a/services/api/test/unit/create_superuser_token_test.rb
+++ b/services/api/test/unit/create_superuser_token_test.rb
@@ -1,3 +1,4 @@
+require 'safe_json'
require 'test_helper'
require 'create_superuser_token'
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list