Skip to content

fix(infra): scope the infrastructure lock key by deployment id - #1065

Open
alexluong wants to merge 1 commit into
mainfrom
fix/infra-lock-deployment-scope
Open

fix(infra): scope the infrastructure lock key by deployment id#1065
alexluong wants to merge 1 commit into
mainfrom
fix/infra-lock-deployment-scope

Conversation

@alexluong

Copy link
Copy Markdown
Collaborator

The infrastructure declaration lock always used the Redis key outpost:lock. Deployments that share a Redis instance via DEPLOYMENT_ID therefore contended on one global lock and could fail startup with failed to acquire lock after 5 attempts when several declared at the same time. The key is now <DEPLOYMENT_ID>:outpost:lock, matching the prefix used for the other deployment-scoped keys; it stays outpost:lock when DEPLOYMENT_ID is unset.

Testing: go build ./..., go vet, go test -short ./internal/infra/... ./internal/app/... pass; added TestLockKey.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WSUm1ZBeUurupWpGWwE8NM

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant