Closed
Bug 1347896
Opened 9 years ago
Closed 5 years ago
Test that performs task generation dry run and validation for cron tasks
Categories
(Firefox Build System :: Task Configuration, task, P5)
Firefox Build System
Task Configuration
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: pmoore, Unassigned)
References
Details
We can now schedule tasks in gecko to run on a cron (such as nightlies).
If a change lands (e.g. see bug 1347889) that breaks task generation, it won't be immediately seen, and no test will run that validates the task generation is working correctly for the cron task. Instead, when the task runs, we will have fall out (for example, no nightlies get generated) and then it is a difficult task to track down which in-tree change caused the problem.
I believe we have a facility already in place as a `mach` action, that allows us to generate tasks without submitting them, and since we have a json schema to validate the task definition against, we should in theory be able to at least generate tasks and validate json schema conformance in tree immediately, even if we don't trigger the actual tasks.
This would hopefully make bugs like bug 1347889 a thing of the past, as the tests would pick up the failure, and changes like this wouldn't land in-tree without causing test failures.
| Reporter | ||
Comment 1•9 years ago
|
||
Note, this could also include having an endpoint on the queue which allows a task to submitted as a dry run - this way, the queue can perform further validation (such as checking scopes) without actually scheduling the task. This way, the validation can take place at the point the code change lands, and problems can be detected early - rather than only seeing issues when the actual task is scheduled (which can often be in the middle of the night for the developer that made the change).
@jonasfj, are you open to the idea of having a "dry run" queue task submission endpoint for validating a task definition, including scope checking etc, without actually scheduling it nor persisting it? If so, I'll create a separate bug for that and hang it off this one.
Flags: needinfo?(jopsen)
| Reporter | ||
Comment 2•9 years ago
|
||
Note, we'd possibly also want to be able to submit it specifying a client context (client, authorized scopes etc) that would be used by the hooks service when it submits a task for real.
If we didn't do that, we'd need the hooks service to call the "dry run" endpoint rather than the mozilla-taskcluster or hg-mozilla service that triggers the gecko tasks - and I'm not sure how that would work.
But one way or the other, we need to make sure when the dry run is called, the queue interprets the request in the context of the client that will eventually call the service for real. So this starts becoming a slightly more complicated problem..... Although still probably solvable, and worthwhile (to avoid nightly bustages).
| Reporter | ||
Comment 3•9 years ago
|
||
Maybe the hooks service provides the "dry run" endpoint?
Comment 4•9 years ago
|
||
I suggest we write this as an in-tree test instead..
Yes, it means duplicating some logic, but not much, schema and scope validation is all pretty mechanical.
IMO, we can just build dry run as a client library feature. I think that gives us the bare minimum.
For more advanced scope check we can just code it up.
Maybe, if it's hard to maintain, or we find it universally useful we can later implement it server side... Then we also have a better idea of what functionality we want and how deep dry-run goes..
Bstack really had some solid thoughts on how dry-run might not be so useful.
Flags: needinfo?(jopsen)
| Reporter | ||
Comment 5•9 years ago
|
||
Yeah, bstack convinced me too, that we should hold-off with implementing a dry-run server side, so let's solve this in-tree with schema validation, and possibly some primitive scope validation, if easy to implement and offers some value. Agreed this adds duplication, but it might be worth the trade-off if it captures some problems early (even if it can't catch all).
Comment 6•9 years ago
|
||
Do we want to add some tasks for improving our in-tree validation, and mark this one as WONTFIX for now?
| Reporter | ||
Updated•8 years ago
|
Priority: -- → P5
Comment 7•8 years ago
|
||
This is a cool idea but it's not clear how to implement it in general. I think the right fix would be some best-effort attempts to check that a nightly and a few critical actions are still runnable.
Component: Integration → Task Configuration
Product: Taskcluster → Firefox Build System
| Reporter | ||
Comment 8•5 years ago
|
||
Not actively working on this at the moment.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•