-
Notifications
You must be signed in to change notification settings - Fork 107
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
osbuild-worker: improve error "reason" in case of stage failures (HMS-1442) #4113
osbuild-worker: improve error "reason" in case of stage failures (HMS-1442) #4113
Conversation
eaa6ac2
to
d846b4d
Compare
85feb6c
to
3828af2
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.
Looks good
ed43026
to
5b2a520
Compare
5b2a520
to
f33129b
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.
Thank you for improving this! I wonder if we should take the opportunity (maybe in a followup if you prefer) to extract a helper here and write a test. The current Run() function is very long and does a lot of things so extracting a helper will not helper that much but it's a start. Wdyt about something like:
0001-osbuild-worker-extract-makeJobErrorFromOsbuildOutput.patch.txt
as a starting point, there is a lot of room for improvement here but this feels like we could build more on top (and also could be used as an example to e.g. extract the logging too etc.
But happy to do as a followup of course!
42e0b17
to
f849321
Compare
f849321
to
28aa517
Compare
Also fixes osbuild/images#727 |
d84797c
to
3ccd4f5
Compare
3ccd4f5
to
8028bbf
Compare
as now the .Reason is properly passed over - it was printed twice
8028bbf
to
53a5707
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.
Let's merge it, I would like to get back to workerClientErrorFrom() but this PR improves things a lot so let's get it merged :)
Small followup for osbuild#4113 (comment) Given that the failed stage is a relatively short string the `\n` seems unneccessary and quotes are enough.
Small followup for #4113 (comment) Given that the failed stage is a relatively short string the `\n` seems unneccessary and quotes are enough.
This should improve the error in the frontend from
to
There is no test framework to test changes like this, right?