Open Bug 1234909 Opened 4 years ago Updated 4 years ago

"Trigger All Talos jobs" with reduced priority


(Testing :: General, defect)

Not set


(Not tracked)


(Reporter: philor, Assigned: F3real)


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.

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:
Assignee: nobody → stefan92f
Flags: needinfo?(armenzg)
You need to log in before you can comment on or make changes to this bug.