fix: migration method selection navigation bug (W-23306091)#3802
Open
sbosio wants to merge 1 commit into
Open
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
The issue was caused because
selectedMigrationMethodwas overloaded as both the data value (POST body) and the control gate deciding whether to show the method prompt. Once set —interactively or via flag— it stayed truthy, so the prompt was skipped on the next pass (after "Go back", or for a second migration in the same session).The fix was to introduce a new attribute to record if the method was provided via flag and ensure the
selectedMigrationMethodgets reset each time a new migration is configured.Added one unit test that selects one of the methods and then goes back to select the other one and verifies the POST is done with the correct method (the last one selected) and that the prompt appears two times as expected.
Type of Change
Patch Updates (patch semver update)
Testing
Notes:
You'll need to have at least a classic Postgres database on your app (and recommended, optionally an available and empty Advanced one).
Steps:
npm install && npm run buildGo backand observe you're redirected to the destination database selection step instead of the migration method selection and you cannot change the migration method. Cancel the migration configuration with CTRL+C.Screenshots (if applicable)
Related Issues
GUS work item: W-23306091