-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
feat(uptime): Add basic detector config schema for uptime #88860
Conversation
@@ -131,5 +131,4 @@ def enforce_config_schema(sender, instance: Detector, **kwargs): | |||
raise ValidationError("Detector config must be a dictionary") | |||
|
|||
config_schema = group_type.detector_config_schema | |||
if instance.config: |
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.
We should be validating the config always, since some fields are required and an empty config means we don't have those fields
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 #88860 +/- ##
==========================================
- Coverage 87.70% 87.70% -0.01%
==========================================
Files 10105 10106 +1
Lines 571788 571821 +33
Branches 22469 22469
==========================================
+ Hits 501474 501499 +25
- Misses 69893 69901 +8
Partials 421 421 |
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
5fe00e5
to
71ac914
Compare
03bccb2
to
706b17c
Compare
src/sentry/testutils/factories.py
Outdated
@@ -321,6 +322,10 @@ def make_word(words=None): | |||
"platform": "python", | |||
} | |||
|
|||
default_detector_config_data = { |
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 stuff just showing up from the other pr cause of base branch?
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, I hadn't rebased yet, so github was probably confused
This adds a basic config schema for uptime. For now it includes mode and environment.
706b17c
to
5eda234
Compare
This adds a basic config schema for uptime. For now it includes mode and environment.