-
Notifications
You must be signed in to change notification settings - Fork 70
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 silent the patch output by using --silent flag #699
base: main
Are you sure you want to change the base?
feat: Add option to silent the patch output by using --silent flag #699
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #699 +/- ##
==========================================
- Coverage 34.22% 34.02% -0.20%
==========================================
Files 18 18
Lines 1578 1590 +12
==========================================
+ Hits 540 541 +1
- Misses 1007 1018 +11
Partials 31 31 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Shishir Kushwaha <[email protected]>
d563d3a
to
9e4308b
Compare
the lint check is failing on a piece of code that is unrelated to me ? can someone help me fix that or is it fine eitherways |
@shishir-11 that lint error was fixed in #682, a rebase should fix that |
@ashnamehrotra can you please check if this is fine or something more needs to be done, thank you. |
pkg/patch/cmd.go
Outdated
@@ -66,6 +68,7 @@ func NewPatchCmd() *cobra.Command { | |||
flags.DurationVar(&ua.timeout, "timeout", 5*time.Minute, "Timeout for the operation, defaults to '5m'") | |||
flags.StringVarP(&ua.scanner, "scanner", "s", "trivy", "Scanner used to generate the report, defaults to 'trivy'") | |||
flags.BoolVar(&ua.ignoreError, "ignore-errors", false, "Ignore errors and continue patching") | |||
flags.BoolVar(&ua.silent, "silent", false, "silences output while processing") |
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.
Can we specify that it only silences buildkit output?
Signed-off-by: Shishir Kushwaha <[email protected]>
@shishir-11 this looks good to me! I can do another review once the test pushed |
Signed-off-by: Shishir Kushwaha <[email protected]>
Signed-off-by: Shishir Kushwaha <[email protected]>
b845b24
to
fdb32cf
Compare
Signed-off-by: Shishir Kushwaha <[email protected]>
@ashnamehrotra can you please take a look at the failing unit test , do you know why that might be happening , is it possible it lacks permissions to execute |
pkg/patch/cmd_test.go
Outdated
}, | ||
{ | ||
name: "Silent flag used", | ||
args: []string{"-t", "3.7-alpine-patched", "-i", "alpine:3.14", "--silent"}, |
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.
we should use a different tag here, or omit it and use default
It shouldn't need permissions to execute apk update, and copa is able to patch the image locally and run cmd_test.go locally. Could we try running with --debug to see the full error output? |
Signed-off-by: Shishir Kushwaha <[email protected]>
Signed-off-by: Shishir Kushwaha <[email protected]>
Signed-off-by: Shishir Kushwaha <[email protected]>
How do i run debug ? I'm unable to run it . |
Debug is part of |
Add option to silent the patch output by using --silent flag.
does not produce output except some end INFO.
Closes #643