WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@thomasrockhu-codecov
Copy link
Contributor

@thomasrockhu-codecov thomasrockhu-codecov commented Nov 20, 2025

The original code captures all errors as FileNotInStorage errors. This is incorrect and this PR makes it more generic. We also reintroduce delays for the retries and make it configurable per error type

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.


Note

Generalizes upload processing errors with mapped classes/texts and per-error retry limits (with exponential backoff), updates breadcrumb reporting and Sentry capture, and aligns tests.

  • Worker backend:
    • services/report/ProcessingError: Adds error_class, error_text, and max_retries properties via an internal mapping per UploadErrorCode.
    • tasks/upload_processor.py:
      • Uses ProcessingError metadata to send breadcrumb error_text and to select Sentry exception class.
      • Implements per-error retry limits with exponential backoff; removes hardcoded retry handling and special-case file-not-found limit.
      • Includes error_code and additional context in Sentry capture.
  • Tests:
    • Update unit tests to assert breadcrumb error_text, unsupported/timeout mappings, and new retry behavior.

Written by Cursor Bugbot for commit 3304be1. This will update automatically on new commits. Configure here.

@thomasrockhu-codecov thomasrockhu-codecov requested a review from a team November 20, 2025 15:33
@sentry
Copy link

sentry bot commented Nov 20, 2025

✅ All tests passed.

@codecov-notifications
Copy link

codecov-notifications bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/worker/services/report/__init__.py 91.30% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 20, 2025

CodSpeed Performance Report

Merging #579 will not alter performance

Comparing th/fix-upload-processor-error-capture (3304be1) with main (6d14cbf)1

Summary

✅ 9 untouched

Footnotes

  1. No successful run was found on main (5ae548a) during the generation of this report, so 6d14cbf was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@thomasrockhu-codecov thomasrockhu-codecov added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit 2a2ca6e Nov 21, 2025
55 checks passed
@thomasrockhu-codecov thomasrockhu-codecov deleted the th/fix-upload-processor-error-capture branch November 21, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants