Skip to content

Conversation

jkachel
Copy link
Contributor

@jkachel jkachel commented Aug 6, 2024

What are the relevant tickets?

Closes #1352

Description (What does it do?)

Adds RUN_DATA_MIGRATIONS=True in front of the poetry command to make migrations, which we use to check if there's missing migrations. This makes it include the data_fixtures app and thus will check for missing migrations there too (unlikely) or for conflicting migrations in that app (much more likely).

How can this be tested?

Add a couple migrations with the same serial number to the data_fixtures app. (I just added a single empty one, then cut and pasted it.)

Run ./scripts/test/detect_missing_migrations.sh from the web container. It should fail.

If you commit these migrations to the branch (or to a sub-branch), it should also fail when the GitHub action runs. (Don't forget to revert the commit if you did it to this branch!)

jkachel added 3 commits August 6, 2024 07:40
This will include the data_fixtures app, and thus will throw an error if you have conflicting migrations there too.
… science.

The test updates should kick these out and the test should fail.
…ose, for science." - tests passed.

This reverts commit 7484b1c, which added some bad migrations to ensure the CI workflow worked. It did, so these go away now.
@jkachel jkachel added Needs Review An open Pull Request that is ready for review product:mit-open Issues related to the MIT Open product labels Aug 6, 2024
@ChristopherChudzicki ChristopherChudzicki self-assigned this Aug 6, 2024
Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ChristopherChudzicki ChristopherChudzicki added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Aug 6, 2024
@jkachel jkachel merged commit fad72e6 into main Aug 6, 2024
@jkachel jkachel deleted the jkachel/update-ci-run-data-migrations branch August 6, 2024 14:09
@odlbot odlbot mentioned this pull request Aug 6, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:mit-open Issues related to the MIT Open product Waiting on author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run data_fixtures app migrations at the end of automated tests

2 participants