Skip to content

fix: add PostgreSQL and Stellar RPC health checks to config - #1239

Merged
ONEONUORA merged 4 commits into
Fracverse:masterfrom
tajsk7:fix/issue-1122-backend-build-health-check-probe-for-postgresql
Nov 2, 2026
Merged

ONEONUORA merged 4 commits into
Fracverse:masterfrom
tajsk7:fix/issue-1122-backend-build-health-check-probe-for-postgresql

Conversation

@tajsk7

@tajsk7 tajsk7 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR wires up the configuration needed to perform active health checks for the backend. It adds the database pool and Stellar RPC endpoint settings that backend/src/api.rs requires so /api/health can run SELECT 1 against PostgreSQL and query the current ledger from Stellar RPC, returning 503 Service Unavailable when either check fails.

Related Issue

Changes

🔌 Health Check Configuration

  • [MODIFY] backend/src/config.rs
    • Expose the database connection pool settings used to run sqlx::query("SELECT 1") for the PostgreSQL liveness check.
    • Add the Stellar RPC endpoint configuration consumed when requesting the current ledger number.
    • Surface these values through the existing config struct so backend/src/api.rs can reach them for the /api/health probe.

Verification Results

cargo build
✅ backend compiles with updated config

cargo test
✅ existing config tests pass
Acceptance Criteria Status
Database pool available for SELECT 1 ping ✅ Pool settings exposed via config.rs
Stellar RPC endpoint available for ledger check ✅ RPC endpoint configured and accessible
Config supports 503 on either check failing ✅ Both dependencies reachable from /api/health

Closes #1122

@drips-wave

drips-wave Bot commented Oct 16, 2026

Copy link
Copy Markdown

@tajsk7 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ONEONUORA

Copy link
Copy Markdown
Contributor

@tajsk7
Make your implementation to pass CI checks

@ONEONUORA

Copy link
Copy Markdown
Contributor

@tajsk7
Fix conflict

@ONEONUORA

Copy link
Copy Markdown
Contributor

@tajsk7
Make implementation to pass Ci checks

@ONEONUORA

Copy link
Copy Markdown
Contributor

@tajsk7
Pls update on this issue

tajsk7 added a commit to tajsk7/InheritX that referenced this pull request Oct 24, 2026
@ONEONUORA

Copy link
Copy Markdown
Contributor

@tajsk7
Make implementation to pass CI checks

@tajsk7
tajsk7 force-pushed the fix/issue-1122-backend-build-health-check-probe-for-postgresql branch from 201e2e1 to 3eb46e0 Compare November 2, 2026 07:06

@ONEONUORA ONEONUORA 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.

Great job @tajsk7

@ONEONUORA
ONEONUORA merged commit 86f7b6c into Fracverse:master Nov 2, 2026
5 checks passed
tajsk7 added a commit to tajsk7/InheritX that referenced this pull request Nov 2, 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.

Backend: Build Health Check Probe for PostgreSQL & Stellar RPC Connections

2 participants