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

chore(uptime): Bump ACTIVE_FAILURE_THRESHOLD to 3 #76218

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sentry/uptime/consumers/results_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
AUTO_DETECTED_ACTIVE_SUBSCRIPTION_INTERVAL = timedelta(minutes=1)
# When in active monitoring mode, how many failures in a row do we need to see to mark the monitor as down, or how many
# successes in a row do we need to mark it up
ACTIVE_FAILURE_THRESHOLD = 2
ACTIVE_FAILURE_THRESHOLD = 3
ACTIVE_RECOVERY_THRESHOLD = 1
# The TTL of the redis key used to track consecutive statuses
ACTIVE_THRESHOLD_REDIS_TTL = timedelta(minutes=60)
Expand Down
10 changes: 8 additions & 2 deletions tests/sentry/uptime/consumers/test_results_consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def test(self):
)
with mock.patch(
"sentry.uptime.consumers.results_consumer.metrics"
) as metrics, self.feature("organizations:uptime-create-issues"):
) as metrics, self.feature("organizations:uptime-create-issues"), mock.patch(
"sentry.uptime.consumers.results_consumer.ACTIVE_FAILURE_THRESHOLD",
new=2,
):
self.send_result(result)
metrics.incr.assert_has_calls(
[
Expand Down Expand Up @@ -231,7 +234,10 @@ def test_no_create_issues_feature(self):
def test_resolve(self):
with mock.patch(
"sentry.uptime.consumers.results_consumer.metrics"
) as metrics, self.feature("organizations:uptime-create-issues"):
) as metrics, self.feature("organizations:uptime-create-issues"), mock.patch(
"sentry.uptime.consumers.results_consumer.ACTIVE_FAILURE_THRESHOLD",
new=2,
):
self.send_result(
self.create_uptime_result(
self.subscription.subscription_id,
Expand Down
Loading