Skip to content

Shared Alchemy state: postgresState on Neon instead of the git-dir symlink #2237

Open

Description

@QuinnsCode

Today Alchemy.localState() sits under a symlink into the git common dir, with our own lock (packages/cli/src/state.ts). That works on one machine only, so a deploy from CI or the cloud office starts from empty state.

Alchemy's postgresState() (docs) keeps state in Postgres and takes a per-(stack, stage) advisory lock, and we already create Neon. Pick that over Cloudflare.state(): that store's locking isn't documented, and its Worker sends telemetry even with DO_NOT_TRACK set. Move existing state across with State.Sync/Export. Needs the owner's database URL secret (varlock), so the cutover is an owner step.

Map: notes/ALCHEMY.md (#2234).

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

    future-ideaLane: a good idea for later, not needed now

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions