Skip to content

Comments

feat(W-18022017): add data:maintenances commands#3535

Merged
k80bowman merged 8 commits intov11.0.0from
k80/data-maintenance
Feb 24, 2026
Merged

feat(W-18022017): add data:maintenances commands#3535
k80bowman merged 8 commits intov11.0.0from
k80/data-maintenance

Conversation

@k80bowman
Copy link
Contributor

Summary

Adds the following commands from the data-maintenance plugin:

  • data:maintenances:info
  • data:maintenances:run
  • data:maintenances:wait
  • data:maintenances:window
  • data:maintenances:window:update

The changes to these commands and their associated tests include:

  • Migration to ESM and oclif/core v4 (migration to the latest version of oclif/test for the tests)
  • Updates to the dataAPI endpoints as detailed in this draft PR
  • Updates to use shared functions from heroku-cli-util

Type of Change

Breaking Changes (major semver update)

  • Add a ! after your change type to denote a change that breaks current behavior

Feature Additions (minor semver update)

  • feat: Introduces a new feature to the codebase

Patch Updates (patch semver update)

  • fix: Bug fix
  • deps: Dependency upgrade
  • revert: Revert a previous commit
  • chore: Change that does not affect production code
  • refactor: Refactoring existing code without changing behavior
  • test: Add/update/remove tests

Testing

Notes:

Check out this branch and run npm install && npm run build

You'll need to add a couple different kinds of databases to a test app in order to test these commands

  • Add an Essential-tier database by running heroku addons:create heroku-postgresql:essential-0 -a TEST_APP
  • Add a Standard-tier database by running heroku addons:create heroku-postgresql:standard-0 -a TEST_APP
  • Add an Advanced-tier database by running HEROKU_PROD_NGPG=true ./bin/run data:pg:create -a TEST_APP (this one can take a while to provision)

Steps:

  1. Run ./bin/run data:maintenances:info DB_NAME -a TEST_APP against your Essential-tier database. Confirm that an error message is returned.
  2. Run ./bin/run data:maintenances:info DB_NAME -a TEST_APP against your Standard and Advanced-tier databases. Confirm that the info is shown as expected.
  3. Run ./bin/run data:maintenances:window DB_NAME -a TEST_APP against your Essential-tier database. Confirm that an error message is returned.
  4. Run ./bin/run data:maintenances:window DB_NAME -a TEST_APP against your Standard-tier database. Confirm that the maintenance windows are shown as expected.
  5. Run ./bin/run data:maintenances:schedule DB_NAME -a TEST_APP against your Essential-tier database. Confirm that an error message is returned.
  6. Run ./bin/run data:maintenances:schedule DB_NAME -a TEST_APP against your Standard and Advanced-tier databases. Confirm that the maintenances are scheduled as expected.
    1. Run ./bin/run data:maintenances:window DB_NAME -a TEST_APP against your Advanced-tier database. Confirm that an error message is returned.
  7. Run ./bin/run data:maintenances:window:update DB_NAME tuesday 1:30PM -a TEST_APP against your Essential-tier database. Confirm that an error message is returned.
  8. Run ./bin/run data:maintenances:window:update DB_NAME tuesday 1:30PM-a TEST_APP against your Standard and Advanced-tier databases. Confirm that the maintenance windows are updated as expected.
  9. Run ./bin/run data:maintenances:run DB_NAME -a TEST_APP --confirm TEST_APP against your Essential-tier database. Confirm that an error message is returned.
  10. Run ./bin/run data:maintenances:run DB_NAME -a TEST_APP --confirm TEST_APP against your Standard and Advanced-tier databases. Confirm that the maintenance is triggered.
  11. Run ./bin/run data:maintenances:wait DB_NAME -a TEST_APP against your Standard-tier database. Confirm that the command waits to complete until the maintenance is finished.

Related Issues

GUS work item: W-18022017

Copy link
Contributor

@tlowrimore-heroku tlowrimore-heroku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@k80bowman k80bowman merged commit 72d65f0 into v11.0.0 Feb 24, 2026
13 checks passed
@k80bowman k80bowman deleted the k80/data-maintenance branch February 24, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants