Sean-Walker0 opened a new pull request, #7388:
URL: https://github.com/apache/shenyu/pull/7388

   <!-- Describe your PR here; e.g. Fixes #issueNo -->
   Completes the fix started by #7324: it stopped `MetaDataTransfer` from 
dropping `namespaceId` on the write paths (`copy()`, `mapToData`), but the read 
path still drops it. `mapToVO` builds the `MetaDataVO` returned by the metadata 
list/detail APIs without copying `namespaceId`, so every row is reported with a 
null namespace even though the stored metadata is namespaced (`MetaDataDO` and 
`MetaDataVO` both carry the field).
   
   <!--
   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
   
   - `MetaDataTransfer#mapToVO` now copies `namespaceId` from the DO to the VO, 
like every other field.
   
   ### Verifying this change
   
   - New `MetaDataTransferTest#testMapToVOKeepsNamespaceId`, following the 
`testCopyKeepsNamespaceId` convention already established by #7324 in the same 
file: maps a DTO with `namespaceId=ns-1` through `mapToEntity` → `mapToVO` 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 metadata list/detail API responses now carry the 
stored `namespaceId` instead of `null`.
   - Orthogonality: no open PR modifies `MetaDataTransfer` (verified via 
keyword search; #7251 touches only `shenyu-plugin-base` cache classes, #7048 
only mapper/service files unrelated to this transfer).
   - Companion read-path fixes found by the same audit are submitted separately 
to keep this PR single-purpose.


-- 
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