Skip to content
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

added filtering by artifact type with regex #258

Merged
merged 16 commits into from
Aug 10, 2022
Merged

added filtering by artifact type with regex #258

merged 16 commits into from
Aug 10, 2022

Conversation

wangxiaoxuan273
Copy link
Contributor

Signed-off-by: wangxiaoxuan273 [email protected]

Resolves issue #201

@wangxiaoxuan273
Copy link
Contributor Author

Further clarification needed: do we need to support doing both inclusion and exclusion at the same time (intersection) ? Right now it is either inclusion or exclusion.

@wangxiaoxuan273
Copy link
Contributor Author

To generalize the above question: should this filtering feature modify the existing FindPredecessors, or creating new FindPredecessors? My current implementation is creating a new FindPredecessors function that either includes or excludes on artifact type with a regex. What should this filtering feature do with existing FindPredecessors ? @shizhMSFT

extendedcopy.go Outdated Show resolved Hide resolved
@shizhMSFT
Copy link
Contributor

To generalize the above question: should this filtering feature modify the existing FindPredecessors, or creating new FindPredecessors? My current implementation is creating a new FindPredecessors function that either includes or excludes on artifact type with a regex. What should this filtering feature do with existing FindPredecessors ? @shizhMSFT

We should invoke the existing FindPredecessors first, and then do filtering.

@codecov-commenter
Copy link

codecov-commenter commented Aug 1, 2022

Codecov Report

Merging #258 (bd5782c) into main (e24e247) will increase coverage by 0.05%.
The diff coverage is 73.68%.

@@            Coverage Diff             @@
##             main     #258      +/-   ##
==========================================
+ Coverage   70.68%   70.73%   +0.05%     
==========================================
  Files          36       36              
  Lines        3217     3274      +57     
==========================================
+ Hits         2274     2316      +42     
- Misses        700      712      +12     
- Partials      243      246       +3     
Impacted Files Coverage Δ
registry/repository.go 0.00% <ø> (ø)
extendedcopy.go 70.39% <73.68%> (+1.97%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

extendedcopy.go Outdated Show resolved Hide resolved
extendedcopy.go Outdated Show resolved Hide resolved
extendedcopy.go Outdated Show resolved Hide resolved
extendedcopy.go Outdated Show resolved Hide resolved
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a performance issue on obtaining the artifact type. We should avoid unnecessary calls when Referrer API is available.

extendedcopy.go Outdated Show resolved Hide resolved
extendedcopy.go Outdated Show resolved Hide resolved
extendedcopy.go Outdated Show resolved Hide resolved
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
registry/repository.go Show resolved Hide resolved
extendedcopy.go Outdated Show resolved Hide resolved
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT merged commit 45a30bb into oras-project:main Aug 10, 2022
@wangxiaoxuan273 wangxiaoxuan273 deleted the artifact-type-filter branch August 10, 2022 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants