Skip to content

Small Fixes to Release Job, Push Pipeline and catalog-build#156

Merged
openshift-merge-bot[bot] merged 3 commits intomedik8s:mainfrom
razo7:fix-release-job
Nov 27, 2025
Merged

Small Fixes to Release Job, Push Pipeline and catalog-build#156
openshift-merge-bot[bot] merged 3 commits intomedik8s:mainfrom
razo7:fix-release-job

Conversation

@razo7
Copy link
Copy Markdown
Member

@razo7 razo7 commented Nov 18, 2025

Why we need this PR

  • Release Job was building a bundle image without updating the bundle's image version by not running the bundle target. See the following error:
.
.
.
v0.19.0: digest: sha256:aac8265be2e3b4c5639daddc619995bfc56da4e07be01cf88d65e6508453c953 size: 939
make[1]: Leaving directory '/home/runner/work/node-maintenance-operator/node-maintenance-operator'
# Remove the catalog directory and Dockerfile
rm -r catalog catalog.Dockerfile
rm: cannot remove 'catalog': No such file or directory
rm: cannot remove 'catalog.Dockerfile': No such file or directory
make: [Makefile:461: catalog-build] Error 1 (ignored)
/home/runner/work/node-maintenance-operator/node-maintenance-operator/bin/opm/v1.60.0/opm generate dockerfile catalog
/home/runner/work/node-maintenance-operator/node-maintenance-operator/bin/opm/v1.60.0/opm init node-maintenance-operator \
	--default-channel=stable \
	--description=./README.md \
	--icon="./config/assets/nmo_blue_icon.png" \
	--output yaml \
	> catalog/index.yaml
/home/runner/work/node-maintenance-operator/node-maintenance-operator/bin/opm/v1.60.0/opm render quay.io/medik8s/node-maintenance-operator-bundle:v0.19.0 --output yaml >> catalog/index.yaml
make add_channel_entry_for_the_bundle
make[1]: Entering directory '/home/runner/work/node-maintenance-operator/node-maintenance-operator'
make[1]: Leaving directory '/home/runner/work/node-maintenance-operator/node-maintenance-operator'
/home/runner/work/node-maintenance-operator/node-maintenance-operator/bin/opm/v1.60.0/opm validate catalog
time="2025-11-17T15:06:44Z" level=fatal msg="package \"node-maintenance-operator\", bundle \"node-maintenance-operator.v0.0.1\" not found in any channel entries"
make: *** [Makefile:467: catalog-build] Error 1

In addition, this fix should help with openshift/release#71745 (comment)

  • Skip deletion of catalog files and errors when running the catalog-build target.
# Remove the catalog directory and Dockerfile
rm -r catalog catalog.Dockerfile
rm: cannot remove 'catalog': No such file or directory
rm: cannot remove 'catalog.Dockerfile': No such file or directory
make[1]: [Makefile:482: catalog-build] Error 1 (ignored)
  • Stop updating the latest tag when you push v* tags

Changes made

  • Modify the makefile target by calling bundle-community-k8s instead of bundle-community for the bundle-build-community target.
    Workaround: Use an older pipeline that works (e.g., from v0.18.0), instead of using a pipeline from main or a related release-branch.
  • Modify the catalog-build target with -rm -rf to skip deletion errors
  • The pipeline was running tests, and trying to push operator, bundle, and catalog images with tag 'latest' when we push a git tag upstream.

Which issue(s) this PR fixes

Test plan

Summary by CodeRabbit

  • Chores
    • Improved build scripts to perform safer cleanup and adjusted the prerequisite step for community bundle image builds.
  • CI
    • Updated post-submit workflow to stop triggering on tag pushes, narrowing automated runs to branch pushes only.

Release Job was building a bundle image without updating the bundle's image version, by running the bundle target.
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Nov 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
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Nov 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: razo7

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 18, 2025

📝 Walkthrough

Walkthrough

Makefile targets and catalog build steps were adjusted (safer removal with -rf, extended opm init flags, and a target dependency change from bundle-community to bundle-community-k8s). The GitHub Actions post-submit workflow no longer triggers on pushed tags (removed on.push.tags).

Changes

Cohort / File(s) Summary
Makefile changes
Makefile
- Use rm -rf for catalog directory and Dockerfile removals. - Extend opm init invocation with --default-channel, --description, --icon, --output yaml and redirect output to catalog index. - Change bundle-build-community dependency from bundle-community to bundle-community-k8s.
Workflow trigger update
.github/workflows/post-submit.yaml
Removed tag-based push trigger (on.push.tags), so the workflow no longer runs on tag pushes (e.g., v*) and now triggers only on branch pushes as configured.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review Makefile: check opm init flag effects on generated index, and verify rm -rf usage is safe in CI contexts.
  • Review change of bundle-build-community dependency to ensure bundle-community-k8s exists and produces expected artifacts.
  • Review workflow: confirm intended removal of tag-trigger and that other triggers still cover required CI runs.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main changes: fixes to the release job, push pipeline, and catalog-build target as documented in the raw summary.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

Use delete with 'force' to skip removing files that don't exist
The pipeline was running tests, and try to push operator, bundle and catalog images with tag 'latest' when we push a git tag upstream
@razo7 razo7 changed the title Build K8s community bundle by default for release Small Fixes to Release Job, Push Pipeline and catalog-build Nov 19, 2025
@slintes
Copy link
Copy Markdown
Member

slintes commented Nov 27, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 27, 2025
@razo7 razo7 marked this pull request as ready for review November 27, 2025 09:29
@openshift-ci openshift-ci bot requested review from beekhof and slintes November 27, 2025 09:29
@razo7
Copy link
Copy Markdown
Member Author

razo7 commented Nov 27, 2025

/retest

3 similar comments
@razo7
Copy link
Copy Markdown
Member Author

razo7 commented Nov 27, 2025

/retest

@razo7
Copy link
Copy Markdown
Member Author

razo7 commented Nov 27, 2025

/retest

@razo7
Copy link
Copy Markdown
Member Author

razo7 commented Nov 27, 2025

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit 2b207a9 into medik8s:main Nov 27, 2025
24 checks passed
razo7 added a commit to razo7/machine-deletion-remediation that referenced this pull request Feb 25, 2026
The post-submit workflow should only run on pushes to main.
Tag pushes should not trigger unversioned image builds, as
the release workflow handles versioned releases properly.

Similar fix applied in medik8s/node-maintenance-operator#156
razo7 added a commit to razo7/self-node-remediation that referenced this pull request Feb 25, 2026
The post-submit workflow should only run on pushes to main.
Tag pushes should not trigger unversioned image builds, as
the release workflow handles versioned releases properly.

Similar fix applied in medik8s/node-maintenance-operator#156
razo7 added a commit to razo7/machine-deletion-remediation that referenced this pull request Feb 25, 2026
The post-submit workflow should only run on pushes to main.
Tag pushes should not trigger unversioned image builds, as
the release workflow handles versioned releases properly.

Similar fix applied in medik8s/node-maintenance-operator#156
razo7 added a commit to razo7/self-node-remediation that referenced this pull request Feb 25, 2026
The post-submit workflow should only run on pushes to main.
Tag pushes should not trigger unversioned image builds, as
the release workflow handles versioned releases properly.

Similar fix applied in medik8s/node-maintenance-operator#156
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.

2 participants