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: handle distroless for upgrade all packages #570

Merged

Conversation

ashnamehrotra
Copy link
Contributor

@ashnamehrotra ashnamehrotra commented Apr 24, 2024

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

  • Adds support for distroless images when updating all packages without scanner report.
  • Reads from /var/lib/rpmmanifest/container-manifest-2 for rpm and /var/lib/dpkg/status.d/ for debian to get list of packages.
  • Verifies which of these packages is outdated and updates only those packages.
  • Handles an edge case for mac when host OS is darwin and sets it to linux.
  • Tests same set of images as with scan report with ignore-errors false

Closes #569
Part of #522

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]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

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

Project coverage is 33.81%. Comparing base (2602d59) to head (3f7fa51).
Report is 62 commits behind head on main.

Files Patch % Lines
pkg/pkgmgr/dpkg.go 27.38% 60 Missing and 1 partial ⚠️
pkg/pkgmgr/rpm.go 0.00% 50 Missing ⚠️
pkg/patch/patch.go 35.29% 11 Missing ⚠️
pkg/buildkit/buildkit.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #570      +/-   ##
==========================================
+ Coverage   32.51%   33.81%   +1.30%     
==========================================
  Files          17       18       +1     
  Lines        1621     1514     -107     
==========================================
- Hits          527      512      -15     
+ Misses       1062      969      -93     
- Partials       32       33       +1     

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

@ashnamehrotra ashnamehrotra force-pushed the patch-no-scanner-distroless branch from c382dfb to 3d96ff2 Compare April 24, 2024 17:33
@ashnamehrotra ashnamehrotra force-pushed the patch-no-scanner-distroless branch from 1e4a80d to 64763ff Compare April 24, 2024 19:34
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 force-pushed the patch-no-scanner-distroless branch from e979ee5 to 3f7fa51 Compare May 10, 2024 18:31
@ashnamehrotra ashnamehrotra merged commit d85fba7 into project-copacetic:main May 10, 2024
23 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