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

Swapping around migrations due to InconsistentMigrationHistory on acc… #1228

Merged
merged 1 commit into from
May 31, 2024

Conversation

alextreme
Copy link
Member

@alextreme alextreme commented May 29, 2024

Problem that occurred on acceptance environments with v1.17.0 which I switched around on v1.17.1. This was most likely due to the fact that we delayed removing the statustranslation table to 1.17

@swrichards
Copy link
Contributor

If this is only a question of an inconsistent migration state on acceptance, would it be an option to address that inconsistency directly instead of altering the migrations in-repo, doing something like:

  1. Using migrate --fake to mark all in-repo migrations applied on acceptance
  2. Assuming the database state has not yet applied the migration, we can then manually fetch the migration SQL from migrate.py sqlmigrate openzaak {0047|0048} and apply it directly in the dbshell (which would ignore the dependencies). The migrations are fairly simple (single line statements in each case) and do not depend on each other.

@alextreme
Copy link
Member Author

This would be sufficient if all we have are SaaS environments (production has the same issue where 0047 is missing).

However we also have Dimpact-installed environments that need a clean migration path between releases, these are done with our Docker image but we don't have much of a say how and when a new version of OIP is installed. And we also have separate installs managed by Sjoerd using our Docker image separate from our SaaS installs. The main thing we could do is mention the steps you say in the release notes, but it wouldn't be easy for them.

So this PR is to avoid future upgrade problems and also a reminder that leaving a PR + migration out of a release will cause headaches during future releases. Of course, doing a squash would avoid confusion for new installs and allow us to clean up this history in due time.

image

Copy link
Contributor

@pi-sigma pi-sigma left a comment

Choose a reason for hiding this comment

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

@alextreme Thanks for the explanation, that makes sense! Let's discuss the option of squashing migrations on Monday.

Copy link
Contributor

@swrichards swrichards left a comment

Choose a reason for hiding this comment

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

Clear,, thanks!

@alextreme alextreme merged commit 0c300a4 into develop May 31, 2024
16 checks passed
@alextreme alextreme deleted the issue/1.17-inconsistent-migrationhistory branch May 31, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants