Skip to content

fix(gateway): probe a site's health without needing curl in its image - #661

Merged
andrewpark-scaleai merged 3 commits into
mainfrom
andrew.park/website-probe-without-curl
Nov 13, 2026
Merged

andrewpark-scaleai merged 3 commits into
mainfrom
andrew.park/website-probe-without-curl

Conversation

@andrewpark-scaleai

@andrewpark-scaleai andrewpark-scaleai commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Why

A website env whose server image doesn't contain curl can never deploy. The compose health check the gateway writes for a site's backend runs curl, so the check exits 127 and compose marks the service unhealthy. That happens even while the server is up and answering its card. Production hit this with a one-image site built from the Notes example minus its apt-get install curl line. Every deploy failed after 90 to 120 s with "failed its health check", even though the captured log showed uvicorn running. Nothing told the author that curl was required. The only mention was a line in the example's README.

What

  • _http_probe builds the backend health check. It tries the card and then the declared health path, using whichever of curl, wget, python3 or node the image has, and passes on the first success. A server that answers only with errors still fails it.
  • The Notes example no longer installs curl, and its README no longer says the gateway needs it.

Verification

  • Before. Inside the failing production image (Debian, python3, no curl), with its server answering 200 on the card, the old probe exits 127 (curl: not found).
  • After. The new probe exits 0 in that same image, and exits 1 when pointed at a dead port.
  • Other image types. The probe passes in node:22-slim (node only) and busybox (wget only) when the server answers, and fails when the server answers 500 or nothing is listening.
  • The example image. The Notes example image, rebuilt without curl, passes the probe.
  • Unit tests. New tests run the generated probe in a shell whose PATH has only python3, against a server answering 200, and then against one answering only errors. env_gateway_provider_test.py passes (270), and so do the Notes example tests.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Website health checks now use the first available client among curl, wget, python3, and node.

  • Website health checks work in images without curl.

The latest change only removes extra whitespace between shell branches. No new issues were found, and the previous request-limit finding is fixed.

Reviews (3) · Last reviewed commit: "style(gateway): single spaces between th..." · Reviewed by Greptile

The compose health check for a website backend ran curl, so a site image
without curl could never turn healthy, even with its server answering. The
probe now fetches with whichever of curl, wget, python3 or node the image has.
@andrewpark-scaleai
andrewpark-scaleai requested a review from a team as a code owner November 13, 2026 06:50
@andrewpark-scaleai
andrewpark-scaleai enabled auto-merge (squash) November 13, 2026 06:51
@andrewpark-scaleai
andrewpark-scaleai merged commit 202d452 into main Nov 13, 2026
61 of 63 checks passed
@andrewpark-scaleai
andrewpark-scaleai deleted the andrew.park/website-probe-without-curl branch November 13, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants