-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tenscan] Endpoint for health check #1718
[Tenscan] Endpoint for health check #1718
Conversation
WalkthroughThe codebase has undergone a refactor where the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (8)
- go/obsclient/obsclient.go (1 hunks)
- integration/networktest/env/dev_network.go (1 hunks)
- integration/networktest/util.go (1 hunks)
- integration/simulation/network/socket.go (1 hunks)
- integration/simulation/simulation.go (1 hunks)
- testnet/launcher/docker.go (1 hunks)
- tools/obscuroscan_v2/backend/obscuroscan_backend.go (1 hunks)
- tools/obscuroscan_v2/backend/webserver/webserver_routes_items.go (1 hunks)
Additional comments: 8
integration/networktest/util.go (1)
- 27-30: The method
HealthStatusOfNode
has been correctly updated fromHealth
. Ensure that the new method's behavior is consistent with the expected functionality of theNodeHealthCheck
function.integration/networktest/env/dev_network.go (1)
- 53-56: The method
HealthStatusOfNode
has been correctly updated fromHealth
. Ensure that the new method's behavior is consistent with the expected functionality of theawaitHealthStatus
function.tools/obscuroscan_v2/backend/obscuroscan_backend.go (1)
- 33-35: The addition of
GetHealthStatus
to theBackend
type is consistent with the changes made to theObsClient
type. Ensure that the new method is used appropriately within the backend logic.tools/obscuroscan_v2/backend/webserver/webserver_routes_items.go (1)
- 20-27: The new route
/info/health/
and its handlergetHealthStatus
have been added correctly. Verify that the error handling in thegetHealthStatus
method is appropriate and that the health status is being returned as expected.go/obsclient/obsclient.go (1)
- 89-93: The method
HealthStatusOfNode
has been correctly updated fromHealth
. Ensure that the new method's behavior is consistent with the expected functionality of theObsClient
type.integration/simulation/network/socket.go (1)
- 176-179: The method
HealthStatusOfNode
has been correctly updated fromHealth
. Ensure that the new method's behavior is consistent with the expected functionality of thecreateConnections
method.testnet/launcher/docker.go (1)
- 226-229: The method
HealthStatusOfNode
has been correctly updated fromHealth
. Ensure that the new method's behavior is consistent with the expected functionality of thewaitForHealthyNode
function.integration/simulation/simulation.go (1)
- 291-293: The method
HealthStatusOfNode
has been correctly updated fromHealth
. Ensure that the new method's behavior is consistent with the expected functionality of thecheckHealthStatus
method.
…nnifer/2624-add-a-health-indicator-for-testnet-on-tenscan-and-the-gateway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (5)
- integration/simulation/network/socket.go (1 hunks)
- integration/simulation/simulation.go (1 hunks)
- testnet/launcher/docker.go (1 hunks)
- tools/tenscan/backend/obscuroscan_backend.go (1 hunks)
- tools/tenscan/backend/webserver/webserver_routes_items.go (1 hunks)
Additional comments: 4
tools/tenscan/backend/obscuroscan_backend.go (1)
- 33-35: The
GetHealthStatus
method correctly delegates toobsClient.HealthStatusOfNode
and returns its result, allowing the caller to handle any errors.tools/tenscan/backend/webserver/webserver_routes_items.go (1)
- 20-27: The new health check route and its handler
getHealthStatus
are correctly implemented, with proper error handling and JSON response formatting.integration/simulation/network/socket.go (1)
- 181-187: The modification to use
HealthStatusOfNode
in thecreateConnections
method is correctly implemented, with a loop that waits for node health or times out appropriately.testnet/launcher/docker.go (1)
- 225-231: The update to
waitForHealthyNode
to useHealthStatusOfNode
is correctly implemented, with proper error handling and retry logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- tools/tenscan/backend/obscuroscan_backend.go (1 hunks)
- tools/tenscan/backend/webserver/webserver_routes_items.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- tools/tenscan/backend/obscuroscan_backend.go
- tools/tenscan/backend/webserver/webserver_routes_items.go
…nnifer/2624-add-a-health-indicator-for-testnet-on-tenscan-and-the-gateway
Why this change is needed
Please provide a description and a link to the underlying ticket
https://github.com/ten-protocol/ten-internal/issues/2624
What changes were made as part of this PR
Please provide a high level list of the changes made
Add an endpoint for health check on Tenscan backend
PR checks pre-merging
Please indicate below by ticking the checkbox that you have read and performed the required
PR checks