#7499 feat(idl): add RunSpec.max_action_concurrency for run-level action concurrency
Pull request opened by
kumare3
Why are the changes needed?
A single run can monopolize all available execution capacity: today there is no way to bound how many actions of one run execute concurrently. Queue-level concurrency limits cap the total, but not any individual run's share, so one wide fan-out run starves its neighbors. This adds a run-scoped knob so a run can declare its own maximum action concurrency at submission time.
What changes were proposed in this pull request?
Adds an optional field to `flyteidl2.task.RunSpec`:
// Maximum number of actions of this run that may execute concurrently.
// 0 (unset) means unlimited. Enforced by the scheduler in addition to any
// queue-level concurrency limits (min wins): actions beyond the limit stay
// queued until a running action of this run completes.
uint32 max_action_concurrency = 13;
Semantics:
• `0`/unset preserves today's behavior (unlimited).
• When set, the scheduler holds the run to this cap
in addition to any queue-level concurrency limits (min wins); excess actions stay queued, they are not rejected.
Generated code (go/python/rust/ts) regenerated via
make buf
. The scheduler-side enforcement lands separately in the closed-source leasor service, which reads the RunSpec it already receives and caches per run.
How was this patch tested?
IDL-only change:
make buf
(dep/format/lint + all language targets) passes and the regenerated code is included. Enforcement logic is tested in the consuming scheduler service (unit, race, and end-to-end scheduling tests there).
Labels
•
added
🤖 Generated with
Claude Code
flyteorg/flyte