feat(W-18022017): add data:maintenances commands#3535
Merged
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
Adds the following commands from the data-maintenance plugin:
data:maintenances:infodata:maintenances:rundata:maintenances:waitdata:maintenances:windowdata:maintenances:window:updateThe changes to these commands and their associated tests include:
heroku-cli-utilType 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
Notes:
Check out this branch and run
npm install && npm run buildYou'll need to add a couple different kinds of databases to a test app in order to test these commands
heroku addons:create heroku-postgresql:essential-0 -a TEST_APPheroku addons:create heroku-postgresql:standard-0 -a TEST_APPHEROKU_PROD_NGPG=true ./bin/run data:pg:create -a TEST_APP(this one can take a while to provision)Steps:
./bin/run data:maintenances:info DB_NAME -a TEST_APPagainst your Essential-tier database. Confirm that an error message is returned../bin/run data:maintenances:info DB_NAME -a TEST_APPagainst your Standard and Advanced-tier databases. Confirm that the info is shown as expected../bin/run data:maintenances:window DB_NAME -a TEST_APPagainst your Essential-tier database. Confirm that an error message is returned../bin/run data:maintenances:window DB_NAME -a TEST_APPagainst your Standard-tier database. Confirm that the maintenance windows are shown as expected../bin/run data:maintenances:schedule DB_NAME -a TEST_APPagainst your Essential-tier database. Confirm that an error message is returned../bin/run data:maintenances:schedule DB_NAME -a TEST_APPagainst your Standard and Advanced-tier databases. Confirm that the maintenances are scheduled as expected../bin/run data:maintenances:window DB_NAME -a TEST_APPagainst your Advanced-tier database. Confirm that an error message is returned../bin/run data:maintenances:window:update DB_NAME tuesday 1:30PM -a TEST_APPagainst your Essential-tier database. Confirm that an error message is returned../bin/run data:maintenances:window:update DB_NAME tuesday 1:30PM-a TEST_APPagainst your Standard and Advanced-tier databases. Confirm that the maintenance windows are updated as expected../bin/run data:maintenances:run DB_NAME -a TEST_APP --confirm TEST_APPagainst your Essential-tier database. Confirm that an error message is returned../bin/run data:maintenances:run DB_NAME -a TEST_APP --confirm TEST_APPagainst your Standard and Advanced-tier databases. Confirm that the maintenance is triggered../bin/run data:maintenances:wait DB_NAME -a TEST_APPagainst your Standard-tier database. Confirm that the command waits to complete until the maintenance is finished.Related Issues
GUS work item: W-18022017