Skip to content

Sync-path saturation: bounded wait + 503 Retry-After per spec 4.3 #55

Closed

Description

@pdettori

Follow-up from P2 (#46, PR #53).

Spec §4.3 calls for saturation handling: async leaves overflow through the existing Redis/KEDA queue (works today), and sync leaves should get a bounded wait + backoff, then 503 Retry-After on timeout.

Current behavior: when every pool pod is at the soft cap, selectPoolSandbox throws SandboxPoolSaturatedError, which propagates through runLeaf to {status:"failed", reason:"error"}. This is fail-safe (the throw happens before any lease is taken — no leak, no crash) and the async requeue path is correct. But the sync path does not implement the bounded-wait + 503 Retry-After behavior the spec describes.

Fix: in the sync /runs path, add a bounded retry/backoff around pool acquisition and map exhaustion to 503 with Retry-After, per spec §4.3. Acceptable to leave async as-is (queue handles it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions