docs(cli): fix fabricated SUPABASE_API_URL and bare PROJECT_ID env-var references#5811
Merged
Coly010 merged 1 commit intoJul 7, 2026
Conversation
…r references
SIDE_EFFECTS.md files across the legacy port documented SUPABASE_API_URL as a
real Management API base URL override - no such env var exists in Go
(SetEnvPrefix("SUPABASE") + AutomaticEnv never binds API_URL, and the Profile
loader uses a separate, unbound viper instance). The real override is
SUPABASE_PROFILE. Bare PROJECT_ID was also documented as if directly settable,
when it's Go's internal viper key name - the real env var is
SUPABASE_PROJECT_ID (viper.GetString("PROJECT_ID") under the SUPABASE prefix).
Also tightens the SUPABASE_PROFILE rows added by this sweep to note the
persisted ~/.supabase/profile fallback step, matching the resolution order
already implemented in legacy-cli-config.layer.ts.
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Contributor
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@42ed102f033b78e41064de08ba2534d86dd35d1bPreview package for commit |
jgoux
approved these changes
Jul 7, 2026
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.
What kind of change does this PR introduce?
Docs fix — Legacy port SIDE_EFFECTS.md accuracy.
What is the current behavior?
Two systemic env-var documentation errors across
src/legacy/**/SIDE_EFFECTS.md, found in the parity audit:SUPABASE_API_URLas a real override for the Management API base URL. No such env var exists in Go:SetEnvPrefix("SUPABASE")+AutomaticEnv()never bindsAPI_URL, there's noos.Getenv("SUPABASE_API_URL")anywhere, and theProfile.api_urlfield loads on a separate, unboundviper.New()instance (internal/utils/profile.go:99). The real override isSUPABASE_PROFILE(built-in name or a path to a YAML profile file).PROJECT_IDas if it were itself a settable env var. It's Go's internal viper key name — the real, user-facing env var isSUPABASE_PROJECT_ID(viper.GetString("PROJECT_ID")under the globalSetEnvPrefix("SUPABASE")singleton,internal/utils/flags/project_ref.go:62).Both claims were independently verified against the real Go source and, for the viper-specific mechanics, a compiled test program against the exact pinned
github.com/spf13/viper v1.21.0.What is the new behavior?
SUPABASE_API_URLrows; where a file didn't already documentSUPABASE_PROFILE, added a real row for it (including the persisted~/.supabase/profilefallback step in the resolution chain, matchinglegacy-cli-config.layer.ts).PROJECT_IDmention (Environment Variables tables, Files Read "When" columns, and prose) toSUPABASE_PROJECT_ID, converging on the dominant convention already used correctly across ~15 sibling files.db/advisors/SIDE_EFFECTS.mduntouched — it already correctly documents thatSUPABASE_API_URLis not honored.DB_PASSWORDhas the same bug class as this PR's F2, in a set of files this PR doesn't touch).Docs-only change; no
.tsfiles touched.pnpm check:allpasses.