Skip to content

fix: scope Redis control plane keys by deployment ID#742

Merged
alexluong merged 3 commits intomainfrom
fix/680-scope-control-plane-keys
Mar 27, 2026
Merged

fix: scope Redis control plane keys by deployment ID#742
alexluong merged 3 commits intomainfrom
fix/680-scope-control-plane-keys

Conversation

@alexluong
Copy link
Copy Markdown
Collaborator

@alexluong alexluong commented Mar 10, 2026

Summary

Fixes #680

Control plane keys (outpostrc, .outpost:migration:lock, outpost:migration:*) were not prefixed with DEPLOYMENT_ID, causing collisions when multiple deployments share the same Redis instance.

  • Rename outpostrc (hash) → outpost:installation_id (string), prefixed with {deploymentID}: when set
  • Rename .outpost:migration:lock.outpost:migration_lock, prefixed with {deploymentID}: when set
  • Prefix outpost:migration:{name} status keys with {deploymentID}: when set
  • Update migration runner, migration CLI, and installation logic
  • Add deployment-scoped tests

Includes scripts/issue-680/ with a data migration script and manual QA test cases.

TODO

  • Manual QA (see scripts/issue-680/TEST_CASES.md)

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
outpost-docs Ready Ready Preview, Comment Mar 26, 2026 3:15pm
outpost-website Ready Ready Preview, Comment Mar 26, 2026 3:15pm

Request Review

alexluong and others added 2 commits March 26, 2026 20:02
Control plane keys (installation ID, migration lock, migration status)
were not prefixed with DEPLOYMENT_ID, causing collisions when multiple
deployments share the same Redis instance.

Key renames:
- outpostrc (hash) → outpost:installation_id (string)
- .outpost:migration:lock → .outpost:migration_lock
- outpost:migration:{name} → unchanged (now prefixed when scoped)

All keys are prefixed with {deploymentID}: when DEPLOYMENT_ID is set,
matching the existing pattern used by tenant store, alert store, etc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DUMP/RESTORE fails silently on Dragonfly (and potentially other Redis
alternatives) because bash command substitution strips null bytes from
the binary payload. Replace with field-by-field HGETALL read loop and
HSET, plus a post-copy verification check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
KEYS blocks Redis single-threaded event loop while scanning the entire
keyspace. Since checkIfFreshInstallation only needs to know if at least
one matching key exists, use SCAN with COUNT 1 for a non-blocking check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexluong alexluong merged commit c6e62fa into main Mar 27, 2026
5 checks passed
@alexluong alexluong deleted the fix/680-scope-control-plane-keys branch March 27, 2026 07:50
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.

Bug: Redis control plane keys not deployment-scoped

2 participants