-
Notifications
You must be signed in to change notification settings - Fork 295
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jakub Guzik <[email protected]>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
WalkthroughThe code now derives a repo base reference from branch information and uses it to filter presubmit jobs during pipeline evaluation. Test data has been updated to use fully-qualified job names prefixed with repo context to align with the new filtering logic. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing touches
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 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hector-vido, jmguzik 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 |
|
Scheduling required tests: Scheduling tests matching the |
|
@jmguzik: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
No description provided.