Skip to content

Commit

Permalink
Revert "feat(crons): Add thresholds to monitor config (#54516)"
Browse files Browse the repository at this point in the history
This reverts commit d21b29c.

Co-authored-by: rjo100 <7078270+rjo100@users.noreply.github.com>
  • Loading branch information
getsentry-bot and rjo100 committed Aug 10, 2023
1 parent 2e53162 commit c7739e0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
2 changes: 0 additions & 2 deletions src/sentry/monitors/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
"schedule_type": {"type": "integer"},
"schedule": {"type": ["string", "array"]},
"alert_rule_id": {"type": ["integer", "null"]},
"failure_issue_threshold": {"type": ["integer", "null"]},
"recovery_threshold": {"type": ["integer", "null"]},
},
# TODO(davidenwang): Old monitors may not have timezone or schedule_type, these should be added here once we've cleaned up old data
"required": ["checkin_margin", "max_runtime", "schedule"],
Expand Down
16 changes: 0 additions & 16 deletions src/sentry/monitors/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,6 @@ class ConfigValidator(serializers.Serializer):
help_text="tz database style timezone string",
)

failure_issue_threshold = EmptyIntegerField(
required=False,
allow_null=True,
default=None,
help_text="How many consecutive missed or failed check-ins in a row before creating a new issue.",
min_value=1,
)

recovery_threshold = EmptyIntegerField(
required=False,
allow_null=True,
default=None,
help_text="How many successful check-ins in a row before resolving an issue.",
min_value=1,
)

def bind(self, *args, **kwargs):
super().bind(*args, **kwargs)
# Inherit instance data when used as a nested serializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ def test_simple(self, mock_record):
"schedule": "0 0 * * *",
"checkin_margin": None,
"max_runtime": None,
"failure_issue_threshold": None,
"recovery_threshold": None,
}

self.project.refresh_from_db()
Expand Down

0 comments on commit c7739e0

Please sign in to comment.