Drop deprecated lanes.size columns (PP-4506) - #3563
Conversation
|
Claude finished @jonathangreen's task in 5m 27s —— View job Code Review
SummaryThis is a correct and tidy release-2 drop. I verified the pieces that actually matter for an online drop: the revision chain is linear and single-headed ( Most importantly, I checked the N-1 side rather than taking the backwards-compat run on faith: on the base branch ( No blocking or minor findings. |
Greptile SummaryThis is the second step of a two-release online migration sequence that removes the deprecated
Confidence Score: 5/5Safe to merge once a release containing PR #3619 has shipped; the migration chain is correct and no stale references to the dropped columns remain in the codebase. The drop migration chains correctly from the prior add-server-default revision, the downgrade faithfully restores both columns in their pre-drop state, and a codebase-wide search confirms zero remaining references to Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| alembic/versions/20260715_de6ae4bbf4a5_drop_deprecated_lanes_size_columns.py | New migration that drops lanes.size and lanes.size_by_entrypoint; down_revision correctly chains to the add-server-default migration, and downgrade() accurately reconstructs both columns in their pre-drop state. |
| src/palace/manager/sqlalchemy/model/lane.py | Removes the two deprecated deferred column definitions and their associated imports (text, JSON, deferred); no stale references to size or size_by_entrypoint remain anywhere in src/ or tests/. |
Sequence Diagram
sequenceDiagram
participant R1 as Release 1 (PR #3619)
participant DB as Database
participant R2 as Release 2 (this PR)
Note over R1,DB: Migration dbeb42224c1b
R1->>DB: "ALTER COLUMN lanes.size ADD server_default=0"
Note over R1: Mark size & size_by_entrypoint as deferred
Note over DB,R2: Migration de6ae4bbf4a5 (this PR)
R2->>DB: DROP COLUMN lanes.size_by_entrypoint
R2->>DB: DROP COLUMN lanes.size
Note over R2: Remove deferred column mappings and unused imports
Reviews (4): Last reviewed commit: "Drop deprecated lanes.size columns (PP-4..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## chore/has-root-lanes-scalar-count #3563 +/- ##
=====================================================================
- Coverage 93.52% 93.52% -0.01%
=====================================================================
Files 512 512
Lines 46760 46758 -2
Branches 6379 6379
=====================================================================
- Hits 43731 43729 -2
Misses 1958 1958
Partials 1071 1071 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
014147b to
20339df
Compare
20339df to
f4a7924
Compare
Release-2 of the online-migration sequence started in the parent PR. Now that a release marking size / size_by_entrypoint as deferred and moving size's default into the database (server_default) has shipped, no running release (current or N-1) reads or writes these columns, so they can be dropped safely. Removes the columns from the Lane model (and the now-unused deferred / text / JSON imports) and adds the drop migration. The downgrade recreates the columns in their post-release-1 state (size NOT NULL with server_default 0, size_by_entrypoint nullable JSON). Stacked on the release-1 PR; do not merge until that release has gone out.
f4a7924 to
5b3960c
Compare
Description
Release-2 (the drop) of the online-migration sequence for removing the deprecated lane-size cache columns. Stacked on the release-1 PR #3619, which stops all reads of
size/size_by_entrypoint(they were already made write-safe viaserver_defaultin #3481). This PR removes the columns from theLanemodel and drops them from the schema.Do not merge until a release containing #3619 has shipped. Until then the still-running previous release reads
lanes.sizeand dropping the column would break it — so this is left in draft. Note that the CIBackwards compatibility teston this PR is expected to fail until then: that job runs the latest published release's suite, which still reads the columns; it will pass once a release containing #3619 becomes the baseline.Motivation and Context
JIRA: PP-4506
Completes the two-release removal. The read-side fix in #3619 was validated against this exact drop locally with the backwards-compatibility check's new local mode (#3618): the release-1 branch's
pytest -m dbsuite passes against this dropped schema.How Has This Been Tested?
tests/migration/test_alembic_builtin_tests.pypasses, includingtest_model_definitions_match_ddl(model matches the migrated schema after the drop) and the up/down migration round-trip.Checklist