-
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
Duplicated error messages #727
Comments
I think osbuild-composer (jobimpl-depsolve) should either "trust" the |
To expand on that a bit: IMO, the I think it makes sense for osbuild-composer to reconstruct the string, if it doesn't like the But I wouldn't make |
Is this a usecase for |
Tiny commit to extract a helper from DepsolveJobImpl.Run() that can then be unit tested. This should help with osbuild/images#727
Thanks for finding this! I think we should use the opportunity to refactor the code in jobimpl-depsolve.go a tiny bit and add a test, I started this in osbuild/osbuild-composer#4188 so that we have a baseline to work with. |
maybe also create a second function as the text "DNF error occured" is explanatory and good, and should stay in
|
I really like orthogonal APIs, i.e. where every exported function or data member supports the others without "overlapping" (hope this picture makes sense). It seems we already have the exported (fwiw, this also hints again that clienterror.Error might need some tweaks, the idea behing "reason" and "details" is great but in practise seems to be less clear (but that is a topic for another day :) |
I had the same thought. |
The idea of |
Tiny commit to extract a helper from DepsolveJobImpl.Run() that can then be unit tested. This should help with osbuild/images#727
Tiny commit to extract a helper from DepsolveJobImpl.Run() that can then be unit tested. This should help with osbuild/images#727
Tiny commit to extract a helper from DepsolveJobImpl.Run() that can then be unit tested. This should help with osbuild/images#727
Tiny commit to extract a helper from DepsolveJobImpl.Run() that can then be unit tested. This should help with osbuild/images#727
Now as we see the
.Reason
of errors in the UI it is now duplicated in case of "DNF DepsolveError"(due to osbuild/image-builder-frontend#2066 )
I think the duplication comes from:
https://github.com/osbuild/images/blob/main/pkg/dnfjson/dnfjson.go#L716
writing the
.Reason
into the string whilehttps://github.com/osbuild/osbuild-composer/blob/main/cmd/osbuild-worker/jobimpl-depsolve.go#L114
uses
.Error()
and adds.Reason
Possible fix:
@achilleas-k @mvo5 Do you agree that
pkg/dnfjson/dnfjson.go
should not add the Reason toError()
? or some other solution?The text was updated successfully, but these errors were encountered: