Skip to content

Conversation

@jmguzik
Copy link
Contributor

@jmguzik jmguzik commented Jan 27, 2026

No description provided.

@openshift-ci-robot
Copy link
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

coderabbitai bot commented Jan 27, 2026

Walkthrough

Derives a repo-scoped base reference from the PR branch and uses it to filter presubmit jobs and pipeline context creation so only presubmits whose names include that repoBaseRef are processed. Tests updated to use fully-qualified job names and add cases for branch-mismatched and multiple protected/test contexts.

Changes

Cohort / File(s) Summary
Pipeline filtering logic
cmd/pipeline-controller/main.go
Added strings import and introduced repoBaseRef (derived from repo-baseBranch). Added checks and continue paths to skip presubmits that do not contain the repoBaseRef when evaluating pipelineConditionallyRequired, pipelineSkipOnlyRequired, protected groups, and during pipeline context creation. No exported signatures changed.
Test data and expectations
cmd/pipeline-controller/pipeline_context_test.go
Updated test fixtures to use fully-qualified presubmit/job names (e.g., pull-ci-test-org-test-repo-main-test-go) and corresponding context strings (e.g., ci/prow/test-go). Adjusted expectations and added cases: PR with job from a different branch should not create a context; multiple protected/test contexts edge scenarios.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 27, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cmd/pipeline-controller/main.go (1)

539-586: Replace substring matching with exact branch comparison to prevent cross-branch job execution

Lines 544, 563, and 583 use strings.Contains(presubmit.Name, repoBaseRef) to filter jobs by branch. This is vulnerable when branch names share prefixes (e.g., release and release-4.16). A PR targeting release would incorrectly match jobs configured for release-4.16, causing unintended jobs to run and blocking unrelated PRs. Query the presubmit's Branches/SkipBranches fields directly using the actual base branch name, or use exact boundary matching (e.g., splitting the job name by a consistent delimiter and comparing exact segments).

@hector-vido
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 27, 2026
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 7a570df and 2 for PR HEAD c186051 in total

@openshift-ci-robot
Copy link
Contributor

Scheduling required tests:
/test e2e

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test integration-optional-test

Signed-off-by: Jakub Guzik <jguzik@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2026
@jmguzik
Copy link
Contributor Author

jmguzik commented Jan 30, 2026

/override ci/prow/e2e

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 30, 2026

@jmguzik: Overrode contexts on behalf of jmguzik: ci/prow/e2e

Details

In response to this:

/override ci/prow/e2e

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-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hector-vido, jmguzik, Prucek

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:
  • OWNERS [Prucek,hector-vido,jmguzik]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jmguzik
Copy link
Contributor Author

jmguzik commented Jan 30, 2026

/override ci/prow/e2e

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 30, 2026

@jmguzik: Overrode contexts on behalf of jmguzik: ci/prow/e2e

Details

In response to this:

/override ci/prow/e2e

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 openshift-merge-robot merged commit eece3fc into openshift:main Jan 30, 2026
8 of 14 checks passed
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants