Merge branch '17696-pysdk-default-storage-class' into main. Refs #17696
authorLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 27 Aug 2021 15:22:47 +0000 (12:22 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 27 Aug 2021 15:22:47 +0000 (12:22 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

build/run-build-packages-one-target.sh
lib/config/export.go
lib/crunchrun/singularity.go

index 81aac9c616c11ea2894482b240c08495a577511d..7cb2b5b2c35d52b580b0f77441e264648cc921db 100755 (executable)
@@ -110,6 +110,7 @@ while [ $# -gt 0 ]; do
                 echo >&2 "FATAL: --build-version '$2' is invalid, must match pattern ^[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+|)(~rc[0-9]+|~dev[0-9]+|)-[0-9]+$"
                 exit 1
             else
+               [[ "$2" =~ (.*)-(.*) ]]
                 ARVADOS_BUILDING_VERSION="${BASH_REMATCH[1]}"
                 ARVADOS_BUILDING_ITERATION="${BASH_REMATCH[2]}"
             fi
index 065011cc2e8d31d2fb133f6546a32a8f506861b2..92e2d7b4d522e2b1a07b8a5602f3318f04720645 100644 (file)
@@ -105,7 +105,7 @@ var whitelist = map[string]bool{
        "Collections.PreserveVersionIfIdle":                   true,
        "Collections.S3FolderObjects":                         true,
        "Collections.TrashSweepInterval":                      false,
-       "Collections.TrustAllContent":                         false,
+       "Collections.TrustAllContent":                         true,
        "Collections.WebDAVCache":                             false,
        "Collections.KeepproxyPermission":                     false,
        "Collections.WebDAVPermission":                        false,
index 741f542454e470ede35cc6f682c64c8a9b1bbf09..61fecad0a13c06664890a9cf2dfffb8346b7a47e 100644 (file)
@@ -101,7 +101,7 @@ func (e *singularityExecutor) checkImageCache(dockerImageID string, container ar
        if len(cl.Items) == 1 {
                imageCollection = cl.Items[0]
        } else {
-               collectionName := collectionName + " " + time.Now().UTC().Format(time.RFC3339)
+               collectionName := "converting " + collectionName
                exp := time.Now().Add(24 * 7 * 2 * time.Hour)
                err = containerClient.RequestAndDecode(&imageCollection,
                        arvados.EndpointCollectionCreate.Method,
@@ -112,6 +112,7 @@ func (e *singularityExecutor) checkImageCache(dockerImageID string, container ar
                                        "name":       collectionName,
                                        "trash_at":   exp.UTC().Format(time.RFC3339),
                                },
+                               "ensure_unique_name": true,
                        })
                if err != nil {
                        return nil, fmt.Errorf("error creating '%v' collection: %s", collectionName, err)
@@ -141,6 +142,12 @@ func (e *singularityExecutor) LoadImage(dockerImageID string, imageTarballPath s
        }
 
        if _, err := os.Stat(imageFilename); os.IsNotExist(err) {
+               // Make sure the docker image is readable, and error
+               // out if not.
+               if _, err := os.Stat(imageTarballPath); err != nil {
+                       return err
+               }
+
                e.logf("building singularity image")
                // "singularity build" does not accept a
                // docker-archive://... filename containing a ":" character,