Repository navigation
fix: convert this package's own UUID columns in the MariaDB migrations - #2703
blarghmatey wants to merge 2 commits into
Conversation
blackboard 0025, canvas 0041 and integrated_channel 0037 altered the enterprise-integrated-channels tables (blackboard_channel_*, canvas_channel_*, channel_integration_*) instead of this package's own. Nothing orders those tables before these migrations, so on a fresh MariaDB database migrate fails with "Table ... doesn't exist" at blackboard 0025. On existing databases the other package's columns were converted (they already are, by that package's own migrations) and this package's columns were left as char(32). The three migrations now name this package's tables, and 0026, 0042 and 0038 convert those tables on databases that applied the old versions. MODIFY to the type a column already has changes nothing, so the new migrations are safe after the corrected ones too. integrated_channel_contentmetadataitemtransmission.enterprise_customer_catalog_uuid is nullable in this package, so it is converted as NULL rather than the NOT NULL of the channel_integration copy. Claude-Session: https://claude.ai/code/session_01LjapgaiiGBFwNW9PgQ59jv
|
Thanks for the pull request, @blarghmatey! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2703 +/- ##
=======================================
Coverage 87.06% 87.06%
=======================================
Files 265 265
Lines 17280 17280
Branches 1709 1709
=======================================
Hits 15044 15044
Misses 1898 1898
Partials 338 338
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The MariaDB UUID conversions from #2475 in
blackboard0025,canvas0041 andintegrated_channel0037 alter the enterprise-integrated-channels tables (blackboard_channel_*,canvas_channel_*,channel_integration_*) rather than this package's own. Nothing orders those tables ahead of these migrations, somigrateon a fresh MariaDB database fails atblackboard.0025with(1146, "Table '...blackboard_channel_blackboardenterprisecustomerconfiguration' doesn't exist"). On existing databases the other package's columns get converted (its own migrations already do that) and this package's columns staychar(32).This points the three migrations back at this package's tables, and adds
blackboard0026,canvas0042 andintegrated_channel0038 to convert those tables on databases that already applied the old versions. MODIFY to the type a column already has changes nothing, so the new migrations are also safe after the corrected ones.integrated_channel_contentmetadataitemtransmission.enterprise_customer_catalog_uuidis nullable here, so it is converted asNULLrather than theNOT NULLof thechannel_integrationcopy.I ran
manage.py migrateagainst MariaDB 11.4 with the test settings pointed at it:blackboard.0025with the error aboveuuidchar(32)(the state of a database that ran the old versions), migrating converts them touuidmakemigrations --checkreports no changes, and the migration tests pass.Not covered here:
enterprise_customer_uuidon the per-channel audit tables that inherit it from the abstractLearnerDataTransmissionAudit(e.g.blackboard_blackboardlearnerdatatransmissionaudit,canvas_canvaslearnerdatatransmissionaudit) is stillchar(32). #2475 never converted those either, so I've left them for a follow-up.Merge checklist:
requirements/*.txtfiles)base.inif needed in production but edx-platform doesn't install ittest-master.inif edx-platform pins it, with a matching versionmake upgrade && make requirementshave been run to regenerate requirementsmake statichas been run to update webpack bundling if any static content was updated./manage.py makemigrationshas been run./manage.py lms makemigrationsin the shell.Post merge:
(so basically once your build finishes, after maybe a minute you should see the new version in PyPi automatically (on refresh))
make upgradein edx-platform will look for the latest version in PyPi.https://claude.ai/code/session_01LjapgaiiGBFwNW9PgQ59jv