fix(debug-files): accurate upload count and preserve --require-all hint#1167
Merged
Conversation
Follow-up to #1146. - `filesUploaded` counted every result, including the error/not_found entries that represent files the server (or the size gate) rejected — over-reporting the number of files actually uploaded. Compute `failures` before the summary and subtract them. - When an upload failure or a size-drop returned first, the `--require-all` "missing requested debug id(s)" note was dropped from the hint (the exit code was still non-zero, but the feedback was lost). Append that note to whichever hint returns.
Contributor
|
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 5133 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 81.51% 81.55% +0.04%
==========================================
Files 399 399 —
Lines 27811 27815 +4
Branches 18065 18081 +16
==========================================
+ Hits 22669 22682 +13
- Misses 5142 5133 -9
- Partials 1863 1865 +2Generated by Codecov Action |
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.
Follow-up to #1146, addressing two bot findings on that PR.
1.
filesUploadedover-counted (Bugbot/Seer, Low)#1146 surfaces size-dropped files as
errorresults so a partial drop exits non-zero. ButdoUploadreportedfilesUploaded: results.length, which then included thoseerror/not_foundentries — over-reporting the number of files actually uploaded in the JSON output.Fixed: compute
failuresbefore the summary and reportresults.length - failures.length.2.
--require-allhint dropped after a failure (Bugbot, Medium)When an upload failure or a size-drop returned first,
doUploadreturned before the--require-allbranch, so the "missing requested debug id(s)" note was omitted from the hint. The exit code was still correctly non-zero, but the actionable feedback was lost.Fixed: build a
requireAllNoteonce and append it to whichever hint returns (failure / size-drop), so the missing-id feedback is never swallowed.Tests
filesUploaded excludes failed/dropped results— mixed ok/error results ⇒filesUploadedcounts only the ok one.--require-all note is preserved alongside an upload failure— failure + missing required id ⇒ hint contains both "had failures" and the missing id.typecheck,lint, and the debug-files upload suite (36 tests) all pass.