Skip to content

feat(client): Add healthcheck command for the worker liveness probe - #814

Draft
oioki wants to merge 1 commit into
mainfrom
feat/client-healthcheck-command
Draft

oioki wants to merge 1 commit into
mainfrom
feat/client-healthcheck-command

Conversation

@oioki

@oioki oioki commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Add python3 -m taskbroker_client.healthcheck <path>. It removes the health file the worker touches, so the next probe fails unless the worker touches it again. If the file is already missing, it exits 1 with one line:

/tmp/health is missing: the worker has not touched it since the last probe

getsentry is moving to a distroless image, and the taskworker liveness probe (rm /tmp/health) needs rm. The ops PR (getsentry/ops#24151) works around it with an inline python3 -c snippet. The worker writes this file, so the client should own the check too, like the drain command in #810.

The path is required. Neither the client nor sentry run taskworker has a default, and ops passes it per pool. The module imports only argparse, because the probe runs every few seconds on every worker.

Nothing waits on this. Once it's released and in the sentry image, ops can replace the inline snippet.

Refs SEC-1112

Add `python3 -m taskbroker_client.healthcheck <path>`, which removes the
health file the worker touches, or exits 1 with a one-line message if
it is missing. Pods currently run `rm <path>`, which does not work on
distroless images that have no shell or rm.

The worker writes the file, so the client should own the check. The
path is required because neither the client nor sentry has a default;
ops passes it per pool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Oct 8, 2026

Copy link
Copy Markdown

SEC-1112

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