Commit graph

6956 commits

Author SHA1 Message Date
Achilleas Koutsou
85e4efe966 go.mod: update to latest images@v0.115.0 2025-02-06 13:48:59 +01:00
Achilleas Koutsou
7e87d1e124 tools: revert prepare-source.sh to use downloaded go binary
The new script can cause changes to the go.mod when executing
`go get go@version`, downgrading packages that we want to bump, which
can revert changes we want the tool to be tidying.

We can work around this for now, but with the script being part of our
PR checks, we also need to revert the script so we can get module
updates through.

This reverts 8554d6202d
2025-02-06 13:48:59 +01:00
Achilleas Koutsou
448b1e276d test/filesystem: print blueprint contents when creating file
Can be useful for troubleshooting and tracing test logs.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
a237447ca0 gitlab: run all versions of filesystem.sh
Run filesystem.sh with all the valid arguments for the customization
type.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
077a56b9ac test/filesystem: minor cleanups
Remove incorrect comment (not an ostree image).
Add a greenprint for depsolving since it can take some time for that to
run and it makes more sense than pausing output on "Preparing
blueprint".
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
96269e454e test/filesystem: support various layouts
Add separate blueprint creation functions, one for each partitioning
layout:
- disk-plain
- disk-lvm
- disk-btrfs (Fedora only)

The existing 'filesystem' blueprint is also kept.

Each function also sets the $EXPECTED_MOUNTPOINTS variable for the
mountpoint check that happens after the build.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
8e765ad97d test/filesystem: remove conditions on v94
Version 94 of osbuild-composer is over a year old now.  It should be
fine to test these unconditionally.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
4241c1d5a7 test/filesystem: move blueprint writing to function
Move the creation of the blueprint to a function.  We'll then add a
separate blueprint function for the new, alternative partitioning
customization.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
49271e614b blueprint: test the conversion 2025-02-05 11:32:52 +01:00
Achilleas Koutsou
68dd8699ed blueprint: add local DiskCustomization
Add DiskCustomization and all its children to the internal blueprint.
Add the conversion to the images counterpart to the Convert() function.
2025-02-05 11:32:52 +01:00
schutzbot
da9a911dea Post release version bump
[skip ci]
2025-02-05 08:12:59 +00:00
Brian C. Lane
7622a69d60 v2_test: Add a test for GetDistributionsList
Related: RHEL-60133
2025-02-04 15:15:14 -08:00
Brian C. Lane
44ac65b70c cloudapi: Add /distributions to return distro:arch:image-type
This adds support for listing all of the supported distributions,
their arches, the image types, and their repository details.

This returns 3 nested json objects. The keys for the first layer are the
distribution names. The 2nd layer's keys are the architectures supported
by that distribution, and the 3rd layer's keys are the image types
supported by that distribution:architecture pair. The value of the 3rd
layer is the repository information.

Resolves: RHEL-60133
2025-02-04 15:15:14 -08:00
schutzbot
4b9f1a4956 schutzfile: Update snapshots to 20250201 2025-02-04 20:46:21 +01:00
schutzbot
01ad496910 Post release version bump
[skip ci]
2025-02-04 09:58:56 +00:00
Brian C. Lane
325a018c75 cloudapi: Return the compose status of all root compose jobs
This returns the status using the same structure as it does for
requesting individual statuses for the jobs.

Related: RHEL-60120
2025-02-03 17:27:31 -08:00
Brian C. Lane
24b939d4c7 cloudapi: Move most of getComposeStatusImpl into a function
This will make it easier to use the status in responses.

Related: RHEL-60120
2025-02-03 17:27:31 -08:00
Brian C. Lane
b2d803306c cloudapi: Add /composes route to list root job UUIDs
This will be used to list the top level job UUIDs.

Related: RHEL-60120
2025-02-03 17:27:31 -08:00
Brian C. Lane
87c0462a33 jobqueue: Add AllRootJobIDs function to jobqueue
This lists the root job UUIDs (the jobs with no dependants).
Currently only implemented by fsjobqueue. The function for
dbjobqueue currently returns nil.

Related: RHEL-60120
2025-02-03 17:27:31 -08:00
Tomáš Hozza
d781b8de6d Makefile: bump golangci-lint to v1.56 for golang 1.22
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-03 19:58:37 +01:00
Tomáš Hozza
8514c95837 Update 'images' to v0.113.0
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-03 19:58:37 +01:00
Tomáš Hozza
b8c2e4c45c SPEC: bump minimum osbuild-dnf-json-api and osbuild version
This should have been done with the `images` bump to `v0.112.0`.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-03 19:58:37 +01:00
Achilleas Koutsou
3e321e3cea go.mod: update to latest images@v0.112.0 2025-02-01 18:15:30 +01:00
Achilleas Koutsou
bec893e37c go.mod: update github.com/vmware/govmomi to v0.48.0
Needs manual change of import paths.
2025-02-01 18:14:18 +01:00
Lukas Zapletal
3a6bea380e build(deps): bump to Go 1.22 2025-01-31 16:57:31 +01:00
Lukas Zapletal
8554d6202d build: use go toolbox instead installing binary 2025-01-31 16:57:31 +01:00
Achilleas Koutsou
083d84f70c test: update all calls to image-info
Call the script without a path since it's now in the PATH.

Drop the SELinux labelling workaround (chcon) from filesystem.sh and
image_tests.sh.  The packaged tool is already labelled correctly.

Install osbuild-tools instead of osbuild-composer-tests in
regression-old-worker-new-composer.sh to get osbuild-image-info.
2025-01-31 08:22:29 +01:00
Achilleas Koutsou
58d16f662f deploy: install osbuild-tools for osbuild-image-info 2025-01-31 08:22:29 +01:00
Achilleas Koutsou
5ba4d3cf9e tools: remove image-info
The image-info tool now lives in osbuild/osbuild.
2025-01-31 08:22:29 +01:00
Achilleas Koutsou
0219b12801 spec: drop image-info from test subpackage 2025-01-31 08:22:29 +01:00
Achilleas Koutsou
e9ddb9f738 Schutzfile: update osbuild commit
Update osbuild commit ID to include image info, which now installs as
/usr/bin/osbuild-image-info.
2025-01-31 08:22:29 +01:00
Brian C. Lane
a613e8cb37 DepsolveJobResult: Remove unused Error and ErrorType
These fields are not set by the depsolve job, they are only set and used
in tests so remove them. Errors are reported in the result.JobError

Related: Related: RHEL-60125
2025-01-30 08:00:12 +01:00
Brian C. Lane
3c2b415e53 jobimpl-depsolve: Always return result
Previously it would not return a result if there was an error. This adds
a deferred function that always returns the current contents of result,
and if there is an error it logs it.

Related: RHEL-60125
2025-01-30 08:00:12 +01:00
Brian C. Lane
29f81a029a v2_test: Add a test for /search/packages
Add a new mockSearch job handler to return static results, add tests for
searching, for distro error, and for arch error.

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Brian C. Lane
17bebb547c v2 tests: Make it easier to add mock handlers to newV2Server
This refactors the server setup, splitting the depsolve and ostree
resolve goroutine creation into helper functions. It also removes the
use of channels, which was always set to "" (and in the case of the
multi-tenancy test an empty list, which acts the same).

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Brian C. Lane
532f1b0396 cloudapi: Hook up the /search/packages handler
This connects all the pieces needed to implement the search.

If you POST a request to /search/packages like this:

    {
      "packages": [
        "tmux"
      ],
      "distribution": "fedora-41",
      "architecture": "x86_64"
    }

It will return details about the tmux packages that looks like this:

{
  "packages": [
    {
      "arch": "x86_64",
      "buildtime": "2024-10-10T00:19:06Z",
      "description": "tmux is ...",
      "license": "ISC AND BSD-2-Clause AND BSD-3-Clause AND SSH-short AND LicenseRef-Fedora-Public-Domain",
      "name": "tmux",
      "release": "2.fc41",
      "summary": "A terminal multiplexer",
      "url": "https://tmux.github.io/",
      "version": "3.5a"
    }
  ]
}

Resolves: RHEL-60136
2025-01-30 08:00:12 +01:00
Brian C. Lane
234e8a09eb openapi: Add /search/packages route to the openapi schema
The request is similar to a depsolve request, it must include the
distribution and architecture. It can optionally include a list of
repositories to search, but if they are not included it searches the
default repos for the distro:arch

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Brian C. Lane
bd55670dd9 worker: Add worker server support for Search job
This adds support for sending a search job to the worker client,
gathering results, and handling errors.

The errors returned are the same as for the Depsolve job, since they
both use the osbuild-depsolve-dnf script via images/pkg/dnfjson.

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Brian C. Lane
d8df7e7cd4 worker: Add search job implementation to worker client
This is similar to the depsolve job, and it shares the solver (which
supports locking, as does DNF itself). This will allow searching for
specific package names, names with globs, or names as substrings of
other names using * as the wildcard.

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Brian C. Lane
84c0f79286 osbuild-worker: Add helper to setup Repo SSL
This same operation will be done in a few places, turn it into a
function.

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Tomáš Hozza
cc79ad15e5 Test/worker-executor: make sure that the port is opened in firewall
It turned out that our new F41 CI images have firewalld installed. Make
sure that the worker-executor port is opened in firewall, otherwise the
worker can't connect to the executor.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-30 07:48:44 +01:00
Tomáš Hozza
4e317f1814 Update all rpmrepo snapshots to 20250115
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-30 07:48:44 +01:00
Tomáš Hozza
2bc27d2d85 Many: replace 'which' with 'type -p' in test cases
Unfortunately, `which` does not seem to be installed by default on our
F41 CI images. Instead of doing the dance with rebuilds, which has been
problematic recently, let's not rely on `which` in scripts any more,
since we can replace it with the Bash built-in `type` command.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-30 07:48:44 +01:00
Tomáš Hozza
55c22bf4df Schutzbot: update terraform ref
The original ref pointed to a commit, which used the plain Fedora 41
Cloud Base images, which don't have any test dependencies installed. Use
the latest commit from `main`.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-30 07:48:44 +01:00
Tomáš Hozza
5e9ef9e5d1 Add test/data/repositories/fedora-41.json
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-30 07:48:44 +01:00
Tomáš Hozza
262d94f14f test/data/repositories: rm fedora-39.json
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-30 07:48:44 +01:00
Tomáš Hozza
7af1b57701 GitLab CI: don't test on EOL F39
Replace F39 with F41

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-30 07:48:44 +01:00
Michael Vogt
e8a0e8ff49 weldr: update depsolve calls in weldr API
Update the weldr API to work with the new depsolve API.
Update tests to match (adding repo_id).

Co-authored-by: Achilleas Koutsou <achilleas@koutsou.net>
2025-01-29 18:03:11 +01:00
Achilleas Koutsou
dab836de19 weldr/test: fix test run name 2025-01-29 18:03:11 +01:00
Michael Vogt
a6ba0785b0 cloudapi: fix manifestSource.Serialize() 2025-01-29 18:03:11 +01:00