fix(admin): stop MetaDataTransfer.mapToVO dropping the namespace id - #7388
Open
Sean-Walker0 wants to merge 1 commit into
Open
Sean-Walker0 wants to merge 1 commit into
Sean-Walker0 wants to merge 1 commit into
Conversation
apache#7324 fixed the write paths (copy() and mapToData) but the read path kept dropping the field: mapToVO builds MetaDataVO from MetaDataDO for the metadata list/detail APIs without copying namespaceId, so every row is reported with a null namespace even though the stored metadata is namespaced. Copy it like every other field, completing the fix started by apache#7324. The new test follows the testCopyKeepsNamespaceId convention from apache#7324 and fails on current master with expected <ns-1> but was <null>. Verified with ./mvnw test -pl shenyu-admin -am and ./mvnw checkstyle:check -pl shenyu-admin (module-scoped).
Aias00
approved these changes
Oct 1, 2026
Aias00
left a comment
Contributor
There was a problem hiding this comment.
Good completion of #7324: mapToVO was still dropping namespaceId on the read path, so the metadata list/detail APIs reported a null namespace even though the stored entity carries it. One-line fix plus test. The red jobs (e2e, e2e-storage mysql) are the known infrastructure failures, not this change. Approving.
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.
Completes the fix started by #7324: it stopped
MetaDataTransferfrom droppingnamespaceIdon the write paths (copy(),mapToData), but the read path still drops it.mapToVObuilds theMetaDataVOreturned by the metadata list/detail APIs without copyingnamespaceId, so every row is reported with a null namespace even though the stored metadata is namespaced (MetaDataDOandMetaDataVOboth carry the field).Make sure that:
./mvnw test -pl shenyu-admin -amand./mvnw checkstyle:check -pl shenyu-admin(module-scoped; full build left to CI).Modifications
MetaDataTransfer#mapToVOnow copiesnamespaceIdfrom the DO to the VO, like every other field.Verifying this change
MetaDataTransferTest#testMapToVOKeepsNamespaceId, following thetestCopyKeepsNamespaceIdconvention already established by fix(admin): stop MetaDataTransfer dropping namespaceId in copy() and mapToData(dto) #7324 in the same file: maps a DTO withnamespaceId=ns-1throughmapToEntity→mapToVOand asserts the VO carries it. Fails on current master withexpected: <ns-1> but was: <null>, passes with this change.Notes
namespaceIdinstead ofnull.MetaDataTransfer(verified via keyword search; [type:fix] Index metadata cold lookups by path prefix #7251 touches onlyshenyu-plugin-basecache classes, fix: add transactional boundaries to metadata batch operations (#6708) #7048 only mapper/service files unrelated to this transfer).