feat(website): introduce DB_ID_SPACE env var for environment-specific collection IDs#1278
Draft
fhennig wants to merge 1 commit into
Draft
feat(website): introduce DB_ID_SPACE env var for environment-specific collection IDs#1278fhennig wants to merge 1 commit into
fhennig wants to merge 1 commit into
Conversation
… collection IDs Wastewater dashboard collection IDs differ between prod, staging, and local environments. Previously the config used isStaging booleans with hardcoded ternaries. This introduces DB_ID_SPACE (prod/staging/local) and a byEnv() helper to make the three-way mapping explicit and readable. Defaults to prod when unset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
@fengelniederhammer I think this might be the way to go. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DB_ID_SPACEenv var (prod|staging|local) to control which collection IDs the wastewater dashboard uses, replacing the existingisStagingboolean ternariesbyEnv(env, prod, staging, local)helper for readable three-way ID mappingprodwhenDB_ID_SPACEis unsetThis should fix the CI issues.
TODO - set the env in the
serversrepo for prod and staging.Test plan
DB_ID_SPACE=locallocally and verify resistance mutation collections load correctly on the wastewater dashboardDB_ID_SPACE=stagingand loads the correct IDsvitest run src/types/wastewaterConfig.spec.ts🤖 Generated with Claude Code