Skip to content

[Enhancement]: Wait strategies should detect when a container exits early and throw an exception #1445

Open
@HofmeisterAn

Description

@HofmeisterAn

Problem

If a container stops or exits during startup, most wait strategies will keep retrying to detect readiness, even though it will never succeed. But if the container has already stopped or exited, we know there's no reason retrying it. Instead, we should immediately throw an exception.

Solution

Ideally, we should also try to get the container logs and include them in the exception to help with debugging.

Benefit

This change would significantly improve the developer experience. Developers would get immediate feedback when something goes wrong.

It would also improve our CI process. For example, the Pulsar module test sometimes fails because a container exits during startup, but we don't know why. From running tests in GitHub Codespaces (Dev Containers), it looks like a memory issue, most likely the CI runner is running OOM (the issue has been fixed in the meantime).

Alternatives

-

Would you like to help contributing this enhancement?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions