Closed sstrollo closed 9 months ago
There are two separate artifacts pushed with the testRefArtifactTypeA
artifact type value, refsManifestAConfigArtifact
, and refsManifestALayerArtifact
. One has the artifactType
explicitly set, the other has it inferred from the config.mediaType
value. It looks like you didn't pull up the config media type with the artifactType isn't explicitly set.
I'm also confused that you have the platform
set in the responses. Are you attempting to parse the config
blob for artifacts with unknown media types?
Ahh - thank you! I had a feeling that I had missed something - will fix.
I'm also confused that you have the platform set in the responses. Are you attempting to parse the config blob for artifacts with unknown media types?
Well, yes, I am a bit unsure about that one too. My reasoning was like this, the Listing referrers section says that the registry should return an "image index containing a list of descriptors". And the in the image spec repo, it says "Descriptors pointing to application/vnd.oci.image.manifest.v1+json SHOULD include the extended field platform". So I assumed, since the "mediaType" is "application/vnd.oci.image.manifest.v1+json" (even thought the artifactType is "application/vnd.nhl.peanut.butter.bagel") that I was supposed to at least try to figure out the platform (and yes, I do it by parsing the config blob)...
You will likely enjoy https://github.com/opencontainers/image-spec/issues/1131 😁
Indeed - I guess I just made his point :)
Thanks for the help and the pointers @sudo-bmitch and @tianon - much appreciated. I'm closing the issue, as it is obviously my bug and not a problem with the test.
Hi,
I have implemented an embedded registry that is part of our product here at Avassa, and I have always run the OCI conformance test to make sure it complies. But I hadn't implemented the referrers API, so I was running the
v1.1.0-rc1
release up until now.Last week I implemented the referrers API, and tried to up the test to the conformance test to first the
v1.1.0-rc3
, and then the latest main, but I still failed one test, the "GET request to existing blob with filter should yield 200", specifically the number of descriptors returned (03_discovery_test.go
line340
). Specifically, the test expects there to be two descriptors, and my implementation returned only one. At this point I am a bit unsure if I've understood the spec completely, or if there is something wrong with the test. Here is output from a run from my implementation:First the unfiltered referrers GET, "GET request to existing blob should yield 200"
The next test does a filtered get, with the filter set to
artifactType=vnd.nhl.peanut.butter.bagel
, again output from my implementation:First of all, did I understand it right that I'm supposed to return
OCI-Filters-Applied: artifactType
(and notOCI-Filters-Applied: application/vnd.nhl.peanut.butter.bagel
)? Second, isn'tsha256:6e54201a24c7de9de03f2dd1c22c56a94d7a6a1b63c873236e4eb94a2bcbb82f
the only manifest that matches? If that is the case, then I suspect the following should be done to the test:Or it could be that what I returned in the first GET was wrong, has anyone else implemented this?
Thanks,
/Sebastian