Skip to content

Closes: #17 Render Deployment Health Check Workflow#107

Merged
EmeditWeb merged 2 commits into
StepFi-app:mainfrom
p3ris0n:feat/healthcheck-workflow
Jul 23, 2026
Merged

Closes: #17 Render Deployment Health Check Workflow#107
EmeditWeb merged 2 commits into
StepFi-app:mainfrom
p3ris0n:feat/healthcheck-workflow

Conversation

@p3ris0n

@p3ris0n p3ris0n commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

feat: Add automated health check to prevent silent API outages

Description

This PR addresses the issue of the Render free-tier instance spinning down due to inactivity, which caused the first subsequent request to take 30+ seconds and allowed the service to experience silent outages without maintainers knowing.

A new GitHub Actions workflow acts as a heartbeat monitor. It pings the /api/v1/health endpoint every 6 hours to keep the instance warm. If the ping fails (returns a non-200 HTTP status), the workflow leverages actions/github-script to automatically alert maintainers.

To prevent issue spam during prolonged downtime, it implements a deduplication check: if an open incident issue already exists, it simply appends a comment to that issue rather than creating a new one.

Changes Made

  • New Workflow (health-check.yml): Added a GitHub Action triggered via cron (0 */6 * * *) and manually via workflow_dispatch. Pings the live health endpoint and handles non-200 failures.
  • Automated Incident Tracking: Uses github-script and the default GITHUB_TOKEN to manage issues with the incident label (no hard-coded secrets used).
  • Documentation Updates: Updated the README.md to document the heart-beat ping operation and the incident label.
  • Progress Tracker: Added a new entry to context/progress-tracker.md to log this architectural/ops change.

Testing & Verification

  • Workflow triggers: Verified YAML syntax for both schedule and workflow_dispatch.
  • Secret security: Validated that no secrets are committed to the codebase.
  • CI: (Pending Actions run on this PR)

Related Issues

*Closes #17 *

@p3ris0n
p3ris0n requested a review from EmeditWeb as a code owner July 23, 2026 07:34
@p3ris0n p3ris0n changed the title Closes: #17 Render Deployment Health Check Worflow Closes: #17 Render Deployment Health Check Workflow Jul 23, 2026
Use `curl -s` (not `-sf`) so the actual response code is captured on
4xx/5xx, and fall back to 000 on connection failure — so the auto-filed
incident issue reports the real status instead of 'failed'.

@EmeditWeb EmeditWeb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Clean ops improvement, suitable to merge. Scheduled (every 6h) + manual health ping of the existing /api/v1/health route; on non-200 it idempotently creates or comments on an incident-labeled issue (no spam), with least-privilege issues: write. README + progress-tracker updated; description matches the code; no duplicate workflow. I applied one small fix (commit 2c8ad92): switched curl -sf … || echo failed to curl -s … || echo 000 so the incident report captures the real HTTP status code instead of 'failed'. Approving and merging.

@EmeditWeb
EmeditWeb merged commit d027b2a into StepFi-app:main Jul 23, 2026
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.

[35] Add Render deployment health check workflow

2 participants