Skip to content
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

ref(alerts): Removed unused code #79700

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

ceorourke
Copy link
Member

@ceorourke ceorourke commented Oct 24, 2024

Remove unused options (include_all_projects and excluded_projects) for alert rules - there are no rules in existence that use these and they're not published in the API docs. We'll be addressing what these options intended to cover with ACI anyway, so it's nicer to remove them now so I don't have to remember what to ignore as we make changes.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 24, 2024
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #79700       +/-   ##
===========================================
+ Coverage   51.33%   78.46%   +27.13%     
===========================================
  Files        7105     7136       +31     
  Lines      314270   315622     +1352     
  Branches    43245    43455      +210     
===========================================
+ Hits       161327   247666    +86339     
+ Misses     151956    61620    -90336     
- Partials      987     6336     +5349     

@ceorourke ceorourke marked this pull request as ready for review October 28, 2024 19:59
@ceorourke ceorourke requested review from a team as code owners October 28, 2024 19:59
user=owner,
)
AlertRuleExcludedProjects.objects.create(alert_rule=alert, project=other_project)
Copy link
Member Author

Choose a reason for hiding this comment

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

I have to manually create the model instances here since it's been removed from create_alert_rule. This test fails if every single column doesn't have something in it.

Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

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

Looks good to me - are you also going to remove the related models in a follow up?

@ceorourke
Copy link
Member Author

Looks good to me - are you also going to remove the related models in a follow up?

We'll be deleting a lot of tables for ACI including these (I think for this feature it's just AlertRuleExcludedProjects and AlertRuleTriggerExclusion) so it'll be done at some point. Maybe I'll treat it like I've been treating this removal stuff - small tasks I can get done when I have a short amount of time.

@ceorourke ceorourke merged commit c8639b8 into master Oct 30, 2024
52 checks passed
@ceorourke ceorourke deleted the ceorourke/rm-include-all-projects-exclude-projects branch October 30, 2024 17:23
@wedamija
Copy link
Member

Looks good to me - are you also going to remove the related models in a follow up?

We'll be deleting a lot of tables for ACI including these (I think for this feature it's just AlertRuleExcludedProjects and AlertRuleTriggerExclusion) so it'll be done at some point. Maybe I'll treat it like I've been treating this removal stuff - small tasks I can get done when I have a short amount of time.

Sounds good - mostly I wanted to make sure that all the related code is removed, which is easy to test if the models are gone. But we're going to remove all of this, so not a huge deal

@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2024
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.

2 participants