[tracker] support .taskcluster.yml in hg.mozilla.org repositories without mozilla-taskcluster
Categories
(Taskcluster :: Services, defect)
Tracking
(Not tracked)
People
(Reporter: pmoore, Assigned: dustin)
References
Details
Updated•10 years ago
|
| Assignee | ||
Updated•10 years ago
|
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Comment 2•10 years ago
|
||
| Assignee | ||
Comment 3•10 years ago
|
||
Updated•10 years ago
|
| Assignee | ||
Updated•9 years ago
|
| Assignee | ||
Updated•8 years ago
|
| Reporter | ||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 7•7 years ago
|
||
| Assignee | ||
Comment 9•7 years ago
|
||
Here's the information provided in the JSON context by mozilla-taskcluster:
{
// tasks_for (string) - always 'hg-push' for mozilla-taskcluster (this is to
// distinguish from other tools that might read the same template, such as
// taskcluster-github)
tasks_for: 'hg-push',
push: {
// push.owner (string) - the hg user that made the push (not always an email)
owner: '..',
// push.revision (string) - long hg revision hash
revision: '..',
// push.comment (string) - commit comment from the last commit in the push
comment: '..'
// push.pushlog_id (number) - id of this push in the hg pushlog; see
// http://mozilla-version-control-tools.readthedocs.io/en/latest/hgmo/pushlog.html#writing-agents-that-consume-pushlog-data
pushlog_id: ..,
// push.pushdate (number) - epoch timestamp when this push occurred
pushdate: ..,
},
repository: {
// repo.url (string) - repository root URL (begins with `https://`, ends with `/`)
url: '..',
// repo.project (string) - alias for this repository
project: '..',
// repo.level (number) - SCM level for this repo
level: ..,
},
// now (string) - the current time, useful for reproducible $fromNow invocations
now: '..',
// as_slugid (function) - given a label, generate a slugid. Multiple calls with the
// same label in the same push will generate the same slugiid, but different slugids
// in different pushes. Use this to generate taskIds, etc.
as_slugid: function(label) { .. },
}
and here's an example v2 message:
{
"type": "changegroup.1",
"data": {
"repo_url": "https://hg.mozilla.org/try",
"heads": ["eb6d9371407416e488d2b2783a5a79f8364330c8"],
"pushlog_pushes": [{
"time": 14609750810,
"pushid": 120040,
"user": "tlin@mozilla.com",
"push_json_url": "https://hg.mozilla.org/try/json-pushes?version=2&startID=120039&endID=120040",
"push_full_json_url": "https://hg.mozilla.org/try/json-pushes?version=2&full=1&startID=120039&endID=120040"
}]
}
}
so I think we need:
- tasks_for: "hg-push"
- push:
- owner: payload.data.pushlog_pushes[0].user
- revision: payload.data.heads[0]
- comment: needs to be fetched
- pushlog_id: payload.data.pushlog_pushes[0].pushid
- pushdate: payload.data.pushlog_pushes[0].pushlog_id
- repository: defined in the hook, created by ci-admin
- now: provided by json-e
- as_slugid: hooks wants to produce one task with a taskid of its own devising, so this needs revision
We'll need bug 1522891 to allow not creating a task for other events than "changegroup.1". If we can adjust the decision task to fetch the comment on its own, and solve the as_slugid question, then all of the above can be done easily in json-e.
This is my ideal: hooks directly creates the decision task, rather than how we do cron tasks, where a "cron task" task creates a "cron job" task which finally runs ./mach taskgraph decision.
| Assignee | ||
Comment 10•7 years ago
|
||
Tom, what are your thoughts on the above in light of rTASKGRAPH? Would it make more sense to chain together two tasks in order to support a more general .taskcluster.yml format?
Comment 11•7 years ago
|
||
We chatted about this in IRC. The plan we came up with is:
- the hooks service will receive pulse message and generate a task from it.
- the hook will directly generate a decision task directly
- to start with, ci-admin will populate the hook from .taskcluster.yml
- we talked about having a higher-level format for describing the tasks, but the details are up in the air.
A few details that we didn't discuss:
- We probably don't want the pulse message at the top-level, so we can have other things in the context, like the task id.
- I think ci-admin should wrap the .taskcluster.yml to restructure the input to match the current format (much like actions are here).
At least in the short-term, this will make changing the .taskcluster.yml harder, and not self-serve. I think this is a reasonable trade-off, to get to using pulse.
| Assignee | ||
Updated•7 years ago
|
Updated•7 years ago
|
| Assignee | ||
Comment 12•7 years ago
|
||
The way I implemented this ends up not depending on bug 1491371, although I'd still love to see that landed!
| Assignee | ||
Comment 13•7 years ago
|
||
I'll loop back to delete the mozilla-taskcluster app (which is already disabled) in a few days, but otherwise this is done.
| Assignee | ||
Comment 14•7 years ago
|
||
I just deleted the TC creds.
Bug 1538033: delete pulse creds
Bug 1538034: delete treeherder API key
I sent a backup of the config DB to brian and coop, and have a copy myself. Encrypted.
And then I deleted the app. Angels sang.
Description
•