-
Notifications
You must be signed in to change notification settings - Fork 296
Branch support fix - filtering in pipeline controller #4910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
WalkthroughDerives 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this 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 executionLines 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.,releaseandrelease-4.16). A PR targetingreleasewould incorrectly match jobs configured forrelease-4.16, causing unintended jobs to run and blocking unrelated PRs. Query the presubmit'sBranches/SkipBranchesfields 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).
|
/lgtm |
|
Scheduling required tests: Scheduling tests matching the |
Signed-off-by: Jakub Guzik <jguzik@redhat.com>
|
/override ci/prow/e2e |
|
@jmguzik: Overrode contexts on behalf of jmguzik: ci/prow/e2e DetailsIn response to this:
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. |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/override ci/prow/e2e |
|
@jmguzik: Overrode contexts on behalf of jmguzik: ci/prow/e2e DetailsIn response to this:
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. |
No description provided.