debian-forge-composer/cmd/osbuild-worker
Michael Vogt 61bf0c3235 osbuild-worker: do not use error in clienterror.Error.Details
This is an alternative/complementary fix for PR#4137. It is very
simple so should be uncontroverisal.

It fixes an issue that @schuellerf discovered, i.e. that when an error
interface is passed into clienterrors.Error.Details the details get
lost because the json.Marshaler will not know how to handler an
error interface.

To find the problematic uses of `error` a custom vet checker was
build in https://github.com/mvo5/osbuild-cvet. With that the
result is:
```
$ go run github.com/mvo5/osbuild-cvet@latest ./...
/home/mvogt/devel/osbuild/osbuild-composer/cmd/osbuild-worker/jobimpl-depsolve.go:93:26: do not pass 'error' to WorkerClientError() details, use error.Error() instead
/home/mvogt/devel/osbuild/osbuild-composer/cmd/osbuild-worker/jobimpl-osbuild.go:404:31: do not pass 'error' to WorkerClientError() details, use error.Error() instead
/home/mvogt/devel/osbuild/osbuild-composer/cmd/osbuild-worker/jobimpl-osbuild.go:519:31: do not pass 'error' to WorkerClientError() details, use error.Error() instead
/home/mvogt/devel/osbuild/osbuild-composer/cmd/osbuild-worker/jobimpl-osbuild.go:556:31: do not pass '[]error' to WorkerClientError() details, use []string instead
```
and once this commit is in no more errors.

Just like PR#4137 this is not perfect because it will not do a
recursive check for the passed argument.
2024-06-07 01:19:11 +02:00
..
config.go worker: support a proxy for repository mtls configuration 2024-04-17 16:17:57 +02:00
config_test.go Worker: allow configuring executor CloudWatch group 2024-03-08 13:13:44 +01:00
jobimpl-awsec2.go worker: Define new jobs to handle copying and resharing of images 2022-08-30 16:14:52 +02:00
jobimpl-container-resolve.go Update osbuild/images to v0.41.0 2024-02-29 20:57:39 +01:00
jobimpl-depsolve.go osbuild-worker: do not use error in clienterror.Error.Details 2024-06-07 01:19:11 +02:00
jobimpl-file-resolve.go worker: add file resolve job 2023-03-16 09:55:39 +00:00
jobimpl-koji-finalize.go Worker/koji-finalize: include osbuild version in image metadata 2023-09-27 12:39:28 +02:00
jobimpl-koji-init.go worker: Remove ellipsis operator from clienterrors.Error 2022-08-03 13:51:52 +02:00
jobimpl-osbuild.go osbuild-worker: do not use error in clienterror.Error.Details 2024-06-07 01:19:11 +02:00
jobimpl-ostree-resolve.go split: replace internal packages with images library 2023-07-10 21:11:19 +02:00
main.go worker: support a proxy for repository mtls configuration 2024-04-17 16:17:57 +02:00