Skip to content

chore(ACI): Add back subscription processor test coverage - #105113

Merged
ceorourke merged 9 commits into
masterfrom
ceorourke/add-back-subscription-processor-test-coverage
Dec 19, 2025
Merged

ceorourke merged 9 commits into
masterfrom
ceorourke/add-back-subscription-processor-test-coverage

Conversation

@ceorourke

@ceorourke ceorourke commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor

Add missing test coverage for the subscription processor. Many tests we still need were deleted and need to be recovered but updated for ACI.

  • Add missing tests for early returns from here

  • Add missing anomaly detection test coverage from here

TODO in future PRs:

  • Add missing EAP test (I can't get this one to pass, it always receives None from get_eap_aggregation_value so I will ask Shruthi post holidays) from here

Comment thread tests/sentry/incidents/subscription_processor/test_subscription_processor_aci.py Outdated
@codecov

codecov Bot commented Dec 17, 2025 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #105113   +/-   ##
========================================
  Coverage   80.61%    80.61%           
========================================
  Files        9422      9422           
  Lines      404017    404017           
  Branches    25654     25654           
========================================
+ Hits       325711    325717    +6     
+ Misses      77837     77831    -6     
  Partials      469       469           

@ceorourke
ceorourke force-pushed the ceorourke/add-back-subscription-processor-test-coverage branch from 839436e to 9fa6aae Compare December 17, 2025 19:01
@ceorourke
ceorourke marked this pull request as ready for review December 17, 2025 22:26
@ceorourke
ceorourke requested a review from a team as a code owner December 17, 2025 22:26
@ceorourke
ceorourke requested a review from a team December 17, 2025 22:30
"sentry.seer.anomaly_detection.get_anomaly_data.SEER_ANOMALY_DETECTION_CONNECTION_POOL.urlopen"
)
def test_triggers_performance_detector(self, mock_seer_request: mock.MagicMock) -> None:
self.snuba_query.update(time_window=15 * 60, dataset=Dataset.Transactions)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing .value when passing Dataset enum to update

The dataset=Dataset.Transactions is passed without .value. The SnubaQuery.dataset field is a TextField expecting a string like "transactions". Without .value, Python's str() converts the enum to "Dataset.Transactions" instead. Other similar calls in test_subscription_processor_aci.py correctly use Dataset.Transactions.value. This will cause incorrect data to be stored in the database, potentially making the test behave unexpectedly or test the wrong scenario.

Fix in Cursor Fix in Web

@mifu67 mifu67 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these!

@ceorourke
ceorourke merged commit 1817fb7 into master Dec 19, 2025
70 checks passed
@ceorourke
ceorourke deleted the ceorourke/add-back-subscription-processor-test-coverage branch December 19, 2025 17:41
ceorourke added a commit that referenced this pull request Dec 19, 2025
Another companion to #105113 to
add back the upsampled alerts subscription processor tests but updates
them for ACI.
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 4, 2026

This branch was successfully deployed

1 active deployment
Preview — 86b1156a Deployed Dec 17, 2025 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants