fix: improve catalog release script for OCP version lifecycle#2386
fix: improve catalog release script for OCP version lifecycle#2386yanmxa wants to merge 2 commits intostolostron:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yanmxa The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough
Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
8001f79 to
5c7c923
Compare
5c7c923 to
5ad1a2b
Compare
5ad1a2b to
3805820
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/skills/new-release/scripts/04-catalog.sh:
- Around line 680-698: Resolve the unresolved git merge markers by removing the
conflict lines (<<<<<<<, =======, >>>>>>>) and keep the incoming logic that
checks and updates the README: keep the grep -q "$PREV_CATALOG_TAG" conditional,
the sed calls that use SED_INPLACE to replace PREV_CATALOG_TAG → CATALOG_TAG and
BASE_BRANCH → CATALOG_BRANCH, and the associated echo messages; ensure variables
README_FILE, PREV_CATALOG_TAG, CATALOG_TAG, BASE_BRANCH, CATALOG_BRANCH and
SED_INPLACE are referenced exactly as in the incoming block so the script is
idempotent and parses correctly.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8f414982-88ea-43c5-9408-9b2b096aa695
📒 Files selected for processing (1)
.claude/skills/new-release/scripts/04-catalog.sh
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/skills/new-release/scripts/04-catalog.sh:
- Around line 680-689: The current conditional gates the
BASE_BRANCH→CATALOG_BRANCH sed replacement behind a grep for PREV_CATALOG_TAG,
so if the tag was already updated but the branch string is stale it will be
skipped; change the logic so the sed "${SED_INPLACE[@]}"
"s/${BASE_BRANCH}/${CATALOG_BRANCH}/g" on README_FILE always runs
(unconditionally or in its own check) regardless of whether PREV_CATALOG_TAG
exists, and adjust the echo messages accordingly to reflect whether each
replacement actually occurred; locate the block referencing PREV_CATALOG_TAG,
CATALOG_TAG, BASE_BRANCH, CATALOG_BRANCH, README_FILE and move or duplicate the
branch-rewrite sed out of the grep-guarded branch so branch updates are applied
and reported independently.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 64de85e2-7437-4961-89e7-391fbd8c8caa
📒 Files selected for processing (1)
.claude/skills/new-release/scripts/04-catalog.sh
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/skills/new-release/scripts/04-catalog.sh:
- Around line 549-551: The early-exit branch skips running the cleanup script
when NEW_CONTAINERFILE already exists; change the logic so the copy-from-PREV
step only runs when PREV_CONTAINERFILE exists and NEW_CONTAINERFILE does not,
but always invoke the filter step (filter_catalog.py) against NEW_CONTAINERFILE
even if it already existed; update the conditional around
NEW_CONTAINERFILE/PREV_CONTAINERFILE to only guard copying (leave the echo/info
message) and ensure the filter_catalog.py invocation and any sanitization logic
for Containerfile.catalog always runs for NEW_CONTAINERFILE; apply the same fix
to the similar block that currently lives around the other conditional (the one
referenced at lines 571-581).
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 669f1e62-6b7c-4f48-9ec4-be3293d3ecda
📒 Files selected for processing (1)
.claude/skills/new-release/scripts/04-catalog.sh
a2e9f54 to
d6826c8
Compare
- Remove filter_catalog.py lines from new OCP platform Containerfiles (new platforms have no existing catalog entries to filter) - Clean up all OCP version directories and pipelines below OCP_MIN (not just the single previous version) - Add README.md version update step - Skip Containerfile creation if it already exists on the branch Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Meng Yan <myan@redhat.com>
- Separate catalog tag and branch replacements into independent grep checks so stale branch references are updated even if the tag was already correct - Always sanitize filter_catalog.py lines from new Containerfile regardless of whether the file was just created or already existed from a previous run Signed-off-by: Meng Yan <myan@redhat.com>
d6826c8 to
4424ac7
Compare
|



Summary
filter_catalog.pylines from new OCP platform Containerfiles (new platforms have no existing catalog entries to filter)Test plan
04-catalog.shwithRELEASE_BRANCH=release-2.17and verified:🤖 Generated with Claude Code
Summary by CodeRabbit