You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the remote.Referrers function fetches a list of referrers for a manifest, it first attempts to make a request to the referrers API endpoint. If that fails, it falls back to making a request to the manifests endpoint using the referrers tag schema.
While using this function with a registry that does not support the referrers API endpoint, I found the function was unexpectedly failing. Digging into the error, I found the registry was returning a 406 instead of a 404 when the function attempted to make a request to the referrers endpoint. Adding http.StatusNotAcceptable to the list of handled status codes in transport.CheckError here fixed the problem for me.
Would it be possible to add http.StatusNotAcceptable to the list of status codes handled by transport.CheckError? Since it is a 4XX error, the Referrers is able to fallback and try the manifests API endpoint.
The text was updated successfully, but these errors were encountered:
I put this here, even though it is related but not really...
Playing with the new GitHub attestation api and modified sigstore policy controller, I got an issue with Google Artifact Registry when retrieving the referrers. (OCI 1.0, but redirect to authentication page when referrer api call is made, so response is 200 + content text/html)
As the spec is clear the content type must be application/vnd.oci.image.index.v1+json I created a PR #1968
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.
When the remote.Referrers function fetches a list of referrers for a manifest, it first attempts to make a request to the
referrers
API endpoint. If that fails, it falls back to making a request to themanifests
endpoint using the referrers tag schema.While using this function with a registry that does not support the
referrers
API endpoint, I found the function was unexpectedly failing. Digging into the error, I found the registry was returning a 406 instead of a 404 when the function attempted to make a request to thereferrers
endpoint. Addinghttp.StatusNotAcceptable
to the list of handled status codes in transport.CheckError here fixed the problem for me.Would it be possible to add
http.StatusNotAcceptable
to the list of status codes handled by transport.CheckError? Since it is a 4XX error, theReferrers
is able to fallback and try themanifests
API endpoint.The text was updated successfully, but these errors were encountered: