feat: 'data:pg:migrate' command implementation (W-21303011)#3546
Draft
feat: 'data:pg:migrate' command implementation (W-21303011)#3546
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Here we implement a new
data:pg:migrateinteractive command that will allow customers to migrate Heroku Postgres Classic databases to the new Advanced tier.This is sort of a POC, tested only with unit tests and mocked fixtures according to the Data API v1 specification as of now, but it's subject to change.
We'll keep this as a draft PR until all features and bugs on the backend are finalized and the command can be thoroughly tested in the wild with actual databases. This also requires CX reviews and fixes that will be applied with new commits.
Once we're ok with the changes we'll change this to be merged to
mainbranch (as we expect v11 to have shipped by that time) and converted to a PR ready for review and merge. We have a different work item for that on our sprint board: W-21385925.There's some heavy refactor on this PR around (now shared) behavior between
data:pg:createand the newdata:pg:migratecommand, given the latter needed a way to create an Advanced database as the target for a migration. Shared behavior was generalized and extracted toPoolConfig(in a similar way to what we did fordata:pg:createanddata:pg:update). While working on this we detected that we missed to copy the unit tests for thatPoolConfigmodule from the NGPG plugin. We fix that here, plus add new tests for the extracted shared behavior.Type of Change
Breaking Changes (major semver update)
!after your change type to denote a change that breaks current behaviorFeature Additions (minor semver update)
Patch Updates (patch semver update)
Testing
For now we can only rely on unit tests, because the backend isn't stable enough for smoke testing.
Nevertheless, in order to use it for testing, checkout this branch, build the CLI and use the
./bin/runtool to run the command.Screenshots (if applicable)
Related Issues
GUS work item: W-21303011