Do not schedule gcp.sh on rhel-10 and centos-stream-10. Also improve
loggin for aws.sh and azure.sh as the cloud-image-val testing is
currently not preformed there.
both are defined in CI, but the GOVC_ prefix doesn't match anything
else. Additionally this value is slightly different for vCenter8 and may
lead to failures if not unified.
The cleanup() function cats the httpd log and error file, but did not
use sudo, which failed on permissions. Fix that.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The test case mistakenly takes into consideration also upstream repo
definitions with the 'no-aux-key' suffix, which are however never
installed by RPMs with this name.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The backward compatibility layer to support also distro / repo names
without a dot is no longer supported since RHEL-10 onwards. Disable the
test case on el10.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Repository definitions suffixed with 'no-aux-key' were previously
mistakenly installed in RPMs. Fix that.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Runners in some jobs suggest, that the intention was to run them only on
x86_64. However, there were two instances when such job was also run on
aarch64 el9.5-nightly runner. Let's assume that this was a copy&paste
error and delete such cases.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Add support for json tailoring files in the cloudapi. Expand the tests
to check that the options returned are okay and that tailoring options
and json tailoring options can't be provided at the same time.
This is a short term workaround to get better visibility why
the osbuild executor sometimes sends non-json data. When reading
the result from the executor the entire output is now read and
if the json parsing goes wrong it will use the entire body
in the error message for better debug visibility.
The workerClientErrorFrom() was returning an `*clienterrors.Error` and
an `error` (if something with the conversation goes wrong.
But the calling code was expecting that even if an `error` is returned
the `*clienterrors.Error` is still valid. The caller would then just
log the error. As returning a valid `value` even when there is an
`error` is an unexpected pattern this commit changes the code to
always return a `*clienterrors.Error` and log any issue via the
logger.
When the cleanup function gets called, there's a chance the Instnace
field isn't populated yet, so store the instance ID separately and wait
for it to be terminated in case it's present.
The error would produce the following trace:
```
goroutine 1 [running]:
...
main.(*OSBuildJobImpl).Run.func1()
osbuild/osbuild-composer/cmd/osbuild-worker/jobimpl-osbuild.go:404 +0xc5
panic({0x55e2a76a1e40?, 0x55e2a906d2f0?})
/usr/lib/golang/src/runtime/panic.go:920 +0x270
github.com/osbuild/osbuild-composer/internal/cloud/awscloud.(*AWS).deleteFleetIfExists(0xc000faa840, 0xc0012718c0)
osbuild/osbuild-composer/internal/cloud/awscloud/secure-instance.go:441 +0x175
github.com/osbuild/osbuild-composer/internal/cloud/awscloud.(*AWS).TerminateSecureInstance(0x55e2a90825e0?, 0x2?)
osbuild/osbuild-composer/internal/cloud/awscloud/secure-instance.go:192 +0x1d
github.com/osbuild/osbuild-composer/internal/cloud/awscloud.(*AWS).RunSecureInstance.func1()
osbuild/osbuild-composer/internal/cloud/awscloud/secure-instance.go:75 +0x69
github.com/osbuild/osbuild-composer/internal/cloud/awscloud.(*AWS).RunSecureInstance(0xc000faa840, {0xc000afeade, 0x10}, {0x0, 0x0}, {0x0, 0x0}, {0xc001120f30, 0x24})
osbuild/osbuild-composer/internal/cloud/awscloud/secure-instance.go:169 +0x12a7
...
```
The usual convention to create new object is to prefix `New*` so
this commit renames the `WorkerClientError`. Initially I thought
it would be `NewWorkerClientError()` but looking at the package
prefix it seems unneeded, i.e. `clienterrors.New()` already
provides enough context it seems and it's the only error we
construct.
We could consider renaming it to `clienterror` (singular) too
but that could be a followup.
I would also like to make `clienterror.Error` implement the
`error` interface but that should be a followup to make this
(mechanical) rename trivial to review.
When cleaning up api tests, the build job results are dumped from the
database to store in build-result.txt and are printed to the runner log
at the same time. This makes it very difficult to read results as the
database dump prints very long lines that flood the job log. The result
isn't really readable (or useful) unless the file is downloaded
separately.
Silence the `tee` command so that the file is created but no output is
printed from the db dump.
There are no more RHEL-8 nightly composes, thus we don't need the code
that defines the repo url for them.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>