Repository navigation
fix(cli): classify functions deploy failures by their cause (CLI-2910) - #7510
Conversation
A multi-function API deploy reported its collected per-function failures as a native AggregateError, which telemetry counted as an internal bug regardless of the actual cause. It now fails with FunctionsDeployFailedError, classified by its first typed cause. A malformed deno.json or import map raised FunctionImportMapSyntaxError with no classification, so it was also counted as an internal bug. It now classifies as invalid config. Messages, exit codes and the JSON error code are unchanged.
CLI benchmark (Lightweight Commands): no changes foundCommit
API calls: unchanged for all 7 commands. Binary size: 134.7 MB, unchanged. Details: timing ranges, API calls per command, slowest phasesTiming ranges
API calls per command
Slowest phasesNo command moved beyond noise, so there are no phase deltas. Comment |
There was a problem hiding this comment.
🤖 AI Review
Both independent reviews reported no findings. Reading all changed files and the surrounding deployment, telemetry classification, and error normalization code revealed no concrete defects. The changes preserve deploy messages and JSON error codes while correcting telemetry classification. Tests were inspected but could not be run because dependencies are not installed.
Findings
No issues found.
Stats
Claude findings: 0 · Codex findings: 0 · Confirmed: 0 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
…LI-2910) A multi-function deploy that failed for different reasons took its classification from whichever cause came first, so a user error could hide an unclassified, upstream or CLI failure depending on function order. The wrapper now reports its most severe cause: internal bug, then unclassified, then external service, then user-actionable.
TL;DR
Two
functions deployfailures were reported to telemetry as internal bugs even though both are typed failures with a known cause. A multi-function API deploy now fails withFunctionsDeployFailedError, classified by the failure it wraps. A malformeddeno.jsonor import map now counts as invalid config.What changed
deployViaApicollects each function's upload failure, plus the bulk update failure, into aFunctionsDeployFailedErrorinstead of a nativeAggregateError.AggregateError, soerrors, the joined message andinstanceof AggregateErrorare unchanged.error:FunctionsDeployFailedError:auth(user_actionable). With no causes it falls back tounknown, notinternal_bug.FunctionImportMapSyntaxErrorgets theinvalidConfigclassification and its own fingerprint,error:FunctionImportMapSyntaxError. It still reportsname: "SyntaxError".Behaviour change
Telemetry only. These failures stop counting as internal bugs and are bucketed by their real cause. Messages, exit codes and JSON
error.code(UnknownError) are unchanged.Linked issue
None (Linear CLI-2910)