feat(workers logs): FUNC-853 - add supabase workers logs command - #6408
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
c9cb51c to
49ad40f
Compare
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@49ad40f7e83b342996d7621a4d1b83bcbe21b24cPreview package for commit |
💡 Codex ReviewWhen When project resolution fails—for example, an unlinked non-interactive checkout—the failure occurs before the AGENTS.md reference: apps/cli/AGENTS.md:L290-L290 A guest message containing When the logs query returns no rows, the initial task has already been cleared before this second API request begins. A slow or stalled AGENTS.md reference: apps/cli/AGENTS.md:L425-L427 This assertion papers over the CLI flag's inferred type, so future drift between the accepted AGENTS.md reference: apps/cli/AGENTS.md:L94-L94 When users combine AGENTS.md reference: apps/cli/AGENTS.md:L300-L300 With In Once follow mode is running, this unfiltered retry also catches permanent failures such as exhausted usage (402), an unavailable project (404), authentication/permission statuses, and a rejected built-in query. Those errors are then reissued every five seconds for up to a minute before reaching the user; for a 429 this extra traffic can itself keep the request window saturated. Restrict retries to genuinely transient network, rate-limit, and retryable server failures, with an interval appropriate to the rate limit. This class is raised when the fixed SQL generated by the CLI is rejected, and its own documentation correctly notes that the projection or filter in the CLI is therefore wrong. Classifying it as AGENTS.md reference: apps/cli/AGENTS.md:L372-L372 The cursor starts at the newest emitted event timestamp and advances only when a still-newer event appears. On a quiet worker, the interval from that timestamp to the current time therefore grows on every poll; a tail left running eventually re-queries nearly the full 24-hour window every ten seconds, repeatedly scanning and returning the same deduplicated rows until it hits query timeouts or usage limits. Track the last successful polling watermark separately and advance it even for empty or only-late batches, retaining only the intended grace overlap. ℹ️ 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". |
|
Closed by a botched stack reorder on my side, not merged — none of these commits ever reached GitHub marked this merged because its head branch's commits became reachable from its base branch ( |
Adds a way to read a worker's runtime output, closing the gap between a successful deploy and diagnosing a misbehaving worker. Along the way it makes
workers new's name prompt-driven, moves the command family's output onto shared conventions, and makesworkers pushreturn without waiting on the build by default.supabase workers logs <name>, reading the project's unified logs endpoint (there is no worker-scoped log route) filtered onlog_attributesrather than the empty top-levelsourcecolumn, with--source,--tail, and a--followmode that polls at the rate limit's floor, dedupes overlapping windows, and streams viastream-json--debugHTTP logger, while machine payloads keep UTC and epoch formssupabase workers new's name argument optional, prompting for it (validated against the same checks the command already enforces) when omitted and there's a terminal to ask on, gated on both stdout and stdin being a TTY--waittosupabase workers push, so the command returns once the deploy is accepted rather than blocking on the server-side build; report unattempted workers on a run that fails partway throughemitSuccessTrailer, standardizelist's advisories on theWARNING:shape, and drop the URL column fromlist's table since it made every row 130+ columns wide for a derivable field--waitinitially shipped without one and broke plainworkers pushparsing