Repository navigation
[Feature] Report gateway readiness separately from heartbeat liveness in Admin (#7718) - #8289
Open
DrDread746 wants to merge 1 commit into
Open
DrDread746 wants to merge 1 commit into
DrDread746 wants to merge 1 commit into
Conversation
Aias00
reviewed
Nov 3, 2026
Aias00
left a comment
Contributor
There was a problem hiding this comment.
Stream Agent analysis
Feature PR #8289 proposes decoupling gateway readiness from heartbeat liveness in Admin, introducing bootId and Actuator readiness probes with backward compatibility (fixes #7718). Bounded excerpts at head SHA 589a9d1 show changes to InstanceController.java, InstanceInfoVO.java, InstanceCheckService.java, and tests. e2e checks success but coverage limited to truncated patches; not a full review. Preliminary recommendation: further review.
Evidence
- PR #8289 open, head SHA 589a9d1, URL #8289 (untrusted data).
- Bounded patch excerpts for shenyu-admin/.../InstanceController.java, InstanceInfoVO.java, InstanceCheckService.java, InstanceControllerTest.java; patches truncated at 300 UTF-16 units.
- Resource snapshot 589a9d1 includes InstanceController.java and InstanceInfoVO.java excerpts (truncated); not full review.
- Checks reported: e2e, e2e-case (e2e-websocket-sync-compose, http), (e2e-http-sync-compose, http), (e2e-logging-rocketmq-compose, http), (e2e-http-sync-compose, websocket) all success, but truncated.
- PR description: decouples heartbeat liveness from readiness, adds bootId, Spring Boot Actuator readiness, backward compatibility for #7718.
- No comments on PR; coverage limited to latest 5 updated items, not full history.
Recommended next steps
- Perform full patch review of InstanceCheckService.java and test changes beyond excerpts.
- Verify backward compatibility with existing heartbeat reporting channels via integration tests.
- Confirm Spring Boot Actuator readiness probe integration and bootId uniqueness handling.
- Run unit/integration tests beyond e2e to validate new VO fields and controller endpoints.
- Maintainer to assess schema/API changes for InstanceInfoVO before merge.
Scope: bounded repository evidence; this is not a full code review or a claim that tests were run.
Task: 9b8ae550-a72b-44da-96aa-ce25e0c41d3b · Commit: 589a9d1d8868285c5579a638e1a7e071814abfbf
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.
What changes were proposed in this pull request?
Fixes #7718.
This PR decouples transport heartbeat liveness from configuration and startup readiness in Apache ShenYu. It introduces per-start process execution identity (
bootId), integrates with Spring Boot Actuator readiness probes, and ensures full backward compatibility with existing reporting channels.Key Architectural Implementations
1. Core Domain Models & Compatibility Enums (
shenyu-common)InstanceStatusEnumwith readiness and draining lifecycle states:INITIALIZING(3),READY(4),READINESS_FAILED(5),DRAINING(6), andUNKNOWN(7)while preserving legacy numeric constants (DELETED=0,ONLINE=1,OFFLINE=2).InstanceBeatInfoDTOto carry optional versioned telemetry fields:bootId,readinessStatus,reasonCode, andobservationTime.2. Gateway Boot Identity & Readiness Telemetry (
shenyu-register-center)bootId): Instantiated staticBOOT_ID = UUID.randomUUID().toString()inHeartbeatListener, uniquely identifying JVM process execution lifecycles.HeartbeatListenerto defaultreadinessStatustoREADYwhenReadinessTelemetryProvideris null/unregistered, enabling standalone local-file gateways to pass readiness probes without central Admin sync.3. Admin Ingestion & Stale Observation Filtering (
shenyu-admin)InstanceCheckServiceto validate incomingbootIdsequences. Heartbeats from prior process executions or olderobservationTimetimestamps are dropped as stale updates.ONLINE), whilereadinessStatus,reasonCode, andlastObservationAgeare tracked independently in memory.4. WebSocket Sync & Actuator Readiness Probes (
shenyu-sync-data-center/shenyu-spring-boot-starter)WebsocketSyncDataService.isInitialSyncReady()to supply dynamicREADYorINITIALIZINGstates.WebsocketSyncHealthGroup/WebsocketSyncHealthConfiguration) to exposeREADINESS_FAILEDalongside bounded failure reason codes (INITIAL_SYNC_TIMED_OUT,WEBSOCKET_DISCONNECTED).MAX_REASON_CODE_LENGTH(64 characters) to strictly bound diagnostic payload size.5. Admin Dashboard & REST API Compatibility (
shenyu-admin)InstanceInfoVOandInstanceControllerendpoints (GET /instance,GET /instance/list,GET /instance/{id}, search endpoints) with telemetry attributes and dynamiclastObservationAgecalculations while keeping legacyinstanceStateintact for dashboard backward compatibility.Brief Checklist
Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true.