Closed madhuravius closed 1 year ago
This pull request has been linked to Shortcut Story #16658: Show scheduled maintenance in the CLI.
# aptible apps --requiring-maintenance
You may restart these Apps/DBs at any time, or Aptible will restart it during the defined window
=== scantests
ubuntu-22 between 2023-07-19 23:00 UTC and 2023-07-19 23:00 UTC
debian-9 between 2023-08-01 23:00 UTC and 2023-08-01 23:00 UTC
=== security
security-notifications-to-shortcut between 2023-08-01 23:00 UTC and 2023-08-01 23:00 UTC
You may restart these Apps/DBs at any time, or Aptible will restart it during the defined window
The JSON output will include a restart_command
attribute that contains the command needed to restart it.
Currently look like this @UserNotFound
[aptible-cli] aptible maintenance:dbs 20:19:43 git:(MR-sc-11658*) ⚡ ✭
=== test-django
couchdb between 2023-08-18 17:32:46 UTC and 2023-08-19 17:32:46 UTC
You may restart these database(s) at any time, or Aptible will restart it during the defined window.
[aptible-cli] aptible maintenance:apps 20:19:50 git:(MR-sc-11658*) ⚡ ✭
No apps found affected by maintenance schedules.
We can stick it in --requiring-maintenance, but we agreed verbally previously flag was not necessary and it could live as a separate command (much like it lives as different API resources), advise if this is not desired
With respect to JSON output, I think something like this is what was desired:
This will pass if gem release is done (i don't have perms):
note/suggestion - I think we should just add a simple helper whenever someone runs apps/databases (where we say at the bottom, to restart your app, just do
aptible restart --app $ID
or whatnotwe might have to add a warning:
"You will only be able to see scheduled maintenance in Environments for which you have been granted at least Read access"
databases proof:
apps proof:
The ticket asked for this grouping (which I can do) if desired, but felt that this was a bit easier to view (and has more relevant information with ids, which i think our CLI supports instead of handle alone). I also did not add it to the parent apps (which I can do if desired):