[ARVADOS] created: 1.3.0-956-g34729fcb1

Git user git at public.curoverse.com
Fri May 24 21:13:06 UTC 2019


        at  34729fcb1f1b54815246b8cbc53220c3b15cb979 (commit)


commit 34729fcb1f1b54815246b8cbc53220c3b15cb979
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Fri May 24 18:11:23 2019 -0300

    15275: Checks for jsonb types changes by comparing deserialized values.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/api/app/models/jsonb_type.rb b/services/api/app/models/jsonb_type.rb
index 3f296be55..02746f64d 100644
--- a/services/api/app/models/jsonb_type.rb
+++ b/services/api/app/models/jsonb_type.rb
@@ -12,6 +12,12 @@ class JsonbType
       nil
     end
 
+    def changed_in_place?(raw_old_value, value)
+      # Compare deserialized values for correctness, checking serialized values
+      # may include changes in ordering, inline whitespaces, etc.
+      deserialize(raw_old_value) != value
+    end
+
     def deserialize(value)
       if value.nil?
         self.default_value

commit 797885e26f85f04123bcba751addcd415ed3db2e
Merge: 3111e242a cdc0e1acb
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Fri May 24 15:34:01 2019 -0300

    Merge branch 'master' into 15275-attribute-dirtyness-bugfix
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>


commit 3111e242a0cf5021c044c9f1d466978cd4024a5a
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Fri May 24 15:33:13 2019 -0300

    15275: Re-adds the test exposing this branch's particular bug.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/api/test/unit/collection_test.rb b/services/api/test/unit/collection_test.rb
index 9198f74e8..d9facba14 100644
--- a/services/api/test/unit/collection_test.rb
+++ b/services/api/test/unit/collection_test.rb
@@ -267,8 +267,7 @@ class CollectionTest < ActiveSupport::TestCase
   end
 
   # This test exposes a bug related to JSONB attributes, see #15725.
-  # Skipping for the moment, to unblock federation tests.
-  skip "recently loaded collection shouldn't list changed attributes" do
+  test "recently loaded collection shouldn't list changed attributes" do
     col = Collection.where("properties != '{}'::jsonb").limit(1).first
     refute col.properties_changed?, 'Properties field should not be seen as changed'
   end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list