Skip to content

feat: add BundleAnalysisFlow checkpoint logger#714

Open
thomasrockhu-codecov wants to merge 2 commits intomainfrom
tomhu/revert-pipeline-context
Open

feat: add BundleAnalysisFlow checkpoint logger#714
thomasrockhu-codecov wants to merge 2 commits intomainfrom
tomhu/revert-pipeline-context

Conversation

@thomasrockhu-codecov
Copy link
Contributor

@thomasrockhu-codecov thomasrockhu-codecov commented Feb 19, 2026

Summary

  • Adds a new BundleAnalysisFlow checkpoint logger to helpers/checkpoint_logger/flows.py, mirroring the existing UploadFlow and TestResultsFlow patterns
  • Integrates BundleAnalysisFlow into BaseCodecovTask for timeout, failure, and retry checkpoint logging
  • Enables metrics tracking (processing duration, notification latency) and reliability counters for bundle analysis task chains

Test plan

  • Verify BundleAnalysisFlow checkpoints are logged correctly during BA task chain execution
  • Confirm existing UploadFlow and TestResultsFlow behavior is unchanged
  • Check that Prometheus reliability counters are emitted for BA flows

Made with Cursor


Note

Medium Risk
Touches core worker task error/timeout/retry paths and breadcrumb validation payload shape; while mostly additive, it could affect observability and failure handling if integration assumptions are wrong.

Overview
Adds a new BundleAnalysisFlow checkpoint logger with success/failure events, subflow timers, and reliability counters for bundle analysis task chains.

Integrates this flow into BaseCodecovTask so timeouts, Celery failures, and max-retry scenarios log BundleAnalysisFlow checkpoints, and ensures checkpoints are rehydrated from task kwargs alongside existing flows.

Extends upload breadcrumb tracking by adding lock-related milestones (LOCK_ACQUIRING/ACQUIRED/RELEASED) and augmenting BreadcrumbData/_call_upload_breadcrumb_task to optionally include task_name and parent_task_id.

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

Add a new BundleAnalysisFlow to the checkpoint logger system, mirroring
UploadFlow and TestResultsFlow. This enables metrics tracking (processing
duration, notification latency) and reliability counters for bundle
analysis task chains.

Integrates BundleAnalysisFlow into BaseCodecovTask for timeout, failure,
and retry checkpoint logging.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sentry
Copy link

sentry bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 72.72727% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.23%. Comparing base (9b95e6b) to head (e54a237).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/worker/tasks/base.py 40.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #714      +/-   ##
==========================================
- Coverage   92.25%   92.23%   -0.03%     
==========================================
  Files        1302     1302              
  Lines       47837    47909      +72     
  Branches     1628     1628              
==========================================
+ Hits        44131    44187      +56     
- Misses       3397     3413      +16     
  Partials      309      309              
Flag Coverage Δ
apiunit 96.36% <ø> (ø)
workerintegration 58.59% <66.66%> (-0.03%) ⬇️
workerunit 90.29% <69.69%> (-0.07%) ⬇️

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

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

@codecov-notifications
Copy link

codecov-notifications bot commented Feb 19, 2026

Codecov Report

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

Files with missing lines Patch % Lines
apps/worker/tasks/base.py 40.00% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

Add LOCK_ACQUIRING, LOCK_ACQUIRED, LOCK_RELEASED milestones to the
Milestones enum for tracking lock lifecycle events in breadcrumbs.

Add task_name and parent_task_id fields to BreadcrumbData so each
breadcrumb records which Celery task produced it and the parent task
in the chain. Update _call_upload_breadcrumb_task to accept and pass
these new fields.

No migration needed -- Milestones is only used within BreadcrumbData
(JSONField) and the new Pydantic fields default to None.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 19, 2026

Merging this PR will not alter performance

✅ 9 untouched benchmarks


Comparing tomhu/revert-pipeline-context (e54a237) with main (afa4356)1

Open in CodSpeed

Footnotes

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

thomasrockhu-codecov added a commit that referenced this pull request Feb 19, 2026
Add an upload_pipeline_timeline readonly field to the Django admin
CommitAdmin page that queries UploadBreadcrumb records for the commit
and renders them as an HTML table.

The timeline shows:
- Timestamp of each breadcrumb
- Task name (Celery task that produced the breadcrumb)
- Parent task ID (preceding task in the chain)
- Detail (milestone, endpoint, error info)
- Upload IDs associated with each breadcrumb

Depends on PR #714 for new BreadcrumbData fields (task_name,
parent_task_id) and lock lifecycle milestones.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant