Continuing image type splitting.
Constructor for qcow2 type requires the distribution object to determine
whether to add RHSM to the image config (RHEL only).
Start splitting image type definitions into separate files by logical
groups (mostly by footprint and cloud platform) for easier navigation,
like we did for rhel9.
Split AMI and Edge image types; the rest will follow in separate
commits.
Image specific package sets are defined in the file for the image type
grouping instead of the package_sets file.
A notable difference with the way it was done in rhel9 is that every
image type is defined in a function rather than a global where possible
and a function when distro version specific configuration is needed.
This is done for consistency and the change will likely be done in the
other distributions as well.
Also, instead of passing only required values to the image type
constructor (for example, osVersion and a RHEL boolean), we pass the
whole distribution object and each constructor can read whatever
information it needs.
Add platform attribute to imageType.
Create platform configurations for each image type, copied from RHEL 9.
Currently this has no effect on the image definition / manifest.
The host distro object was identical to the regular distro objects for a
while now. The constructors in the registry have been aliases to the
base constructors for a long time.
- Deleted all HostDistro constructors from the distributions.
- Changed the supported distro list to only contain base constructor
functions.
- The host distro in the distro registry is a copy of the base distro
that matches the host and does not call a separate constructor.
Inline the distribution structs in the common constructor.
Make the same changes that were made to RHEL 8:
- Remove major version argument: it's always 9
- Make the default constructor New() create the default minor version
and rename it to plain RHEL 9.
The distroregistry now contains both rhel-9 and rhel-90, which point to
the same configuration but with different names.
The default rhel-9 should be updated to be an alias to rhel-91, the
current GA.
Update the implementation of the distro.Distro interface to match the
one in RHEL 9 and Fedora. The main change is that the runner is a
runner.Runner and not a string.
The distroMap is replaced by a switch that initialises the distribution
struct strings based on the minor version number.
The default minor version, created with rhel8.New(), creates a copy of
RHEL 8.6 and renames it to "rhel8".
We have switched how 5xx errors are being recorded
internally and we are now recording all failures
for all endpoints. As a result, a dedicated metric
only for compose failures is no longer required.
Currently, we still have the issue with rogue instances. The latest commit in
the gitlab-ci-terraform repository prevents that by limiting the validity
of the spot fleet request to 4 hours which matches our maximum job duration
set in GitLab.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
The workers now use a new metric to record all
http requests. This commit updates the worker dashboard
to use the new `image_builder_worker_request_count`
query.
osbuild-composer now uses a new metric to record all
http requests. This commit updates the composer dashboard
to use the new `image_builder_composer_request_count`
query.
After introducing Go 1.18 to a project, it's required by law to convert at
least one method to a generic one.
Everyone hates IntToPtr, StringToPtr, BoolToPtr and Uint64ToPtr, so let's
convert them to the ultimate generic ToPtr one.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
Fedora 35 support was dropped, so we can update to a newer Go.
Stable RHEL 8 and 9 and Fedora 36 ships Go 1.18, so let's switch to it.
"//go:build" directives are now apparently enforced by go fmt, so that's why
there were added.
Also, all the github actions were adjusted to use Go 1.18.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
Fedora 35 is going EOL on Tue 2022-12-13. At the time of writing this commit
message, that's the next day. As we do releases on Wednesdays, the next
release will never find its way to F35 and thus, there's no point in keeping
support for it.
Let's delete everything that relates to Fedora 35. If there's something that
cannot be deleted (e.g. CI containers based on F35), let's upgrade it to F37.
TestCrossArchDepsolve now uses CentOS Stream 8 because RHEL 8.4 cannot read
F37 repository metadata. This is a similar issue to
https://bugzilla.redhat.com/show_bug.cgi?id=2004853 . Basically, newer
repositories can be only read by libmodulemd >= 2.11.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
Github actions have a peculiar behaviour: The "job root" directory is owned
by user with ID 1001 whereas many containers (like the Fedora one) run as root
by default. This causes git to freak out because repositories owned by
different users aren't considered safe anymore and must be explicitly allow-
listed.
This becomes a problem when we switch to Go 1.18 because it stamps build with
Git information which fails because the repository technically isn't safe.
Let's fix this by marking the repository as a safe one.
Note that the actions/checkout action has a set-safe-directory feature, but
this one is not permanent. After the action is done, the setting is removed.
See https://github.com/actions/checkout/pull/762
Signed-off-by: Ondřej Budai <ondrej@budai.cz>