[WIP] refactor: replace domain heartbeat with endpoint-level health reporting#94
Open
shubham3121 wants to merge 1 commit intomainfrom
Open
[WIP] refactor: replace domain heartbeat with endpoint-level health reporting#94shubham3121 wants to merge 1 commit intomainfrom
shubham3121 wants to merge 1 commit intomainfrom
Conversation
- Add EndpointHealthChecker Protocol for ISP-based decoupling - Add get_published_endpoint_health() on EndpointHandler (checks dataset + model healthchecks concurrently with 5s timeout) - Add update_endpoint_health() on SyftHubClient - Move manager from shared/ to endpoints/ component
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 refactors and enhances the heartbeat mechanism for SyftHub marketplaces by shifting from domain-level heartbeats to endpoint-level health reporting. The new system periodically checks the health of all published endpoints and reports their status to SyftHub, providing more granular and accurate liveness signals. Key changes include renaming and restructuring the heartbeat manager, introducing endpoint health checking logic, and updating SyftHub client interactions.
Heartbeat Manager Refactor & Endpoint Health Reporting
HeartbeatManagertoEndpointHeartbeatManager, moved the file, and updated all references and log messages to reflect endpoint-level health reporting instead of domain-level heartbeats. The manager now checks the health of all published endpoints and reports their status as a liveness signal. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Endpoint Health Checking Logic
EndpointHealthCheckerprotocol and implementedget_published_endpoint_healthinEndpointHandler, which concurrently checks the health of each endpoint's linked dataset and model, returning a list of health statuses. [1] [2]SyftHub Client Integration
update_endpoint_healthmethod toSyftHubClientfor sending endpoint health status to SyftHub, replacing the previous heartbeat mechanism and supporting non-destructive updates and domain liveness via TTL.Dependency Injection & Initialization
main.pyand throughout the manager to inject the newEndpointHeartbeatManagerand ensure correct usage of the health checker and repositories. [1] [2]Supporting Types and Imports
HealthcheckStatus, to enable endpoint health checking and status reporting. [1] [2]