Skip to content

OCPBUGS-61136: Only print catalog rebuild message if there are catalo…#1386

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
dorzel:OCPBUGS-61136
Apr 10, 2026
Merged

OCPBUGS-61136: Only print catalog rebuild message if there are catalo…#1386
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
dorzel:OCPBUGS-61136

Conversation

@dorzel
Copy link
Copy Markdown
Member

@dorzel dorzel commented Apr 6, 2026

…gs to rebuild

Description

Currently we unconditionally print the rebuilding catalogs message before looping through the collected list to see if they need rebuilding. This adds a pre-scan check that aborts before the loop if none are found, and prints the message if at least one exists that needs to be rebuilt.

Github / Jira issue: https://redhat.atlassian.net/browse/OCPBUGS-61136

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

  • Ran various m2d with the ISC specified in the bug

Expected Outcome

  • output no longer exists

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

@dorzel: This pull request references Jira Issue OCPBUGS-61136, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @nidangavali

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

…gs to rebuild

Description

Currently we unconditionally print the rebuilding catalogs message before looping through the collected list to see if they need rebuilding. This adds a pre-scan check that aborts before the loop if none are found, and prints the message if at least one exists that needs to be rebuilt.

Github / Jira issue: https://redhat.atlassian.net/browse/OCPBUGS-61136

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

  • Ran various m2d with the ISC specified in the bug

Expected Outcome

  • output no longer exists

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-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Apr 6, 2026
@openshift-ci openshift-ci Bot requested a review from nidangavali April 6, 2026 18:08
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 75f53599-4bad-40ad-a23f-8ffa2eab32c9

📥 Commits

Reviewing files that changed from the base of the PR and between 18c646f and b4e5d96.

📒 Files selected for processing (1)
  • internal/pkg/cli/executor.go

Walkthrough

The RebuildCatalogs method in ExecutorSchema now includes an early return optimization. Before processing the rebuild loop, it checks whether any catalog entries have ToRebuild == true. If none require rebuilding, the function returns immediately, skipping the rebuild iteration and logging.

Changes

Cohort / File(s) Summary
Catalog Rebuild Optimization
internal/pkg/cli/executor.go
Added pre-check in RebuildCatalogs to validate whether any catalogs require rebuilding; if not, returns early without executing the rebuild loop.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 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 adolfo-ab and r4f4 April 6, 2026 18:08
@dorzel
Copy link
Copy Markdown
Member Author

dorzel commented Apr 7, 2026

/retest

Copy link
Copy Markdown
Contributor

@adolfo-ab adolfo-ab left a comment

Choose a reason for hiding this comment

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

/lgtm

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

r4f4 commented Apr 8, 2026

You could use the opportunity and refactor the code to use early returns and reduce the indent level. Maybe even extract the catalog rebuild code into a function.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 10, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adolfo-ab, aguidirh, dorzel

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 10, 2026
@aguidirh
Copy link
Copy Markdown
Contributor

/verified later @nidangavali

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

@aguidirh: This PR has been marked to be verified later by @nidangavali.

Details

In response to this:

/verified later @nidangavali

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
Copy link
Copy Markdown

openshift-ci Bot commented Apr 10, 2026

@dorzel: 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 f42bab7 into openshift:main Apr 10, 2026
12 checks passed
@openshift-ci-robot
Copy link
Copy Markdown

@dorzel: Jira Issue OCPBUGS-61136: All pull requests linked via external trackers have merged:

This pull request has the verified-later tag and will need to be manually moved to VERIFIED after testing. Jira Issue OCPBUGS-61136 has been moved to the MODIFIED state.

Details

In response to this:

…gs to rebuild

Description

Currently we unconditionally print the rebuilding catalogs message before looping through the collected list to see if they need rebuilding. This adds a pre-scan check that aborts before the loop if none are found, and prints the message if at least one exists that needs to be rebuilt.

Github / Jira issue: https://redhat.atlassian.net/browse/OCPBUGS-61136

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

  • Ran various m2d with the ISC specified in the bug

Expected Outcome

  • output no longer exists

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.

@dorzel dorzel deleted the OCPBUGS-61136 branch April 10, 2026 14:45
@dorzel
Copy link
Copy Markdown
Member Author

dorzel commented Apr 10, 2026

/cherry-pick release 4.21

@openshift-cherrypick-robot
Copy link
Copy Markdown

@dorzel: cannot checkout release: error checking out "release": exit status 1 error: pathspec 'release' did not match any file(s) known to git

Details

In response to this:

/cherry-pick release 4.21

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.

@dorzel
Copy link
Copy Markdown
Member Author

dorzel commented Apr 10, 2026

/cherry-pick release-4.21

@openshift-cherrypick-robot
Copy link
Copy Markdown

@dorzel: new pull request created: #1388

Details

In response to this:

/cherry-pick release-4.21

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.

@openshift-merge-robot
Copy link
Copy Markdown
Contributor

Fix included in release 4.22.0-0.nightly-2026-04-11-163821

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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 verified-later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants