Feature Request: Add runner group information in the workflow_job webhook #53420
Replies: 5 comments 2 replies
-
@pballandras We ran into exact same problem, seems this is still not implemented from Github's end, curious which strategy did you use to sort this out..? |
Beta Was this translation helpful? Give feedback.
-
This would definitely be useful for scheduling. Targeting a particular runner group should trigger logic to spin up runners only in that pool. But without knowing which group the workflow requested, you might end up spinning runners without setting the runner group ID on the runner and it will never pick up the job. So a workflow like: runs-on:
group: my-runner-group
labels: ["large", "self-hosted"] should set the |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Could we reopen this and add the |
Beta Was this translation helpful? Give feedback.
-
It doesn't make sense that the webhook doesn't contain the runner information. If you query the the github api it populates the runner group id. Why not include that in the queued workflow_job webhook? |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Context
In a nutshell, we have a system that receives webhooks and dynamically starts self hosted runners based on the labels. A problem we faced is that, in a scenario as follows:
The system will interpret the labels and spawn two ephemeral runner instances that have the specified labels, but the problem is, Job 1 can "steal" job 2's runner and leave it starving. I made it generic, but in real life terms most of the time job 2 is more demanding and requires another type, class or... group of runners.
And so we found there are groups now in the runners and it would be exactly what we need, but looking at the raw events we receive from GitHub (and also the doc, the doc says it clearly) the runner group information is
null
while it is queued:The problem is, we need this information to spawn the instance that will dequeue the job 😅
Use case
We'd like to have k8s runners heavier than some. Like more RAM and such. We deal with this by specifying the RAM request in labels. This leads to the problem explained above where smaller jobs would take heavier runners before the heavy jobs.
Question
So my question is: Would it be possible to have information about runner groups even in the queued state?
My reasoning is that the information must be available somewhat easily (famous last words) since the labels are available at that point and the group is (well, in the file) really close to the labels. This way, we could dynamically add the runner group to the new instance we spawn and the heavy jobs would get their heavy runners.
Solutions explored outside groups
We could also edit all our workflows to change the labels so that the A B C D problem from earlier doesn't happen, but I feel like the groups are such a nice addition I'd like to explore this first.
Another solution we thought of was to change the workflows to label themselves with labels like
A B C D
andA B C E
Beta Was this translation helpful? Give feedback.
All reactions