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

feat: Add option to update all packages without scanner input. #548

Merged
merged 33 commits into from
Apr 2, 2024

Conversation

ashnamehrotra
Copy link
Contributor

Adds "--update-all" flag which will update all available packages to latest without having scanner input. First parses "/etc/os-release" file to determine os family, and then calls respective package managers to install updates.

Describe the changes in this pull request using active verbs such as Add, Remove, Replace ...

Closes #547
Closes #546

Part of #522

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Attention: Patch coverage is 14.19753% with 139 lines in your changes are missing coverage. Please review.

Project coverage is 35.13%. Comparing base (2602d59) to head (4f897df).
Report is 35 commits behind head on main.

Files Patch % Lines
pkg/patch/patch.go 30.98% 48 Missing and 1 partial ⚠️
pkg/pkgmgr/rpm.go 2.56% 38 Missing ⚠️
pkg/pkgmgr/apk.go 0.00% 29 Missing ⚠️
pkg/pkgmgr/dpkg.go 0.00% 22 Missing ⚠️
pkg/buildkit/buildkit.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #548      +/-   ##
==========================================
+ Coverage   32.51%   35.13%   +2.62%     
==========================================
  Files          17       18       +1     
  Lines        1621     1386     -235     
==========================================
- Hits          527      487      -40     
+ Misses       1062      867     -195     
  Partials       32       32              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sozercan
Copy link
Member

@ashnamehrotra can we add integration tests for the --update-all flow

pkg/patch/patch.go Outdated Show resolved Hide resolved
pkg/patch/cmd.go Outdated Show resolved Hide resolved
pkg/pkgmgr/apk.go Outdated Show resolved Hide resolved
pkg/buildkit/buildkit.go Outdated Show resolved Hide resolved
pkg/patch/patch.go Outdated Show resolved Hide resolved
pkg/pkgmgr/dpkg.go Outdated Show resolved Hide resolved
pkg/patch/cmd.go Outdated Show resolved Hide resolved
pkg/pkgmgr/dpkg.go Outdated Show resolved Hide resolved
pkg/pkgmgr/dpkg.go Outdated Show resolved Hide resolved
pkg/patch/patch.go Outdated Show resolved Hide resolved
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
integration/patch_test.go Outdated Show resolved Hide resolved
integration/patch_test.go Outdated Show resolved Hide resolved
pkg/patch/patch_test.go Outdated Show resolved Hide resolved
Signed-off-by: ashnamehrotra <[email protected]>
pkg/pkgmgr/dpkg.go Outdated Show resolved Hide resolved
Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM

@ashnamehrotra ashnamehrotra merged commit ebd8811 into project-copacetic:main Apr 2, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants