Skip to content

feat(uptime): backfill 2xx status code assertions on all uptime subscriptions#108678

Open
evanpurkhiser wants to merge 1 commit intomasterfrom
evanpurkhiser/feat-uptime-backfill-2xx-status-code-assertions-on-all-uptime-subscriptions
Open

feat(uptime): backfill 2xx status code assertions on all uptime subscriptions#108678
evanpurkhiser wants to merge 1 commit intomasterfrom
evanpurkhiser/feat-uptime-backfill-2xx-status-code-assertions-on-all-uptime-subscriptions

Conversation

@evanpurkhiser
Copy link
Member

Fixes NEW-761

@evanpurkhiser evanpurkhiser requested review from a team as code owners February 20, 2026 11:38
@evanpurkhiser evanpurkhiser removed the request for review from a team February 20, 2026 11:38
@linear
Copy link

linear bot commented Feb 20, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 20, 2026
@github-actions
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/uptime/migrations/0055_backfill_2xx_status_assertion.py

for 0055_backfill_2xx_status_assertion in uptime

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

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

Is adding this check to all uptime checks going to make these more expensive to run at all?

Comment on lines +40 to +45
if not assertion or not assertion.get("root"):
return {"root": {"op": "and", "children": copy.deepcopy(DEFAULT_STATUS_CODE_CHECKS)}}, True

root = assertion["root"]
if _has_any_status_code_check(root):
return assertion, False
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if we should just check for no assertion here, rather than editing existing assertions? Are customers using these at all right now? It might be easier to just handle the simple case

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.

2 participants