-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dnd-worldmap-removal) Added null checks for columns and fields. #53475
Conversation
Abdkhan14
commented
Jul 24, 2023
•
edited
Loading
edited
- Migration already approved here: PR but it had a runtime error.
- Added null checks for columns and fields in DashboardWidgetQuery.
- Should fix run time error from previous migration attempt:
- Link to failure: https://deploy.getsentry.net/go/tab/build/detail/deploy-getsentry-backend-us/63/migrations/1/migrations
- Tested it out locally with NULL columns.
This PR has a migration; here is the generated SQL for --
-- MIGRATION NOW PERFORMS OPERATION THAT CANNOT BE WRITTEN AS SQL:
-- Raw Python operation
-- |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #53475 +/- ##
==========================================
- Coverage 79.55% 78.24% -1.32%
==========================================
Files 4942 4917 -25
Lines 209068 208787 -281
Branches 35603 35562 -41
==========================================
- Hits 166331 163355 -2976
- Misses 37658 40222 +2564
- Partials 5079 5210 +131 |
widgetQueries = DashboardWidgetQuery.objects.select_related("widget").filter( | ||
widget__display_type=5 | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're around the 10k row count. You could hit a migration timeout when updating rows. If you wanted to be totally safe an is_dangerous = True
migration would safer albeit much slower.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'd rather be safe. How much longer would it take @markstory?
This PR has a migration; here is the generated SQL for --
-- MIGRATION NOW PERFORMS OPERATION THAT CANNOT BE WRITTEN AS SQL:
-- Raw Python operation
-- |
…53475) - Migration already approved here: [PR](#53109) but it had a runtime error. - Added null checks for columns and fields in DashboardWidgetQuery. - Should fix run time error from previous migration attempt: <img width="488" alt="Screenshot 2023-07-24 at 6 17 48 PM" src="https://github.com/getsentry/sentry/assets/60121741/49fe3214-77c3-4bdb-b02f-355eb567f1d3"> - Link to failure: https://deploy.getsentry.net/go/tab/build/detail/deploy-getsentry-backend-us/63/migrations/1/migrations - Tested it out locally with NULL columns. Co-authored-by: Abdullah Khan <[email protected]>