Skip to content

fix(worklows): More accurate legacy model use tracking#110934

Merged
kcons merged 2 commits into
masterfrom
kcons/tagit
Mar 17, 2026
Merged

fix(worklows): More accurate legacy model use tracking#110934
kcons merged 2 commits into
masterfrom
kcons/tagit

Conversation

@kcons
Copy link
Copy Markdown
Member

@kcons kcons commented Mar 17, 2026

These rely on serializers, but there are clear legacy model usage paths, and by tagging them directly we avoid counting 0 result calls as not using legacy models.

@kcons kcons requested a review from ceorourke March 17, 2026 22:28
@kcons kcons requested a review from a team as a code owner March 17, 2026 22:28
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 17, 2026
Copy link
Copy Markdown
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

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

🛳️

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Missing legacy tracking in combined rules legacy path
    • Added the missing report_used_legacy_models() call after AlertRule.objects.fetch_for_organization() in the OrganizationCombinedRuleIndexEndpoint legacy path to match the fix applied to fetch_metric_alerts().

Create PR

Or push these changes by commenting:

@cursor push e4732b1061
Preview (e4732b1061)
diff --git a/src/sentry/incidents/endpoints/organization_alert_rule_index.py b/src/sentry/incidents/endpoints/organization_alert_rule_index.py
--- a/src/sentry/incidents/endpoints/organization_alert_rule_index.py
+++ b/src/sentry/incidents/endpoints/organization_alert_rule_index.py
@@ -625,6 +625,7 @@
 
         # Legacy path below
         alert_rules = AlertRule.objects.fetch_for_organization(organization, projects)
+        report_used_legacy_models()
 
         issue_rules = Rule.objects.filter(
             status__in=[ObjectStatus.ACTIVE, ObjectStatus.DISABLED],

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Comment thread src/sentry/incidents/endpoints/organization_alert_rule_index.py
@kcons kcons disabled auto-merge March 17, 2026 22:32
@kcons kcons enabled auto-merge (squash) March 17, 2026 23:12
@kcons kcons merged commit c931ffe into master Mar 17, 2026
57 checks passed
@kcons kcons deleted the kcons/tagit branch March 17, 2026 23:34
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants