Closed
Bug 1433506
Opened 8 years ago
Closed 8 years ago
Add ability to exclude branches from github-taskcluster integration
Categories
(Taskcluster :: Services, enhancement)
Taskcluster
Services
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: kats, Assigned: bstack)
Details
According to [1] it's possible to provide a "whitelist" of branches on which the CI jobs run. However it would be nice to also provide a "blacklist" of branches on which to exclude CI jobs from running. Travis-CI supports this [2]. It would be quite useful for any repos managed by bors (the servo PR-merging bot) because right now any merged PR has CI jobs run three times on the exact same code, and this blacklist would allow reducing that to two times. (The other fix will need to go in bors).
[1] https://docs.taskcluster.net/reference/integrations/taskcluster-github/docs/usage#branch-filtering
[2] https://docs.travis-ci.com/user/customizing-the-build/#Safelisting-or-blocklisting-branches
| Reporter | ||
Comment 1•8 years ago
|
||
Also for reference, the process of merging a PR is like so:
- PR branch is merged to the current master branch and pushed to the "auto" branch. This triggers one CI run.
- Upon successful completion, the auto branch is pushed as the new master. This triggers the second CI run.
- The new master is then pushed back to auto (which really should be identical already). This triggers the third CI run.
If we can exclude CI from running on the master branch that would remove the second of the three CI runs listed above.
Comment 2•8 years ago
|
||
Hi Kartikaya, I want to work on this bug.
I think the fix could be to -
1) Update the docs for an 'exclude' field.
2) Modify the src/intree.js (https://github.com/taskcluster/taskcluster-github/blob/master/src/intree.js#L127) to exclude the branches under 'exclude'
Flags: needinfo?(bugmail)
| Reporter | ||
Comment 3•8 years ago
|
||
I'm not familiar with the code, redirecting needinfo to bstack who may be able to provide some guidance. Thanks!
Flags: needinfo?(bugmail) → needinfo?(bstack)
| Assignee | ||
Comment 4•8 years ago
|
||
Your general idea seems correct, yd! This seems like a fine plan.
Assignee: nobody → didwaniayashvardhan
Status: NEW → ASSIGNED
Flags: needinfo?(bstack)
Comment 5•8 years ago
|
||
I made this pull request few days back -
https://github.com/taskcluster/taskcluster-github/pull/229
| Reporter | ||
Comment 6•8 years ago
|
||
The PR has merged, do you know if it has been deployed already, or when it will be deployed? I'm not sure of what the tc-gh release process looks like and when this bug will be marked resolved.
Flags: needinfo?(bstack)
| Assignee | ||
Comment 7•8 years ago
|
||
kats: I beleive this is running in production now. Generally once something is in master in tc, it goes to production within a couple hours at most. Sorry we never closed this.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(bstack)
Resolution: --- → FIXED
| Reporter | ||
Comment 8•8 years ago
|
||
Thanks for the update!
| Reporter | ||
Comment 9•8 years ago
|
||
So I started using this on the webrender repo, but it looks like it disabled running taskcluster CI on PR branches as well. See for example:
https://github.com/servo/webrender/pull/2536/commits - this is before I added 'master' to excludeBranches
https://github.com/servo/webrender/pull/2537/commits - this is after I added 'master' to excludeBranches
On the first PR (#2536) you can see by clicking on the green checkmark that taskcluster CI ran on the PR commit. On the second PR (#2537) it doesn't run. It still seems to be running on the "auto" branch, where the bot merges the PR head with the current master. So something isn't quite right.
Flags: needinfo?(didwaniayashvardhan)
| Assignee | ||
Updated•8 years ago
|
Status: RESOLVED → REOPENED
Flags: needinfo?(bstack)
Resolution: FIXED → ---
| Assignee | ||
Updated•8 years ago
|
Assignee: didwaniayashvardhan → bstack
| Assignee | ||
Comment 11•8 years ago
|
||
Sorry, at a work-week now and am in weird time zones. I think I can have a fix for this tomorrow Berlin time!
| Assignee | ||
Comment 12•8 years ago
|
||
We can land https://github.com/taskcluster/taskcluster-github/pull/234 soon and this should work after that! Thanks for the bug report.
| Reporter | ||
Comment 13•8 years ago
|
||
Seems to be working now, thanks!
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Flags: needinfo?(didwaniayashvardhan)
Resolution: --- → FIXED
| Assignee | ||
Updated•7 years ago
|
Component: Github → Services
You need to log in
before you can comment on or make changes to this bug.
Description
•