fix(debug-files): accurate upload count and preserve --require-all hint by BYK · Pull Request #1167 · getsentry/cli · GitHub
Skip to content

fix(debug-files): accurate upload count and preserve --require-all hint#1167

Merged
BYK merged 1 commit into
mainfrom
byk/fix/debug-files-upload-count-hint
Jul 2, 2026
Merged

fix(debug-files): accurate upload count and preserve --require-all hint#1167
BYK merged 1 commit into
mainfrom
byk/fix/debug-files-upload-count-hint

Conversation

@BYK

@BYK BYK commented Jul 2, 2026

Copy link
Copy Markdown
Member

Follow-up to #1146, addressing two bot findings on that PR.

1. filesUploaded over-counted (Bugbot/Seer, Low)

#1146 surfaces size-dropped files as error results so a partial drop exits non-zero. But doUpload reported filesUploaded: results.length, which then included those error/not_found entries — over-reporting the number of files actually uploaded in the JSON output.

Fixed: compute failures before the summary and report results.length - failures.length.

2. --require-all hint dropped after a failure (Bugbot, Medium)

When an upload failure or a size-drop returned first, doUpload returned before the --require-all branch, 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 requireAllNote once 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 ⇒ filesUploaded counts 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.

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.
@github-actions github-actions Bot added the risk: low PR risk score: low label Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@BYK BYK merged commit 5ef9581 into main Jul 2, 2026
30 checks passed
@BYK BYK deleted the byk/fix/debug-files-upload-count-hint branch July 2, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant