[ARVADOS] updated: 2.1.0-986-g7f80639c3

Git user git at public.arvados.org
Tue Jun 29 20:11:12 UTC 2021


Summary of changes:
 lib/crunchrun/crunchrun_test.go              | 33 +++++++++++++++++++++++-----
 services/api/app/models/container.rb         |  4 ++--
 services/api/app/models/container_request.rb |  2 +-
 3 files changed, 31 insertions(+), 8 deletions(-)

       via  7f80639c3641ca9fa500789121c537477f856379 (commit)
      from  9f7f123d653018219ee712ac9d6ccb18c038ce95 (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 7f80639c3641ca9fa500789121c537477f856379
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue Jun 29 16:10:47 2021 -0400

    17395: Add tests.  Don't include storage classes in full text search
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/lib/crunchrun/crunchrun_test.go b/lib/crunchrun/crunchrun_test.go
index 3539a3f65..4b1bf8425 100644
--- a/lib/crunchrun/crunchrun_test.go
+++ b/lib/crunchrun/crunchrun_test.go
@@ -547,8 +547,6 @@ func (s *TestSuite) TestRunContainer(c *C) {
 
 	c.Check(logs.Stdout.String(), Matches, ".*Hello world\n")
 	c.Check(logs.Stderr.String(), Equals, "")
-	c.Check(s.testDispatcherKeepClient, Equals, []string{"default"})
-	c.Check(s.testContainerKeepClient, Equals, []string{"default"})
 }
 
 func (s *TestSuite) TestCommitLogs(c *C) {
@@ -664,7 +662,7 @@ func (s *TestSuite) fullRunHelper(c *C, record string, extraMounts []string, exi
 		return d, err
 	}
 	s.runner.MkArvClient = func(token string) (IArvadosClient, IKeepClient, *arvados.Client, error) {
-		return &ArvTestClient{secretMounts: secretMounts}, &KeepTestClient{}, nil, nil
+		return &ArvTestClient{secretMounts: secretMounts}, &s.testContainerKeepClient, nil, nil
 	}
 
 	if extraMounts != nil && len(extraMounts) > 0 {
@@ -715,7 +713,8 @@ func (s *TestSuite) TestFullRunHello(c *C) {
     "output_path": "/tmp",
     "priority": 1,
     "runtime_constraints": {"vcpus":1,"ram":1000000},
-    "state": "Locked"
+    "state": "Locked",
+    "output_storage_classes": ["default"]
 }`, nil, 0, func() {
 		c.Check(s.executor.created.Command, DeepEquals, []string{"echo", "hello world"})
 		c.Check(s.executor.created.Image, Equals, "sha256:d8309758b8fe2c81034ffc8a10c36460b77db7bc5e7b448c4e5b684f9d95a678")
@@ -730,7 +729,8 @@ func (s *TestSuite) TestFullRunHello(c *C) {
 	c.Check(s.api.CalledWith("container.exit_code", 0), NotNil)
 	c.Check(s.api.CalledWith("container.state", "Complete"), NotNil)
 	c.Check(s.api.Logs["stdout"].String(), Matches, ".*hello world\n")
-
+	c.Check(s.testDispatcherKeepClient.StorageClasses, DeepEquals, []string{"default"})
+	c.Check(s.testContainerKeepClient.StorageClasses, DeepEquals, []string{"default"})
 }
 
 func (s *TestSuite) TestRunAlreadyRunning(c *C) {
@@ -947,6 +947,29 @@ func (s *TestSuite) TestFullRunSetCwd(c *C) {
 	c.Check(s.api.Logs["stdout"].String(), Matches, ".*/bin\n")
 }
 
+func (s *TestSuite) TestFullRunSetOutputStorageClasses(c *C) {
+	s.fullRunHelper(c, `{
+    "command": ["pwd"],
+    "container_image": "`+arvadostest.DockerImage112PDH+`",
+    "cwd": "/bin",
+    "environment": {},
+    "mounts": {"/tmp": {"kind": "tmp"} },
+    "output_path": "/tmp",
+    "priority": 1,
+    "runtime_constraints": {},
+    "state": "Locked",
+    "output_storage_classes": ["foo", "bar"]
+}`, nil, 0, func() {
+		fmt.Fprintln(s.executor.created.Stdout, s.executor.created.WorkingDir)
+	})
+
+	c.Check(s.api.CalledWith("container.exit_code", 0), NotNil)
+	c.Check(s.api.CalledWith("container.state", "Complete"), NotNil)
+	c.Check(s.api.Logs["stdout"].String(), Matches, ".*/bin\n")
+	c.Check(s.testDispatcherKeepClient.StorageClasses, DeepEquals, []string{"foo", "bar"})
+	c.Check(s.testContainerKeepClient.StorageClasses, DeepEquals, []string{"foo", "bar"})
+}
+
 func (s *TestSuite) TestStopOnSignal(c *C) {
 	s.executor.runFunc = func() {
 		s.executor.created.Stdout.Write([]byte("foo\n"))
diff --git a/services/api/app/models/container.rb b/services/api/app/models/container.rb
index a844fbaf7..ddae45818 100644
--- a/services/api/app/models/container.rb
+++ b/services/api/app/models/container.rb
@@ -106,11 +106,11 @@ class Container < ArvadosModel
   end
 
   def self.full_text_searchable_columns
-    super - ["secret_mounts", "secret_mounts_md5", "runtime_token", "gateway_address"]
+    super - ["secret_mounts", "secret_mounts_md5", "runtime_token", "gateway_address", "output_storage_classes"]
   end
 
   def self.searchable_columns *args
-    super - ["secret_mounts_md5", "runtime_token", "gateway_address"]
+    super - ["secret_mounts_md5", "runtime_token", "gateway_address", "output_storage_classes"]
   end
 
   def logged_attributes
diff --git a/services/api/app/models/container_request.rb b/services/api/app/models/container_request.rb
index f47fff792..1de71102c 100644
--- a/services/api/app/models/container_request.rb
+++ b/services/api/app/models/container_request.rb
@@ -243,7 +243,7 @@ class ContainerRequest < ArvadosModel
   end
 
   def self.full_text_searchable_columns
-    super - ["mounts", "secret_mounts", "secret_mounts_md5", "runtime_token"]
+    super - ["mounts", "secret_mounts", "secret_mounts_md5", "runtime_token", "output_storage_classes"]
   end
 
   protected

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list