Closed
Bug 1470621
Opened 7 years ago
Closed 7 years ago
Convert all existing actions to use hooks
Categories
(Firefox Build System :: Task Configuration, task)
Firefox Build System
Task Configuration
Tracking
(firefox-esr60 fixed, firefox62 fixed, firefox63 fixed)
RESOLVED
FIXED
mozilla63
People
(Reporter: dustin, Assigned: dustin)
References
Details
Attachments
(3 files, 1 obsolete file)
No description provided.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8987966 -
Flags: review?(mozilla)
Assignee | ||
Comment 2•7 years ago
|
||
I can see two ways of cleaning this up:
- allow `level` and `trust-domain` to be lists, and implicitly expand those using a cross-product
- grant scopes with scope-grants.yml (bug 1465842)
Both can come later.
Attachment #8987969 -
Flags: review?(mozilla)
Updated•7 years ago
|
Attachment #8987969 -
Attachment is patch: true
Comment 3•7 years ago
|
||
Comment on attachment 8987969 [details] [diff] [review]
ci-configuration.patch
Review of attachment 8987969 [details] [diff] [review]:
-----------------------------------------------------------------
::: actions.yml
@@ +75,5 @@
> +
> +- trust_domain: gecko
> + level: 1
> + action_perm: cancel-all
> + groups: [releng, vpn_sheriff]
I think we probably want to give everyone with level-1 permissions permission the ability to cancel all jobs on level-1 trees. We want people able to cancel all jobs on a try push, for example. (And possibly level-2 as well).
Attachment #8987969 -
Flags: review?(mozilla) → review+
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8987966 [details]
Bug 1470621: make all actions use hooks
https://reviewboard.mozilla.org/r/253236/#review260082
This looks good. I think we want to handle rel-pro in a separate bug, given that two callers haven't been updated yet.
Also, we should test all the switched actions before landing this.
::: taskcluster/taskgraph/actions/release_promotion.py:58
(Diff revision 1)
>
> @register_callback_action(
> name='release-promotion',
> title='Release Promotion',
> + kind='hook',
> + generic=False,
Lets split this one into a separate bug. There are at least a couple of places that need to be updated to handle hooks before this bit can land:
- https://hg.mozilla.org/build/tools/file/61c5335d64e2/lib/python/kickoff/actions.py#l37
- https://github.com/mozilla-releng/services/blob/master/src/shipit_workflow/shipit_workflow/tasks.py
Attachment #8987966 -
Flags: review?(mozilla) → review+
Assignee | ||
Comment 5•7 years ago
|
||
https://hg.mozilla.org/build/ci-configuration/rev/05567b74d2e3059dd02b31e11f6b710bffa2d448 (with the suggested group changes)
Assignee | ||
Comment 6•7 years ago
|
||
(applied with ci-admin)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•7 years ago
|
||
Assignee | ||
Comment 9•7 years ago
|
||
The hooks are erroring out because data.user.taskId doesn't exist..
https://github.com/mozilla/treeherder/pull/3728
Assignee | ||
Comment 10•7 years ago
|
||
action_perm needs to be the cb_name for the specific callback, not the name (which might correspond to a few different callbacks, e.g., retrigger works differently for mochitests and non-mochitests).
Attachment #8988544 -
Flags: review?(mozilla)
Comment 11•7 years ago
|
||
Comment on attachment 8988544 [details]
action_perm_cb_name.patch
We discussed this in IRC, and are instead going to adjust the in-tree code to not expose the names of the python callbacks.
Attachment #8988544 -
Flags: review?(mozilla) → review-
Comment hidden (mozreview-request) |
Assignee | ||
Comment 13•7 years ago
|
||
Assignee | ||
Comment 14•7 years ago
|
||
Testing:
[DONE] add-new-jobs
BnMdsqUySWmXFU-PWzPQew
[DONE] add-talos (context: [])
buIm9ja5RJWt_IpfKdUhOA
[DONE] cancel-all (context: []; non-generic)
LTd1HfPeTP2tB9Qm5CjKOQ
[DONE] mochitest retrigger
Ega9P6msSjGanT5mYdVz0A
[DONE] purge-caches (non-generic)
LsD_XNBNRLOaMcs6M1VZhw
[DONE] rerun
bov0-7AkRQWtBFagdogq6w
[DONE] run-missing-tests (context: [])
GGnqqUEGSyq8v2TwZ4j7Gw
The actions with context: [] need https://github.com/mozilla/treeherder/pull/3728 to land first.
Assignee | ||
Updated•7 years ago
|
Attachment #8988544 -
Attachment is obsolete: true
Comment 15•7 years ago
|
||
mozreview-review |
Comment on attachment 8988547 [details]
Bug 1470621: actionPerm is the cb_name, not name;
https://reviewboard.mozilla.org/r/253790/#review260524
::: taskcluster/taskgraph/actions/registry.py:144
(Diff revision 1)
> assert 1 <= len(symbol) <= 25, 'symbol must be between 1 and 25 characters'
> assert isinstance(symbol, basestring), 'symbol must be a string'
>
> assert not mem['registered'], 'register_callback_action must be used as decorator'
> - assert cb.__name__ not in callbacks, 'callback name {} is not unique'.format(cb.__name__)
> + if not cb_name:
> + cb_name = cb.__name__
I tried just setting this to `name`. It looks like the mochitest retrigger is called `retrigger-mochitest-reftest-with-options` so none of them conflict.
I think we should just go with the name (but with the check that they are unique) for now. If we later want to add identically named actions with different callbacks (that presumably have disjoint sets of tasks they work on), we can add a cb_name parameter that defaults to name.
Attachment #8988547 -
Flags: review?(mozilla) → review-
Assignee | ||
Comment 16•7 years ago
|
||
Names are not required to be unique -- https://docs.taskcluster.net/docs/manual/using/actions/spec#action-metadata
I'm not sure why the mochitest retrigger isn't named "retrigger". Likely because we couldn't figure out how to make those task sets disjoint (I've been thinking of maybe adding a "precedence" to allow non-disjoint sets).
So it doesn't seem like a good idea to remove that capability now, only to re-land it later.
Comment 17•7 years ago
|
||
Well, I'd be happy with just defaulting the callback name to the name (rather than the function name). That would mean there isn't anybody explicitly setting the callback name. But that would be fine.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 19•7 years ago
|
||
On reflection, I think we should make all actions generic for now (except relpromo). It's just too much scope fiddling to try to do more than that. So purge-cache, cancel, and cancel-all can all be generic. We can follow up later to make those non-generic.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 22•7 years ago
|
||
mozreview-review |
Comment on attachment 8987966 [details]
Bug 1470621: make all actions use hooks
https://reviewboard.mozilla.org/r/253236/#review261324
Comment 23•7 years ago
|
||
mozreview-review |
Comment on attachment 8988547 [details]
Bug 1470621: actionPerm is the cb_name, not name;
https://reviewboard.mozilla.org/r/253790/#review261330
Attachment #8988547 -
Flags: review?(mozilla) → review+
Assignee | ||
Comment 24•7 years ago
|
||
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 27•7 years ago
|
||
Pushed by dmitchell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ceffafc6dee3
make all actions use hooks r=tomprince
https://hg.mozilla.org/integration/autoland/rev/3f4e1feb7c8e
actionPerm is the cb_name, not name; r=tomprince
Comment 28•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ceffafc6dee3
https://hg.mozilla.org/mozilla-central/rev/3f4e1feb7c8e
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Comment 29•6 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-release/rev/2127780cd6d6
https://hg.mozilla.org/releases/mozilla-release/rev/08804f27a9c5
status-firefox62:
--- → fixed
Comment 30•6 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-esr60/rev/9928b1f58895
https://hg.mozilla.org/releases/mozilla-esr60/rev/40eccbaa189f
status-firefox-esr60:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•