[arvados] updated: 2.6.1-19-g3cb5e61dc

git repository hosting git at public.arvados.org
Mon May 22 15:38:18 UTC 2023


Summary of changes:
 apps/workbench/Gemfile.lock                         | 18 +++++++++---------
 doc/api/methods/groups.html.textile.liquid          |  1 +
 doc/sdk/python/cookbook.html.textile.liquid         |  9 ++++-----
 go.mod                                              |  2 +-
 go.sum                                              |  4 ++--
 services/api/Gemfile.lock                           | 18 +++++++++---------
 .../arvados/v1/container_requests_controller.rb     |  2 +-
 .../controllers/arvados/v1/containers_controller.rb |  2 +-
 services/api/lib/update_priorities.rb               | 14 +++++++++++++-
 .../arvados/v1/containers_controller_test.rb        | 21 +++++++++++++++++++++
 10 files changed, 62 insertions(+), 29 deletions(-)

       via  3cb5e61dc56d30e159f286f306351800bb4a0729 (commit)
       via  5ed5fa1d14ae2ca9cd705e95e792112ec5f7c3ae (commit)
       via  847937c2b8886676701bad3c2111b728ab3992f7 (commit)
       via  3fbb10ed00f4ee97454e4509bafb8dd436bfac71 (commit)
       via  52d3359c4c60d102f4af710a3fd7053e50a38fe2 (commit)
      from  11509742679c983bc9eb68c5875593cce25764d5 (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 3cb5e61dc56d30e159f286f306351800bb4a0729
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Mon May 22 11:33:46 2023 -0400

    Merge branch '20529-container-deadlocks' refs #20529
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/api/app/controllers/arvados/v1/container_requests_controller.rb b/services/api/app/controllers/arvados/v1/container_requests_controller.rb
index b57f09a6a..6b6e96a1f 100644
--- a/services/api/app/controllers/arvados/v1/container_requests_controller.rb
+++ b/services/api/app/controllers/arvados/v1/container_requests_controller.rb
@@ -32,7 +32,7 @@ class Arvados::V1::ContainerRequestsController < ApplicationController
   end
 
   def update
-    if (resource_attrs.keys - [:owner_uuid, :name, :description, :properties]).empty? or @object.container_uuid.nil?
+    if (resource_attrs.keys.map(&:to_sym) - [:owner_uuid, :name, :description, :properties]).empty? or @object.container_uuid.nil?
       # If no attributes are being updated besides these, there are no
       # cascading changes to other rows/tables, the only lock will be
       # the single row lock on SQL UPDATE.
diff --git a/services/api/app/controllers/arvados/v1/containers_controller.rb b/services/api/app/controllers/arvados/v1/containers_controller.rb
index 17970ce4c..13aa478d2 100644
--- a/services/api/app/controllers/arvados/v1/containers_controller.rb
+++ b/services/api/app/controllers/arvados/v1/containers_controller.rb
@@ -31,7 +31,7 @@ class Arvados::V1::ContainersController < ApplicationController
   end
 
   def update
-    if (resource_attrs.keys - [:cost, :gateway_address, :output_properties, :progress, :runtime_status]).empty?
+    if (resource_attrs.keys.map(&:to_sym) - [:cost, :gateway_address, :output_properties, :progress, :runtime_status]).empty?
       # If no attributes are being updated besides these, there are no
       # cascading changes to other rows/tables, the only lock will the
       # single row lock on SQL UPDATE.
diff --git a/services/api/lib/update_priorities.rb b/services/api/lib/update_priorities.rb
index b59859a82..4183ac10b 100644
--- a/services/api/lib/update_priorities.rb
+++ b/services/api/lib/update_priorities.rb
@@ -3,8 +3,20 @@
 # SPDX-License-Identifier: AGPL-3.0
 
 def row_lock_for_priority_update container_uuid
+  # Locks all the containers under this container, and also any
+  # immediate parent containers.  This ensures we have locked
+  # everything that gets touched by either a priority update or state
+  # update.
   ActiveRecord::Base.connection.exec_query %{
-        select 1 from containers where containers.uuid in (select pri_container_uuid from container_tree($1)) order by containers.uuid for update
+        select 1 from containers where containers.uuid in (
+  select pri_container_uuid from container_tree($1)
+UNION
+  select container_requests.requesting_container_uuid from container_requests
+    where container_requests.container_uuid = $1
+          and container_requests.state = 'Committed'
+          and container_requests.requesting_container_uuid is not NULL
+)
+        order by containers.uuid for update
   }, 'select_for_update_priorities', [[nil, container_uuid]]
 end
 
diff --git a/services/api/test/functional/arvados/v1/containers_controller_test.rb b/services/api/test/functional/arvados/v1/containers_controller_test.rb
index 8c2919b97..07fa5c321 100644
--- a/services/api/test/functional/arvados/v1/containers_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/containers_controller_test.rb
@@ -168,4 +168,25 @@ class Arvados::V1::ContainersControllerTest < ActionController::TestCase
     assert_response :success
     assert_not_equal 0, Container.find_by_uuid(containers(:running).uuid).priority
   end
+
+  test 'update runtime_status, runtime_status is toplevel key' do
+    authorize_with :dispatch1
+    c = containers(:running)
+    patch :update, params: {id: containers(:running).uuid, runtime_status: {activity: "foo", activityDetail: "bar"}}
+    assert_response :success
+  end
+
+  test 'update runtime_status, container is toplevel key' do
+    authorize_with :dispatch1
+    c = containers(:running)
+    patch :update, params: {id: containers(:running).uuid, container: {runtime_status: {activity: "foo", activityDetail: "bar"}}}
+    assert_response :success
+  end
+
+  test 'update state, state is toplevel key' do
+    authorize_with :dispatch1
+    c = containers(:running)
+    patch :update, params: {id: containers(:running).uuid, state: "Complete", runtime_status: {activity: "finishing"}}
+    assert_response :success
+  end
 end

commit 5ed5fa1d14ae2ca9cd705e95e792112ec5f7c3ae
Author: Brett Smith <brett.smith at curii.com>
Date:   Mon May 22 10:47:29 2023 -0400

    Merge branch '20527-group-contents-select-doc'
    
    Closes #20527.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/doc/api/methods/groups.html.textile.liquid b/doc/api/methods/groups.html.textile.liquid
index af14c56f4..02e8bfbb3 100644
--- a/doc/api/methods/groups.html.textile.liquid
+++ b/doc/api/methods/groups.html.textile.liquid
@@ -116,6 +116,7 @@ table(table table-bordered table-condensed).
 |include|string|If provided with the value "owner_uuid", this will return owner objects in the "included" field of the response.|query||
 |include_trash|boolean (default false)|Include trashed objects.|query|@true@|
 |include_old_versions|boolean (default false)|Include past versions of the collections being listed.|query|@true@|
+|select|array|Attributes of each object to return in the response. Specify an unqualified name like @uuid@ to select that attribute on all object types, or a qualified name like @collections.name@ to select that attribute on objects of the specified type. By default, all available attributes are returned, except on collections, where @manifest_text@ is not returned and cannot be selected due to an implementation limitation. This limitation may be removed in the future.|query|@["uuid", "collections.name"]@|
 
 Notes:
 

commit 847937c2b8886676701bad3c2111b728ab3992f7
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed May 17 10:20:54 2023 -0300

    Merge branch '20325-go-docker-distribution-upgrade2'. Refs #20325
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/go.mod b/go.mod
index b6208bbf1..6723c8385 100644
--- a/go.mod
+++ b/go.mod
@@ -69,7 +69,7 @@ require (
 	github.com/davecgh/go-spew v1.1.1 // indirect
 	github.com/dimchansky/utfbom v1.1.1 // indirect
 	github.com/dnaeon/go-vcr v1.2.0 // indirect
-	github.com/docker/distribution v2.8.1+incompatible // indirect
+	github.com/docker/distribution v2.8.2+incompatible // indirect
 	github.com/docker/go-connections v0.3.0 // indirect
 	github.com/docker/go-units v0.4.0 // indirect
 	github.com/gliderlabs/ssh v0.2.2 // indirect
diff --git a/go.sum b/go.sum
index d1061a5b3..96daa9874 100644
--- a/go.sum
+++ b/go.sum
@@ -114,8 +114,8 @@ github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi
 github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE=
 github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=
 github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
-github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
-github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
+github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
+github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
 github.com/docker/docker v17.12.0-ce-rc1.0.20210128214336-420b1d36250f+incompatible h1:nhVo1udYfMj0Jsw0lnqrTjjf33aLpdgW9Wve9fHVzhQ=
 github.com/docker/docker v17.12.0-ce-rc1.0.20210128214336-420b1d36250f+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
 github.com/docker/go-connections v0.3.0 h1:3lOnM9cSzgGwx8VfK/NGOW5fLQ0GjIlCkaktF+n1M6o=

commit 3fbb10ed00f4ee97454e4509bafb8dd436bfac71
Author: Brett Smith <brett.smith at curii.com>
Date:   Thu May 11 11:53:41 2023 -0400

    Refine PySDK collection walk recipe
    
    Use PurePosixPath to clarify that we're strictly doing path manipulation.
    (It will also behave better on Windows, although I'm not sure if the SDK
    itself is Windows-ready yet.)
    
    Keep Path objects in the queue to reduce local state.
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/doc/sdk/python/cookbook.html.textile.liquid b/doc/sdk/python/cookbook.html.textile.liquid
index f2d087625..c9e1f05f1 100644
--- a/doc/sdk/python/cookbook.html.textile.liquid
+++ b/doc/sdk/python/cookbook.html.textile.liquid
@@ -471,17 +471,16 @@ import collections
 import pathlib
 root_collection = arvados.collection.Collection(...)
 # Start work from the base stream.
-stream_queue = collections.deque(['.'])
+stream_queue = collections.deque([pathlib.PurePosixPath('.')])
 while stream_queue:
-    stream_name = stream_queue.popleft()
-    collection = root_collection.find(stream_name)
+    stream_path = stream_queue.popleft()
+    collection = root_collection.find(str(stream_path))
     for item_name in collection:
         try:
             my_file = collection.open(item_name)
         except IsADirectoryError:
             # item_name refers to a stream. Queue it to walk later.
-            stream_path = pathlib.Path(stream_name, item_name)
-            stream_queue.append(stream_path.as_posix())
+            stream_queue.append(stream_path / item_name)
             continue
         with my_file:
             ...  # Work with my_file as desired

commit 52d3359c4c60d102f4af710a3fd7053e50a38fe2
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Tue May 9 16:49:09 2023 -0300

    Merge branch '20325-jquery-rails-upgrade'. Refs #20325
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index 12886ab10..55f4a881c 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -111,11 +111,11 @@ GEM
     childprocess (0.9.0)
       ffi (~> 1.0, >= 1.0.11)
     cliver (0.3.2)
-    concurrent-ruby (1.1.10)
+    concurrent-ruby (1.2.2)
     crass (1.0.6)
     deep_merge (1.2.1)
     docile (1.3.1)
-    erubi (1.10.0)
+    erubi (1.12.0)
     execjs (2.7.0)
     extlib (0.9.16)
     faraday (0.15.4)
@@ -136,7 +136,7 @@ GEM
     httpclient (2.8.3)
     i18n (0.9.5)
       concurrent-ruby (~> 1.0)
-    jquery-rails (4.3.3)
+    jquery-rails (4.5.1)
       rails-dom-testing (>= 1, < 3)
       railties (>= 4.2.0)
       thor (>= 0.14, < 2.0)
@@ -150,7 +150,7 @@ GEM
       railties (>= 4)
       request_store (~> 1.0)
     logstash-event (1.2.02)
-    loofah (2.19.1)
+    loofah (2.20.0)
       crass (~> 1.0.2)
       nokogiri (>= 1.5.9)
     mail (2.7.1)
@@ -163,7 +163,7 @@ GEM
       mime-types-data (~> 3.2015)
     mime-types-data (3.2019.0331)
     mini_mime (1.1.2)
-    mini_portile2 (2.8.1)
+    mini_portile2 (2.8.2)
     minitest (5.10.3)
     mocha (1.8.0)
       metaclass (~> 0.0.1)
@@ -200,10 +200,10 @@ GEM
       websocket-driver (>= 0.2.0)
     public_suffix (4.0.6)
     racc (1.6.2)
-    rack (2.2.6.4)
+    rack (2.2.7)
     rack-mini-profiler (1.0.2)
       rack (>= 1.2.0)
-    rack-test (2.0.2)
+    rack-test (2.1.0)
       rack (>= 1.3)
     rails (5.2.8.1)
       actioncable (= 5.2.8.1)
@@ -225,7 +225,7 @@ GEM
     rails-dom-testing (2.0.3)
       activesupport (>= 4.2.0)
       nokogiri (>= 1.6)
-    rails-html-sanitizer (1.4.4)
+    rails-html-sanitizer (1.5.0)
       loofah (~> 2.19, >= 2.19.1)
     rails-perftest (0.0.7)
     railties (5.2.8.1)
@@ -291,7 +291,7 @@ GEM
     thor (1.2.1)
     thread_safe (0.3.6)
     tilt (2.0.9)
-    tzinfo (1.2.10)
+    tzinfo (1.2.11)
       thread_safe (~> 0.1)
     uglifier (2.7.2)
       execjs (>= 0.3.0)
diff --git a/services/api/Gemfile.lock b/services/api/Gemfile.lock
index 21d0ad471..3163f790a 100644
--- a/services/api/Gemfile.lock
+++ b/services/api/Gemfile.lock
@@ -82,9 +82,9 @@ GEM
       multi_json (>= 1.0.0)
     builder (3.2.4)
     byebug (11.0.1)
-    concurrent-ruby (1.1.10)
+    concurrent-ruby (1.2.2)
     crass (1.0.6)
-    erubi (1.10.0)
+    erubi (1.12.0)
     extlib (0.9.16)
     factory_bot (5.0.2)
       activesupport (>= 4.2.0)
@@ -106,7 +106,7 @@ GEM
     httpclient (2.8.3)
     i18n (0.9.5)
       concurrent-ruby (~> 1.0)
-    jquery-rails (4.3.3)
+    jquery-rails (4.5.1)
       rails-dom-testing (>= 1, < 3)
       railties (>= 4.2.0)
       thor (>= 0.14, < 2.0)
@@ -123,7 +123,7 @@ GEM
       railties (>= 4)
       request_store (~> 1.0)
     logstash-event (1.2.02)
-    loofah (2.19.1)
+    loofah (2.20.0)
       crass (~> 1.0.2)
       nokogiri (>= 1.5.9)
     mail (2.7.1)
@@ -133,7 +133,7 @@ GEM
     metaclass (0.0.4)
     method_source (1.0.0)
     mini_mime (1.1.2)
-    mini_portile2 (2.8.1)
+    mini_portile2 (2.8.2)
     minitest (5.10.3)
     mocha (1.8.0)
       metaclass (~> 0.0.1)
@@ -153,8 +153,8 @@ GEM
     power_assert (1.1.4)
     public_suffix (4.0.6)
     racc (1.6.2)
-    rack (2.2.6.4)
-    rack-test (2.0.2)
+    rack (2.2.7)
+    rack-test (2.1.0)
       rack (>= 1.3)
     rails (5.2.8.1)
       actioncable (= 5.2.8.1)
@@ -176,7 +176,7 @@ GEM
     rails-dom-testing (2.0.3)
       activesupport (>= 4.2.0)
       nokogiri (>= 1.6)
-    rails-html-sanitizer (1.4.4)
+    rails-html-sanitizer (1.5.0)
       loofah (~> 2.19, >= 2.19.1)
     rails-observers (0.1.5)
       activemodel (>= 4.0)
@@ -222,7 +222,7 @@ GEM
       power_assert
     thor (1.2.1)
     thread_safe (0.3.6)
-    tzinfo (1.2.10)
+    tzinfo (1.2.11)
       thread_safe (~> 0.1)
     websocket-driver (0.7.5)
       websocket-extensions (>= 0.1.0)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list