Support for referrers API
Support for refers API (5/8 failures)
Summary
These tests are failing because the new OCI spec includes support for the referrers API. The specificity of the failures are related to the following new spec requirements:
-
A registry MUST initially accept an otherwise valid manifest with a subject field that references a manifest that does not exist in the repository, allowing clients to push a manifest and referrers to that manifest in either order.
-
To fetch the list of referrers, perform a GET request to a path in the following format:
/v2/<name>/referrers/<digest>.<name>is the namespace of the repository, and<digest>is the digest of the manifest specified in the subject field. Assuming a repository is found, this request MUST return a 200 OK (regardless of if the digest exists or not) -
The registry SHOULD support filtering on
artifactType. To fetch the list of referrers with a filter, perform a GET request to a path in the following format:/v2/<name>/referrers/<digest>?artifactType=<mediaType>. If filtering is requested and applied, the response MUST include a headerOCI-Filters-Applied: artifactTypedenoting that anartifactTypefilter was applied. If multiple filters are applied, the header MUST contain a comma separated list of applied filters.
Failure logs
Failures
==============================================================================
•SDEBUG
==============================================================================
~~~ REQUEST ~~~
POST /v2/oci-conformance/repo-a/blobs/uploads/ HTTP/1.1
HOST : localhost:5000
HEADERS:
User-Agent: distribution-spec-conformance-tests
BODY :
***** NO CONTENT *****
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 202 Accepted
PROTO : HTTP/1.1
RECEIVED AT : 2024-02-15T23:51:22.149062215Z
TIME DURATION: 7.50611ms
HEADERS :
Content-Length: 0
Date: Thu, 15 Feb 2024 23:51:22 GMT
Docker-Distribution-Api-Version: registry/2.0
Docker-Upload-Uuid: bffb5cce-92b8-40a0-9ba2-f2e69f630c53
Location: http://localhost:5000/v2/oci-conformance/repo-a/blobs/uploads/bffb5cce-92b8-40a0-9ba2-f2e69f630c53?_state=949vq9qH9S1A416qnfjjJosSU7p2NARBwRA2ESRPexN7Ik5hbWUiOiJvY2ktY29uZm9ybWFuY2UvcmVwby1hIiwiVVVJRCI6ImJmZmI1Y2NlLTkyYjgtNDBhMC05YmEyLWYyZTY5ZjYzMGM1MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyNC0wMi0xNVQyMzo1MToyMi4xNDIwMjI4NjRaIn0%3D
Range: 0-0
BODY :
==============================================================================
DEBUG
==============================================================================
~~~ REQUEST ~~~
PUT /v2/oci-conformance/repo-a/blobs/uploads/bffb5cce-92b8-40a0-9ba2-f2e69f630c53?_state=949vq9qH9S1A416qnfjjJosSU7p2NARBwRA2ESRPexN7Ik5hbWUiOiJvY2ktY29uZm9ybWFuY2UvcmVwby1hIiwiVVVJRCI6ImJmZmI1Y2NlLTkyYjgtNDBhMC05YmEyLWYyZTY5ZjYzMGM1MyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyNC0wMi0xNVQyMzo1MToyMi4xNDIwMjI4NjRaIn0%3D&digest=sha256%3A44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a HTTP/1.1
HOST : localhost:5000
HEADERS:
Content-Length: 2
Content-Type: application/octet-stream
User-Agent: distribution-spec-conformance-tests
BODY :
***** BODY IS byte(s) (size - 2) *****
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 201 Created
PROTO : HTTP/1.1
RECEIVED AT : 2024-02-15T23:51:22.175367507Z
TIME DURATION: 26.093683ms
HEADERS :
Content-Length: 0
Date: Thu, 15 Feb 2024 23:51:22 GMT
Docker-Content-Digest: sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
Docker-Distribution-Api-Version: registry/2.0
Location: http://localhost:5000/v2/oci-conformance/repo-a/blobs/sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
BODY :
==============================================================================
DEBUG
==============================================================================
~~~ REQUEST ~~~
POST /v2/oci-conformance/repo-a/blobs/uploads/ HTTP/1.1
HOST : localhost:5000
HEADERS:
User-Agent: distribution-spec-conformance-tests
BODY :
***** NO CONTENT *****
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 202 Accepted
PROTO : HTTP/1.1
RECEIVED AT : 2024-02-15T23:51:22.183431888Z
TIME DURATION: 7.870031ms
HEADERS :
Content-Length: 0
Date: Thu, 15 Feb 2024 23:51:22 GMT
Docker-Distribution-Api-Version: registry/2.0
Docker-Upload-Uuid: bed3f331-1c1e-4e54-8d3a-076c03caff33
Location: http://localhost:5000/v2/oci-conformance/repo-a/blobs/uploads/bed3f331-1c1e-4e54-8d3a-076c03caff33?_state=10zpTFLT-7FJzBqNvBI2GJnO6sN0ZHQn6nPIVHvUfRZ7Ik5hbWUiOiJvY2ktY29uZm9ybWFuY2UvcmVwby1hIiwiVVVJRCI6ImJlZDNmMzMxLTFjMWUtNGU1NC04ZDNhLTA3NmMwM2NhZmYzMyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyNC0wMi0xNVQyMzo1MToyMi4xNzYyODU5MjhaIn0%3D
Range: 0-0
BODY :
==============================================================================
DEBUG
==============================================================================
~~~ REQUEST ~~~
PUT /v2/oci-conformance/repo-a/blobs/uploads/bed3f331-1c1e-4e54-8d3a-076c03caff33?_state=10zpTFLT-7FJzBqNvBI2GJnO6sN0ZHQn6nPIVHvUfRZ7Ik5hbWUiOiJvY2ktY29uZm9ybWFuY2UvcmVwby1hIiwiVVVJRCI6ImJlZDNmMzMxLTFjMWUtNGU1NC04ZDNhLTA3NmMwM2NhZmYzMyIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAyNC0wMi0xNVQyMzo1MToyMi4xNzYyODU5MjhaIn0%3D&digest=sha256%3Aee29d2e91da0e5dbf6536f5b369148a83ef59b0ce96e49da65dd6c25eb1fa44f HTTP/1.1
HOST : localhost:5000
HEADERS:
Content-Length: 33
Content-Type: application/octet-stream
User-Agent: distribution-spec-conformance-tests
BODY :
***** BODY IS byte(s) (size - 33) *****
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 201 Created
PROTO : HTTP/1.1
RECEIVED AT : 2024-02-15T23:51:22.210185391Z
TIME DURATION: 26.313653ms
HEADERS :
Content-Length: 0
Date: Thu, 15 Feb 2024 23:51:22 GMT
Docker-Content-Digest: sha256:ee29d2e91da0e5dbf6536f5b369148a83ef59b0ce96e49da65dd6c25eb1fa44f
Docker-Distribution-Api-Version: registry/2.0
Location: http://localhost:5000/v2/oci-conformance/repo-a/blobs/sha256:ee29d2e91da0e5dbf6536f5b369148a83ef59b0ce96e49da65dd6c25eb1fa44f
BODY :
==============================================================================
DEBUG
==============================================================================
~~~ REQUEST ~~~
PUT /v2/oci-conformance/repo-a/manifests/sha256:18f1c6c0c77f769caf0d4dcc8dff4bc5856449a7740ef53384087c5d5afeec0e HTTP/1.1
HOST : localhost:5000
HEADERS:
Content-Type: application/vnd.oci.image.manifest.v1+json
User-Agent: distribution-spec-conformance-tests
BODY :
"ewoJInNjaGVtYVZlcnNpb24iOiAyLAoJIm1lZGlhVHlwZSI6ICJhcHBsaWNhdGlvbi92bmQub2NpLmltYWdlLm1hbmlmZXN0LnYxK2pzb24iLAoJImNvbmZpZyI6IHsKCQkibWVkaWFUeXBlIjogImFwcGxpY2F0aW9uL3ZuZC5uaGwucGVhbnV0LmJ1dHRlci5iYWdlbCIsCgkJImRpZ2VzdCI6ICJzaGEyNTY6ZWUyOWQyZTkxZGEwZTVkYmY2NTM2ZjViMzY5MTQ4YTgzZWY1OWIwY2U5NmU0OWRhNjVkZDZjMjVlYjFmYTQ0ZiIsCgkJInNpemUiOiAzMywKCQkibmV3VW5zcGVjaWZpZWRGaWVsZCI6IG51bGwKCX0sCgkibGF5ZXJzIjogWwoJCXsKCQkJIm1lZGlhVHlwZSI6ICJhcHBsaWNhdGlvbi92bmQub2NpLmVtcHR5LnYxK2pzb24iLAoJCQkiZGlnZXN0IjogInNoYTI1Njo0NDEzNmZhMzU1YjM2NzhhMTE0NmFkMTZmN2U4NjQ5ZTk0ZmI0ZmMyMWZlNzdlODMxMGMwNjBmNjFjYWFmZjhhIiwKCQkJInNpemUiOiAyLAoJCQkibmV3VW5zcGVjaWZpZWRGaWVsZCI6IG51bGwKCQl9CgldLAoJInN1YmplY3QiOiB7CgkJIm1lZGlhVHlwZSI6ICJhcHBsaWNhdGlvbi92bmQub2NpLmltYWdlLm1hbmlmZXN0LnYxK2pzb24iLAoJCSJkaWdlc3QiOiAic2hhMjU2OjRlMTRiOGRiZTg2YWVlMmQ4M2JiYjU5MWQ3OWMxZGQ5MmY0NjVkNTRjYWYyNjUwYjJmYTI0YTMwNjVmYmY2Y2IiLAoJCSJzaXplIjogNzE0LAoJCSJuZXdVbnNwZWNpZmllZEZpZWxkIjogbnVsbAoJfSwKCSJhbm5vdGF0aW9ucyI6IHsKCQkib3JnLm9wZW5jb250YWluZXJzLmNvbmZvcm1hbmNlLnRlc3QiOiAidGVzdCBjb25maWcgYSIKCX0KfQ=="
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 400 Bad Request
PROTO : HTTP/1.1
RECEIVED AT : 2024-02-15T23:51:22.254617655Z
TIME DURATION: 44.133464ms
HEADERS :
Content-Length: 166
Content-Type: application/json
Date: Thu, 15 Feb 2024 23:51:22 GMT
Docker-Distribution-Api-Version: registry/2.0
BODY :
{
"errors": [
{
"code": "MANIFEST_BLOB_UNKNOWN",
"message": "blob unknown to registry",
"detail": "sha256:4e14b8dbe86aee2d83bbb591d79c1dd92f465d54caf2650b2fa24a3065fbf6cb"
}
]
}
==============================================================================
------------------------------
• [FAILED] [0.114 seconds]
OCI Distribution Conformance Tests Content Discovery Setup [It] References setup
/builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:88
[FAILED] Expected
<int>: 400
to be <
<int>: 300
In [It] at: /builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:131 @ 02/15/24 23:51:22.254
------------------------------
==============================================================================
•DEBUG
==============================================================================
~~~ REQUEST ~~~
GET /v2/oci-conformance/repo-a/referrers/sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 HTTP/1.1
HOST : localhost:5000
HEADERS:
User-Agent: distribution-spec-conformance-tests
BODY :
***** NO CONTENT *****
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 404 Not Found
PROTO : HTTP/1.1
RECEIVED AT : 2024-02-15T23:51:22.368072975Z
TIME DURATION: 394.39µs
HEADERS :
Content-Length: 19
Content-Type: text/plain; charset=utf-8
Date: Thu, 15 Feb 2024 23:51:22 GMT
X-Content-Type-Options: nosniff
BODY :
404 page not found
==============================================================================
------------------------------
• [FAILED] [0.001 seconds]
OCI Distribution Conformance Tests Content Discovery Test content discovery endpoints (listing references) [It] GET request to nonexistent blob should result in empty 200 response
/builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:300
[FAILED] Expected
<int>: 404
to equal
<int>: 200
In [It] at: /builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:306 @ 02/15/24 23:51:22.368
------------------------------
DEBUG
==============================================================================
~~~ REQUEST ~~~
GET /v2/oci-conformance/repo-a/referrers/sha256:4e14b8dbe86aee2d83bbb591d79c1dd92f465d54caf2650b2fa24a3065fbf6cb HTTP/1.1
HOST : localhost:5000
HEADERS:
User-Agent: distribution-spec-conformance-tests
BODY :
***** NO CONTENT *****
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 404 Not Found
PROTO : HTTP/1.1
RECEIVED AT : 2024-02-15T23:51:22.371977035Z
TIME DURATION: 1.24797ms
HEADERS :
Content-Length: 19
Content-Type: text/plain; charset=utf-8
Date: Thu, 15 Feb 2024 23:51:22 GMT
X-Content-Type-Options: nosniff
BODY :
404 page not found
==============================================================================
• [FAILED] [0.002 seconds]
OCI Distribution Conformance Tests Content Discovery Test content discovery endpoints (listing references) [It] GET request to existing blob should yield 200
/builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:315
[FAILED] Expected
<int>: 404
to equal
<int>: 200
In [It] at: /builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:321 @ 02/15/24 23:51:22.372
------------------------------
DEBUG
==============================================================================
~~~ REQUEST ~~~
GET /v2/oci-conformance/repo-a/referrers/sha256:4e14b8dbe86aee2d83bbb591d79c1dd92f465d54caf2650b2fa24a3065fbf6cb?artifactType=application%2Fvnd.nhl.peanut.butter.bagel HTTP/1.1
HOST : localhost:5000
HEADERS:
User-Agent: distribution-spec-conformance-tests
BODY :
***** NO CONTENT *****
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 404 Not Found
PROTO : HTTP/1.1
RECEIVED AT : 2024-02-15T23:51:22.373440975Z
TIME DURATION: 372.84µs
HEADERS :
Content-Length: 19
Content-Type: text/plain; charset=utf-8
Date: Thu, 15 Feb 2024 23:51:22 GMT
X-Content-Type-Options: nosniff
BODY :
404 page not found
==============================================================================
• [FAILED] [0.001 seconds]
OCI Distribution Conformance Tests Content Discovery Test content discovery endpoints (listing references) [It] GET request to existing blob with filter should yield 200
/builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:335
[FAILED] Expected
<int>: 404
to equal
<int>: 200
In [It] at: /builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:342 @ 02/15/24 23:51:22.373
------------------------------
DEBUG
==============================================================================
~~~ REQUEST ~~~
GET /v2/oci-conformance/repo-a/referrers/sha256:3c240fe1a4f4ed953a8267ddcf5c8a29407bffda08c2365d8b8dfaa36c550f66 HTTP/1.1
HOST : localhost:5000
HEADERS:
User-Agent: distribution-spec-conformance-tests
BODY :
***** NO CONTENT *****
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 404 Not Found
PROTO : HTTP/1.1
RECEIVED AT : 2024-02-15T23:51:22.374724345Z
TIME DURATION: 351.19µs
HEADERS :
Content-Length: 19
Content-Type: text/plain; charset=utf-8
Date: Thu, 15 Feb 2024 23:51:22 GMT
X-Content-Type-Options: nosniff
BODY :
404 page not found
==============================================================================
• [FAILED] [0.001 seconds]
OCI Distribution Conformance Tests Content Discovery Test content discovery endpoints (listing references) [It] GET request to missing manifest should yield 200
/builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:367
[FAILED] Expected
<int>: 404
to equal
<int>: 200
In [It] at: /builds/gitlab-org/container-registry/distribution-spec/conformance/03_discovery_test.go:373 @ 02/15/24 23:51:22.375
------------------------------
Notes
-
Before enabling a referrers API all registries must conform to the requirements highlighted in https://github.com/opencontainers/distribution-spec/blob/main/spec.md#enabling-the-referrers-api
-
There is extra guidance provided in the spec on what clients must do when contacting registries that do not support the referrers API yet in the spec