Skip to content

Dispatcher: remove cluster upgrade job pattern from dispatching when cluster blocked#5041

Open
jmguzik wants to merge 1 commit intoopenshift:mainfrom
jmguzik:feat-remove-upgrade
Open

Dispatcher: remove cluster upgrade job pattern from dispatching when cluster blocked#5041
jmguzik wants to merge 1 commit intoopenshift:mainfrom
jmguzik:feat-remove-upgrade

Conversation

@jmguzik
Copy link
Copy Markdown
Contributor

@jmguzik jmguzik commented Mar 23, 2026

No description provided.

…cluster blocked

Signed-off-by: Jakub Guzik <jguzik@redhat.com>
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 23, 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: 93920ad0-5c42-45a6-8ebf-e20bd00addb1

📥 Commits

Reviewing files that changed from the base of the PR and between 9373ef5 and 8defdf2.

📒 Files selected for processing (2)
  • cmd/prow-job-dispatcher/main.go
  • cmd/prow-job-dispatcher/main_test.go

Walkthrough

Introduces cluster relocation blocking exceptions via regex patterns for specific job types. A new function conditionally filters blocked clusters per job, removing the determined target cluster from the blocked set when the job matches an exception pattern. This logic integrates into both delta and volume dispatch paths.

Changes

Cohort / File(s) Summary
Cluster Relocation Blocking Logic
cmd/prow-job-dispatcher/main.go
Added regexp import and blockedClusterRelocationJobExceptions regex patterns to identify exempt jobs (e.g., periodic-build[0-9]{2}-upgrade). Introduced isBlockedClusterRelocationException() to match job names against patterns and blockedClustersForJob() to conditionally filter blocked clusters per job. Updated findClusterAssigmentsForJobs() and clusterVolume.addToVolume() to compute per-job blocked sets instead of using shared blocked set directly.
Test Coverage
cmd/prow-job-dispatcher/main_test.go
Added TestBlockedClustersForJob validating the filtered blocked set logic across matching and non-matching jobs. Added TestAddToVolumeSkipsBlockedRelocationForMatchingUpgradePeriodic verifying that matching upgrade jobs remain on blocked clusters while non-matching jobs are relocated.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

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

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

@openshift-ci openshift-ci bot requested review from danilo-gemoli and smg247 March 23, 2026 15:13
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmguzik

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

Pipeline controller notification

No second-stage tests were triggered for this PR.

This can happen when:

  • The changed files don't match any pipeline_run_if_changed patterns
  • All files match pipeline_skip_if_only_changed patterns
  • No pipeline-controlled jobs are defined for the main branch

Use /test ? to see all available tests.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 23, 2026

@jmguzik: The following test 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/breaking-changes 8defdf2 link false /test breaking-changes

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.

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