Aias00 opened a new issue, #7731:
URL: https://github.com/apache/shenyu/issues/7731
## Current behavior
The persisted `InstanceInfoDO` has an `id`, but `InstanceInfoVO` declares no
id property, and `InstanceInfoServiceImpl.buildInstanceInfoVO` does not expose
it. The dashboard instance model assigns `item.key = item.id`, and the table
uses those keys for controlled row selection. All returned records consequently
have an undefined expected key. The API also exposes `/instance/{id}`, although
list results do not provide that record identifier.
## Source evidence
- [Instance response
model](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/vo/InstanceInfoVO.java#L27)
- [DO-to-VO
conversion](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/InstanceInfoServiceImpl.java#L108)
- [Dashboard fetch/model key
assignment](https://github.com/apache/shenyu-dashboard/blob/b2586eac8ef16e5ceb2e0995554eaa49c5c40828/src/models/instance.js#L36)
- [Instance table with row
selection](https://github.com/apache/shenyu-dashboard/blob/b2586eac8ef16e5ceb2e0995554eaa49c5c40828/src/routes/System/Instance/index.js#L543)
## Acceptance criteria
- [ ] Expose the persisted id through list/detail conversion, or agree and
consistently implement a documented stable row identity; prefer preserving the
existing id-based API contract.
- [ ] API serialization tests assert a nonempty, distinct id for two
database records and round-trip it through the detail endpoint.
- [ ] Dashboard tests verify independent selection of two rows and stable
keys after reordering/refetching; do not substitute array indexes.
- [ ] Preserve namespace scoping and coordinate dashboard compatibility as
necessary.
This is a source-confirmed response-contract mismatch; browser behavior has
not been reproduced during issue preparation. Related: #7697 is a different
instance-list failure when a heartbeat-map entry is missing.
--
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]