-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
prow: avoid retriggering presubmits on default remote branch rename #20829
Comments
/assign @BenTheElder I'll see if I can dig any up for kubernetes/org or kubernetes/k8s.io |
Found an event, thanks to https://github-dot-k8s-gubernator.appspot.com/timeline?repo=kubernetes/org&number=2139 (TIL, and suddenly I'm a lot less interested in deleting this app) Note that as part of this process the
I trimmed down to what I think are the relevant fields. I'm not sure there is enough solely within this payload to detect that what it changed from is the same as what it changed to. Maybe skip solving the general base branch renaming case and special case on the fact that {
"sender": {
"login": "spiffxp", // makes sense, I'm the one that clicked the button
},
"repository": {
"full_name": "kubernetes/org",
"pushed_at": "2021-01-29T19:38:57Z", // repo has new branch by this point
"default_branch": "main"
},
"number": 2139,
"pull_request": {
"merge_commit_sha": "5d0c8b8562f2f3c3a47a1bf79da5035b07fef390",
"number": 2139,
"state": "open",
"head": {
"repo": {
"full_name": "yliaog/org",
},
"sha": "30aa59f9cf1b2eeda5d6619f20522a6680e807c6",
"ref": "master",
},
"commits": 1,
"rebaseable": null,
"updated_at": "2021-01-29T19:38:58Z",
"base": {
"repo": {
"full_name": "kubernetes/org",
"pushed_at": "2021-01-29T19:38:57Z",
"default_branch": "main"
},
"sha": "e1e8ec86d24aab7998a9804c7e996c6ca99117f7",
"ref": "main",
"label": "kubernetes:main"
},
"patch_url": "https://github.com/kubernetes/org/pull/2139.patch"
},
"action": "edited", // this seems relevant
"organization": {
"login": "kubernetes",
},
"changes": {
"base": {
"sha": {
"from": "8ef36d93bd7f042e24ee084b5ca27876cc8d35bc"
},
"ref": {
"from": "master"
}
}
}
} |
That endpoint is the best kept secret in test-infra 🙃 |
GitHub asked if it was possible for us to try a maintenance window approach (disabling prow just prior to a branch rename, and then enabling afterward) This would look like disabling the
It might involve disabling tide too? We would ideally want some way to identify which jobs we should have legitimately triggered during maintenance window, and manually trigger them. Or, less ideally, we would assume contributors blocked by these missed jobs would |
Just some numbers to think about:
If we can handle ~100 retest PRs at once, then k/k becomes the only concern. If that's the case, maybe we just turn off the org-wide webhook in the GH config once, flip the switch, then turn it back on. No code changes to |
FWIW GitHub reports they may have figured something out on their end and will update us when they're ready for us to try another rename |
It really depends on what the repo is running. Temporarily disabling trigger for a repo sounds like a reasonable workaround though. |
I just noticed #20707 landed, which should let us do the temporarily disable dance |
FYI I just migrated kubernetes-sigs/slack-infra (kubernetes-sigs/slack-infra#50) and in the process verified that GitHub no longer blasts prow with webhooks when a repo's default branch is renamed I think we can call this closed unless anyone feels like we need to invest further engineering into this? |
/close |
@spiffxp: Closing this issue. In 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/test-infra repository. |
What would you like to be added:
I would like prow to be able to detect and avoid retriggering presubmits when PRs have their base branch changed as part of GitHub's tool to rename the default remote branch for a given repo.
The scenario I want to avoid is sort of the opposite of tide's retrigger logic:
main
is at commit B, and the last results for the PR were from commit A, prow should not retrigger the PRI am hoping there is enough info in whatever events are fired as part of the rename (e.g. kubernetes/org#2139 (comment))...
...to detect that a PR's base branch has changed, but the underlying SHA of the base branch has not
Why is this needed:
Currently, renaming a repo's default remote branch causes prow to retrigger all presubmits for all open PRs.
The worst case scenario would be kubernetes/kubernetes, ballpark
960 open PRs * 10 presubmits = 9600 prowjobs
triggered instantly. This would overwhelm our CI capacity, and incite a thundering herd of/retest
s.I feel like the options are:
/wg naming
/sig contributor-experience
/area github-management
/sig testing
/priority important-longterm
/area prow
/area prow/hook
/assign @cjwagner @alvaroaleman
Assigning Cole since we discussed it, and Alvaro to get input. Please /unassign if you don't want this on your plate.
The text was updated successfully, but these errors were encountered: