-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(ACI): Pull get_comparison_aggregation_value code into smaller functions #91909
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(ACI): Pull get_comparison_aggregation_value code into smaller functions #91909
Conversation
@@ -74,6 +75,92 @@ def get_aggregation_value_helper(subscription_update: QuerySubscriptionUpdate) - | |||
return aggregation_value | |||
|
|||
|
|||
def get_eap_aggregation_value( |
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.
This code was added in https://github.com/getsentry/sentry/pull/81948/files#diff-d262481ba0aaae3473d14f62d3cbb554e099bda1093454b7935890139f3fe5a8 so it seems to be EAP related
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 - seems alright to move into a method like this.
cc @shruthilayaj just incase to confirm
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.
lgtm since it's just moving the code into methods. 🎉 thanks for the refactor.
@@ -74,6 +75,92 @@ def get_aggregation_value_helper(subscription_update: QuerySubscriptionUpdate) - | |||
return aggregation_value | |||
|
|||
|
|||
def get_eap_aggregation_value( |
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 - seems alright to move into a method like this.
cc @shruthilayaj just incase to confirm
alert_rule_id: int | None = None, | ||
) -> float | None: | ||
try: | ||
# TODO: determine whether we need to include the subscription query_extra here |
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.
unrelated to this pr -- but anyone have context over this comment?
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.
It's from an old Nathan PR 028e31a#diff-d262481ba0aaae3473d14f62d3cbb554e099bda1093454b7935890139f3fe5a8 but I don't know the context, do you remember?
Codecov ReportAttention: Patch coverage is
|
Files with missing lines | Patch % | Lines |
---|---|---|
...c/sentry/incidents/utils/process_update_helpers.py | 78.57% | 6 Missing |
Additional details and impacted files
@@ Coverage Diff @@
## master #91909 +/- ##
==========================================
- Coverage 87.63% 87.62% -0.01%
==========================================
Files 10356 10356
Lines 587133 587148 +15
Branches 22585 22585
==========================================
+ Hits 514506 514515 +9
- Misses 72199 72205 +6
Partials 428 428
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Follow up to #91783 to pull code into 2 smaller functions for EAP and non EAP comparison aggregates.