feat: migrate evstack health checks to HTTP /health/ready endpoint#149
feat: migrate evstack health checks to HTTP /health/ready endpoint#149
Conversation
Update evstack health checks to use the new HTTP /health/ready endpoint instead of the gRPC /evnode.v1.HealthService/Livez endpoint. Changes: - Replace gRPC endpoint with /health/ready HTTP endpoint - Update health check method from POST to GET - Continue using RPC port (7331) where HTTP endpoints are served - Remove unused bytes import
WalkthroughStandardized health check implementation across Docker framework components by replacing internal RPC-based POST health checks ( Changes
Sequence DiagramsequenceDiagram
participant App as Application
participant Poller as Health Check Poller
participant Old as Old Endpoint<br/>(/evnode.v1.HealthService/Livez)
participant New as New Endpoint<br/>(/health/ready)
rect rgb(230, 245, 230)
Note over Old: Previous Flow
App->>Poller: Start health check
Poller->>Old: POST + JSON body<br/>(Content-Type header)
Old-->>Poller: Response
Poller-->>App: Health status
end
rect rgb(245, 230, 230)
Note over New: New Flow
App->>Poller: Start health check
Poller->>New: GET + no body
New-->>Poller: Response
Poller-->>App: Health status
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
framework/docker/evstack/node.go (1)
282-303: Health check correctly migrated to GET /health/ready.The implementation properly uses GET with no body and checks for 200 OK status.
Consider adding a TCP port liveness check before the HTTP request (similar to
framework/docker/evstack/evmsingle/node.golines 215-220) to reduce debug log noise from connection errors:func (n *Node) isNodeHealthy(client *http.Client, healthURL string) bool { + // Quick TCP check first to avoid HTTP errors when port isn't open yet + if c, err := net.DialTimeout("tcp", fmt.Sprintf("0.0.0.0:%s", n.externalPorts.RPC), 2*time.Second); err == nil { + _ = c.Close() + } else { + return false + } + req, err := http.NewRequest("GET", healthURL, nil)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
framework/docker/evmsingle_with_reth_test.go(1 hunks)framework/docker/evstack/evmsingle/node.go(2 hunks)framework/docker/evstack/node.go(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-27T08:24:51.731Z
Learnt from: chatton
Repo: celestiaorg/tastora PR: 106
File: framework/docker/dataavailability/config.go:3-7
Timestamp: 2025-08-27T08:24:51.731Z
Learning: The tastora codebase consistently uses `github.com/moby/moby/client` for Docker client imports throughout all framework/docker packages. Do not suggest changing this to `github.com/docker/docker/client` as it would break type compatibility.
Applied to files:
framework/docker/evmsingle_with_reth_test.go
🧬 Code graph analysis (3)
framework/docker/evmsingle_with_reth_test.go (1)
framework/types/network.go (1)
Ports(50-63)
framework/docker/evstack/node.go (2)
framework/docker/dataavailability/node.go (1)
Node(61-77)framework/docker/container/node.go (1)
Node(20-31)
framework/docker/evstack/evmsingle/node.go (2)
framework/docker/evstack/node.go (1)
Node(40-55)framework/docker/evstack/reth/node.go (1)
Node(23-31)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: test
- GitHub Check: Analyze (go)
- GitHub Check: Run golangci-lint
🔇 Additional comments (3)
framework/docker/evmsingle_with_reth_test.go (1)
191-199: LGTM! Health check migration implemented correctly.The migration from the gRPC endpoint to the HTTP
/health/readyendpoint is properly implemented. The GET request with no body and 200 OK status check follows HTTP health check conventions.framework/docker/evstack/node.go (1)
258-280: LGTM! Proper health check polling with context cancellation.The
waitForNodeReadyfunction correctly migrates to the/health/readyendpoint and includes appropriate context cancellation handling.framework/docker/evstack/evmsingle/node.go (1)
201-231: LGTM! Well-implemented health check with best practices.The migration to the
/health/readyendpoint is correctly implemented with:
- Proper context cancellation handling (lines 210-211)
- TCP port liveness check before HTTP request (lines 215-220) to reduce error noise
- GET method with no body (line 221)
- Appropriate status code validation (line 225)
The 120-second timeout is longer than the 60 seconds used in
framework/docker/evstack/node.go, which appears intentional given this is the evm-single startup path.
This commit fixes issue #2643 where the health endpoint still reports OK when a node has stopped producing blocks. Closes #2643 <!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. Ex: Closes #<issue number> --> Needs merge and tag of tastora PR celestiaorg/tastora#149 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Update evstack health checks to use the new HTTP /health/ready endpoint
instead of the gRPC /evnode.v1.HealthService/Livez endpoint.
Changes:
Overview
Related to evstack/ev-node#2800
Summary by CodeRabbit