Repository navigation
feat(db): add release_level alongside release_status (BDMS-1382) - #1052
Open
likithabommasani21 wants to merge 2 commits into
Open
likithabommasani21 wants to merge 2 commits into
likithabommasani21 wants to merge 2 commits into
Conversation
likithabommasani21
requested review from
jacob-a-brown,
jirhiker and
ksmuczynski
November 13, 2026 17:53
Contributor
Coverage❌ 43.17% total — gate is 75%. Coverage for the Python files changed in this PR
|
…al rename 73d27e78571a and 7480e4ee69dc (BDMS-1554, already merged to staging) both branched off the same parent, creating two alembic heads. Chains this migration after 7480e4ee69dc instead, and swaps thing_geologic_formation_association for its new name, stratigraphic_interval, since that table no longer exists under the old one by the time this migration runs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
likithabommasani21
force-pushed
the
BDMS-1382-1-2-split-release-status-into-release-level-and-provisional-status
branch
from
November 13, 2026 18:01
e0ce2bf to
ed4e2f4
Compare
Contributor
Coverage✅ 82.03% total — gate is 75%. Coverage for the Python files changed in this PR
|
likithabommasani21
removed request for
jacob-a-brown,
jirhiker and
ksmuczynski
November 13, 2026 18:04
likithabommasani21
marked this pull request as draft
November 13, 2026 18:04
likithabommasani21
requested review from
jacob-a-brown,
jirhiker and
ksmuczynski
and removed request for
ksmuczynski
November 14, 2026 00:00
likithabommasani21
marked this pull request as ready for review
November 14, 2026 00:00
This branch has not been 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.
Why
This PR addresses the following problem / context:
ReleaseMixingives every record onerelease_statuscolumn that's being asked two unrelated questions at once: who may see it, and how far along it is in review. Perdocs/release-level-and-data-maturity-vocabulary.md, this is step one of splitting that into two independent fields: addingrelease_levelalongside the existing column.How
Implementation summary: the following was changed / added / removed:
release_levellexicon category (pending/private/public) tocore/lexicon.json, tagging the existingpublic/privateterms and adding the newpendingterm. AddedReleaseLeveltocore/enums.py.release_leveltodb/base.py'sReleaseMixin, defaulting new rows topending.73d27e78571a: addsrelease_levelto all 35ReleaseMixintables and backfills it by exact value name only (public→public,private→private,draft/provisional→pending) -- raises rather than guessing if any other value shows up, sincepublished/final/archivedare expected to have zero rows anywhere.release_levelto the_versionshadow table of the 7__versioned__(sqlalchemy_continuum) tables among those 35, which must mirror the live table's columns or every write to them fails.release_statusis not dropped in this PR -- kept for now, consumers migrated and the column dropped in later follow-ups.Author Checklist
Reviewer Checklist
draft/provisional→pendingis the right backfill, and that raising on any other value (rather than defaulting it) is the right call.provisional→pendingfortransducer_observation/transducer_observation_blockspecifically -- this is still an assumption pending sign-off from whoever owns the hydrograph correction workflow, not a final decision.release_statusin place for now (two-step rollout) rather than dropping it in this same PR.Notes
Any special considerations, known limitations, risks, workarounds, or follow-up work to note?
This PR only adds
release_leveland backfills it -- updating the ~38 consumer files, the two materialized chemistry views, and droppingrelease_statusare separate follow-up steps, not part of this PR.Verified: migration applies and reverts cleanly on a fresh local database; full test suite passes (1299 passed, 0 failures, excluding modules with a pre-existing unrelated missing-dependency issue in this environment).
Two BDD scenarios in
tests/features/ogc-cleanup-sprint1.featurefail against this branch: "Sprint 1 migration restricts all ogc_* views to public records" and "The 4 already-consistent layers are unaffected by the migration."Root cause: these scenarios deliberately rewind the real database schema to an old revision (
PRE_A1_REVISION, well before this change) to test an old migration in isolation, then seed test data using the current SQLAlchemy ORM model classes. Sincerelease_levelis now a mapped column onReleaseMixin, every model using it (Group,Location, etc.) always includesrelease_levelin its generatedINSERTstatement -- regardless of whether it's set, and regardless of any default (client-side, server-side, or none at all; all three were tried and all fail the same way). Against the rewound schema, that column doesn't exist yet, so the insert fails withcolumn "release_level" of relation "group" does not exist.I think this needs a fix on the test side (e.g.,
_seed_allintests/features/steps/ogc-cleanup-sprint1.pyseeding via raw SQL instead of the ORM for these two scenarios specifically) -- not resolved in this PR. @ksmuczynski @jirhiker any thoughts on this ?