Repository navigation
fix: report provider dependency health in /status - #253
Open
Nwapu-TrustJah wants to merge 1 commit into
Open
Nwapu-TrustJah wants to merge 1 commit into
Nwapu-TrustJah wants to merge 1 commit into
Conversation
|
@Nwapu-TrustJah 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! 🚀 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
/statusreported"ok": true, "status": "healthy"throughout an outage where no user could complete identity verification, because the provider's KYC endpoint was returning 5xx and nothing watched it. This PR adds adependenciessection to/statusthat reports the last observed outcome of the provider endpoints the product actually needs, distinguishes "this service is up" from "the rails are usable", and surfaces a failing dependency asdegradedrather thanhealthy.Related Issue
Changes
🔌 Provider Dependency Reporting
[MODIFY]
src/linq/statusForClients.tsGET /b2b/rate) is unauthenticated and side-effect free, so it is probed directly.degraded(notunhealthy): the process is up, but the rails are not usable. The response states which.[MODIFY]
src/linq/client.ts/statusreflects observed reality without adding any new outbound call.[MODIFY]
src/api.ts/statusresponse.[MODIFY]
src/openapi/schemas.ts,openapi.jsondependenciesfield and thedegradedstatus value.[ADD]
src/__tests__/linq/statusForClients.test.tsglobal.fetchmock pattern. No test reaches the live provider.Verification Results
/statusdistinguishes "this service is up" from "the rails are usable"status: "degraded"with adependenciessection separate from service healthGET /b2b/rateis probed; KYC outcome is reported from the last real call/statuswithin a bounded time, and the bound is statedobservedAtper dependency; rate probe on each/statuscall)src/__tests__/linq/statusForClients.test.tsCloses #241