-
Notifications
You must be signed in to change notification settings - Fork 202
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 tests: delete emptylayer manifest too #307
Conformance tests: delete emptylayer manifest too #307
Conversation
Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran this changeset against bundlebar, and failing with:
~~~ RESPONSE ~~~
STATUS : 400 Bad Request
RECEIVED AT : 2021-12-01T11:05:28.706046-06:00
TIME DURATION: 31.481292ms
HEADERS :
Connection: keep-alive
Content-Length: 94
Content-Type: application/json; charset=utf-8
Date: Wed, 01 Dec 2021 17:05:28 GMT
Server: bundle.bar
X-Content-Type-Options: nosniff
X-Request-Id: 778b424b-7721-46ef-9b29-7554206e500d
BODY :
{
"errors": [
{
"code": "UNSUPPORTED",
"message": "deletion by tag is not supported",
"detail": null
}
]
}
I beilieve we need to allow that if the delete by tag returns 400, it is a UNSUPPORTED
error.
Similar to what is done in lines 97-102 here:
if resp.StatusCode() == http.StatusBadRequest { |
To work around spec's manifest by tag deletion being optional. Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
It seems like a more appropriate solution would be to delete that manifest by a digest, because we still want it to be gone to be free of dependencies, see 40b4c03. Also, what is a "bundlebar" and how can I run the conformance tests against it? |
@jdolitsky would you mind giving this a look once more? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
deleteManifest(client.NewRequest(reggie.DELETE, "/v2/<name>/manifests/<digest>", | ||
reggie.WithDigest(emptyLayerManifestDigest))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a condition on this second delete, checking whether skipEmptyLayerTest
is false before running it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #421 for while this will be a bigger issue going forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have fixed this in #421 since hitting this issue there as well.
@@ -330,21 +330,28 @@ var test02Push = func() { | |||
}) | |||
|
|||
g.Context("Teardown", func() { | |||
deleteManifest := func(req *reggie.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not move this into setup.go or a utils.go/common.go
Other tests could use this too.
closing as outdated, will address as we make further updates in conformance in the coming ~ week |
Otherwise the
Delete config blob created in tests
step will fail (even when usingOCI_DELETE_MANIFEST_BEFORE_BLOBS=1
), because the configuration blob that it deletes is also referenced by the emptylayer manifest:distribution-spec/conformance/setup.go
Lines 256 to 263 in 7be5e85