laomo-hub opened a new pull request, #7785:
URL: https://github.com/apache/shenyu/pull/7785

   Refs #7716. Scope coordination: 
https://github.com/apache/shenyu/issues/7716#issuecomment-6237463155
   
   HTTP synchronization serializes an already-encoded instance-information 
string again, so the dashboard's single parse produces a string rather than an 
object. The ordinary WebSocket case already passes because `convertToMap` 
recursively decodes JSON-looking strings; that conversion instead changes 
nested metadata string values and can throw on malformed optional metadata.
   
   Keep `instanceInfo` as a string containing JSON object text. Preserve HTTP 
text and extract WebSocket metadata from the outer JSON tree without recursive 
conversion. Normalize optional metadata at the shared heartbeat boundary and 
when reading stored records, accepting one known legacy JSON-string wrapper. 
Missing, malformed and non-object metadata falls back to `{}` without 
preventing heartbeat processing. Do not log metadata payloads or migrate rows 
on reads.
   
   Validation:
   
   - Original production code: 5 selected regression cases, 4 failures; 
ordinary WebSocket control passes. Failing cases cover HTTP re-encoding, 
WebSocket nested-string mutation, legacy stored reads and legacy heartbeat 
information.
   - Targeted tests on JDK 17 with the repository wrapper: 132 passed, no 
failures/errors/skips. Includes real H2 stored-row compatibility, normal/legacy 
payloads, nested string preservation, malformed/missing information and 
repeated heartbeat liveness.
   - Admin and its 28-project prerequisite reactor `clean verify`: all 28 
projects succeeded; 2,741 reported tests, 2,739 passed and 2 skipped, no 
failures/errors. Admin itself reported 2,026 tests with 1 skipped. All 28 
Checkstyle and 28 Apache RAT executions passed.
   - `git diff --check` passes.
   
   Compatibility: the database/API field stays a string; current JSON-object 
text and one legacy string-wrapped object are accepted. Existing raw rows are 
not rewritten by read operations; regular later writes can persist normalized 
values. Do not repeatedly decode arbitrary string layers or nested object 
values.
   
   Coverage limits: no live mixed-version Admin/gateway deployment, complete 
dashboard rendering or Docker/e2e run. Dashboard's existing one-pass JSON 
formatting was inspected in source; H2 and method-level regressions are 
executed locally. Unrelated instance metadata-refresh/type-identity work 
remains outside this change.
   
   Make sure that:
   
   - [x] You have read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [x] You submit test cases (unit or integration tests) that back your 
changes.
   - [ ] Your local test passed `./mvnw clean install 
-Dmaven.javadoc.skip=true`. Validation covers Admin and its 28-project 
prerequisite reactor as documented above; a whole-repository clean install was 
not run for this change.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to