-
Notifications
You must be signed in to change notification settings - Fork 48
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
![Screenshot_20240604_192337](https://private-user-images.githubusercontent.com/8057963/336550147-71908023-4ae1-4598-b5fb-fc070beceb21.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2MTA2NTcsIm5iZiI6MTcyNDYxMDM1NywicGF0aCI6Ii84MDU3OTYzLzMzNjU1MDE0Ny03MTkwODAyMy00YWUxLTQ1OTgtYjVmYi1mYzA3MGJlY2ViMjEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjVUMTgyNTU3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDlhMGE3NDRlM2U5OTY1ZDVkZjcwMjU1NDY1YzQ1NzE0ZGJlNDUwM2Q4NmVmNTlmMmRhNzRiYzRhNzIwYTc3YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.9T6hcq5QlwPYyaH3AA1SRTCWqF5fPJxZjPvp6JjUuqE)
.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: