Skip to content

Commit

Permalink
fix: delete manifest before blobs by default (#423)
Browse files Browse the repository at this point in the history
* fix: delete manifest before blobs by default

Currently the conformance tests default to deleting manifests after
blobs, which leaves the manifest dangling. Furthermore, the same blob may be
referenced in many manifests.

AFAIK, no client does this.

So changing default behavior.

Signed-off-by: Ramkumar Chinchani <[email protected]>

* Update conformance/README.md

Signed-off-by: Josh Dolitsky <[email protected]>

---------

Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Josh Dolitsky <[email protected]>
Co-authored-by: Josh Dolitsky <[email protected]>
  • Loading branch information
rchincha and jdolitsky authored Jun 21, 2023
1 parent adeb3ac commit aef0f61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conformance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export OCI_TEST_CONTENT_MANAGEMENT=1
# Extra settings
export OCI_HIDE_SKIPPED_WORKFLOWS=0
export OCI_DEBUG=0
export OCI_DELETE_MANIFEST_BEFORE_BLOBS=0
export OCI_DELETE_MANIFEST_BEFORE_BLOBS=0 # defaults to OCI_DELETE_MANIFEST_BEFORE_BLOBS=1 if not set
```

Lastly, run the tests:
Expand Down
6 changes: 4 additions & 2 deletions conformance/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func init() {
runContentDiscoverySetup = true
runContentManagementSetup = true
skipEmptyLayerTest = false
deleteManifestBeforeBlobs = false
deleteManifestBeforeBlobs = true

if os.Getenv(envVarTagName) != "" &&
os.Getenv(envVarManifestDigest) != "" &&
Expand All @@ -323,7 +323,9 @@ func init() {
}

skipEmptyLayerTest, _ = strconv.ParseBool(os.Getenv(envVarPushEmptyLayer))
deleteManifestBeforeBlobs, _ = strconv.ParseBool(os.Getenv(envVarDeleteManifestBeforeBlobs))
if v, ok := os.LookupEnv(envVarDeleteManifestBeforeBlobs); ok {
deleteManifestBeforeBlobs, _ = strconv.ParseBool(v)
}
automaticCrossmountVal := ""
automaticCrossmountVal, runAutomaticCrossmountTest = os.LookupEnv(envVarAutomaticCrossmount)
automaticCrossmountEnabled, _ = strconv.ParseBool(automaticCrossmountVal)
Expand Down

0 comments on commit aef0f61

Please sign in to comment.