Repository navigation
ref(crons): Make the check-in config not null - #131375
Merged
Merged
Conversation
evanpurkhiser
approved these changes
Nov 16, 2026
Contributor
Sentry Snapshot Testing
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9e08cb8. Configure here.
Contributor
|
This PR has a migration; here is the generated SQL for for --
-- Custom state/database change combination
--
ALTER TABLE "sentry_monitorcheckin" DROP CONSTRAINT IF EXISTS "sentry_monitorcheckin_checkin_config_id_17e2de71_notnull";
ALTER TABLE "sentry_monitorcheckin" ADD CONSTRAINT "sentry_monitorcheckin_checkin_config_id_17e2de71_notnull" CHECK ("checkin_config_id" IS NOT NULL) NOT VALID;
ALTER TABLE "sentry_monitorcheckin" VALIDATE CONSTRAINT "sentry_monitorcheckin_checkin_config_id_17e2de71_notnull";
ALTER TABLE "sentry_monitorcheckin" ALTER COLUMN "checkin_config_id" SET NOT NULL;
ALTER TABLE "sentry_monitorcheckin" DROP CONSTRAINT "sentry_monitorcheckin_checkin_config_id_17e2de71_notnull"; |
wedamija
added a commit
that referenced
this pull request
Nov 16, 2026
Part of a series that shrinks the indexes on `sentry_monitorcheckin`. Drops the index on `checkin_config_id`. It was only needed to check that every check-in has a config, and now they all do. Nothing deletes configs, so the foreign key never needs it. Merge order: 1. #131374 ← this PR 2. #131375 (post-deploy migration) 3. #131376 (post-deploy migration)
Base automatically changed from
danf/crons-drop-checkin-config-index
to
master
November 16, 2026 22:26
# Conflicts: # migrations_lockfile.txt # src/sentry/monitors/migrations/0026_drop_checkin_config_index.py
wedamija
added a commit
that referenced
this pull request
Nov 16, 2026
Part of a series that shrinks the indexes on `sentry_monitorcheckin`. Swaps the `(status, timeout_at)` index for a partial index on `timeout_at` over in-progress check-ins, the only rows the timeout task reads. Post-deploy, because it builds an index. Merge order: 1. #131374 2. #131375 (post-deploy migration) 3. #131376 (post-deploy migration) ← this PR
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part of a series that shrinks the indexes on
sentry_monitorcheckin.Every check-in has a config now, so
checkin_configbecomes NOT NULL. Post-deploy, because validating the constraint scans the whole table.Merge order: