-
Notifications
You must be signed in to change notification settings - Fork 60
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
progress: tweak progress error reporting #810
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds catpure of os.Std{out,err} when running osbuild so that we capture the error log and can display it as part of an error from osbuild, e.g. when osbuild itself crashes. This gives us more accurate error reporting if anything fails during the osbuild building.
eb97668
to
dd38714
Compare
This commit tweaks an issue that potentially an incorrect status from osbuild would fail the build with a bad error message and without us getting the full buildlog.
dd38714
to
4833fb4
Compare
supakeen
approved these changes
Jan 27, 2025
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.
Cool, looks good to me. Thank you.
Enabled auto-merge and retriggered the integration tests (which seem flaky lately, this time it failed on pulling a container image). |
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Feb 5, 2025
This commit fixes a silly mistake from PR#810. The issue is that in osbuild#810 we started to collect the osbuild stdout/stderr so that we can show crashes from osbuild or other unexpected output. However when a stage fails this is reported via the json progress and not directly on stdout/stderr - this was missed when osbuild#810 was done. This commit does a short term fix by collecting the buildlog again and showing it in the error and also updates the test to be more realistic. However we really need a test that actually tests the real behavior, ideally a real osbuild run with a stage error so that we can be sure we capture this (criticial!) functionality.
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Feb 5, 2025
This commit fixes a silly mistake from PR#810. The issue is that in osbuild#810 we started to collect the osbuild stdout/stderr so that we can show crashes from osbuild or other unexpected output. However when a stage fails this is reported via the json progress and not directly on stdout/stderr - this was missed when osbuild#810 was done. This commit does a short term fix by collecting the buildlog again and showing it in the error and also updates the test to be more realistic. However we really need a test that actually tests the real behavior, ideally a real osbuild run with a stage error so that we can be sure we capture this (criticial!) functionality.
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Feb 5, 2025
This commit adds a proper integration test that ensures that we always report the details of a failing osbuild run. This prevents regressions like the one from osbuild#810. This ensures that: a) we report the messags from a broken stage b) we report any osbuild messages as well to catch e.g. crashes that are not reported via the json progress It is archived by creating a new build container fixture that is deliberately broken, i.e: a) the org.osbuild.selinux stage is replaced with a fake that will echo some msgs and then error b) osbuild itself is is wrapped around so that we can reliably echo some canary strings before the real osbuild is executed
pull bot
pushed a commit
to centos-workstation/bootc-image-builder
that referenced
this pull request
Feb 5, 2025
This commit fixes a silly mistake from PR#810. The issue is that in osbuild#810 we started to collect the osbuild stdout/stderr so that we can show crashes from osbuild or other unexpected output. However when a stage fails this is reported via the json progress and not directly on stdout/stderr - this was missed when osbuild#810 was done. This commit does a short term fix by collecting the buildlog again and showing it in the error and also updates the test to be more realistic. However we really need a test that actually tests the real behavior, ideally a real osbuild run with a stage error so that we can be sure we capture this (criticial!) functionality.
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Feb 6, 2025
This commit adds a proper integration test that ensures that we always report the details of a failing osbuild run. This prevents regressions like the one from osbuild#810. This ensures that: a) we report the messags from a broken stage b) we report any osbuild messages as well to catch e.g. crashes that are not reported via the json progress It is archived by creating a new build container fixture that is deliberately broken, i.e: a) the org.osbuild.selinux stage is replaced with a fake that will echo some msgs and then error b) osbuild itself is is wrapped around so that we can reliably echo some canary strings before the real osbuild is executed
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 12, 2025
This commit adds a proper integration test that ensures that we always report the details of a failing osbuild run. This prevents regressions like the one from #810. This ensures that: a) we report the messags from a broken stage b) we report any osbuild messages as well to catch e.g. crashes that are not reported via the json progress It is archived by creating a new build container fixture that is deliberately broken, i.e: a) the org.osbuild.selinux stage is replaced with a fake that will echo some msgs and then error b) osbuild itself is is wrapped around so that we can reliably echo some canary strings before the real osbuild is executed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds catpure of os.Std{out,err} when running osbuild so that we capture the error log and can display it as part of an error from osbuild, e.g. when osbuild itself crashes.
This gives us more accurate error reporting if anything fails during the osbuild building.
[edit: this will also help https://github.com/osbuild/image-builder-cli/pull/21]