Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI to check data migrations for conflicts #1368

Merged
merged 3 commits into from
Aug 6, 2024

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
11 checks passed
@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