From 88f2730b487a73b12c09292a3a51c87c9ca39dbd Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Mon, 12 Jun 2023 20:19:52 +0000 Subject: [PATCH 1/2] 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 --- conformance/README.md | 2 +- conformance/setup.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/conformance/README.md b/conformance/README.md index 2dd922d6..bec0a325 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -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: diff --git a/conformance/setup.go b/conformance/setup.go index 6395c4b2..379e4850 100644 --- a/conformance/setup.go +++ b/conformance/setup.go @@ -310,7 +310,7 @@ func init() { runContentDiscoverySetup = true runContentManagementSetup = true skipEmptyLayerTest = false - deleteManifestBeforeBlobs = false + deleteManifestBeforeBlobs = true if os.Getenv(envVarTagName) != "" && os.Getenv(envVarManifestDigest) != "" && @@ -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) From 562d804bf09706befb2c60f524921b3aca19ae82 Mon Sep 17 00:00:00 2001 From: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com> Date: Wed, 21 Jun 2023 12:26:36 -0500 Subject: [PATCH 2/2] Update conformance/README.md Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com> --- conformance/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conformance/README.md b/conformance/README.md index bec0a325..a75ab4f4 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -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 (defaults to OCI_DELETE_MANIFEST_BEFORE_BLOBS=1 if not set) +export OCI_DELETE_MANIFEST_BEFORE_BLOBS=0 # defaults to OCI_DELETE_MANIFEST_BEFORE_BLOBS=1 if not set ``` Lastly, run the tests: