heroku ps:wait is made to wait for a deployment to be up and running. A literal quote from the code:
static description = 'wait for all dynos to be running latest version after a release'
I tested it with a successful deployment and it exited the process with status 0 as soon as my dyno was in the state up. So far so good.
But now I wanted to test a failing startup of the application I was deploying. So introduced a bug so the app did not want to start. To my surprise it was in an infinite loop. The state of the of the dyno was changed from starting to crashed. And Heroku tried another time. So crashed became starting and it failed again so now crashed was the final state of this version of the application. And the heroku ps:wait process was still running.
What is the expected behavior?
I expect the heroku ps:wait command to exit the process with an error status if the app it is waiting for becomes in the state crashed. Also a timeout as parameter would be great (with a default of 60 seconds or some sorts).
This is very useful for automated deployment. After deploying an app it should be possible to find out with the Heroku CLI to know whether the startup of the app succeeded.
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
https://github.com/heroku/cli/blob/master/packages/ps/src/commands/ps/wait.ts
heroku ps:wait
is made to wait for a deployment to be up and running. A literal quote from the code:I tested it with a successful deployment and it exited the process with
status 0
as soon as my dyno was in the state up. So far so good.But now I wanted to test a failing startup of the application I was deploying. So introduced a bug so the app did not want to start. To my surprise it was in an infinite loop. The state of the of the dyno was changed from
starting
tocrashed
. And Heroku tried another time. Socrashed
becamestarting
and it failed again so nowcrashed
was the final state of this version of the application. And theheroku ps:wait
process was still running.What is the expected behavior?
I expect the
heroku ps:wait
command to exit the process with an error status if the app it is waiting for becomes in the statecrashed
. Also a timeout as parameter would be great (with a default of 60 seconds or some sorts).This is very useful for automated deployment. After deploying an app it should be possible to find out with the Heroku CLI to know whether the startup of the app succeeded.