Sean-Walker0 opened a new pull request, #7387: URL: https://github.com/apache/shenyu/pull/7387
<!-- Describe your PR here; e.g. Fixes #issueNo --> Found by code audit (no existing issue; happy to file one if maintainers prefer). `ProxySelectorServiceImpl#listAllData` builds a `ProxySelectorVO` from every `ProxySelectorDO` but never copies the namespace id, while its sibling `listByPage` in the same file does (`vo.setNamespaceId(proxySelectorDO.getNamespaceId())`). The list-all response therefore reports `namespaceId: null` for every proxy selector even though the rows are namespaced. The same read-path field drop was fixed for `MetaDataTransfer` write paths in #7324; this is the proxy-selector variant. <!-- Thank you for proposing a pull request. This template will guide you through the essential steps necessary for a pull request. --> 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. - [x] Your local test passed `./mvnw test -pl shenyu-admin -am` and `./mvnw checkstyle:check -pl shenyu-admin` (module-scoped; full build left to CI). ### Modifications - `listAllData` now sets `vo.setNamespaceId(proxySelectorDO.getNamespaceId())`, mirroring `listByPage`. ### Verifying this change - New `ProxySelectorServiceTest#testListAllDataKeepsNamespaceId` builds a DO with `namespaceId=ns-1`, calls `listAllData`, and asserts the VO carries it. Fails on current master with `expected: <ns-1> but was: <null>`, passes with this change. ### Notes - Behavior change: the list-all proxy selector API response now carries the stored `namespaceId` instead of `null`. - Incidental finding (not touched here): the `DiscoveryDTO` embedded in the same response is produced by `DiscoveryTransfer#mapToDTO(DiscoveryDO)`, which also drops `namespaceId` — addressed separately to keep this PR single-purpose. - Orthogonality: no open PR modifies `ProxySelectorServiceImpl` (verified via keyword search and per-PR file audit). -- 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]
