forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct routing logic for self-hosted runners (github#17418)
Co-authored-by: Martin Lopes <[email protected]>
- Loading branch information
1 parent
301ec51
commit 97dfb49
Showing
1 changed file
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,8 +64,11 @@ These labels operate cumulatively, so a self-hosted runner’s labels must match | |
|
||
### Routing precedence for self-hosted runners | ||
|
||
If you use both repository-level and organization-level runners, {% data variables.product.prodname_dotcom %} follows an order of precedence when routing jobs to self-hosted runners: | ||
|
||
1. The job's `runs-on` labels are processed. {% data variables.product.prodname_dotcom %} then attempts to locate a runner that matches the label requirements: | ||
2. The job is sent to a repository-level runner that matches the job labels. If no repository-level runner is available (either busy, offline, or no matching labels): | ||
3. The job is sent to an organization-level runner that matches the job labels. If no organization-level runner is available, the job request fails with an error. | ||
When routing a job to a self-hosted runner, {% data variables.product.prodname_dotcom %} looks for a runner that matches the job's `runs-on` labels: | ||
|
||
1. {% data variables.product.prodname_dotcom %} first searches for a runner at the repository level, then at the organization level{% if currentVersion ver_gt "[email protected]" %}, then at the enterprise level{% endif %}. | ||
2. The job is then sent to the first matching runner that is online and idle. | ||
- If all matching online runners are busy, the job will queue at the level with the highest number of matching online runners. | ||
- If all matching runners are offline, the job will queue at the level with the highest number of matching offline runners. | ||
- If there are no matching runners at any level, the job will fail. | ||
- If the job remains queued for more than 24 hours, the job will fail. |