GitHub Actions max-parallel setting queues all matrix jobs upfront, triggering wasteful runner launches
A GitHub Community discussion (#209687) reported that GitHub Actions creates and queues every matrix job at run start when strategy.max-parallel is set, even though the limit means only some can execute at once. Each queued event prompts autoscalers such as terraform-aws-github-runner or Actions Runner Controller to launch a runner, so many runners sit idle until scale-down terminates them. The payload does not distinguish jobs waiting for capacity from jobs blocked by max-parallel, so autoscalers cannot tell the difference. The discussion also found that matrix jobs calling reusable workflows are created and queued one at a time, which avoids the problem. This suggests sequential queuing is possible, though it is unclear whether the difference is intentional.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in