Skip to content

ActorTemplate: opt-out of golden snapshots, and require a wakeup probe when it is enabled #2068

Closed

Description

@zoez7

Description:

  1. Make golden snapshot optional. Whether goldens should be mandatory is also discussed in Do ActorTemplates still need mandatory golden snapshots? #536. The golden doesn't pay for itself in some cases:
    • High cardinality of ActorTemplates.
    • Templates created only to upgrade existing actors. When existing actors move to a new template, they cold boot onto it anyway. The new template's golden is built but never used.

. When the golden is enabled, a wakeup probe should be required. Today if any container has no wakeup_probe, the reconciler takes the golden snapshot after a fixed 20-second wait: goldenSnapshotWarmupFor. The 20s is just a guess, it's not a signal provided by the application that "I have finished initializing and safe to be snapshoted", the binary could have generated random values or cached credentials already.

Tasks:

  • Add a golden snapshot config field to ActorTemplate that turns golden reconciliation on or off. Default to on.
  • When the golden is disabled, skip the template in the reconciler: no golden actor, no golden tag.
  • When the golden is enabled, reject the template at validation unless every container has a wakeup_probe. Remove the 20-second fallback (goldenSnapshotWarmup / goldenSnapshotWarmupFor).

Activity

  1. added this to the M3 milestone on Oct 1, 2026
  2. changed the title [-]ActorTemplate: allow opt-out of the golden snapshots, and require a wakeup probe when it is enabled[/-] [+]ActorTemplate: opt-out of golden snapshots, and require a wakeup probe when it is enabled[/+] on Oct 1, 2026
  3. cloudonly commented on Oct 3, 2026

    @cloudonly
    Contributor

    Zoe Zhao (@zoez7) I'd like to contribute the golden snapshot opt-out part of this issue. I would keep the current wakeup-probe and restore behavior, add coverage for the default-enabled and disabled paths, and verify that disabled templates create neither a golden Actor nor a Tag while regular Actors can still cold boot and suspend/resume.

    Since #2102 proposes SnapshotConfig.golden_snapshot, would a GoldenSnapshotConfig with disabled: false by default fit the intended API? Should this land independently on the current API, or follow/stack on the #2102 change? Please also let me know if someone is already implementing this.

  4. zoez7 commented on Oct 8, 2026

    @zoez7
    CollaboratorAuthor

    Hi Luomu (@cloudonly), thanks, feel free to send a PR. #2102 is independent of this feature. You can add a new golden_snapshot_config to the current SnapshotConfig.

    message SnapshotConfig {
      // golden_snapshot configures automated golden snapshot creation for this template.
      // If GoldenSnapshotConfig is not present, default to true.
      //
      // +k8s:optional
      GoldenSnapshotConfig golden_snapshot_config = 4;
    }
    
    message GoldenSnapshotConfig {
      bool enabled = 1;
    }
    

    Also please make sure the defaulting sets enabled to true when the request didn't specify 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

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions