Skip to content

Conversation

evanpurkhiser
Copy link
Member

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

@evanpurkhiser evanpurkhiser requested review from a team as code owners August 29, 2025 16:51
@evanpurkhiser evanpurkhiser removed request for a team August 29, 2025 16:51
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 29, 2025
Comment on lines +17 to +20
// 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}"`;
Copy link
Member Author

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.

Copy link
Member

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

cursor[bot]

This comment was marked as outdated.

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
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-uptime-use-detectorid-for-uptime-rules-on-the-frontend branch from e45045b to 676babc Compare August 29, 2025 17:34
evanpurkhiser added a commit that referenced this pull request Aug 29, 2025
We no longer need support for querying by projectUptimeSubscriptionId

Requires #98527
Comment on lines +17 to +20
// 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}"`;
Copy link
Member

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

@evanpurkhiser evanpurkhiser merged commit 3853850 into master Sep 4, 2025
45 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-uptime-use-detectorid-for-uptime-rules-on-the-frontend branch September 4, 2025 14:21
evanpurkhiser added a commit that referenced this pull request Sep 4, 2025
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
evanpurkhiser added a commit that referenced this pull request Sep 4, 2025
…98555)

We no longer need support for querying by projectUptimeSubscriptionId

Requires #98527
evanpurkhiser added a commit that referenced this pull request Sep 4, 2025
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
evanpurkhiser added a commit that referenced this pull request Sep 4, 2025
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
evanpurkhiser added a commit that referenced this pull request Sep 4, 2025
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
evanpurkhiser added a commit that referenced this pull request Sep 4, 2025
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
evanpurkhiser added a commit that referenced this pull request Sep 4, 2025
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
armenzg pushed a commit that referenced this pull request Sep 5, 2025
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
armenzg pushed a commit that referenced this pull request Sep 5, 2025
…98555)

We no longer need support for querying by projectUptimeSubscriptionId

Requires #98527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants