Skip to content

fix(worker): gracefully handle 'off' value for max_report_age - #1885

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/worker-handle-max-report-age-off
Open

fix(worker): gracefully handle 'off' value for max_report_age#1885
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/worker-handle-max-report-age-off

Conversation

@sentry

@sentry sentry Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

This PR addresses the TimestringInvalid error that occurs when codecov.max_report_age is set to the string "off" in a user's YAML configuration.

Previously, the from_xml functions in cobertura.py, clover.py, and jacoco.py would attempt to parse the "off" string as a date because it is a truthy value. This led to a TimestringInvalid exception.

The fix introduces an additional check in the if condition that determines whether to perform the report age validation. Specifically, and str(max_age).lower() != "off" has been added. This ensures that if max_report_age is explicitly set to "off", the entire date comparison block is skipped, preventing the invalid parsing attempt and allowing users to effectively disable the report age check as intended.

Legal Boilerplate

Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness 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 Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.

Fixes WORKER-YX4

@codecov-notifications

codecov-notifications Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.83%. Comparing base (d8942db) to head (0523803).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1885   +/-   ##
=======================================
  Coverage   91.83%   91.83%           
=======================================
  Files        1332     1332           
  Lines       51830    51830           
  Branches     1647     1647           
=======================================
  Hits        47598    47598           
  Misses       3911     3911           
  Partials      321      321           
Flag Coverage Δ
workerintegration 58.51% <33.33%> (ø)
workerunit 90.39% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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.

0 participants