Retry and pace TestOps uploads - #817
Closed
todti wants to merge 2 commits into
Closed
Conversation
Classify TestOps upload failures into transient (5xx/429/timeout),
recoverable ("launch is closed"), or terminal (auth/validation/payload/
conflict) kinds, and retry only the retryable ones with exponential
backoff. Wired into all three upload call sites (test results, global
attachments, global errors) — previously a failed request just logged
and gave up with no retry at all.
Add a leaky-bucket pacer with independent per-window budgets for
requests, files, and bytes sent to TestOps, enabled by default with
sane defaults (20 req/s, 1000 files/s, 1 GiB/s) since the server-side
limits it approximates are real regardless of whether anyone configures
for them. Disable via a new uploadRateLimit: false plugin option, or
tune it via an explicit uploadRateLimit config.
Also makes the `open` command's temp-report cleanup handle SIGTERM, not
just SIGINT, via a small shared signals helper (notifySignals/
waitForAbort) with conventional exit codes and a graceful-shutdown
deadline.
todti
force-pushed
the
allurectl-signals-errors-pacer
branch
from
July 23, 2026 16:20
55ea290 to
a3e71c2
Compare
Allure perf metricsGenerated at:
Artifacts: allure-perf-metrics |
- classifyError only recognized raw AxiosError, but TestOpsClient never sees one: @allurereport/service wraps every HTTP failure into a KnownError/UnknownError first, so retry classification silently fell through to Unknown and withUploadRetry never retried anything for real. - uploadTestResults swallowed its own errors internally, making the retry wrapper around it a no-op; it now lets failures propagate, with logging moved to the plugin-level catch (matching the other upload call sites). - Wire the pacer into every upload call site (global attachments, per-result attachments/fixtures, quality gate), including byte cost for attachment content, not just requests/files. - Add reopenClosedLaunch option: reopens a launch TestOps reports as closed instead of failing the upload outright. - Wrap quality gate upload in withUploadRetry, the one upload path that was missing it.
3 tasks
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
errors.tsclassifies upload failures into transient (5xx/429/timeout), recoverable ("launch is closed"), or terminal (auth/validation/payload/conflict) kinds.withUploadRetry()retries only the retryable kinds with exponential backoff, and is now wired into all three TestOps upload call sites (test results, global attachments, global errors) — previously a single failed request just logged and gave up with no retry at all.uploadPacer.tsadds a leaky-bucket pacer with independent per-window budgets for requests, files, and bytes sent to TestOps. Enabled by default with sane defaults (20 req/s, 1000 files/s, 1 GiB/s), since the server-side limits it approximates are real whether or not anyone explicitly configures for them. Can be disabled via a newuploadRateLimit: falseplugin option, or tuned via an explicituploadRateLimitconfig.Also fixes an
open.tscommand that only handledSIGINTfor temp-report cleanup — it now handlesSIGTERMtoo, via a small sharedutils/signals.tshelper (notifySignals/waitForAbort) with conventional exit codes (130/143) and a graceful-shutdown deadline.