question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ability to prioritize GitHub Action runners

See original GitHub issue

Describe the enhancement

Self-hosted GitHub actions should have an attribute (weight) that allows to prioritize them, i.e. If there are multiple idle runners with matching labels, then the weight attribute would determine which runner to use first, e.g. prioritized in ascending order.

Additional information

For context, the reason this is needed is because the current implementation randomly picks an available runner. However, imagine that you are scaling up and down runners depending on how long they have been idle. Using random allocation mechanism, there is no way to determine (efficiently) how long the runner was not in use. As a result, we have a large portion of VMs runnings that are not in use most of the time.

Prioritization would allow more efficient resource packing.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:79
  • Comments:30 (7 by maintainers)

github_iconTop GitHub Comments

15reactions
idyllcommented, Aug 10, 2022

As another example for this, we have M1 and Intel self hosted Mac runners.

The M1s are so much faster that we’d love a way to give them priority over the intel runners and only send jobs to the intel runners if all the M1 runners are busy.

The weight solution would work but really anything that allows us to set precedence would be great.

10reactions
vallabbharathcommented, Feb 21, 2023

yes, the PR https://github.com/actions/runner/pull/2443 is good one. But prioritization is definitely much needed feature.

A workflow author should be able to say “Use runners with these labels if they are available, if they are not available, use runners with another label”. Currently that’s not possible. As ‘xucian’ mentioned in previous comment, either we have to wait for the high-resource runners without utilizing the priority 2 (low-resource ) runners if we set this strictly to match one of them. Or if we match the labels to match both of them, we have to live with the compromise of not utilizing the high-resource runner 50% of the time, even though it might be available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Priority for self-hosted runners #25309
By default, the repository runners have the priority to be used for the workflow jobs in a repository. If there is not available...
Read more >
Automatically switch to Github runner if self hosted ...
Add support in Github action which will pick Github runner if self hosted runner is not available automatically. e.g. Setup single self hosted...
Read more >
Job-Prioritisation with multiple parallel workflow-runs #340
Hi all, we have a Workflow with multiple jobs in it. They depend on each other (with needs ). This workflow has its...
Read more >
Add ability to re-run single jobs · Issue #432 · actions/runner
GitHub Actions will let you re-run all failed jobs, any individual job, and let you see the results of previous runs. This was...
Read more >
Is it possible to order or prioritise parallel jobs within a ...
The only workaround I can think about it allocates one of your runners for this long job. I.e. tag one of the runners...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found