Commit 8a9522f
committed
Merge #7267: fix: prevent self-reinforcing Blacksmith runner selection loop
bf81f26 fix: prevent self-reinforcing Blacksmith runner selection loop (pasta)
Pull request description:
## Summary
- `count_queued_jobs` was counting ALL queued jobs regardless of runner type, including jobs already routed to Blacksmith
- This created a feedback loop: once Blacksmith was selected, its queued jobs inflated the backlog count, causing subsequent runs to also select Blacksmith while GitHub-hosted runners sat idle
- Added `targets_github_hosted_runner()` filter to exclude `blacksmith-*` and `self-hosted` labeled jobs from the backlog count
## Test plan
- [ ] Verify `test_select_dynamic_runner.py` passes (6 tests including new `test_count_queued_jobs_excludes_blacksmith_jobs`)
- [ ] Monitor runner usage after merge to confirm GitHub-hosted runners are utilized when backlog is low
- [ ] Verify Blacksmith is still selected when GitHub runner backlog genuinely exceeds threshold
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Top commit has no ACKs.
Tree-SHA512: 8b3afab62f095f0068cdd1ba4d9d0f27db59fbd1c3d7ee96f48ade20fe342ec077bb5a6bb7df5fd410034bb17331de815e2d7f0593c8e6d884027dc32c616cca2 files changed
Lines changed: 54 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
81 | 97 | | |
82 | 98 | | |
83 | 99 | | |
| |||
104 | 120 | | |
105 | 121 | | |
106 | 122 | | |
107 | | - | |
| 123 | + | |
108 | 124 | | |
109 | 125 | | |
110 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
46 | 79 | | |
47 | 80 | | |
48 | 81 | | |
| |||
74 | 107 | | |
75 | 108 | | |
76 | 109 | | |
77 | | - | |
| 110 | + | |
78 | 111 | | |
79 | 112 | | |
80 | 113 | | |
| |||
0 commit comments