-
Notifications
You must be signed in to change notification settings - Fork 102
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
Request: Add Public Function for Finding Referrers and Filtering by Artifact Type #657
Comments
Perhaps a duplicate of issue 392 |
Hi @nathan-joslin , thanks for opening the issue. |
@Wwwsylvia Apologies for the confusion. My use case is not within a unit test. I have a I noticed similar existing implementations of using the referrers API with The related issue 392 proposes letting |
I think this issue can be potentially resolved by #659 as per #659 (comment). |
I agree with your comment. |
User Story
As a user of oras-go I would like to discover referrers of a manifest and filter by ArtifactType. I have a
GraphStorage
which only gives me access toPredecessors
. I'd like to take advantage of the referrers API for optimization.Limits of Current Functionality
The
FilterArtifactType
option forExtendedCopyGraph
provides this filtering, but the condition of copying limits its use.As the
GraphStorage
I have is originally aregistry.Repository
, I have the option of elevating myGraphStorage
to aregistry.Repository
giving me access torepository.Referrers
. However, this has a side effect on my unit tests which use amemory.Store
; aPredecessorFinder
not aregistry.ReferrerLister
.The implementation of
func (opts *ExendedCopyGraphOptions) FilterArtifactType(regex)
provides a "fallback" mechanism, where a nonregistry.ReferrerLister
usesPredecessors
instead, which seems useful to both thememory.Store
in my unit tests as well as myGraphStorage
.The text was updated successfully, but these errors were encountered: