Skip to content

Default snapshot bucket is a hard-coded Google test bucket; AX_SNAPSHOTS_BUCKET override is undocumented #372

Done

Description

@zhoukuncheng

Summary

BuildActorTemplate in internal/substrate/client.go defaults the snapshot storageLocation to gs://snapshot-substrate-test-ax-substrate/ate-env/, a bucket in a Google test project. The only override is the undocumented AX_SNAPSHOTS_BUCKET environment variable read inside that function; deploy/ax-controller.yaml does not set it and no doc mentions it. On a kind cluster installed with the Substrate quickstart (which provisions a local rustfs bucket named ate-snapshots) every Task template therefore points at an unreachable bucket unless the user reads the source.

AX d8ed0fe.

Reproduction

Follow the Substrate kind quickstart, deploy AX with make deploy AX_IMAGE_REPO=localhost:5001, apply a Task, then kubectl ate get actor-template <task>-tmpl-... -o yaml: snapshotsConfig.storageLocation is gs://snapshot-substrate-test-ax-substrate/ate-env/.

Expected

The bucket should be an explicit controller flag with a sensible default for the documented local setup, and the kind section of docs/development.md should say what to set.

Suggested fix

Add --snapshots-bucket to cmd/ax-controller/main.go (falling back to AX_SNAPSHOTS_BUCKET for compatibility), pass it into the reconciler/client instead of reading the environment inside BuildActorTemplate, set it in deploy/ax-controller.yaml via a comment or a kustomize overlay for kind, and document it.

Activity

  1. sharadregoti commented on Sep 22, 2026

    @sharadregoti

    Ran into this too, and it has a nasty follow-on: once an actor references the bad bucket, deleting the task also fails. ReleaseExternalSnapshots tries to list that bucket, gets a 404, and the task gets stuck in Terminating forever. Had to manually create the bucket and restart ax-controller to unwedge it. Might be worth a substrate-side issue too, since cleanup probably shouldn't hard-fail just because the bucket's already gone.

  2. ashishsinghbora commented on Sep 25, 2026

    @ashishsinghbora
    Contributor

    I'd like to work on this issue.

    I plan to:

    • add an explicit --snapshots-bucket controller flag;
    • retain AX_SNAPSHOTS_BUCKET as a compatibility fallback;
    • pass the resolved bucket through the controller/reconciler into BuildActorTemplate instead of reading environment state inside the substrate client;
    • remove the Google-specific hard-coded bucket from the deployment configuration;
    • document the configuration and the local kind/Substrate setup;
    • add focused tests covering flag/env/default resolution and the generated SnapshotsConfig.StorageLocation.

    I'll first verify the existing Substrate kind quickstart and current configuration conventions so the default matches the documented local environment rather than introducing another environment-specific value.

    I'll keep the change scoped to #372 and run the relevant Go tests plus the full test suite before opening the PR.

  3. added a commit that references this issue on Sep 27, 2026
  4. added
    devx
    on Oct 15, 2026
  5. yjjnls commented on Nov 19, 2026

    @yjjnls

    Friendly heads-up: the hardcoded default snapshot bucket issue appears to have been resolved on main — the gs://snapshot-substrate-test-ax-substrate/ constant and AX_SNAPSHOTS_BUCKET are no longer referenced anywhere in the tree, and BuildActorTemplate (internal/substrate/client.go) now takes an explicit snapshotsBucket parameter, falling back to the cluster-level snapshot location when empty. It looks like the refactor that landed incidentally addressed this. If that covers the report, this issue could be closed — just flagging so the credit/resolution doesn't get lost.

  6. rakyll commented on Nov 25, 2026

    @rakyll
    Member

    Fixed: the hard-coded bucket and AX_SNAPSHOTS_BUCKET are gone; an empty bucket uses the cluster default (#553).

    We are closing this as part of a cleanup after the significant changes in v0.4.0, because it is probably obsolete or out of scope now. If you think this is a mistake, please reopen it (or leave a comment if you can't reopen 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

    devx

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions