write preview env vars to both non-prod netlify contexts#50
Open
michaelfward wants to merge 1 commit into
Open
write preview env vars to both non-prod netlify contexts#50michaelfward wants to merge 1 commit into
michaelfward wants to merge 1 commit into
Conversation
Replay QA✅ QA run passed for
|
|
🔎 Loop QA preview (all-k8s backend): https://pr-50--loop-qa-j63k5x.netlify.app |
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.
every preview deployed today is broken: all functions 502 with "No database connection string was provided to neon()". pr-48 and pr-49's previews both hit it; pr-33 and pr-34 (deployed 2026-07-02) still work. nothing relevant changed in the repo between those dates - netlify changed which non-production context a CLI alias deploy's functions bake.
deploy-ci writes preview runtime env (per-PR DATABASE_URL etc) to the
branch-deploycontext because that's what alias deploys empirically read (verified 2026-06-26;deploy-previewvalues were invisible then). as of today alias deploys no longer seebranch-deployvalues, so the deployed functions get no DATABASE_URL at all and crash at module init.fix: write preview values to BOTH non-prod contexts (
deploy-preview+branch-deploy) in the same PUT, so whichever one netlify bakes, the value is there. production path unchanged; production values and scopes still preserved.test plan
npx tsc --noEmit+ eslint clean on the changed file/api/guidancereturns 401 (executing, DB connected) instead of 502