feat(cli): port functions list #5652
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60c2ccab85
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c14b71cbf8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14b882a273
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1992e9a3b3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 012d9df0e5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b99d43d285
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| Effect.tapError(() => fetching?.fail() ?? Effect.void), | ||
| Effect.catch(mapListError), | ||
| ); | ||
| if (response.status !== 200) { |
There was a problem hiding this comment.
Require JSON content before decoding functions
For HTTP 200 responses with a missing or non-JSON Content-Type (for example a replay server returning text/plain JSON), this branch proceeds to parse and render the body. The Go client only sets JSON200 when strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200 in apps/cli-go/pkg/api/client.gen.go, and internal/functions/list/list.go then reports unexpected list functions status 200: <body> when JSON200 is nil. Check the response content type before entering the decode path so native functions list preserves that legacy failure mode.
Useful? React with 👍 / 👎.
| yield* Effect.gen(function* () { | ||
| const fetching = | ||
| output.format === "text" ? yield* output.task("Fetching functions...") : undefined; | ||
| const response = yield* api.executeRaw(operationDefinitions.v1ListAllFunctions, { ref }).pipe( |
There was a problem hiding this comment.
Disable API-client retries for Go-parity list calls
Because the legacy API layer builds makeApiClient without overriding retry options, this GET inherits applySupabaseRetryPolicy's default 5 retries for idempotent 5xx responses in packages/api/src/internal/client.ts. The Go path uses a plain http.Client from apps/cli-go/internal/utils/api.go and internal/functions/list/list.go reports the first V1ListAllFunctionsWithResponse status/error, so a transient 503 or replay fixture can now issue extra /functions requests or even succeed after a response the Go CLI would have returned as unexpected list functions status 503.
Useful? React with 👍 / 👎.
Warning
WIP