Skip to content

refs(alert_rules): Stop using query related fields on AlertRule and QuerySubscription. Remove unused columns from models, and unused Models#18805

Merged
wedamija merged 1 commit into
masterfrom
danf/alert_rules_drop_columns
May 14, 2020
Merged

refs(alert_rules): Stop using query related fields on AlertRule and QuerySubscription. Remove unused columns from models, and unused Models#18805
wedamija merged 1 commit into
masterfrom
danf/alert_rules_drop_columns

Conversation

@wedamija

@wedamija wedamija commented May 13, 2020

Copy link
Copy Markdown
Member

This removes all query related fields from both AlertRule and QuerySubscription, since we can
now rely solely on SnubaQuery. This also removes the *Environment many to many tables, since these
are also unused. This migration only removes them from the state - we'll add another migration later to really remove the columns and unused tables.

As part of this pr we remove any final outstanding uses of these columns and tables as well.

@wedamija wedamija requested review from a team, iProgramStuff and markstory May 13, 2020 21:47
@wedamija

Copy link
Copy Markdown
Member Author

Migration generates:

BEGIN;
--
-- Custom state/database change combination
--
COMMIT;

@wedamija wedamija force-pushed the danf/stop_using_query_subscriptions branch 2 times, most recently from 6b2d8b6 to 8d214e8 Compare May 13, 2020 22:48
@wedamija wedamija force-pushed the danf/alert_rules_drop_columns branch from dfc3091 to a8bd178 Compare May 13, 2020 22:50
@wedamija wedamija force-pushed the danf/stop_using_query_subscriptions branch from 8d214e8 to fa24a26 Compare May 14, 2020 01:05
@wedamija wedamija force-pushed the danf/alert_rules_drop_columns branch from a8bd178 to 2a2473a Compare May 14, 2020 02:14
@wedamija wedamija changed the base branch from danf/stop_using_query_subscriptions to master May 14, 2020 17:11
@wedamija wedamija force-pushed the danf/alert_rules_drop_columns branch from 2a2473a to 153b23c Compare May 14, 2020 17:18
…uerySubscription. Remove unused columns from models, and unused Models

This removes all query related fields from both `AlertRule` and `QuerySubscription`, since we can
now rely solely on `SnubaQuery`. This also removes the *Environment many to many tables, since these
are also unused. This migration only removes them from the state - we'll add another migration later to really remove the colums and unused tables.

As part of this pr we remove and final outstanding uses of these columns and tables as well.

@markstory markstory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Migration state changes look good.

@iProgramStuff iProgramStuff 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.

Looks like you got everything to me.

@wedamija wedamija merged commit 7c10ce4 into master May 14, 2020
@wedamija wedamija deleted the danf/alert_rules_drop_columns branch May 14, 2020 22:20
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 18, 2020
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.

3 participants