-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(uptime): Use detectorId for uptime rules on the frontend #98527
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(uptime): Use detectorId for uptime rules on the frontend #98527
Conversation
// TODO(epurkhiser): We need a better way to query for uptime issues, using | ||
// the title is brittle and means when the user changes the URL we'll have to | ||
// wait for a new event before the issue matches again. | ||
const query = `issue.type:${IssueType.UPTIME_DOMAIN_FAILURE} title:"Downtime detected for ${uptimeRule.url}"`; |
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 is probably the most egregious change. We'll need to figure out a better way to query for issues associated to the uptime detectors.
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.
Hmm there was work done to get the query detector:<detector_id>
working, but as I'm testing it now that doesn't appear to work. I'll look into that and make sure that gets fixed, then we can switch this over to use that instead.
This was the original PR for that #95515
Updates all uptime components and utilities to use detectorId instead of uptimeRuleId/projectUptimeSubscriptionId. - Update API endpoints to use `detectorId` with `useDetectorId` query param - Migrate event occurrence data to use `detectorId` from `evidenceData` - Update route params from `uptimeRuleId` to `detectorId` - Refactor all hooks and utilities to use `detectorId` parameter - Update tests to reflect new `detectorId` structure - Moves delete functionality to uptime action creators
e45045b
to
676babc
Compare
We no longer need support for querying by projectUptimeSubscriptionId Requires #98527
// TODO(epurkhiser): We need a better way to query for uptime issues, using | ||
// the title is brittle and means when the user changes the URL we'll have to | ||
// wait for a new event before the issue matches again. | ||
const query = `issue.type:${IssueType.UPTIME_DOMAIN_FAILURE} title:"Downtime detected for ${uptimeRule.url}"`; |
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.
Hmm there was work done to get the query detector:<detector_id>
working, but as I'm testing it now that doesn't appear to work. I'll look into that and make sure that gets fixed, then we can switch this over to use that instead.
This was the original PR for that #95515
This systemically removes ProjectUptimeSubscription usages from uptime endpoints. - Remove legacy dual ID handling logic and query parameter dependencies. The useDetectorId query parameter no longer has any affect, all IDs are treated as detector Ids. - Update all endpoints to use Detector model instead of ProjectUptimeSubscription. - Refactor serializers to work with Detector objects and associated UptimeSubscription data. - Update validators to create and update Detector instances directly - Update audit logging to use detector IDs and consolidated audit log data functions. Previously the get_audit_log_data method was part of the ProjectUptimeSubscription, which is no longer used. - Remove unused ProjectUptimeSubscription references throughout codebase IMPORTANTLY the tests have very little changes to them, this is because this change does NOT change how data is returned. Requires #98527
This systemically removes ProjectUptimeSubscription usages from uptime endpoints. - Remove legacy dual ID handling logic and query parameter dependencies. The useDetectorId query parameter no longer has any affect, all IDs are treated as detector Ids. - Update all endpoints to use Detector model instead of ProjectUptimeSubscription. - Refactor serializers to work with Detector objects and associated UptimeSubscription data. - Update validators to create and update Detector instances directly - Update audit logging to use detector IDs and consolidated audit log data functions. Previously the get_audit_log_data method was part of the ProjectUptimeSubscription, which is no longer used. - Remove unused ProjectUptimeSubscription references throughout codebase IMPORTANTLY the tests have very little changes to them, this is because this change does NOT change how data is returned. Requires #98527
This systemically removes ProjectUptimeSubscription usages from uptime endpoints. - Remove legacy dual ID handling logic and query parameter dependencies. The useDetectorId query parameter no longer has any affect, all IDs are treated as detector Ids. - Update all endpoints to use Detector model instead of ProjectUptimeSubscription. - Refactor serializers to work with Detector objects and associated UptimeSubscription data. - Update validators to create and update Detector instances directly - Update audit logging to use detector IDs and consolidated audit log data functions. Previously the get_audit_log_data method was part of the ProjectUptimeSubscription, which is no longer used. - Remove unused ProjectUptimeSubscription references throughout codebase IMPORTANTLY the tests have very little changes to them, this is because this change does NOT change how data is returned. Requires #98527
This systemically removes ProjectUptimeSubscription usages from uptime endpoints. - Remove legacy dual ID handling logic and query parameter dependencies. The useDetectorId query parameter no longer has any affect, all IDs are treated as detector Ids. - Update all endpoints to use Detector model instead of ProjectUptimeSubscription. - Refactor serializers to work with Detector objects and associated UptimeSubscription data. - Update validators to create and update Detector instances directly - Update audit logging to use detector IDs and consolidated audit log data functions. Previously the get_audit_log_data method was part of the ProjectUptimeSubscription, which is no longer used. - Remove unused ProjectUptimeSubscription references throughout codebase IMPORTANTLY the tests have very little changes to them, this is because this change does NOT change how data is returned. Requires #98527
This systemically removes ProjectUptimeSubscription usages from uptime endpoints. - Remove legacy dual ID handling logic and query parameter dependencies. The useDetectorId query parameter no longer has any affect, all IDs are treated as detector Ids. - Update all endpoints to use Detector model instead of ProjectUptimeSubscription. - Refactor serializers to work with Detector objects and associated UptimeSubscription data. - Update validators to create and update Detector instances directly - Update audit logging to use detector IDs and consolidated audit log data functions. Previously the get_audit_log_data method was part of the ProjectUptimeSubscription, which is no longer used. - Remove unused ProjectUptimeSubscription references throughout codebase IMPORTANTLY the tests have very little changes to them, this is because this change does NOT change how data is returned. Requires #98527
This systemically removes ProjectUptimeSubscription usages from uptime endpoints. - Remove legacy dual ID handling logic and query parameter dependencies. The useDetectorId query parameter no longer has any affect, all IDs are treated as detector Ids. - Update all endpoints to use Detector model instead of ProjectUptimeSubscription. - Refactor serializers to work with Detector objects and associated UptimeSubscription data. - Update validators to create and update Detector instances directly - Update audit logging to use detector IDs and consolidated audit log data functions. Previously the get_audit_log_data method was part of the ProjectUptimeSubscription, which is no longer used. - Remove unused ProjectUptimeSubscription references throughout codebase IMPORTANTLY the tests have very little changes to them, this is because this change does NOT change how data is returned. Requires #98527
Updates all uptime components and utilities to use detectorId instead of uptimeRuleId/projectUptimeSubscriptionId. - Update API endpoints to use `detectorId` with `useDetectorId` query param - Migrate event occurrence data to use `detectorId` from `evidenceData` - Update route params from `uptimeRuleId` to `detectorId` - Refactor all hooks and utilities to use `detectorId` parameter - Update tests to reflect new `detectorId` structure - Moves delete functionality to uptime action creators
Updates all uptime components and utilities to use detectorId instead
of uptimeRuleId/projectUptimeSubscriptionId.
detectorId
withuseDetectorId
query paramdetectorId
fromevidenceData
uptimeRuleId
todetectorId
detectorId
parameterdetectorId
structure