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

RHOAIENG-20088: chore(tests/containers) + GHA CI update: check images size change #901

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jstourac
Copy link
Member

@jstourac jstourac commented Feb 18, 2025

Description

Enhances our existing ci scripts for the params.env and existing
runtimes definitions with the actual image size check - we have preset
expected size for each of the image and we check that this size isn't
changed too much.

With this implementation we are checking the compressed image size to
avoid the image download.


Adds a new test to our pytest set to check the given image size compared
to the expected value. In this test we are checking the uncompressed
image size by summing up all the layeres of the image. This image is
usually downloaded on the machine where this is being run already.


https://issues.redhat.com/browse/RHOAIENG-20088

How Has This Been Tested?

Local execution of the:

./ci/check-params-env.sh
./ci/check-runtime-images.sh

and for the Pytest:

DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock poetry run pytest tests/containers --image quay.io/opendatahub/workbench-images@sha256:6a2da12a8bdc9cfcda27f4189827be5fbde4b4b4c4f7d92ac694d9360e3562dc -k test_image_size_change

We shall check all the existing images before merging this, though.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link
Contributor

openshift-ci bot commented Feb 18, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the size/l label Feb 18, 2025
Copy link
Contributor

openshift-ci bot commented Feb 18, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from jstourac. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added size/l and removed size/l labels Feb 18, 2025
@jstourac jstourac changed the title Test img size RHOAIENG-20088: chore(tests/containers) + GHA CI update: check images size change Feb 18, 2025
@openshift-ci openshift-ci bot added size/l and removed size/l labels Feb 18, 2025
@openshift-ci openshift-ci bot added size/l and removed size/l labels Feb 18, 2025
@openshift-ci openshift-ci bot added size/l and removed size/l labels Feb 18, 2025
@openshift-ci openshift-ci bot added size/l and removed size/l labels Feb 18, 2025
@jstourac
Copy link
Member Author

Didn't expect that many CI failures with this run - looks like the image sizes differ here against what I checked it locally. I'll check what is the rootcause tomorrow.

Also, I tried to raise a testing PR with the updated pipfiles to force the images being build jstourac#7 . Let's see.

@openshift-ci openshift-ci bot removed the size/l label Feb 20, 2025
@openshift-ci openshift-ci bot added the size/l label Feb 20, 2025
@jstourac
Copy link
Member Author

jstourac commented Feb 20, 2025

Okay, after some more checks also on the testing PR on my own fork #jstourac/pull/7, it looks like the cache we use for our builds may vary between different repository forks. This may affect the resulting size of the image for different users.

After consultation with Jiri, we think that the solution might be either in disabling the cache (well, we don't like it because the builds may take quite a long time to be done - but we haven't try). Another option might be to switch from tag to sha for our base images. This is something that will be done as part of the migration to konflux.

Well, for now - so that we can move on a little bit at least, I'll split this PR into two separate ones - one (this) will be kept only for the pytest based check. The other will be for the bash based checks for GHA CI checking when images are updated in params.env file (#912).

This PR will be worked on a bit later.

Adds a new test to our pytest set to check the given image size compared
to the expected value. In this test we are checking the uncompressed
image size by summing up all the layeres of the image. This image is
usually downloaded on the machine where this is being run already.

https://issues.redhat.com/browse/RHOAIENG-20088
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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