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

feat(uptime): Add basic detector config schema for uptime #88860

Merged
merged 3 commits into from
Apr 9, 2025

Conversation

wedamija
Copy link
Member

@wedamija wedamija commented Apr 4, 2025

This adds a basic config schema for uptime. For now it includes mode and environment.

@wedamija wedamija requested review from a team as code owners April 4, 2025 22:09
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 4, 2025
@@ -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:
Copy link
Member Author

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

Copy link

codecov bot commented Apr 4, 2025

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   #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              

Copy link
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

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

Lgtm

@wedamija wedamija force-pushed the danf/uptime-detector-config-schema branch from 5fe00e5 to 71ac914 Compare April 9, 2025 18:55
@wedamija wedamija requested a review from a team as a code owner April 9, 2025 18:55
@wedamija wedamija force-pushed the danf/uptime-detector-config-schema branch from 03bccb2 to 706b17c Compare April 9, 2025 18:57
@@ -321,6 +322,10 @@ def make_word(words=None):
"platform": "python",
}

default_detector_config_data = {
Copy link
Contributor

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?

Copy link
Member Author

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

wedamija added 3 commits April 9, 2025 14:34
This adds a basic config schema for uptime. For now it includes mode and environment.
@wedamija wedamija force-pushed the danf/uptime-detector-config-schema branch from 706b17c to 5eda234 Compare April 9, 2025 21:34
@wedamija wedamija merged commit 0a4877a into master Apr 9, 2025
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants