Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conformance test: tear down manifests before blobs #156

Closed
wants to merge 3 commits into from

Conversation

majewsky
Copy link
Contributor

@majewsky majewsky commented Jun 5, 2020

As explained in the added comments, "some registries" (i.e. my own implementation, Keppel https://github.com/sapcc/keppel) forbid deleting blobs that are still referenced by manifests. To do a proper cleanup in this case, the manifest needs to be deleted first.

The diff looks a bit weird, but I really just swapped the order of some paragraphs, pulling the manifest deletion to the top.

Copy link
Member

@jdolitsky jdolitsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@majewsky please see this issue for some context: #134

I think modifying this order will break the test for most other registries, so I think that either:

My own registry implementation, Keppel [1] forbids deleting blobs that
are still referenced by manifests. To do a proper cleanup in this case,
the manifest needs to be deleted first.

[1] https://github.com/sapcc/keppel

Signed-off-by: Stefan Majewsky <[email protected]>
@majewsky
Copy link
Contributor Author

majewsky commented Jun 8, 2020

This PR should be modified to switch the order based on the presence of some env var

Done.

Copy link
Member

@jdolitsky jdolitsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@majewsky looks good - either in this or a follow up PR, we should document OCI_DELETE_MANIFEST_BEFORE_BLOBS in the readme

Signed-off-by: Stefan Majewsky <[email protected]>
@majewsky
Copy link
Contributor Author

majewsky commented Jun 8, 2020

Documentation added.

conformance/01_pull_test.go Outdated Show resolved Hide resolved
@jdolitsky
Copy link
Member

@majewsky looks good. Last thing is the DCO check failed on your last commit. Can you amend the commit to contain signoff then we can merge?

Signed-off-by: Stefan Majewsky <[email protected]>
@jdolitsky
Copy link
Member

@majewsky - thanks for you patience, looks like the final commit had a different email in signed-off-by which might be causing an error: https://pullapprove.com/opencontainers/distribution-spec/pull-request/156/requirements/

@jzelinskie
Copy link
Member

jzelinskie commented Jul 9, 2020

LGTM

Approved with PullApprove

@vbatts vbatts mentioned this pull request Jul 9, 2020
mikebrow
mikebrow approved these changes Jul 9, 2020
mikebrow
mikebrow approved these changes Jul 9, 2020
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
see Vince's #170 rebase PR

@mikebrow mikebrow closed this in #170 Jul 9, 2020
mikebrow added a commit that referenced this pull request Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants