-
Notifications
You must be signed in to change notification settings - Fork 55
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: Added logs for held packages #616
base: main
Are you sure you want to change the base?
feat: Added logs for held packages #616
Conversation
Signed-off-by: Neeraj Nagure <nagureneeraj@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #616 +/- ##
==========================================
+ Coverage 32.51% 33.66% +1.15%
==========================================
Files 17 18 +1
Lines 1621 1521 -100
==========================================
- Hits 527 512 -15
+ Misses 1062 976 -86
- Partials 32 33 +1 ☔ View full report in Codecov by Sentry. |
const heldCmd = `sh -c "apt-mark showhold"` | ||
aptHeld := aptUpdated.Dir(resultsPath).Run(llb.Shlex(heldCmd)).Root() | ||
heldPackagesBytes, err := buildkit.ExtractFileFromState(ctx, dm.config.Client, &aptHeld, resultsPath) | ||
if err != nil { |
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.
looks like you are receiving this error: Error: read /tmp/buildkit-mount1189165548/copa-out: is a directory
since resultsPath (copa-out) is a directory. You would need to save the output of the heldCmd to a file first and read that file.
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.
@ashnamehrotra I have fixed the error and also I save the output of the cmd in statusdOutputFile and then read it
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.
thanks! I think it would be better if we saved it to a new file, since we are using statusdOutputFile
to determine whether or not the image is distroless.
Signed-off-by: Neeraj Nagure <nagureneeraj@gmail.com>
Added logs for the packages that were held by apt
Closes #496