feat(spans-migration): self hosted spans migration for discover saved queries#106018
feat(spans-migration): self hosted spans migration for discover saved queries#106018nikkikapadia wants to merge 9 commits intomasterfrom
Conversation
|
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
|
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
|
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
|
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
|
This PR has a migration; here is the generated SQL for for --
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Typo in migration hints table name breaks routing
- Fixed typo by changing 'explpre_exploresavedquery' to 'explore_exploresavedquery' to match the actual db_table name in the ExploreSavedQuery model.
Or push these changes by commenting:
@cursor push 0a731ce614
Preview (0a731ce614)
diff --git a/src/sentry/migrations/1064_discover_to_explore_queries_self_hosted.py b/src/sentry/migrations/1064_discover_to_explore_queries_self_hosted.py
--- a/src/sentry/migrations/1064_discover_to_explore_queries_self_hosted.py
+++ b/src/sentry/migrations/1064_discover_to_explore_queries_self_hosted.py
@@ -92,7 +92,7 @@ class Migration(CheckedMigration):
"sentry_discoversavedquery",
"sentry_discoversavedqueryproject",
"explore_exploresavedqueryproject",
- "explpre_exploresavedquery",
+ "explore_exploresavedquery",
]
},
)
@@ -92,7 +92,7 @@ class Migration(CheckedMigration):
"sentry_discoversavedquery",
"sentry_discoversavedqueryproject",
"explore_exploresavedqueryproject",
- "explpre_exploresavedquery",
+ "explore_exploresavedquery",
]
},
)This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3929c59. Configure here.
|
This PR has a migration; here is the generated SQL for for --
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL |
wedamija
left a comment
There was a problem hiding this comment.
Similar feedback to #104803
tl;dr is that you should copy/paste translate_discover_query_to_explore_query into this migration and not import the external models (use DiscoverSavedQuery = apps.get_model("sentry", "DiscoverSavedQuery"))


We've migrated all discover queries on all regions (including single tenant) and are looking to migrate self hosted queries as well. This migration utilizes the migration function that we made and applies it to all the queries here.
NOTE: i won't be merging this until some feature flags are put into the next self-hosted release. Don't worry if it's sitting unmerged for a while :)
Closes EXP-552