Skip to content

USHIFT-6812: Optimize bootc image building for upgrade tests#6540

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
vanhalenar:upgrade-test-symlinks
Apr 24, 2026
Merged

USHIFT-6812: Optimize bootc image building for upgrade tests#6540
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
vanhalenar:upgrade-test-symlinks

Conversation

@vanhalenar
Copy link
Copy Markdown
Contributor

@vanhalenar vanhalenar commented Apr 20, 2026

Contains changes from this PR, should be merged after.

This PR introduces a new el10 bootc image layer called layer5-upgrade, which contains symbolic links to el9 images required for upgrade scenarios. This allows us to not build all el9 images in el10 jobs, but only the required ones, thus saving time.

Summary by CodeRabbit

  • Tests
    • Updated CI upgrade test sequence to use new test blueprint layer configuration.
    • Added test blueprint reference files for RHEL 10 upgrade testing scenarios.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 20, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 20, 2026

@vanhalenar: This pull request references USHIFT-6812 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Contains changes from this PR, should be merged after.

This PR introduces a new el10 bootc image layer called layer5-upgrade, which contains symbolic links to el9 images required for upgrade scenarios. This allows us to not build all el9 images in el10 jobs, but only the required ones, thus saving time.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 20, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 20, 2026

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 688a4a0d-e4ee-40d1-9893-d647438ef6f2

📥 Commits

Reviewing files that changed from the base of the PR and between 7ba71ee and 2dd919b.

📒 Files selected for processing (8)
  • test/bin/ci_phase_iso_build.sh
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel96-bootc.image-bootc
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel96-test-agent.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel98-bootc.image-bootc
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel98-test-agent.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group2/rhel96-bootc-prel.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group2/rhel96-bootc-yminus2.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group2/rhel98-bootc-source.containerfile
✅ Files skipped from review due to trivial changes (7)
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel98-test-agent.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group2/rhel98-bootc-source.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group2/rhel96-bootc-prel.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel96-test-agent.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel96-bootc.image-bootc
  • test/image-blueprints-bootc/el10/layer5-upgrade/group2/rhel96-bootc-yminus2.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel98-bootc.image-bootc
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/bin/ci_phase_iso_build.sh

Walkthrough

The CI build script is updated to use the el10 layer5-upgrade blueprint layer for upgrade testing instead of el9 layers. Eight reference files are added under the el10 layer5-upgrade directory, each pointing to corresponding el9 base layer files.

Changes

Cohort / File(s) Summary
CI Build Script
test/bin/ci_phase_iso_build.sh
Updated upgrade-test bootc build sequence for el10 to use layer5-upgrade instead of layer1-base and layer2-presubmit.
el10 Layer5-Upgrade Blueprint References
test/image-blueprints-bootc/el10/layer5-upgrade/group1/*, test/image-blueprints-bootc/el10/layer5-upgrade/group2/*
Added 8 reference files pointing to corresponding el9 base layer files (rhel96/rhel98 variants for bootc, containerfile, and test-agent resources).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: optimizing bootc image building for upgrade tests by introducing el10 layer5-upgrade with symlinks to el9 images.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed No Ginkgo test files (*.go test files) are modified in this PR, making the stable test names check not applicable.
Test Structure And Quality ✅ Passed No Ginkgo test code files are present in this PR. The PR modifies CI build scripts and blueprint reference files only.
Microshift Test Compatibility ✅ Passed This PR does not add new Ginkgo e2e tests. Changes are build configuration artifacts only.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Custom check for SNO Test Compatibility not applicable. PR only modifies CI build scripts and blueprint config files, no new e2e tests added.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only test infrastructure: CI shell script and container image build files. No production Kubernetes scheduling code introduced.
Ote Binary Stdout Contract ✅ Passed PR modifies only CI infrastructure files with no Go code or stdout writes affecting OTE binary implementation.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR does not introduce new Ginkgo e2e tests; changes are CI script and symlinks to existing configurations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
test/bin/pyutils/build_bootc_images.py (1)

603-608: De-duplicate repeated layer dirs before processing.

If the same -l is passed more than once, the same groups are rebuilt multiple times. A small normalization step avoids accidental duplicate work.

♻️ Proposed fix
-            args.layer_dir = [os.path.abspath(d) for d in args.layer_dir]
+            args.layer_dir = list(dict.fromkeys(os.path.abspath(d) for d in args.layer_dir))

Also applies to: 679-684

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/bin/pyutils/build_bootc_images.py` around lines 603 - 608, The code
currently converts args.layer_dir to absolute paths and then iterates them, but
does not remove duplicates so repeated -l entries cause redundant rebuilds;
before validating and processing, normalize args.layer_dir by deduplicating
while preserving order (e.g., replace args.layer_dir with a list of unique
absolute paths derived from args.layer_dir) and then continue with the existing
isdir check and downstream processing (apply the same deduplication step in the
other identical block that handles args.layer_dir later around the second
occurrence).
test/bin/ci_phase_iso_build.sh (1)

140-140: Inconsistent path quoting.

Other paths in this function use double quotes (e.g., lines 135, 136, 144, 147), but this one doesn't. While it works since it's a literal path, consider quoting for consistency.

Suggested fix
-                $(dry_run) bash -x ./bin/build_bootc_images.sh -l ./image-blueprints-bootc/el10/layer5-upgrade
+                $(dry_run) bash -x ./bin/build_bootc_images.sh -l "./image-blueprints-bootc/el10/layer5-upgrade"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/bin/ci_phase_iso_build.sh` at line 140, The call to launch
build_bootc_images.sh uses an unquoted path argument ($(dry_run) bash -x
./bin/build_bootc_images.sh -l ./image-blueprints-bootc/el10/layer5-upgrade)
which is inconsistent with other invocations; update the invocation to quote the
path argument (for example -l "./image-blueprints-bootc/el10/layer5-upgrade") so
it matches the quoting style used on surrounding lines and prevents
word-splitting if the path ever contains spaces.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/bin/ci_phase_iso_build.sh`:
- Line 140: The call to launch build_bootc_images.sh uses an unquoted path
argument ($(dry_run) bash -x ./bin/build_bootc_images.sh -l
./image-blueprints-bootc/el10/layer5-upgrade) which is inconsistent with other
invocations; update the invocation to quote the path argument (for example -l
"./image-blueprints-bootc/el10/layer5-upgrade") so it matches the quoting style
used on surrounding lines and prevents word-splitting if the path ever contains
spaces.

In `@test/bin/pyutils/build_bootc_images.py`:
- Around line 603-608: The code currently converts args.layer_dir to absolute
paths and then iterates them, but does not remove duplicates so repeated -l
entries cause redundant rebuilds; before validating and processing, normalize
args.layer_dir by deduplicating while preserving order (e.g., replace
args.layer_dir with a list of unique absolute paths derived from args.layer_dir)
and then continue with the existing isdir check and downstream processing (apply
the same deduplication step in the other identical block that handles
args.layer_dir later around the second occurrence).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: cbe2fa57-d081-4dba-9491-d52ac2bb15fe

📥 Commits

Reviewing files that changed from the base of the PR and between fe29d2a and 7ba71ee.

📒 Files selected for processing (36)
  • test/bin/ci_phase_iso_build.sh
  • test/bin/pyutils/build_bootc_images.py
  • test/image-blueprints-bootc/el10/layer1-base/group1/rhel102-test-agent.containerfile
  • test/image-blueprints-bootc/el10/layer1-base/group2/rhel102-bootc-crel-isolated.containerfile
  • test/image-blueprints-bootc/el10/layer1-base/group2/rhel102-bootc-crel-optionals.containerfile
  • test/image-blueprints-bootc/el10/layer1-base/group2/rhel102-bootc-crel.containerfile
  • test/image-blueprints-bootc/el10/layer1-base/group2/rhel102-bootc.image-bootc
  • test/image-blueprints-bootc/el10/layer4-release/group1/rhel102-bootc-brew-lrel-optional.containerfile
  • test/image-blueprints-bootc/el10/layer4-release/group1/rhel102-bootc-brew-nightly-with-optional.containerfile
  • test/image-blueprints-bootc/el10/layer4-release/group1/rhel102-bootc-brew.containerfile
  • test/image-blueprints-bootc/el10/layer4-release/group2/rhel102-bootc-brew-lrel-fips.containerfile
  • test/image-blueprints-bootc/el10/layer4-release/group2/rhel102-bootc-brew-lrel-optional.image-bootc
  • test/image-blueprints-bootc/el10/layer4-release/group2/rhel102-bootc-brew-lrel-tuned.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel96-bootc.image-bootc
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel96-test-agent.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel98-bootc.image-bootc
  • test/image-blueprints-bootc/el10/layer5-upgrade/group1/rhel98-test-agent.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group2/rhel96-bootc-prel.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group2/rhel96-bootc-yminus2.containerfile
  • test/image-blueprints-bootc/el10/layer5-upgrade/group2/rhel98-bootc-source.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group1/rhel96-test-agent.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group1/rhel98-test-agent.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group2/rhel96-bootc-prel.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group2/rhel96-bootc-yminus2.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group2/rhel96-bootc.image-bootc
  • test/image-blueprints-bootc/el9/layer1-base/group2/rhel98-bootc-crel-isolated.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group2/rhel98-bootc-crel-optionals.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group2/rhel98-bootc-crel.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group2/rhel98-bootc.image-bootc
  • test/image-blueprints-bootc/el9/layer4-release/group1/rhel96-bootc-brew-y1-with-optional.containerfile
  • test/image-blueprints-bootc/el9/layer4-release/group1/rhel96-bootc-brew-y2-with-optional.containerfile
  • test/image-blueprints-bootc/el9/layer4-release/group1/rhel98-bootc-brew-lrel-optional.containerfile
  • test/image-blueprints-bootc/el9/layer4-release/group1/rhel98-bootc-brew-nightly-with-optional.containerfile
  • test/image-blueprints-bootc/el9/layer4-release/group2/rhel98-bootc-brew-lrel-fips.containerfile
  • test/image-blueprints-bootc/el9/layer4-release/group2/rhel98-bootc-brew-lrel-optional.image-bootc
  • test/image-blueprints-bootc/el9/layer4-release/group2/rhel98-bootc-brew-lrel-tuned.containerfile

@vanhalenar vanhalenar force-pushed the upgrade-test-symlinks branch from 7ba71ee to 2dd919b Compare April 22, 2026 08:15
@vanhalenar vanhalenar marked this pull request as ready for review April 22, 2026 08:40
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2026
@openshift-ci openshift-ci Bot requested review from ggiguash and pmtk April 22, 2026 08:40
@agullon
Copy link
Copy Markdown
Contributor

agullon commented Apr 22, 2026

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 22, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 22, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agullon, vanhalenar

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

The pull request process is described here

Details 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 22, 2026
@vanhalenar
Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@vanhalenar
Copy link
Copy Markdown
Contributor Author

/retest

@vanhalenar
Copy link
Copy Markdown
Contributor Author

/retest

@ggiguash
Copy link
Copy Markdown
Contributor

/verified by ci

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 24, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@ggiguash: This PR has been marked as verified by ci.

Details

In response to this:

/verified by ci

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 openshift-eng/jira-lifecycle-plugin repository.

@agullon
Copy link
Copy Markdown
Contributor

agullon commented Apr 24, 2026

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 24, 2026

@vanhalenar: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit 744e3a3 into openshift:main Apr 24, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants