-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add referrers fetcher to remotes #7644
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
Conversation
|
Skipping CI for Draft Pull Request. |
724b435 to
7b349f3
Compare
| ocispec "github.com/opencontainers/image-spec/specs-go/v1" | ||
| ) | ||
|
|
||
| func (r dockerFetcher) FetchReferrers(ctx context.Context, dgst digest.Digest, artifactTypes ...string) (io.ReadCloser, ocispec.Descriptor, error) { |
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.
This is pretty low-level access to referrers info. Should this provide a higher level view, or be wrapped by something else? It also seems kind of weird to return a descriptor here, doesn't look like it's doing much.
- Paging
- Ensuring filtering is applied (if registry does not support filtering, or if referrers tag schema was used)
- Parsing the output to return a set of descriptors rather than an
io.ReadCloser
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.
I'm thinking artifactTypes ...string could change to a more generic application including pages if needed. I don't think paging is a good API for referrers though and whether we should support it. Descriptor annotations are good for extra context though (paging, which endpoint, whether filters were applied, etc)
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.
I think not supporting paging for now is fine, we can always revisit later. Given that filtering by artifact type is not guaranteed to be supported, it would be nice if we provided client-side filtering here as a fallback.
remotes/docker/referrers_test.go
Outdated
| func (ti testIndex) OCIManifest() []byte { | ||
| manifest := ocispec.Index{ | ||
| Versioned: specs.Versioned{ | ||
| SchemaVersion: 1, |
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.
Did you mean 2 ?
Adds an implementation of the referrers API targeted for OCI distribution-spec 1.1. Signed-off-by: Derek McGowan <[email protected]>
7b349f3 to
a67a399
Compare
Add the new `enable_referrers` option in config.toml, to enables trying to fetch the nydus image associated with the OCI image and run it. This feature relies on the support of OCI reference type. Currently, only Harbor (>=v2.8) registry and ORAS registry support this. Additionally, we need to rely on containerd's referrer fetcher interface, related links: containerd/containerd#7644 https://oras.land/cli/6_reference_types/ Signed-off-by: Yan Song <[email protected]>
Add the new `enable_referrers` option in config.toml, to enables trying to fetch the nydus image associated with the OCI image and run it. This feature relies on the support of OCI reference type. Currently, only Harbor (>=v2.8) registry and ORAS registry support this. Additionally, we need to rely on containerd's referrer fetcher interface, related links: containerd/containerd#7644 https://oras.land/cli/6_reference_types/ Signed-off-by: Yan Song <[email protected]>
Add the new `enable_referrers` option in config.toml, to enables trying to fetch the nydus image associated with the OCI image and run it. This feature relies on the support of OCI reference type. Currently, only Harbor (>=v2.8) registry and ORAS registry support this. Additionally, we need to rely on containerd's referrer fetcher interface, related links: containerd/containerd#7644 https://oras.land/cli/6_reference_types/ Signed-off-by: Yan Song <[email protected]>
Add the new `enable_referrers` option in config.toml, to enables trying to fetch the nydus image associated with the OCI image and run it. This feature relies on the support of OCI reference type. Currently, only Harbor (>=v2.8) registry and ORAS registry support this. Additionally, we need to rely on containerd's referrer fetcher interface, related links: containerd/containerd#7644 https://oras.land/cli/6_reference_types/ Signed-off-by: Yan Song <[email protected]>
Add the new `enable_referrers` option in config.toml, to enables trying to fetch the nydus image associated with the OCI image and run it. This feature relies on the support of OCI reference type. Currently, only Harbor (>=v2.8) registry and ORAS registry support this. Additionally, we need to rely on containerd's referrer fetcher interface, related links: containerd/containerd#7644 https://oras.land/cli/6_reference_types/ Signed-off-by: Yan Song <[email protected]>
Add the new `enable_referrers` option in config.toml, to enables trying to fetch the nydus image associated with the OCI image and run it. This feature relies on the support of OCI reference type. Currently, only Harbor (>=v2.8) registry and ORAS registry support this. Additionally, we need to rely on containerd's referrer fetcher interface, related links: containerd/containerd#7644 https://oras.land/cli/6_reference_types/ Signed-off-by: Yan Song <[email protected]>
Add the new `enable_referrers` option in config.toml, to enables trying to fetch the nydus image associated with the OCI image and run it. This feature relies on the support of OCI reference type. Currently, only Harbor (>=v2.8) registry and ORAS registry support this. Additionally, we need to rely on containerd's referrer fetcher interface, related links: containerd/containerd#7644 https://oras.land/cli/6_reference_types/ Signed-off-by: Yan Song <[email protected]>
Add the new `enable_referrers` option in config.toml, to enables trying to fetch the nydus image associated with the OCI image and run it. This feature relies on the support of OCI reference type. Currently, only Harbor (>=v2.8) registry and ORAS registry support this. Additionally, we need to rely on containerd's referrer fetcher interface, related links: containerd/containerd#7644 https://oras.land/cli/6_reference_types/ Signed-off-by: Yan Song <[email protected]>
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
This PR is stale because it has been open 90 days with no activity. This PR will be closed in 7 days unless new comments are made or the stale label is removed. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
Adds an implementation of the referrers API targeted for OCI distribution-spec 1.1.
Note: The draft spec specifies that registries MUST return all referrers, even if that list grows beyond a useful size. To accommodate large list there is pagination. The pagination doesn't fit well into our API or storage model but we should figure out something there.