[ARVADOS] updated: e6986ed88126f61ecad0f557c78981961f901044

Git user git at public.curoverse.com
Wed Feb 1 11:51:09 EST 2017


Summary of changes:
 sdk/go/arvados/container.go           | 15 ++++++++-------
 services/crunch-run/crunchrun.go      | 16 +++-------------
 services/crunch-run/crunchrun_test.go |  2 +-
 3 files changed, 12 insertions(+), 21 deletions(-)

       via  e6986ed88126f61ecad0f557c78981961f901044 (commit)
      from  5caa73a3bf5a17241bf908c75aa2c3aa427289d1 (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 e6986ed88126f61ecad0f557c78981961f901044
Author: radhika <radhika at curoverse.com>
Date:   Wed Feb 1 11:50:42 2017 -0500

    9397: Add ExcludeFromOutput to Mount struct.

diff --git a/sdk/go/arvados/container.go b/sdk/go/arvados/container.go
index 61c14ea..36d9af1 100644
--- a/sdk/go/arvados/container.go
+++ b/sdk/go/arvados/container.go
@@ -19,13 +19,14 @@ type Container struct {
 
 // Mount is special behavior to attach to a filesystem path or device.
 type Mount struct {
-	Kind             string      `json:"kind"`
-	Writable         bool        `json:"writable"`
-	PortableDataHash string      `json:"portable_data_hash"`
-	UUID             string      `json:"uuid"`
-	DeviceType       string      `json:"device_type"`
-	Path             string      `json:"path"`
-	Content          interface{} `json:"content"`
+	Kind              string      `json:"kind"`
+	Writable          bool        `json:"writable"`
+	PortableDataHash  string      `json:"portable_data_hash"`
+	UUID              string      `json:"uuid"`
+	DeviceType        string      `json:"device_type"`
+	Path              string      `json:"path"`
+	Content           interface{} `json:"content"`
+	ExcludeFromOutput bool        `json:"exclude_from_output"`
 }
 
 // RuntimeConstraints specify a container's compute resources (RAM,
diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go
index 2bbd3d9..fa8ee13 100644
--- a/services/crunch-run/crunchrun.go
+++ b/services/crunch-run/crunchrun.go
@@ -674,21 +674,11 @@ func (runner *ContainerRunner) CaptureOutput() error {
 			continue
 		}
 
-		if strings.Index(bindSuffix, "/") != 0 {
-			return fmt.Errorf("Expected bind to be of the format '%v/*' but found: %v", runner.Container.OutputPath, bind)
+		if strings.HasPrefix(bindSuffix, "/") == false {
+			bindSuffix = "/" + bindSuffix
 		}
 
-		jsondata, err := json.Marshal(mnt.Content)
-		if err != nil {
-			return fmt.Errorf("While marshal of mount content: %v", err)
-		}
-		var content map[string]interface{}
-		err = json.Unmarshal(jsondata, &content)
-		if err != nil {
-			return fmt.Errorf("While unmarshal of mount content: %v", err)
-		}
-
-		if content["exclude_from_output"] == true {
+		if mnt.ExcludeFromOutput == true {
 			continue
 		}
 
diff --git a/services/crunch-run/crunchrun_test.go b/services/crunch-run/crunchrun_test.go
index 35ef013..51549ae 100644
--- a/services/crunch-run/crunchrun_test.go
+++ b/services/crunch-run/crunchrun_test.go
@@ -1134,7 +1134,7 @@ func (s *TestSuite) TestStdoutWithExcludeFromOutputMountPointUnderOutputDir(c *C
         "/tmp": {"kind": "tmp"},
         "/tmp/foo": {"kind": "collection",
                      "portable_data_hash": "a3e8f74c6f101eae01fa08bfb4e49b3a+54",
-                     "content": {"exclude_from_output": true}
+                     "exclude_from_output": true
         },
         "stdout": {"kind": "file", "path": "/tmp/a/b/c.out"}
     },

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list