fix(localmode): regenerate embedded compose (duration env + strip server-owned secrets)#27
fix(localmode): regenerate embedded compose (duration env + strip server-owned secrets)#27tkkhq wants to merge 1 commit into
Conversation
…ver-owned secrets)
There was a problem hiding this comment.
Pull request overview
This PR regenerates the embedded local-mode Docker Compose template to match the hosting source, fixing localmode-e2e failures caused by typed-config now requiring duration-formatted environment variables (e.g., 60s instead of 60). It also updates the local-mode environment/plan-limit defaults and removes server-owned secrets from the template.
Changes:
- Update duration env vars (
REDIS_TIMEOUT,USAGE_SYNC_INTERVAL,USAGE_SYNC_LOCK_TTL) to use duration strings ("60s","30s"). - Refresh plan-limit and retention-related env vars to align with hosting’s current expectations.
- Adjust the embedded services config (e.g., postgres command for
pg_stat_statements) and replace the old Stripe billing env block with first-party bootstrap env placeholders.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # First-party bootstrap (optional). ANON_KEY_SECRET is sourced from | ||
| # .env.local and must match the secret VOLCANO_FIRST_PARTY_ANON_KEY was | ||
| # signed with, since the server validates that key during bootstrap. |
|
Marking this as draft in favor of #24 for now. #24 is effectively the broader/superset PR: it includes the embedded compose regeneration from this PR and also carries the database-auth test updates. Caveats to preserve/revisit:
After #24 merges into |
|
Closing as superseded by #24, which already landed the duration fix and relaxed the ANON_KEY_SECRET invariant on main. This branch predates #24: it strips ANON_KEY_SECRET (main keeps it as an allowed empty passthrough) and carries the old strict test, so merging it would regress main. The only remaining useful change — the postgres pg_stat_statements command — is delivered by the fresh regen in #30. |
Summary
Fixes
localmode-e2e(broken repo-wide): the embedded local-mode Compose passed timeouts as bare numbers (REDIS_TIMEOUT: "60"), but hosting's typed-config migration now requires durations ("60s"), so thekong/volcano:local-nightlyserver fails to start ("missing required environment variables: REDIS_TIMEOUT must be a valid duration").Regenerated
internal/localmode/assets/docker-compose.template.ymlfrom the current hosting source via the updated generator (Kong/volcano-hosting#514), which now:REDIS_TIMEOUT/USAGE_SYNC_INTERVAL/USAGE_SYNC_LOCK_TTL->"60s"/"30s"/"30s".ANON_KEY_SECRET, etc.) soTestDockerComposeTemplateLeavesServerOwnedLocalSecretsUnsetstays green.Dependency
Generator change: Kong/volcano-hosting#514 (keeps
make volcano-cli-localmode-assets-*in sync).Tests
go test ./internal/localmodegreen (incl. secret-strip + plan-limit invariants); build/vet clean.Split back out of #25 to keep the scoped-service-key PR focused; supersedes closed #26.