Merged
Conversation
…orting Add a new API endpoint that accepts granular per-endpoint health status from clients, replacing the domain-level heartbeat as the primary health signal. The health monitor is simplified to a 2-tier approach: per-endpoint health (priority 1) with heartbeat as a deprecated fallback (priority 2). - Add health_status, health_checked_at, health_ttl_seconds to EndpointModel - Add POST /endpoints/health route with bulk slug matching and TTL capping - Add EndpointHealthRequest/Response schemas and repository methods - Simplify health monitor: remove HTTP fallback, extract modular tier methods - Add deprecation notes to heartbeat endpoints, services, schemas, and models - Add alembic migration for new nullable endpoint health columns
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.
This pull request introduces a new per-endpoint health reporting API to improve health monitoring and deprecates the legacy heartbeat endpoints. The changes add new database fields and schemas for storing client-reported health status, update repository and service logic to support bulk health updates, and mark old heartbeat-related code as deprecated. These updates pave the way for more granular and scalable health checks, while maintaining backward compatibility during the transition.
New Endpoint Health Reporting API:
POST /endpoints/healthAPI endpoint for clients to report health status for multiple endpoints, including schemasEndpointHealthRequestandEndpointHealthResponsefor request and response validation. [1] [2] [3]EndpointModelfor storing per-endpoint health status (health_status,health_checked_at,health_ttl_seconds).Endpoint,EndpointResponse,EndpointPublicResponse) to expose health status fields in API responses. [1] [2] [3]Repository and Service Enhancements:
EndpointServiceto handle the new health reporting logic, including TTL capping and domain heartbeat subsumption. [1] [2]Deprecation and Backward Compatibility:
Other Improvements:
EndpointHealthStatusenum for standardized health values.These changes enable granular endpoint health tracking, simplify future health monitoring, and ensure a smooth migration from legacy heartbeat APIs.