Open Bug 1234909 Opened 4 years ago Updated 4 years ago

"Trigger All Talos jobs" with reduced priority

Categories

(Testing :: General, defect)

defect
Not set

Tracking

(Not tracked)

People

(Reporter: philor, Assigned: F3real)

Details

When someone uses Trigger All Talos jobs it's never burningly urgent, but because it's not unusual for perf regression chasing to involve triggering five runs of each of sixteen jobs per platform across several pushes, it's really easy for a single chase to result in so many jobs that it uses up all the available hardware for long enough that all the other jobs get so backlogged that we have to close trees to catch up.

It would be better if we could create the jobs with priority -1 (assuming my memory about which way the numbers go is correct), so that we would continue running other tests, and get to the retriggers when we have hardware to spare.
catlee: is a priority of -1 valid? I can't figure it out from looking at the code.

Pulse_actions calls [1]
> trigger_all_talos_jobs(repo_name, revision, times, dry_run=dry_run)
which calls trigger_range [2]
which calls trigger_abitrary_job [3]

The API does *not* mention that we can set the priority as POST parameters [4]:
> POST	/self-serve/{branch}/builders/{builder_name}/{revision}
> Creates a new arbitrary build/test for this buildername, for this revision.<br/>
> Optional POST parameters are 'properties' and 'files', which should be a dictionary and a list, respectively.

From looking at the code [4], I believe we can set the priority:
> priority = validators.Int(if_empty=0).\
>              to_python(request.POST.get('priority'))

NOTE TO SELF: Why does it call trigger_range instead of trigger_job? It's OK for now.

[1] https://github.com/mozilla/pulse_actions/blob/master/pulse_actions/handlers/treeherder_resultset.py#L57
https://github.com/mozilla/mozilla_ci_tools/blob/master/mozci/mozci.py#L527
[2] https://github.com/mozilla/mozilla_ci_tools/blob/master/mozci/mozci.py#L431
[3] https://github.com/armenzg/buildapi_client/blob/master/buildapi_client/buildapi_client.py#L26
[4] https://github.com/mozilla/build-buildapi/blob/a19f3d79dd78e221a763b341f7c2d8281bea94a7/buildapi/controllers/selfserve.py#L511
Flags: needinfo?(catlee)
Yes, I believe negative numbers are valid priorities.
Flags: needinfo?(catlee)
NI to remember to find owner.
Flags: needinfo?(armenzg)
Stefan is already looking into this:
https://github.com/mozilla/mozilla_ci_tools/pull/418
Assignee: nobody → stefan92f
Flags: needinfo?(armenzg)
You need to log in before you can comment on or make changes to this bug.