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/scripts/build-info: include runner-distro in info.json (HMS-5350) #1152

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

thozza
Copy link
Member

@thozza thozza commented Jan 20, 2025

While working on replacing manifest-db with images build cache, I've run into a situation when the ability to download the image artifact after the downloading of build info metadata would be useful. Specifically when tests are run in batches, when one needs to first determine the full list of test cases and then download image artifacts only for the relevant test cases.

Due to the size of image artifacts, downloading all of them every time is not really feasible as it takes non-trivial amount of time.

The idea is to be able to download image artifact from S3 after build metadata have been already downloaded. The info.json already contains almost all information necessary to construct the S3 path to download, except for the runner distro.

Let's add the runner-distro property to info.json, so that we can have a script that reads info.json and is able to download the complete build cache for the specific build.

Lastly, we determine the need to rebuild image on the runner-distro, osbuild-ref and manifest-id values. Therefore it makes sense, that two builds done on different runner distro would have different info.json, which was not the case until now.

EDIT:
I understand that this change will not ensure that the current build cache info.json files will contain the new value. I'd update osbuild-ref once this gets merged to ensure it is there. Determining the runner distro from the Schutzfile can be still used as a reasonable fallback.

/jira-epic COMPOSER-2318

JIRA: HMS-5350

While working on replacing manifest-db with images build cache, I've run
into a situation when the ability to download the image artifact after
the downloading of build info metadata would be useful. Specifically
when tests are run in batches, when one needs to first determine the
full list of test cases and then download image artifacts only for the
relevant test cases.

Due to the size of image artifacts, downloading all of them every time
is not really feasible as it takes non-trivial amount of time.

The idea is to be able to download image artifact from S3 after build
metadata have been already downloaded. The `info.json` already contains
almost all information necessary to construct the S3 path to download,
except for the runner distro.

Let's add the `runner-distro` property to `info.json`, so that we can
have a script that reads `info.json` and is able to download the
complete build cache for the specific build.

Lastly, we determine the need to rebuild image on the runner-distro,
osbuild-ref and manifest-id values. Therefore it makes sense, that two
builds done on different runner distro would have different `info.json`,
which was not the case until now.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
@thozza thozza requested a review from achilleas-k January 20, 2025 05:14
@schutzbot schutzbot changed the title Test/scripts/build-info: include runner-distro in info.json Test/scripts/build-info: include runner-distro in info.json (HMS-5350) Jan 20, 2025
@thozza thozza requested review from mvo5 and schuellerf January 20, 2025 05:17
@achilleas-k achilleas-k added this pull request to the merge queue Jan 20, 2025
Merged via the queue into osbuild:main with commit 40a2980 Jan 20, 2025
21 checks passed
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.

3 participants