Skip to content

test: explicitly process bootc templates#6486

Open
copejon wants to merge 1 commit intoopenshift:mainfrom
copejon:ushift-6788
Open

test: explicitly process bootc templates#6486
copejon wants to merge 1 commit intoopenshift:mainfrom
copejon:ushift-6788

Conversation

@copejon
Copy link
Copy Markdown
Contributor

@copejon copejon commented Apr 9, 2026

Summary

  • Adds explicit processing for shared bootc templates from image-blueprints-bootc/templates/ directory
  • Templates are processed after package-specific templates but before mirror registry
  • Respects existing FORCE_REBUILD logic to skip already-processed templates

Fixes: USHIFT-6788

Test plan

  • Verify bootc image build processes templates from the shared templates directory
  • Verify existing template processing behavior is unchanged
  • Verify FORCE_REBUILD flag works correctly for shared templates

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: ab9a3d06-2ab1-4756-850a-0258b9ffe65d

📥 Commits

Reviewing files that changed from the base of the PR and between 7b2121a and e84acfe.

📒 Files selected for processing (1)
  • test/bin/pyutils/build_bootc_images.py

Walkthrough

Added a pre-build templating step in main() that scans image-blueprints-bootc/templates for *.template files, renders them to BOOTC_IMAGE_DIR with the .template suffix stripped, and conditionally skips rendering if the output file exists and FORCE_REBUILD is false.

Changes

Cohort / File(s) Summary
Build bootc images templating
test/bin/pyutils/build_bootc_images.py
Added template rendering loop that scans for *.template files in image-blueprints-bootc/templates, renders outputs to BOOTC_IMAGE_DIR, and skips if file exists and FORCE_REBUILD is false. Loop positioned after package-sources-bootc processing and before mirror_registry.sh invocation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

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

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

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

@openshift-ci openshift-ci bot requested review from eslutsky and kasturinarra April 9, 2026 18:19
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 9, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: copejon

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 9, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 9, 2026

@copejon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-tests-bootc-periodic-el10 e84acfe link true /test e2e-aws-tests-bootc-periodic-el10
ci/prow/e2e-aws-tests-bootc-arm-el10 e84acfe link true /test e2e-aws-tests-bootc-arm-el10
ci/prow/e2e-aws-tests-periodic e84acfe link true /test e2e-aws-tests-periodic
ci/prow/e2e-aws-tests e84acfe link true /test e2e-aws-tests
ci/prow/e2e-aws-tests-bootc-arm-el9 e84acfe link true /test e2e-aws-tests-bootc-arm-el9
ci/prow/e2e-aws-tests-bootc-periodic-el9 e84acfe link true /test e2e-aws-tests-bootc-periodic-el9
ci/prow/e2e-aws-tests-bootc-el10 e84acfe link true /test e2e-aws-tests-bootc-el10
ci/prow/e2e-aws-tests-bootc-periodic-arm-el9 e84acfe link true /test e2e-aws-tests-bootc-periodic-arm-el9
ci/prow/e2e-aws-tests-bootc-periodic-arm-el10 e84acfe link true /test e2e-aws-tests-bootc-periodic-arm-el10
ci/prow/e2e-aws-tests-bootc-el9 e84acfe link true /test e2e-aws-tests-bootc-el9

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.

ofile = os.path.join(BOOTC_IMAGE_DIR, ifile)
ifile = os.path.join(ipkgdir, ifile)
run_template_cmd(ifile, ofile, args.dry_run)
# Process shared bootc templates (USHIFT-6788)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove the issue ID from the comment. We do not usually do this unless it's a TODO item.

run_template_cmd(ifile, ofile, args.dry_run)
# Process shared bootc templates (USHIFT-6788)
tpldir = f"{SCRIPTDIR}/../image-blueprints-bootc/templates"
if os.path.isdir(tpldir):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This code is almost a duplicate of a block from process_group function.
Let's refactor it into process_template_files and call from both places?

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants