Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 516
fix(cli): functions delete/download mark --project-ref telemetry-safe (Go parity)#5809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Coly010
merged 8 commits into
develop
from
columferry/cli-1864-functions-delete-add-safeflags-project-ref-telemetry-parityJul 7, 2026
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cecd31d
fix(cli): mark functions delete's --project-ref telemetry-safe (Go pa…
Coly010 ba4c392
fix(cli): close review findings on functions delete's safeFlags fix
Coly010 ed6cba9
docs(cli): finish reconciling functions download's SIDE_EFFECTS.md wi…
Coly010 f74ece9
Merge remote-tracking branch 'origin/develop' into columferry/cli-186…
Coly010 01d3eca
docs(cli): close remaining SIDE_EFFECTS.md gaps on functions delete/d…
Coly010 2747c19
fix(cli): re-pad SIDE_EFFECTS.md tables to satisfy oxfmt (ci: Check c…
Coly010 3acde05
docs(cli): correct SUPABASE_HOME access-token path and boolean-flag r…
Coly010 89d1971
Merge remote-tracking branch 'origin/develop' into columferry/cli-186…
Coly010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
43 changes: 30 additions & 13 deletions
43 apps/cli/src/legacy/commands/functions/delete/SIDE_EFFECTS.md
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
16 changes: 10 additions & 6 deletions
16 apps/cli/src/legacy/commands/functions/delete/delete.command.ts
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
66 changes: 65 additions & 1 deletion
66 apps/cli/src/legacy/commands/functions/delete/delete.integration.test.ts
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
3 changes: 2 additions & 1 deletion
3 apps/cli/src/legacy/commands/functions/deploy/deploy.command.ts
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
48 changes: 33 additions & 15 deletions
48 apps/cli/src/legacy/commands/functions/download/SIDE_EFFECTS.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2,23 +2,31 @@ | ||
| ## Files Read | ||
| | Path | Format | When | | ||
| | -------------------------- | ---------- | ---------------------------------------------------------- | | ||
| | `~/.supabase/access-token` | plain text | when `SUPABASE_ACCESS_TOKEN` unset and keyring unavailable | | ||
| | Path | Format | When | | ||
| | ----------------------------------------------- | ---------- | ------------------------------------------------------------- | | ||
| | `<SUPABASE_HOME or ~/.supabase>/access-token` | plain text | when `SUPABASE_ACCESS_TOKEN` unset and keyring unavailable | | ||
| | `<SUPABASE_HOME or ~/.supabase>/profile` | plain text | when `--profile` and `SUPABASE_PROFILE` are both unset | | ||
| | `<profile>.yaml` | YAML | when `SUPABASE_PROFILE` or `--profile` points to a file | | ||
| | `<workdir>/supabase/.temp/project-ref` | plain text | when `--project-ref` and `SUPABASE_PROJECT_ID` are both unset | | ||
| | `<SUPABASE_HOME or ~/.supabase>/telemetry.json` | JSON | when present, before post-run telemetry state is refreshed | | ||
| ## Files Written | ||
| | Path | Format | When | | ||
| | --------------------------------------------------- | ------ | ---------------------------------------- | | ||
| | `<workdir>/supabase/functions/<slug>/<remote path>` | bytes | for each source file returned by the API | | ||
| | Path | Format | When | | ||
| | --------------------------------------------------- | ------ | ----------------------------------------------------------------------- | | ||
| | `<workdir>/supabase/functions/<slug>/<remote path>` | bytes | for each source file returned by the API | | ||
| | `<workdir>/supabase/.temp/linked-project.json` | JSON | after resolving a project ref, cached on both success and failure paths | | ||
| | `<SUPABASE_HOME or ~/.supabase>/telemetry.json` | JSON | after command completion, flushed on both success and failure paths | | ||
Coly010 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ## API Routes | ||
| | Method | Path | Auth | Request body | Response (used fields) | | ||
| | ------ | ------------------------------------------ | ------------ | ------------ | ------------------------------------------ | | ||
| | `GET` | `/v1/projects/{ref}/functions` | Bearer token | none | function slugs, when downloading all | | ||
| | `GET` | `/v1/projects/{ref}/functions/{slug}` | Bearer token | none | entrypoint path, when absent from metadata | | ||
| | `GET` | `/v1/projects/{ref}/functions/{slug}/body` | Bearer token | none | multipart function source | | ||
| | Method | Path | Auth | Request body | Response (used fields) | | ||
| | ------ | ------------------------------------------ | ------------ | ------------ | ----------------------------------------------------- | | ||
| | `GET` | `/v1/projects/{ref}/functions` | Bearer token | none | function slugs, when downloading all | | ||
| | `GET` | `/v1/projects/{ref}/functions/{slug}` | Bearer token | none | entrypoint path, when absent from metadata | | ||
| | `GET` | `/v1/projects/{ref}/functions/{slug}/body` | Bearer token | none | multipart function source | | ||
| | `GET` | `/v1/projects` | Bearer token | none | project picker options when no ref is supplied in TTY | | ||
| | `GET` | `/v1/projects/{ref}` | Bearer token | none | linked project metadata used by the post-run cache | | ||
| ## Subprocesses | ||
| @@ -28,10 +36,14 @@ | ||
| ## Environment Variables | ||
| | Variable | Purpose | Required? | | ||
| | ----------------------- | ---------------------------------------------------- | ------------------------------------------------------- | | ||
| | `SUPABASE_ACCESS_TOKEN` | auth token (bypasses credential file/keyring lookup) | no (falls back to keyring → `~/.supabase/access-token`) | | ||
| | `SUPABASE_PROFILE` | built-in profile name or YAML file path | no (falls back to `~/.supabase/profile` -> `supabase`) | | ||
| | Variable | Purpose | Required? | | ||
| | ----------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | ||
| | `SUPABASE_ACCESS_TOKEN` | auth token (bypasses credential file/keyring lookup) | no (falls back to keyring → `<SUPABASE_HOME or ~/.supabase>/access-token`) | | ||
| | `SUPABASE_HOME` | overrides where `telemetry.json` and `profile` are read/written | no (defaults to `~/.supabase`) | | ||
| | `SUPABASE_NO_KEYRING` | disables the OS keyring, forcing the access-token file fallback | no | | ||
| | `SUPABASE_PROFILE` | select a built-in profile or YAML profile file with `api_url:` | no (falls back to `~/.supabase/profile` -> `supabase`) | | ||
| | `SUPABASE_PROJECT_ID` | provides the project ref when `--project-ref` is unset | no (falls back to `<workdir>/supabase/.temp/project-ref`) | | ||
| | `SUPABASE_WORKDIR` | sets `<workdir>` for local Supabase temp files | no (falls back to `--workdir` -> nearest ancestor with `supabase/config.toml` -> cwd) | | ||
| ## Exit Codes | ||
| @@ -43,6 +55,12 @@ | ||
| | `1` | network / connection failure | | ||
| | `1` | invalid function slug or flag conflict | | ||
| ## Telemetry Events Fired | ||
| | Event | When | Notable properties / groups | | ||
| | ---------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| | `cli_command_executed` | post-run, success or failure (via wrapper) | `exit_code`, `duration_ms`, `flags` (`project-ref` recorded verbatim, matching `functions list`/`delete`; `use-api`/`use-docker`/`legacy-bundle` also recorded verbatim since they are boolean flags, matching Go's `isBooleanFlag` branch; no flag on this command is currently redacted) | | ||
| ## Output | ||
| ### `--output-format text` (Go CLI compatible) | ||
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.