Skip to content
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

Test/imgtestlib/get_osbuild_commit(): consider only gitlab-ci-runner distro (HMS-5243) #1124

Closed
wants to merge 2 commits into from

Conversation

thozza
Copy link
Member

@thozza thozza commented Jan 3, 2025

Previously, the osbuild commit stored in image build info.json was based on the host distro. However, we always use the same distro for all image build jobs, which is defined in the Schutzfile.

Modify the get_osbuild_commit() function to not take the distro as an argument, but instead read the gitlab-ci-runner from the Schutzfile and determine the osbuild commit based on its distro.

This will make it much easier to determine the actual osbuild commit that was (supposed to be) used for the image builds on the checked out branch. Consistency of data in image.info and the reality will be ensured.

Make get_osbuild_commit() raise a KeyError in case there's no osbuild commit defined in Shutzfile for the gitlab-ci-runner distro, so that we do not accidentally miss it and use unknown osbuild version from the distro repos.

/jira-epic COMPOSER-2318

JIRA: HMS-5243

thozza added 2 commits January 3, 2025 12:14
Previously, the osbuild commit stored in image build `info.json` was
based on the host distro. However, we always use the same distro for all
image build jobs, which is defined in the Schutzfile.

Modify the `get_osbuild_commit()` function to not take the distro as an
argument, but instead read the `gitlab-ci-runner` from the Schutzfile
and determine the osbuild commit based on its distro.

This will make it much easier to determine the actual osbuild commit
that was (supposed to be) used for the image builds on the checked out
branch. Consistency of data in `image.info` and the reality will be
ensured.

Make `get_osbuild_commit()` raise a KeyError in case there's no
osbuild commit defined in Shutzfile for the gitlab-ci-runner distro, so
that we do not accidentally miss it and use unknown osbuild version from
the distro repos.

Signed-off-by: Tomáš Hozza <[email protected]>
The `read_osrelease()` function is no longer used by any script,
therefore delete it.

Signed-off-by: Tomáš Hozza <[email protected]>
@schutzbot schutzbot changed the title Test/imgtestlib/get_osbuild_commit(): consider only gitlab-ci-runner distro Test/imgtestlib/get_osbuild_commit(): consider only gitlab-ci-runner distro (HMS-5243) Jan 3, 2025
@thozza thozza marked this pull request as draft January 3, 2025 11:18
@thozza
Copy link
Member Author

thozza commented Jan 3, 2025

I've missed the other dependencies. I'll rethink the whole change from a different angle...

@thozza thozza closed this Jan 3, 2025
@thozza thozza deleted the osbuild-commit branch January 3, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants