Skip to content

fix(#1143): add readiness/liveness/startup probes to the requests-proxy Deployment - #641

Merged
divyasinghds merged 3 commits into
developfrom
fix/1143-requests-proxy-probes
Aug 7, 2026
Merged

fix(#1143): add readiness/liveness/startup probes to the requests-proxy Deployment#641
divyasinghds merged 3 commits into
developfrom
fix/1143-requests-proxy-probes

Conversation

@divyasinghds

@divyasinghdsdivyasinghds commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Closes tracebloc/backend#1143.

Problem

The requests-proxy Deployment has no readiness/liveness/startup probes, so the pod counts as Ready the moment the container starts — before gunicorn is actually accepting connections. The doctor's ReadyReplicas check goes green while the proxy can't yet serve (false-green).

Fix

Add startupProbe / livenessProbe / readinessProbe as tcpSocket on the gunicorn port (8888), mirroring the three-probe structure of mysql-deployment.yaml.

Why tcpSocket, not httpGet: the requests-proxy application lives in the client-runtime repo and exposes no chart-visible HTTP health path — an httpGet to an unknown path would 404 and permanently wedge the pod. A successful TCP accept on 8888 is the honest "gunicorn is serving" signal and is exactly what the doctor's ReadyReplicas check needs.

Files

  • client/templates/requests-proxy-deployment.yaml — three tcpSocket probes on port 8888
  • client/Chart.yaml — version + appVersion → 1.9.26 (chart-content change)

Validation

helm lint clean; helm template renders the probes as intended.

🤖 Generated with Claude Code


Note

Low Risk
Helm-only change to probe timing on a single-replica sidecar; no auth or data-path logic, with documented limits of tcpSocket vs full app health.

Overview
Fixes false-green readiness for the Service Bus egress proxy: tb doctor was treating the pod as ready as soon as the container started, before gunicorn listened on 8888.

The requests-proxy Deployment now has startup, liveness, and readiness probes as tcpSocket on port 8888, aligned with the three-probe pattern used elsewhere in the chart (e.g. MySQL). HTTP probes were avoided because the proxy app has no chart-visible health URL; a bad httpGet could 404 and block readiness permanently.

Chart version is bumped to 1.9.26. Inline comments note this is a partial fix: TCP success only means the gunicorn master bound the socket, not that create_app() and the worker can actually relay traffic—a future /healthz in client-runtime would be needed for that.

Reviewed by Cursor Bugbot for commit 9634e74. Bugbot is set up for automated code reviews on this repo. Configure here.

divyasinghdsand others added 2 commits August 7, 2026 12:27
The requests-proxy Deployment declared ports/securityContext/resources/env
but no probes, so the pod was marked Ready the instant the container process
started -- before gunicorn had bound :8888. `tb doctor`'s "Service Bus egress
(requests-proxy) ready" check reads ReadyReplicas, so it showed a false green
even when the proxy could not relay.
Add tcpSocket startup/liveness/readiness probes on the gunicorn listen port
(8888), mirroring mysql-deployment.yaml's three-probe structure. tcpSocket
(not httpGet) because the proxy application lives in the separate
client-runtime repo and exposes no chart-visible HTTP health path; a probe
against an unknown path would 404 and wedge the pod, whereas a successful TCP
accept is the honest "gunicorn is serving" signal the doctor check needs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
saadqbal
saadqbal previously approved these changes Aug 7, 2026

@saadqbalsaadqbal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, tight fix — probe timings mirror mysql-deployment, tcpSocket is the right call given there's no chart-visible HTTP path, and version/appVersion move in lockstep as usual. One non-blocking note inline about the residual false-green. Approving.

Comment threadclient/templates/requests-proxy-deployment.yaml
aptracebloc
aptracebloc previously approved these changes Aug 7, 2026

@aptraceblocaptracebloc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and I adhere to Asad's non-blocking comment.

tcpSocket:8888 confirms the gunicorn master has bound the listen socket
— a strict improvement over no probes that catches a container that
never starts — but it does not fully close the false-green: the master
binds before the worker finishes importing create_app() and keeps the
socket bound while a worker crash-loops, so a proxy that can't relay can
still read Ready. A real /healthz in client-runtime would be needed to
close it fully. Probes themselves unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@divyasinghds
divyasinghds dismissed stale reviews from aptracebloc and saadqbal via 9634e74August 7, 2026 07:42
@divyasinghds
divyasinghds merged commit 95a9e83 into developAug 7, 2026
21 checks passed
@LukasWodka
LukasWodka deleted the fix/1143-requests-proxy-probes branch August 14, 2026 14:18
Sign up for freeto 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.

4 participants

@divyasinghds@saadqbal@aptracebloc@LukasWodka