-
Notifications
You must be signed in to change notification settings - Fork 13
Adding artifactType filtering to the Referrers API #74
Adding artifactType filtering to the Referrers API #74
Conversation
Signed-off-by: Michael Brown <brownxmi@amazon.com>
Please rebase as #59 is in |
docs/proposals/PROPOSAL_E.md
Outdated
@@ -179,6 +230,7 @@ For registries that do not support the `referrers` API, a tag MUST be pushed for | |||
- `<ref>`: the digest from the `refers` field (limit of 64 characters) | |||
- `<hash>`: the digest of this artifact (limit of 16 characters) | |||
- `<type>`: type of artifact for filtering (limit of 5 characters) | |||
- The type field is based on a mapping from `artifactType` to a short string for the tag. |
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 probably to go away depending on #72
docs/proposals/PROPOSAL_E.md
Outdated
"annotations": { | ||
"artifactType": "application/vnd.example.icecream.v1" | ||
} |
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.
should this be codified into the proposal?
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.
So from the discussion just an indication of the field without he values makes the response for unmatched artifacts cachable.
As a part of the response are all annotations expected to be returned in the |
Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>
Co-authored-by: Jason Hall <jason@chainguard.dev> Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>
Co-authored-by: Jason Hall <jason@chainguard.dev> Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>
I've gone ahead and resolved merge conflicts / committed suggested changes to keep this moving. @michaelb990 - is this ready for review/merge? |
On the WG meeting last week, I think we ended up unsure if this made sense to implement since it would result in added complexity for registry servers that would reduce the ability to cache the output, and clients already have client-side filtering implemented to support the tag output and any registries that don't support filtering. Lets save this for a merge or close decision on tomorrow's meeting. |
…lied Signed-off-by: Michael Brown <brownxmi@amazon.com>
eaa8bca
to
62362fb
Compare
Will post to a vote. |
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.
LGTM for merging once the vote is in. Any minor adjustments can be made post merge in my opinion.
I'd lean towards MAY, but that's not a strong opinion.
Thank you!
The big advantage of having the API to me isn't filtering, but the lack of client side maintenance of the tag, and elimination of race conditions. (Plus it declutters the tag listing.) Thanks for getting the vote out. 👍 |
+1 here too. Thanks! |
lgtm |
Draft PR on top of #59 to add
artifactType
filtering in the Referrers API.Pros:
Cons:
artifactType
, not other fields or annotations.