refactor: use @heroku/sdk for maintenance commands#3713
Merged
eablack merged 1 commit intoMay 15, 2026
Conversation
Replace direct Platform API calls in maintenance:on, maintenance:off, and maintenance status commands with @heroku/sdk equivalents (enableMaintenanceMode, disableMaintenanceMode, createPlatformClient). Bumps @heroku/sdk to the commit that ships a prepare script so the SDK's dist/ folder is built at install time. Removes a setTimeout stub in test/helpers/init.mjs that interfered with ky's internal timeout handling and triggered fetch retries against nock.
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
maintenance:on,maintenance:off, andmaintenance(status) with@heroku/sdkequivalents:enableMaintenanceMode,disableMaintenanceMode, andcreatePlatformClient().app.info().@heroku/sdkto the commit that ships apreparescript so the SDK'sdist/folder is built when installed from GitHub.setTimeout/setIntervalstub intest/helpers/init.mjsthat forced ky's internal timeout to fire immediately and triggered fetch-retry loops against nock.Type of Change
Testing
Notes: SDK calls hit the same endpoints with the same payloads as before, so existing nock fixtures still apply. Tests now reply with a JSON body (
{maintenance: true|false}) since the SDK dispatcher callsresponse.json().Steps:
npm test— unit suite passes../bin/run.jsagainst a test app:maintenance:on,maintenance,maintenance:off.Related Issues
GUS work item: W-22265433