local_resource
with pass-then-fail readiness_probe never shows as red
#6478
Labels
bug
Something isn't working
Expected Behavior
When a readiness_probe on any resource (including local_resource) succeeds and turns green, then subsequently fails, the resource should show as unhealthy.
Current Behavior
Local resources specifically only show as red if the serve_cmd exits with any code. If the health check passes, then fails, the resource goes back to a "pending" state. The same is true for other types of probes as well.
The serve_cmd behavior is documented, but the readiness_probe behavior doesn't align with other uses of probes
Steps to Reproduce
echo 0 > counter
to make the readiness_probe passecho 1 > counter
to make it failContext
tilt doctor
OutputAbout Your Use Case
We use local_resources to coordinate launching a number of local processes for local development (we don't use tilt for the k8s side of things at the moment). We utilize depends_on for ordering, so it becoming healthy is important. One of the resources we run is a watcher for files that will re-compile just that file using
tsc
rather than restarting the whole tilt resource. When tsc fails to compile, the output shows it, but the resource shows as healthy. We're usingtsc-watch
to drop a file when successful and delete it when failing, then setting the health check to fail if the file is not present so developers see a notice that it's failing.We see the same functionality with running postgres locally with a similar tiltfile health check (so as not to re-trigger tiltfile re-evaluation).
The text was updated successfully, but these errors were encountered: