Skip to content

Detect app startup failure instead of retrying waitForUrl for full timeout #38

@DeDuckProject

Description

@DeDuckProject

Problem

When the app server crashes or exits during startup (e.g. missing env vars, DB not configured, port conflict), git-glimpse keeps polling waitForUrl until the full timeout expires — often 10+ minutes in CI.

The user sees repeated connection-refused retries with no indication that the process is already dead, making it hard to distinguish "server is slow to start" from "server crashed immediately".

Expected behaviour

git-glimpse should watch the child process exit code. If the server process exits before readyWhen.url becomes reachable, the pipeline should fail immediately with the process's stderr output rather than waiting out the timeout.

Suggested fix

After spawning the startCommand process, attach an exit listener alongside the URL polling loop. If the process exits with a non-zero code before the URL responds, cancel the poll and surface the captured stderr as the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions