Repository navigation
feat(healthcheck): Add a healthcheck command for consumer liveness probes - #580
Merged
Merged
Conversation
…obes Add `python3 -m arroyo.healthcheck <path>`, which removes the file the Healthcheck strategy touches, or exits 1 with a one-line message if it is missing. Consumers run this check today as `rm <path>`, which needs a shell image, or as an inline `python3 -c` snippet in each deployment. Arroyo writes the file, so it should own the check too. The module imports only the standard library and `arroyo`, so it stays cheap enough to run every few seconds. Co-Authored-By: Claude <noreply@anthropic.com>
Match the taskbroker client commands, which test behavior only. Co-Authored-By: Claude <noreply@anthropic.com>
oioki
force-pushed
the
feat/healthcheck-command
branch
from
October 13, 2026 17:35
31065eb to
1b5aa2c
Compare
Keep the explanation on the function, like the taskbroker client commands. Co-Authored-By: Claude <noreply@anthropic.com>
oioki
marked this pull request as ready for review
October 13, 2026 17:42
markstory
approved these changes
Oct 13, 2026
BojanOro
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
python3 -m arroyo.healthcheck <path>. It removes the file theHealthcheckstrategy touches, or exits 1 with<path> is missing: the consumer has not touched it since the last probe. It's meant to run as the consumer's Kubernetes liveness probe.Consumers run this check today as
rm /tmp/health.txt, which needs a shell image and doesn't work on distroless. As a stopgap, ops carries an inlinepython3 -c "import os; os.remove(...)"snippet in sentry (getsentry/ops#24151), snuba (getsentry/ops#21290) and super-big-consumers (getsentry/ops#21394), with a traceback as the error message. Arroyo writes the file, so it should own the check, the same waytaskbroker_clientnow owns the taskworker's (getsentry/taskbroker#814).The module imports only the standard library and
arroyo's top-level package (about 0.06s), not the Kafka client or the processing strategies. That matters because the probe runs every 10s in every consumer pod. For comparison, asentryCLI subcommand would cost about 1s per probe, since it loads Django.