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

Introducing Flyway as DB schema migration manager #809

Closed
wants to merge 2 commits into from

Conversation

pyalex
Copy link
Collaborator

@pyalex pyalex commented Jun 19, 2020

What this PR does / why we need it:

Adding Flyway to project.
Existing DB schema added as V1. It's not possible to sync migration version with our release versions, since first baseline version name will be always V1.
Fake migration will be run to sync with current schema on first core start.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:


@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pyalex
To complete the pull request process, please assign davidheryanto
You can assign the PR to them by writing /assign @davidheryanto in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pyalex
Copy link
Collaborator Author

pyalex commented Jun 19, 2020

/retest

@pyalex
Copy link
Collaborator Author

pyalex commented Jun 19, 2020

/hold

@woop
Copy link
Member

woop commented Jun 19, 2020

@pyalex We probably need a new page underneath Administration (link) for Upgrading Feast. We can just keep it simple for now, but what I was thinking is just having a release specific process (steps to upgrade from 0.4 to 0.5), and a section for common tasks like applying a migration. This PR should probably introduce the latter.

@pyalex
Copy link
Collaborator Author

pyalex commented Jun 19, 2020

@woop flyway is integrated with spring-boot and all migrations will be happen automatically with start of core. There's no need for any manual steps. However such page in documentation still maybe useful to explain what was changed and what issues may occur

@ches
Copy link
Member

ches commented Jun 24, 2020

Any comment on why this was closed, change of plans?

@ches
Copy link
Member

ches commented Jun 24, 2020

Superseded by #810?

@ches
Copy link
Member

ches commented Jul 4, 2020

flyway is integrated with spring-boot and all migrations will be happen automatically with start of core. There's no need for any manual steps.

Some organizations will have database operations managed by dedicated DBA teams, production DDL needs to run through formal change management processes, etc. (Speaking from experience here). Flyway can still help prepare scripts for such procedures, and Feast docs don't need to duplicate things that Flyway docs cover about how this might work, but I absolutely agree that Feast docs should cover what will happen, ideally with some acknowledgement that implicit auto will not be usable by everyone and what they might do instead.

This ought to cover initial deployment of Feast in the future too IMO, where environments again may not allow automatic creation of schema by Hibernate or Flyway (these kinds of things are all disabled by Hibernate's defaults, Feast config sets Spring's hibernate.ddl-auto: update—which is something that might need to be reviewed given Flyway should own management of schema now).

@woop
Copy link
Member

woop commented Jul 4, 2020

@ches I believe the idea was that the backport wasn't necessary since Spring ignores the baseline migration if a schema already exists, so folks coming from 0.5 would just get the diffs in 0.6.

You have a valid point though, in that not all organizations have the freedom to use implicit auto. This seems to only be a problem if you are baselined prior to 0.6.

What would be an acceptable minimum here? Should the migrations start from an earlier version? Should we document a means of upgrading versions (without migrations, perhaps import/export of schemas)?

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.

4 participants