Repository navigation
examples(ideas-board): tagged multi-region schema check demo - #11
Merged
Merged
Conversation
Demonstrate the cockroachdb-sqlalchemy 0.2.0 multi-region check as a user would use it, tagged for docs tutorial includes: - multiregion_check_service.py: RegionalIdeaModel(RegionalByRowMixin) mapping the regional_idea table (mr-check-entity) + create_cockroachdb_engine opt-in running verify_multiregion_schema at startup (mr-check-usage). - test_multiregion_check_it.py: gated on CRDB_MULTIREGION like test_regional_it; asserts a matching schema passes verify_multiregion_schema (mr-check-report). - requirements.txt: pin cockroachdb-sqlalchemy==0.2.0. - examples-it-multiregion.yml: run the new gated test against the 3-region cluster.
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.
Adds a tagged, user-facing demo of the cockroachdb-sqlalchemy 0.2.0 multi-region schema check to
examples/ideas-board, for docs tutorial includes.Tags (Python
# tag::NAME[]…# end::NAME[])mr-check-entitymultiregion_check_service.py—RegionalIdeaModel(RegionalByRowMixin)mapping theregional_ideatablemr-check-usagemultiregion_check_service.py—create_cockroachdb_engine(..., multiregion_base=Base, multiregion_mode="warn")startup opt-in (runsverify_multiregion_schema)mr-check-reporttest_multiregion_check_it.py— gated onCRDB_MULTIREGION, asserts a matching schema passesverify_multiregion_schema(..., mode="validate")Notes
cockroachdb-sqlalchemy==0.2.0is added torequirements.txt(pullssqlalchemy>=2.0).test_regional_it.py; it skips by default (verified locally) and runs against the 3-region cluster viaexamples-it-multiregion.yml.create_all; the check is read-only, the model is metadata only.