Delete request to manifest tag should return 202, unless tag deletion is disallowed (400/405)
Context
Related to &10345 (closed).
Problem
After adding OCI conformance tests to the CI pipeline, we have identified this failure:
------------------------------
• Failure [0.009 seconds]
OCI Distribution Conformance Tests
/builds/gitlab-org/container-registry/distribution-spec/conformance/00_conformance_suite_test.go:12
Content Management
/builds/gitlab-org/container-registry/distribution-spec/conformance/04_management_test.go:13
Manifest delete
/builds/gitlab-org/container-registry/distribution-spec/conformance/04_management_test.go:86
DELETE request to manifest tag should return 202, unless tag deletion is disallowed (400/405) [It]
/builds/gitlab-org/container-registry/distribution-spec/conformance/04_management_test.go:87
Expected
<string>: DIGEST_INVALID
to equal
<string>: UNSUPPORTED
/builds/gitlab-org/container-registry/distribution-spec/conformance/04_management_test.go:101
------------------------------
This is due to the fact that the OCI Distribution Spec v1 has introduced a tag delete functionality under the /v2/<name>/manifests/<tag>
endpoint, which we don't support. We added support for tag deletes way before, but we did so using the /v2/<name>/tags/reference/<reference>
endpoint.
Considering this, we should:
-
Add support for tag deletion under the DELETE /v2/<name>/manifests/<tag>
endpoint, replicating what we already do inDELETE /v2/<name>/tags/reference/<reference>
; -
Deprecate support for the DELETE /v2/<name>/tags/reference/<reference>
endpoint; -
Raise an issue so that GitLab Rails starts using DELETE /v2/<name>/manifests/<tag>
instead ofDELETE /v2/<name>/tags/reference/<reference>
; -
Raise an issue to remove the DELETE /v2/<name>/tags/reference/<reference>
endpoint in %17.0, marking it as blocked by the previous issue.
https://gitlab.com/gitlab-org/container-registry/-/jobs/4803030807