fix(cli): explain bundle upload timeouts instead of raw AbortError - #2896
Draft
posthog-eu[bot] wants to merge 1 commit into
Draft
fix(cli): explain bundle upload timeouts instead of raw AbortError#2896posthog-eu[bot] wants to merge 1 commit into
posthog-eu[bot] wants to merge 1 commit into
Conversation
The standard (non-TUS) upload arms an AbortController with a 120s wall-clock timeout. When it fired, the raw "This operation was aborted" AbortError was printed and rethrown verbatim, giving no hint that a timeout occurred or how to work around it, and landing in error tracking as a fresh per-version duplicate. - Detect the abort at the PUT site and throw a typed BundleUploadTimeoutError whose message names the elapsed budget and points at --tus and --timeout. - Print that message as-is in the catch block (no generic prefix); the stable name/message collapses the per-CLI-version duplicate issues into one. - Fix the misleading verbose "Retry attempts: 5" line — the standard path does not retry (only TUS does). Generated-By: PostHog Code Task-Id: 4c908637-5113-4f9e-bef6-395756b5f5f9
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
|
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.



Summary
bundle uploadtrips the CLI's hidden 120s wall-clock timeout on the standard (non-TUS) path see onlyThis operation was aborted— no sign a timeout fired, no pointer to a workaround — so a self-service retry becomes a support ticket.PUTis wrapped in anAbortControllerarmed withsetTimeout(..., UPLOAD_TIMEOUT)(120s). Nothing distinguished the abort from any other failure, so the rawAbortErrorwas printed and rethrown verbatim.Changes
PUTsite and throw a typedBundleUploadTimeoutErrorwhose message names the elapsed budget and points at--tus(resumable, chunked, retries) and--timeout(raise the limit).Cannot upload bundleprefix.Retry attempts: 5line — the standard path has no retries (only the TUS path does).Test plan
bun run test:upload— extended to assert the timeout message names the120sbudget, saystimed out, and mentions both--tusand--timeout, and that a custom--timeoutis reflected in the message.bun run typecheckandbun run lintpass.Screenshots
N/A — CLI error-message text change; before/after covered by the added test assertions.
Checklist
bun run lint:backend && bun run lint.accordingly.
my tests
Created with PostHog Desktop from this inbox report.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.