-
Notifications
You must be signed in to change notification settings - Fork 54
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
Remove existing file during build-disk #1857
Conversation
This commit makes build-disk command behave like build-iso in that it will remove an existing raw disk before writing the new disk and log a warning. Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1857 +/- ##
==========================================
- Coverage 75.35% 75.29% -0.06%
==========================================
Files 67 67
Lines 6820 6825 +5
==========================================
Hits 5139 5139
- Misses 1311 1315 +4
- Partials 370 371 +1 ☔ View full report in Codecov by Sentry. |
ccffa23
to
10193dd
Compare
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.
With the exception of the second commit all good to me.
Regarding the second commit (c8b76f2) I have mixed feelings with it. My idea to solve that, was to add a new RunNoError
(or similar) into the runner interface and in that interface simply log as warnings any error, but never return error. Which would still call it always but do not present it as an error in logs.
Note this error message is also present on install processes, which is also ugly. There the suggested approach here would still log the red ugly error.
So probably I'd be more in favor of log it as a warning|debug message. I have an implementation here. Probably we can leave that for a separate PR.
That feels so hacky though.. We could consider moving the logging out of the runner for this reason, but I do think that only running partx on files in |
For now I could remove the second commit to get the other changes merged! |
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
10193dd
to
b779089
Compare
Well, I am not convinced either, but this isn't much different than calling Another option could be turning all runner logs into debug level. Alternatively we could also have a I think having the logger within the runner is helpful for debugging purposes as we see the exact commands that are executed. |
The first commit makes build-disk command behave like build-iso in that it will remove an existing raw disk before writing the new disk and log a warning.
Second commit changes the build-iso Makefile target to use the toolkit image instead of the target derivative image to be consistent with build-disk target