Skip to content

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

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

Draft
wants to merge 2 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:

for image_ref in $(cat manifests/base/params.env | grep "\-n=" | cut -d "=" -f 2); do DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock poetry run pytest tests/containers --image "${image_ref}" -k test_image_size_change; done

for each image separately (e.g. runtimes):

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
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
@jstourac
Copy link
Member Author

jstourac commented Apr 29, 2025

@openshift-ci openshift-ci bot added size/xxl and removed size/m labels Apr 29, 2025
jiridanek added a commit to jiridanek/notebooks that referenced this pull request Jun 18, 2025
@atheo89
Copy link
Member

atheo89 commented Jul 18, 2025

@jstourac is that PR still valid?

Copy link
Contributor

Caution

There are some errors in your PipelineRun template.

PipelineRun Error
unknown `Object 'Kind' is missing in '

List of images referenced from the Python code generation scripts for Tekton pipelines.

The structure of this file must be compatible with

https://docs.renovatebot.com/modules/manager/tekton/

Specifically, see function getDeps and function getBundleValue() in

https://github.com/renovatebot/renovate/blob/main/lib/modules/manager/tekton/extract.ts

This is using the 'older-style' bundle references (see ^^^), because they are a bit less verbose

Konflux (MintMaker) will then update the hashes in this yaml together with the generated Tekton pipelines

because the default renovate.json config includes .tekton/**.yaml (and .yml) files

https://github.com/konflux-ci/mintmaker/blob/289fefb5c7ac18c978b96080c2628d55d0712e83/config/renovate/renovate.json#L62-L70

items:

  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.4@sha256:1d26a89f1ad48279999cdcad3cb5ce43dc08620a6c07d8dfe5cc9c9e17622551
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:04f15cbce548e1db7770eee3f155ccb2cc0140a6c371dc67e9a34d83673ea0c0
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-init:0.2@sha256:737682d073a65a486d59b2b30e3104b93edd8490e0cd5e9b4a39703e47363f0f
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:9709088bf3c581d4763e9804d9ee3a1f06ad6a61c23237277057c4f0cdc4f9c3
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.2@sha256:153ef0382deef840d155f5146f134f39b480523a7d5c38ba9fea2b58792dd4b5
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-build-image-index:0.1@sha256:95be274b6d0432d4671e2c41294ec345121bdf01284b1c6c46b5537dc6b37e15
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.2@sha256:9fe82c9511f282287686f918bf1a543fcef417848e7a503357e988aab2887cee
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-deprecated-image-check:0.5@sha256:5d63b920b71192906fe4d6c4903f594e6f34c5edcff9d21714a08b5edcfbc667
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-clair-scan:0.2@sha256:712afcf63f3b5a97c371d37e637efbcc9e1c7ad158872339d00adc6413cd8851
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.2@sha256:00b13d06d17328e105b11619ee4db98b215ca6ac02314a4776aa5fc2a974f9c1
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.3@sha256:a1cb59ed66a7be1949c9720660efb0a006e95ef05b3f67929dd8e310e1d7baef
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-clamav-scan:0.2@sha256:62c835adae22e36fce6684460b39206bc16752f1a4427cdbba4ee9afdd279670
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-sast-coverity-check-oci-ta:0.2@sha256:044412899f847dad17a64ae84f43ace5fd6fb976acbe64a42eb0a06bbff92499
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-coverity-availability-check:0.2@sha256:0b35292eed661c5e3ca307c0ba7f594d17555db2a1da567903b0b47697fa23ed
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta:0.1@sha256:a591675c72f06fb9c5b1a3d60e6e4c58e4df5f7da180c7a4691a692a6e7e6496
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta:0.1@sha256:424f2f659c02998dc3a43e1ce869e3148982c59adb74f953f8fa91ff1c9ab86e
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:61c90b1c94a2a11cb11211a0d65884089b758c34254fcec164d185a402beae22
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:55a4ff2910ae2e4502f3841719935d37578bd52156bc789fcdf45ff48c2b048b
  • spec:
    taskRef:
    bundle: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:7b80f5a319d4ff1817fa097cbdbb9473635562f8ea3022e64933e387d3b68715

'` |

@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.

Copy link
Contributor

coderabbitai bot commented Jul 18, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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