-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat: Migrations & related checks can be disabled #5140
Conversation
Thanks for the lint fix @aldeed! I can squash the commits down to a single, signed commit once the test/lint suites pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me but we should have @manueldelreal give it a test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ticean Sign your commits and let's get this merged. 🎉 |
Oops, sorry I did the lint fix on github and forgot to add my signature. A signed squash sounds good @ticean |
The checks that verify the migration state are important to run the application in a safe and sane way. However, in some emergency circumstances it can be necessary to disable checks so that the application may be started when the migration versions don't line up. An example scenario might be an emergency release rollback. Running in such a mode is inherently unsafe! It is the operator's responsibility to decide if it is OK to run in this mode. The difference between the target and existing migration state should be examined carefully. New environment variables: - `MIGRATION_BYPASS_ENABLED`, boolean, not required, default: false Signed-off-by: Ticean Bennett <ticean@reactioncommerce.com>
a10520a
to
5c25072
Compare
All squashed with no changes. The DCO is passing. |
Resolves N/A
Impact: minor
Type: feature
Issue
The checks that verify the migration state are important to run the application in a safe and sane way. However, in some emergency circumstances it can be necessary to disable checks so that the application may be started when the migration versions don't line up.
An example scenario might be an emergency release rollback.
Solution
Adds new environment variables to flag the migration feature.
MIGRATION_BYPASS_ENABLED
, boolean, not required, default: falseCode changes disable migrations and checks when the flag is true.
Breaking changes
None.
Testing
Flag disabled
Migrations are Enabled
MIGRATION_BYPASS_ENABLED
flag is falseMigration Checks are Enabled
MIGRATION_BYPASS_ENABLED
flag is falseFlag enabled
Migrations are Disabled
MIGRATION_BYPASS_ENABLED
flag is true"DANGER: MIGRATION_BYPASS_ENABLED is true and all migration activity is bypassed. This is a dangerous mode and may result in data corruption."
Migration Checks are Disabled
MIGRATION_BYPASS_ENABLED
flag is true