Isolate readiness probes from live Gitea traffic #687

Closed
opened 2026-08-12 22:49:31 +00:00 by timmy · 0 comments
Owner

Problem

GET /readyz calls the authenticated Gitea user endpoint for every public probe. Monitoring traffic therefore competes with operator reads for the shared bounded upstream transport and can amplify an outage. Existing #71 only bounded each probe to five seconds.

Slice

Run one bounded Gitea readiness check in the application lifespan, retain a timestamped sanitized result, refresh it at a configured interval, and have /readyz serve only that snapshot. Expire stale healthy state and cancel the monitor cleanly on shutdown.

Acceptance

  • Repeated /readyz requests make no upstream call.
  • Fresh success returns 200; operator mode does not expose the Gitea login.
  • Failure/timeout returns sanitized 503 and timeout keeps a bounded Retry-After hint.
  • A healthy snapshot becomes not-ready after its maximum age.
  • The lifespan monitor checks at most once per interval and stops cleanly.
  • Focused and full suites pass.
## Problem `GET /readyz` calls the authenticated Gitea `user` endpoint for every public probe. Monitoring traffic therefore competes with operator reads for the shared bounded upstream transport and can amplify an outage. Existing #71 only bounded each probe to five seconds. ## Slice Run one bounded Gitea readiness check in the application lifespan, retain a timestamped sanitized result, refresh it at a configured interval, and have `/readyz` serve only that snapshot. Expire stale healthy state and cancel the monitor cleanly on shutdown. ## Acceptance - Repeated `/readyz` requests make no upstream call. - Fresh success returns 200; operator mode does not expose the Gitea login. - Failure/timeout returns sanitized 503 and timeout keeps a bounded Retry-After hint. - A healthy snapshot becomes not-ready after its maximum age. - The lifespan monitor checks at most once per interval and stops cleanly. - Focused and full suites pass.
timmy self-assigned this 2026-08-12 22:49:31 +00:00
timmy closed this issue 2026-08-12 23:26:59 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#687
No description provided.