oras-project/artifacts-spec

Filtering and distribution-spec

Closed this issue · 5 comments

(Apologies in advance if this has already been discussed and resolved, if there are links to discussions where these have already been hashed out I'm happy to go read those instead)

I've read through the referrers spec proposal (this specific version, for future readers), and have some feedback I thought I'd share, with the goal of clarifying/generalizing the spec, and toward making it easier to propose and accept into distribution-spec when the time comes.


distribution-spec doesn't currently have any concept of filtering list results.

While I definitely agree that filtering is useful, especially since we expect potentially many artifacts referring to an image, and since we'd prefer to have one interface of that clearly specified for compatibility, I'd suggest it might be easier to put a pin filtering for now to remove one more area of conversation and potential disagreement, and come back to address it after the bulk of the proposal has been ironed out and accepted into distribution-spec.

This should also lead to less churn and work for you if there are other changes to artifact types suggested, since you won't have to update the filtering specification to match those changes.

I think many want to support better filtering, sorting, searching capabilities over time. The discussion has been to focus on MAY, enabling registries to opt-into the behavior, setting expectations the client MUST account for MAY:

The referrers api calls out filtering with the following text:

The /referrers API MAY provide for filtering of artifactTypes. Artifact clients MUST account for implementations that MAY NOT support filtering. Artifact clients MUST revert to client side filtering to determine which artifactTypes they will process.

Is the concern around MAY?

Adding context since this was done over a set of iterations - #4
Also Link header was specifically asked for #4 (comment)

Oops. - The above comment was for the pagination issue.

@imjasonh, the spec calls out MAY. Is there any other action here?

I'm fine with dropping this for now. Thanks for your feedback everyone. 👍