Closed Bug 1380306 Opened 7 years ago Closed 7 years ago

Create 'try_task_config' method for scheduling tasks on try via checked-in json file

Categories

(Firefox Build System :: Task Configuration, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla56

People

(Reporter: ahal, Assigned: ahal)

References

Details

Attachments

(1 file)

It would be great to have an alternate scheduling mechanism for try, something easier to generate and consume with tools. This bug proposes a checked in json file that lives somewhere in-tree.
Depends on: 1380357
Comment on attachment 8886145 [details]
Bug 1380306 - Create a new 'try_task_config' method for scheduling tasks on try,

https://reviewboard.mozilla.org/r/156940/#review162036

::: taskcluster/taskgraph/target_tasks.py:56
(Diff revision 1)
>          (filter_on_nightly, filter_for_project, filter_upload_symbols)
>      )
>  
>  
> -@_target_task('try_option_syntax')
> -def target_tasks_try_option_syntax(full_task_graph, parameters):
> +def _try_task_config(full_task_graph, parameters):
> +    task_config_file = os.path.join(os.getcwd(), 'try_task_config.json')

I think it's worth bikeshedding over the name here, as it will be sort of difficult to change in the future. At the very least, I'll need to know what name to block in bug 1380357.

Some ideas:
src/try_task_config.json
src/.try_tasks.json
src/taskcluster/.try_task_config.json
src/taskcluster/try_tasks.json

or any variant thereof.
Comment on attachment 8886145 [details]
Bug 1380306 - Create a new 'try_task_config' method for scheduling tasks on try,

https://reviewboard.mozilla.org/r/156940/#review162066

I like it.  I especially like the compatibility model.

This should probably also have some documentation under taskcluster/docs about the format of this file.  It's pretty simple, but having a place to hang docs for tool authors will be useful.
Attachment #8886145 - Flags: review?(dustin) → review+
Comment on attachment 8886145 [details]
Bug 1380306 - Create a new 'try_task_config' method for scheduling tasks on try,

https://reviewboard.mozilla.org/r/156940/#review162036

> I think it's worth bikeshedding over the name here, as it will be sort of difficult to change in the future. At the very least, I'll need to know what name to block in bug 1380357.
> 
> Some ideas:
> src/try_task_config.json
> src/.try_tasks.json
> src/taskcluster/.try_task_config.json
> src/taskcluster/try_tasks.json
> 
> or any variant thereof.

I think a top-level file makes sense, and it's unlikely to be seen from a CLI so a leading `.` doesn't add much value.  So I'd go for the first option.
Comment on attachment 8886145 [details]
Bug 1380306 - Create a new 'try_task_config' method for scheduling tasks on try,

https://reviewboard.mozilla.org/r/156940/#review162066

Sure, I'll add some docs.
Blocks: 1384563
Blocks: 1384593
I realized that for any task scheduled this way, we should probably disable optimization (as it has been explicitly selected). I'd prefer to fix this in a follow-up bug though.

p.s just waiting for the hooks from bug 1380357 to be in place before landing this.
You can just change optimize_target_tasks = False.  We have that set to true for try syntax since it selects so much by default.
But can that be modified from within a target task method? Ideally tasks scheduled with try syntax would still be optimized, and tasks scheduled with try_tasks_config.json wouldn't. Either way I think we should punt on this for now and give this some more thought in a new bug.
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7af941648ca6
Create a new 'try_task_config' method for scheduling tasks on try, r=dustin
https://hg.mozilla.org/mozilla-central/rev/7af941648ca6
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Product: TaskCluster → Firefox Build System
You need to log in before you can comment on or make changes to this bug.