- 
                Notifications
    
You must be signed in to change notification settings  - Fork 732
 
Remove duplicate image source providers #4289
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
Conversation
… set Signed-off-by: Kudryavcev Nikolay <[email protected]>
Signed-off-by: Kudryavcev Nikolay <[email protected]>
| if len(def) == 0 { | ||
| return nil, fmt.Errorf("invalid DefaultImagePullSource: %s; available values are: %v", c.DefaultImagePullSource, pull.Tags()) | ||
| } | ||
| providers = base.Join(def...).Join(pull...) | 
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 set is supposed to remove duplicates, but I see through some debugging that some of the sources are not comparable, so they are not being removed. An easier change would just be to add this line:
pull = pull.Remove(c.DefaultImagePullSource)
| 
           Hey @Rupikz, thanks for the contribution. However,   | 
    
| 
           Hey @kzantow, Awesome, your solution is better.  | 
    
| 
           Hey @Rupikz adding tests here is great, I'd love to get those contributed. Does the function need to be refactored? It seems to me there isn't much benefit to moving it. Maybe just revert that part of the change, bump the dependency, and update the tests to use the method instead of refactored function?  | 
    
…roviders Signed-off-by: Kudryavcev Nikolay <[email protected]>
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, thanks @Rupikz!
* main: chore(deps): update tools to latest versions (#4302) chore(deps): bump github.com/github/go-spdx/v2 from 2.3.3 to 2.3.4 (#4301) chore(deps): bump github/codeql-action from 4.30.8 to 4.30.9 (#4299) support universal (fat) mach-o binary files (#4278) chore(deps): bump sigstore/cosign-installer from 3.10.0 to 4.0.0 (#4296) chore(deps): bump anchore/sbom-action from 0.20.7 to 0.20.8 (#4297) convert posix path back to windows (#4285) Remove duplicate image source providers (#4289) chore(deps): bump anchore/sbom-action from 0.20.6 to 0.20.7 (#4293) feat: add option to fetch remote licenses for pnpm-lock.yaml files (#4286) Add PDM parser (#4234) chore(deps): update tools to latest versions (#4291) fix: panic during java archive maven resolution (#4290) Extract zip archive with multiple entries (#4283) chore: update to use old configuration on new cosign (#4287) chore(deps): update anchore dependencies (#4282) chore(deps): bump github.com/mholt/archives from 0.1.3 to 0.1.5 (#4280) add docs to configs (#4281)
Description
Remove duplicate image source providers if the DefaultImagePullSource parameter is set.
Details:
base.Join(def...).Join(pull...)previously "pull" continued to contain "def"Type of change
Checklist: