Skip to content

rust: make same-pod attempt start retry idempotent #1001

Closed

Description

@athvin

Evidence

The #963 client retry treats 500/503 and transport failures as transient, but entities/task_instance/update/start.sql updates only a queued attempt. If the server commits the start transition and its 200 response is lost, the same pod retries and receives a terminal 409. The task can then report stale_start even though its first start succeeded.

Change

Make the declared start transition idempotent for the same pod_uid while retaining the live-attempt, attempt ID, and Kubernetes Job guards. Preserve the original started_at on a same-pod retry. Keep a different pod or revoked attempt fenced with 409.

Done when

  • A same-pod retry after a committed start returns 200 without changing started_at.
  • A different pod and a revoked attempt still return 409.
  • A Postgres-tier regression test covers the lost-response retry sequence.
  • Generated entity artifacts and make check pass.

Follow-up from #963; this is separate from its bounded transient-response retry.

Activity

  1. added
    code-cleanup
    on Nov 9, 2026
  2. self-assigned this
    on Nov 9, 2026
  3. athvin commented on Nov 9, 2026

    @athvin
    OwnerAuthor

    Claimed — working in #1026 (draft). Closing that PR releases the claim.

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

Metadata

Metadata

Assignees

Labels

code-cleanup

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions