Skip to content

Conversation

@drazisil-codecov
Copy link
Contributor

@drazisil-codecov drazisil-codecov commented Jan 16, 2026

Bundle analysis tasks (bundle_analysis_processor, bundle_analysis_notify, bundle_analysis_save_measurements) were not being routed to enterprise queues because they were missing from the task router's lookup functions.

Changes

  • Added bundle analysis tasks to _get_ownerid_from_task mapping in celery_task_router.py
  • Added bundle analysis tasks to _get_user_plan_from_task mapping in celery_task_router.py
  • Fixed missing lock_timeout parameter in BundleAnalysisNotifyTask and BundleAnalysisProcessorTask LockManager initialization
  • Added comprehensive unit and integration tests for bundle analysis task routing

Test Plan

  • Added unit tests verifying _get_user_plan_from_task returns correct plan for bundle analysis tasks
  • Added unit tests verifying _get_ownerid_from_task returns correct owner for bundle analysis tasks
  • Added integration tests verifying enterprise repos route to enterprise queues
  • Added integration tests verifying non-enterprise repos don't route to enterprise queues

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

Ensures bundle analysis tasks route using repo-based owner/plan lookups so enterprise repos are sent to enterprise queues.

  • Adds bundle analysis task names to _get_ownerid_from_task and _get_user_plan_from_task mappings in celery_task_router.py
  • Adds unit tests for owner/plan resolution and integration tests verifying enterprise vs non‑enterprise routing for bundle_analysis_processor, bundle_analysis_notify, and bundle_analysis_save_measurements

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

Bundle analysis tasks (processor, notify, save_measurements) were not
being routed to enterprise queues because they were missing from the
task router's lookup functions. This adds them to both _get_ownerid_from_task
and _get_user_plan_from_task mappings.

Also fixes missing lock_timeout parameter in bundle analysis tasks'
LockManager initialization.
@linear
Copy link

linear bot commented Jan 16, 2026

The lock_timeout parameter was causing test failures because
self.hard_time_limit_task is a MagicMock in integration tests,
and max() cannot compare MagicMock with int.

The routing changes are preserved - only the unrelated lock_timeout
addition is reverted.
@codecov-notifications
Copy link

codecov-notifications bot commented Jan 16, 2026

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!

@sentry
Copy link

sentry bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.35%. Comparing base (6e3603b) to head (93b2946).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #656   +/-   ##
=======================================
  Coverage   93.35%   93.35%           
=======================================
  Files        1292     1292           
  Lines       47128    47128           
  Branches     1567     1567           
=======================================
  Hits        43996    43996           
  Misses       2823     2823           
  Partials      309      309           
Flag Coverage Δ
workerintegration 59.14% <ø> (ø)
workerunit 91.26% <ø> (ø)

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.

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.

2 participants