ci: add regenerate-artifacts composite action and fix release branch workflow - #504
Conversation
Extract the duplicated `uv run build/gen_*.py` sequence into a reusable composite action at .github/actions/regenerate-artifacts/. Replace the inline commands in redhat-distro-container.yml (both build-test and publish jobs), test-pr-in-showroom.yml, and test-upstream-in-showroom.yml. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace setup-python with setup-uv (pre-commit hooks need uv). Add a regenerate-artifacts step before pre-commit so lockfiles are up to date when committed. Add distribution/config.yaml to the git add list. Simplify pre-commit to a single pass since artifacts are already regenerated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update the warning to reference lockfiles instead of the removed requirements.txt. Correct the Containerfile section to point to Containerfile.in since Containerfile is now auto-generated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughA reusable composite action now regenerates configuration, lockfile, and Containerfile artifacts with optional version and working-directory overrides. Release, Red Hat container, and showroom workflows use the action instead of duplicating generation commands. Release commits now include Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 8 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (8 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/actions/regenerate-artifacts/action.yml:
- Around line 26-28: Restore execution of build/verify_secrets.py in the
artifact regeneration command sequence in the composite action, alongside
gen_config.py, gen_lockfile.py, and gen_containerfile.py, so secret
synchronization is validated during regeneration.
In @.github/workflows/test-pr-in-showroom.yml:
- Around line 79-83: Update the “Regenerate distribution artifacts” step so it
does not execute the composite action or scripts from the PR checkout. Invoke a
trusted action definition from the base repository, or isolate this regeneration
in an unprivileged workflow without access to OC_TOKEN or
SHOWROOM_VLLM_API_TOKEN, while preserving the required artifact-generation
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: d1d5bfeb-4e10-4be4-a643-57bdff7a8c27
📒 Files selected for processing (6)
.github/actions/regenerate-artifacts/action.yml.github/workflows/create-or-update-release-branch.yml.github/workflows/redhat-distro-container.yml.github/workflows/test-pr-in-showroom.yml.github/workflows/test-upstream-in-showroom.ymlREADME.md
Decouple the build from the OpenShift concurrency group so builds run immediately while tests serialize on the shared cluster. - Forward PR commit SHA as a build job output for the test summary - Compress image artifact with zstd to reduce disk usage and transfer time - Deduplicate registry URL into a job-level REGISTRY_IMAGE env var - Remove dead pull_image step output - Add podman image exists check after loading the artifact Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 1228f25.
|
Tick the box to add this pull request to the merge queue (same as
|
|
@eoinfennessy: The following test has Succeeded: OCI Artifact Browser URLInspecting Test Artifacts ManuallyTo inspect your test artifacts manually, follow these steps:
mkdir -p oras-artifacts
cd oras-artifacts
oras pull quay.io/opendatahub/odh-ci-artifacts:ogx-core-functional-its-xncv5 |
Summary
Addresses review comments from #499:
.github/actions/regenerate-artifacts/): Extracts the duplicateduv run build/gen_*.pysequence into a reusable composite action, replacing inline commands across 4 workflow locations (redhat-distro-container.ymlx2,test-pr-in-showroom.yml,test-upstream-in-showroom.yml)setup-python3.11 tosetup-uv3.12 (pre-commit hooks needuv), adds aregenerate-artifactsstep so lockfiles are regenerated before commit, addsdistribution/config.yamlto thegit addlist, and simplifies pre-commit to a single passdistribution/requirements.txt→ lockfiles,Containerfilehand-edited → editContainerfile.inTest plan
pre-commit run --all-filespasses (includes actionlint for workflow validation)setup-uv+ composite action🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Containerfile.in.