Skip to content

heroku ps:wait supporting failing startup of application #1732

Open

Description

@ebendal

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:

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.

Activity

  1. nertzy commented on May 28, 2024

    @nertzy

    It would be great to support a --timeout [number of seconds] flag or similar.

    Until then, I've been able to simulate the same thing with a call to timeout from coreutils.

  2. added theissue type on Sep 14, 2026
  3. removed theissue type on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions