-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
chore(alerts): Remove excluded projects trigger exclusion #81020
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
Merged
ceorourke
merged 4 commits into
master
from
ceorourke/remove-excluded-projects-trigger-exclusion
Nov 22, 2024
Merged
chore(alerts): Remove excluded projects trigger exclusion #81020
ceorourke
merged 4 commits into
master
from
ceorourke/remove-excluded-projects-trigger-exclusion
Nov 22, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
488dad4 to
9b50b44
Compare
Contributor
|
This PR has a migration; here is the generated SQL for --
-- Alter field alert_rule on alertruleexcludedprojects
--
SET CONSTRAINTS "sentry_alertruleexcl_alert_rule_id_7611518a_fk_sentry_al" IMMEDIATE; ALTER TABLE "sentry_alertruleexcludedprojects" DROP CONSTRAINT "sentry_alertruleexcl_alert_rule_id_7611518a_fk_sentry_al";
--
-- Alter field alert_rule_trigger on alertruletriggerexclusion
--
SET CONSTRAINTS "sentry_alertruletrig_alert_rule_trigger_i_82ac5b81_fk_sentry_al" IMMEDIATE; ALTER TABLE "sentry_alertruletriggerexclusion" DROP CONSTRAINT "sentry_alertruletrig_alert_rule_trigger_i_82ac5b81_fk_sentry_al";
--
-- Alter field query_subscription on alertruletriggerexclusion
--
SET CONSTRAINTS "sentry_alertruletrig_query_subscription_i_244687c4_fk_sentry_qu" IMMEDIATE; ALTER TABLE "sentry_alertruletriggerexclusion" DROP CONSTRAINT "sentry_alertruletrig_query_subscription_i_244687c4_fk_sentry_qu"; |
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #81020 +/- ##
==========================================
- Coverage 80.34% 80.34% -0.01%
==========================================
Files 7225 7225
Lines 320221 320199 -22
Branches 20781 20781
==========================================
- Hits 257268 257249 -19
+ Misses 62559 62556 -3
Partials 394 394 |
wedamija
approved these changes
Nov 22, 2024
9b50b44 to
b117474
Compare
harshithadurai
pushed a commit
that referenced
this pull request
Nov 25, 2024
A follow up to #79700 and a step towards removing the `AlertRuleExcludedProjects` and `AlertRuleTriggerExclusion` models. This sets the foreign keys' `db_constraint` to False and removes any lingering code that references the tables or usage of the columns. I removed references to the `AlertRule` `excluded_projects` and `include_all_projects` fields from the serializer as well since they're unused. The only place that still references them is in the [backup tests](https://github.com/getsentry/sentry/blob/master/src/sentry/testutils/helpers/backups.py#L520) that can't be removed until we're removing the table in the next step.
ceorourke
added a commit
that referenced
this pull request
Nov 25, 2024
In preparation for removing the `AlertRuleExcludedProjects` model (see #81020) we need to first remove the many to many `excluded_projects` column on the `AlertRule` model. We can take the opportunity to remove the now unused `include_all_projects` column. This PR uses the brand new `SafeRemoveField` option added in #81098
evanh
pushed a commit
that referenced
this pull request
Nov 25, 2024
A follow up to #79700 and a step towards removing the `AlertRuleExcludedProjects` and `AlertRuleTriggerExclusion` models. This sets the foreign keys' `db_constraint` to False and removes any lingering code that references the tables or usage of the columns. I removed references to the `AlertRule` `excluded_projects` and `include_all_projects` fields from the serializer as well since they're unused. The only place that still references them is in the [backup tests](https://github.com/getsentry/sentry/blob/master/src/sentry/testutils/helpers/backups.py#L520) that can't be removed until we're removing the table in the next step.
evanh
pushed a commit
that referenced
this pull request
Nov 25, 2024
In preparation for removing the `AlertRuleExcludedProjects` model (see #81020) we need to first remove the many to many `excluded_projects` column on the `AlertRule` model. We can take the opportunity to remove the now unused `include_all_projects` column. This PR uses the brand new `SafeRemoveField` option added in #81098
ceorourke
added a commit
that referenced
this pull request
Nov 26, 2024
Follow up to #81020 (and a few others) to remove the `AlertRuleExcludedProjects` and `AlertRuleTriggerExclusion` models. There will be a final PR to fully remove them and then they're finally gone!
ceorourke
added a commit
that referenced
this pull request
Nov 27, 2024
The final PR to remove the `AlertRuleExcludedProjects` and `AlertRuleTriggerExclusion` models. The models were removed from code in #81020.
andrewshie-sentry
pushed a commit
that referenced
this pull request
Dec 2, 2024
A follow up to #79700 and a step towards removing the `AlertRuleExcludedProjects` and `AlertRuleTriggerExclusion` models. This sets the foreign keys' `db_constraint` to False and removes any lingering code that references the tables or usage of the columns. I removed references to the `AlertRule` `excluded_projects` and `include_all_projects` fields from the serializer as well since they're unused. The only place that still references them is in the [backup tests](https://github.com/getsentry/sentry/blob/master/src/sentry/testutils/helpers/backups.py#L520) that can't be removed until we're removing the table in the next step.
andrewshie-sentry
pushed a commit
that referenced
this pull request
Dec 2, 2024
In preparation for removing the `AlertRuleExcludedProjects` model (see #81020) we need to first remove the many to many `excluded_projects` column on the `AlertRule` model. We can take the opportunity to remove the now unused `include_all_projects` column. This PR uses the brand new `SafeRemoveField` option added in #81098
andrewshie-sentry
pushed a commit
that referenced
this pull request
Dec 2, 2024
Follow up to #81020 (and a few others) to remove the `AlertRuleExcludedProjects` and `AlertRuleTriggerExclusion` models. There will be a final PR to fully remove them and then they're finally gone!
andrewshie-sentry
pushed a commit
that referenced
this pull request
Dec 2, 2024
The final PR to remove the `AlertRuleExcludedProjects` and `AlertRuleTriggerExclusion` models. The models were removed from code in #81020.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A follow up to #79700 and a step towards removing the
AlertRuleExcludedProjectsandAlertRuleTriggerExclusionmodels.This sets the foreign keys'
db_constraintto False and removes any lingering code that references the tables or usage of the columns. I removed references to theAlertRuleexcluded_projectsandinclude_all_projectsfields from the serializer as well since they're unused.The only place that still references them is in the backup tests that can't be removed until we're removing the table in the next step.