refactor: use sdk for addons commands - #3850
Open
jdodson wants to merge 9 commits 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
Migrates addons to use the SDK
upgrade— fixed doublenew HerokuSDK()(single instance)destroy—platform.addOn.destroyAndWait; CLI keeps the pg error copywait—waitForProvisioning+ newpollAddonUntilDeprovisionedhelperType 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
SDK reads netrc, so log in with
HEROKU_NETRC_WRITE=true. Throwaway app; last step is destructive. Keep the order —upgrade/attachmutate the add-on,destroyremoves it.Setup
npm i && npm run buildHEROKU_NETRC_WRITE=true ./bin/run login./bin/run apps:create APP./bin/run addons:create heroku-postgresql:essential-0 --app APP --wait— note the add-on name (ADDON)Run each migrated command
./bin/run addons:wait --app APP— lists status./bin/run addons:upgrade ADDON heroku-postgresql:essential-1 --app APP— plan changes./bin/run addons:docs ADDON --app APP --show-url— prints docs URL./bin/run addons:open ADDON --app APP --show-url— prints dashboard URL./bin/run addons:attach ADDON --app APP --as MYDB— attaches, printsdone, v<N>./bin/run addons:destroy ADDON --app APP --confirm APP—Destroying ADDON on ⬢ APP... doneCleanup
./bin/run apps:destroy --app APP --confirm APPScreenshots (if applicable)
Related Issues
GUS work item: https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00002eHU1qYAG/view