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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃毟(apps) run the db_migrate job before starting application pods #411

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sampaccoud
Copy link
Contributor

Purpose

If we run db_migrate after starting the new pod:

  • the current pod has to be compatible with the state of the db before and after the migration.
  • the new pod has to be compatible with the state of the database before and after a migration. This is not possible for a new database, and not easy for schema updates.

If we run db_migrate before starting a new pod, the new pod only has to be
compatible with the state of the database after the migration.

Proposal

Tag all db_migrate jobs as pre jobs.

If we run db_migrate after starting the new pod:
- the current pod has to be compatible with the state of the db before and
  after the migration.
- the new pod has to be compatible with the state of the database before
  and after a migration. This is not possible for a new database, and not
  easy for schema updates.
If we run db_migrate before starting a new pod, the new pod only has to be
compatible with the state of the database after the migration.
Copy link
Contributor

@jmaupetit jmaupetit left a comment

Choose a reason for hiding this comment

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

deployment_stamp: "{{ deployment_stamp }}"
job_stamp: "{{ job_stamp }}"
# Jobs with the "pre" job type will be executed prior to deployments
job_type: "pre"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be conditioned to non-trashable environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants