Skip to content

ref(crons): Remove monitor_config from the check-in model - #127450

Draft
wedamija wants to merge 1 commit into
danf/crons-checkin-config-not-nullfrom
danf/crons-remove-checkin-monitor-config-state
Draft

wedamija wants to merge 1 commit into
danf/crons-checkin-config-not-nullfrom
danf/crons-remove-checkin-monitor-config-state

Conversation

@wedamija

@wedamija wedamija commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Do not merge yet.

Removes monitor_config from the MonitorCheckIn model. State only; the column is dropped in the next PR.

Merge order:

  1. sentry#126542: Backfill config references
  2. sentry#127449: Stop reading monitor_config (30+ days after sentry#126539 deploys)
  3. sentry#127450: Remove the field from the model, MOVE_TO_PENDING (after 2 deploys) ← this PR
  4. sentry#127451: Drop the column, DELETE (after 3 deploys)

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 14, 2026
@sentry

sentry Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 630 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@github-actions

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/monitors/migrations/0017_backfill_checkin_config.py src/sentry/monitors/migrations/0018_fill_missing_checkin_config.py src/sentry/monitors/migrations/0019_make_checkin_config_not_null.py src/sentry/monitors/migrations/0020_remove_checkin_monitor_config.py

for 0017_backfill_checkin_config in monitors

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

for 0018_fill_missing_checkin_config in monitors

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

for 0019_make_checkin_config_not_null in monitors

--
-- Alter field checkin_config on monitorcheckin
--
SET CONSTRAINTS "sentry_monitorchecki_checkin_config_id_17e2de71_fk_sentry_mo" IMMEDIATE; ALTER TABLE "sentry_monitorcheckin" DROP CONSTRAINT "sentry_monitorchecki_checkin_config_id_17e2de71_fk_sentry_mo";
ALTER TABLE "sentry_monitorcheckin" ADD CONSTRAINT "sentry_monitorchecki_checkin_config_id_17e2de71_fk_sentry_mo" FOREIGN KEY ("checkin_config_id") REFERENCES "sentry_monitorcheckinconfig" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "sentry_monitorcheckin" VALIDATE CONSTRAINT "sentry_monitorchecki_checkin_config_id_17e2de71_fk_sentry_mo";
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";

for 0020_remove_checkin_monitor_config in monitors

--
-- Moved monitorcheckin.monitor_config field to pending deletion state
--
-- (no-op)

@wedamija
wedamija force-pushed the danf/crons-checkin-config-not-null branch from d459312 to 7183bf7 Compare October 14, 2026 22:01
@wedamija
wedamija force-pushed the danf/crons-remove-checkin-monitor-config-state branch from 01bb170 to 1868662 Compare October 14, 2026 22:01
@github-actions

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/monitors/migrations/0017_backfill_checkin_config.py src/sentry/monitors/migrations/0018_remove_checkin_monitor_config.py

for 0017_backfill_checkin_config in monitors

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

for 0018_remove_checkin_monitor_config in monitors

--
-- Moved monitorcheckin.monitor_config field to pending deletion state
--
-- (no-op)

@wedamija
wedamija force-pushed the danf/crons-checkin-config-not-null branch from 7183bf7 to 93776fd Compare October 15, 2026 21:57
@wedamija
wedamija force-pushed the danf/crons-remove-checkin-monitor-config-state branch from 1868662 to 7b60166 Compare October 15, 2026 21:57
@github-actions

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/monitors/migrations/0021_remove_checkin_monitor_config.py

for 0021_remove_checkin_monitor_config in monitors

--
-- Moved monitorcheckin.monitor_config field to pending deletion state
--
-- (no-op)

@getsantry

getsantry Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Backend Test Failures

Failures on 9659989 in this run:

tests/snuba/api/endpoints/test_organization_trace_item_attributes.py::OrganizationTraceItemAttributeValuesEndpointSpansTest::test_tags_keys_autocomplete_noop — log
[gw1] linux -- Python 3.13.15 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/snuba/api/endpoints/test_organization_trace_item_attributes.py:2542: in test_tags_keys_autocomplete_noop
    assert response.data == [], key
E   AssertionError: trace
E   assert [{'count': 1,...': None, ...}] == []
E     
E     Left contains 3 more items, first extra item: �[0m{�[33m'�[39;49;00m�[33mcount�[39;49;00m�[33m'�[39;49;00m: �[94m1�[39;49;00m, �[33m'�[39;49;00m�[33mfirstSeen�[39;49;00m�[33m'�[39;49;00m: �[94mNone�[39;49;00m, �[33m'�[39;49;00m�[33mkey�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mtrace�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mlastSeen�[39;49;00m�[33m'�[39;49;00m: �[94mNone�[39;49;00m, ...}�[90m�[39;49;00m
E     
E     Full diff:
E     �[0m�[91m- []�[39;49;00m�[90m�[39;49;00m
E     �[92m+ [�[39;49;00m�[90m�[39;49;00m
E     �[92m+     {�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'count': 1,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'firstSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'key': 'trace',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'lastSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'name': '0b58f71f1ac048f5bcf6c3233f72cb2d',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'value': '0b58f71f1ac048f5bcf6c3233f72cb2d',�[39;49;00m�[90m�[39;49;00m
E     �[92m+     },�[39;49;00m�[90m�[39;49;00m
E     �[92m+     {�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'count': 1,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'firstSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'key': 'trace',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'lastSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'name': '87c8ecc562c84bd7bf63d669566194be',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'value': '87c8ecc562c84bd7bf63d669566194be',�[39;49;00m�[90m�[39;49;00m
E     �[92m+     },�[39;49;00m�[90m�[39;49;00m
E     �[92m+     {�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'count': 1,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'firstSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'key': 'trace',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'lastSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'name': '8ae14770db61411fad9551483a6b4dcd',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'value': '8ae14770db61411fad9551483a6b4dcd',�[39;49;00m�[90m�[39;49;00m
E     �[92m+     },�[39;49;00m�[90m�[39;49;00m
E     �[92m+ ]�[39;49;00m�[90m�[39;49;00m

@getsantry getsantry Bot removed the Stale label Nov 7, 2026

This branch has not been deployed

No deployments
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.

1 participant