Skip to content

Resume fails with FailedPrecondition when an actor was suspended before its template had a golden tag #2020

Closed

Description

@eren23

What happens: If an actor is suspended before its ActorTemplate has a golden tag, the next resume fails: a Golden data resume requires the ActorTemplate golden tag, which is not available (loadActorForResume in cmd/ateapi/internal/controlapi/workflow_resume.go). The suspend itself succeeds. The failure is temporary: when the golden tag exists, a second resume works. But FailedPrecondition tells a client not to retry, and AX marks the task Failed, so the actor looks lost. CreateActor already handles a missing golden tag ("Actors created before the golden tag is ready retain their cold-boot behavior", #1523). The resume path has no such fallback.

Evidence (kind install, AX ac23328, Substrate 1d7ca8c):

  • ax apply a new Task, ax resume, then ax suspend at once. kubectl ate get actor-template -a default shows no GOLDEN TAG for <task>-tmpl-* at the time of the suspend.
  • The next ax resume fails with the error above, and the task goes to Failed. This happened on the first try in two separate loops.
  • About 25 s later the template has its golden tag, and ax resume succeeds. The task is Running again.
  • In other runs, the golden tag appeared 0 to 16 s after the template was created. A client that waits for the tag before a suspend never saw the failure.
  • On main (13e8eff), the check in workflow_resume.go is unchanged. I did not run main.

Suggested fix: Reject or delay SuspendActor until the template has its golden tag. Or let the resume wait for the tag, or return a retryable code such as Unavailable.

Environment: Agent Substrate 1d7ca8c and google/ax ac23328, on a local kind cluster (Docker Desktop on Apple Silicon), gVisor sandbox class.

Activity

  1. ericcurtin commented on Sep 30, 2026

    @ericcurtin

    I'll send a PR: return Unavailable while the golden tag is still being built, and keep FailedPrecondition when the golden build has failed.

  2. added
    kind/bug
    prio/P2
    on Sep 30, 2026
  3. zoez7 commented on Sep 30, 2026

    @zoez7
    Collaborator

    This should be fixed after #2027 - a data-only resume will no longer require golden snapshot.

  4. eren23 commented on Oct 2, 2026

    @eren23
    ContributorAuthor

    Confirmed fixed by #2105 (6a35150).

    I tested the race with kubectl ate only, without AX. Each trial created an ActorTemplate in the shape that AX makes (DATA snapshot scope, one durable dir). It then created an actor, resumed it, and suspended it before the template had a golden tag. Then it resumed the actor again.

    Substrate onResume.fromData Suspended before golden tag Second resume
    1d7ca8c RESUME_SOURCE_GOLDEN 3 of 3 3 of 3 failed: a Golden data resume requires the ActorTemplate golden tag, which is not available
    6a35150 (field removed) 5 of 5 5 of 5 resumed

    The 1d7ca8c row is the control. It shows the test hits the original window.

    This issue can close from my side. One note for clients: 6a35150 rejects a template that still sets on_resume (unknown field with protobuf tag 3). google/ax still sends that field, so AX cannot create Tasks on this version yet. I filed that as google/ax#443.

    Environment: Agent Substrate 6a35150 and 1d7ca8c, on a local kind cluster (Docker Desktop on Apple Silicon), gVisor sandbox class.

  5. mayawang commented on Oct 2, 2026

    @mayawang
    Collaborator

    Thanks for retesting Eren Akbulut (@eren23)! Closing this as fixed by #2105 (removing onResume.fromData and the golden restore scope), so a data resume no longer needs the golden snapshot.

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

Metadata

Metadata

Labels

area/api-machinerykind/bugprio/P2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions