-
Notifications
You must be signed in to change notification settings - Fork 216
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
Add optional tagType query param to tags list endpoint #568
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Josh Dolitsky <[email protected]>
"this is considered an anti-pattern" seems like a pretty good reason not to add even more functionality supporting this in the spec, right? Especially given the long tail of adoption? |
That's a fair point. However, specifically in the case of tags falling into this "digest" category, we're only seeing the number of these tags grow vs. slow down/migrating to use referrers. |
From discussion, alternative:
|
If implementers are resource constrained on adding referrers, it seems very unlikely for something like this to get implemented either. FWIW, Docker Hub does have referrers on the roadmap, and would not likely prioritize this ahead of that. |
What about cosign style tags with a |
Fair point. I do think that depends. There was further discussion on the call today that there are other use cases for filtering tags unrelated to referrers-related behaviour:
Yes, the |
I agree that other types of tag listing would be useful, but that seems much greater in scope. Current spec limits the response to be a string list of tags, which severely limits the usefulness. If we want to do date filters, it'd be more useful to be able to return some metadata with the tag, which would be a new endpoint (or add new, optional fields in the response to keep backwards compatibility) |
@jcarter3 - see this comment above for @sudo-bmitch rough idea for a v2 tag listing endpoint: #568 (comment) |
My gut reaction on this is that it's unlikely to solve the target issue, since registries that don't implement referrers are also unlikely to implement new tag listing features. But my bigger goals include a v2 of the tag listing API, perhaps merged with a manifest listing described in #222. Some of my thoughts were already captured above, but to put them all in one place:
These ideas come from the different types of questions people are solving when querying the tag listing:
Support for some of these features could dramatically lower the load on registries, giving them motivation to adopt a v2. Particularly since I suspect a significant percentage of tag listing APIs are from automated tools checking to see when a new tag has been pushed, either to mirror the tag, update builds/deployments, or launch vulnerability scanners. All of the above is probably a big enough change to warrant a working group, but I don't have the bandwidth to run another one of those right now (particularly since two of the WGs I'm on are currently paused pending maintainer bandwidth). |
Adds the ability to do a server-side filter of "digest" tags (e.g.
sha256-...
).This is done by creating a
tagType
classification, which can be used to filter things. This works similar to theartifactType
filter on the referrers API.This is intended to exclude or isolate tags which are considered "non-normal". If another type of common non-normal tag appears in the wild, it can be added as a new
tagType
. In general, this is considered an anti-pattern and clients are encouraged to use thesubject
field and referrers API etc. to connect objects in the registry.