You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Oxidaner (via GitHub)" <gi...@apache.org> on 2026/07/23 07:56:55 UTC
[PR] [codex] honor m tags during generic realization [dubbo-go]
Oxidaner opened a new pull request, #3504:
URL: https://github.com/apache/dubbo-go/pull/3504
## What changed
- configure `MapGeneralizer.Realize` to decode struct fields using the `m` tag
- add a round-trip regression test with a genuine field alias (`UserID` -> `user_id`)
## Why
`MapGeneralizer.Generalize` already uses the `m` tag when producing map keys, but `Realize` previously called `mapstructure.Decode` with its default configuration. The default decoder reads `mapstructure` tags rather than `m` tags, so renamed fields were silently ignored and left at their zero values.
Using the same tag in both directions restores symmetric map generalization and realization.
## Impact
Generic calls using the default map generalizer now preserve values for fields whose `m` tag differs from the Go field name, including aliases such as `m:"user_id"`.
## Validation
- `go test ./filter/generic/generalizer -run '^TestMTagRoundTrip$' -count=1 -v`
- `go test ./filter/generic/... -count=1`
- `git diff --check -- filter/generic/generalizer/map.go filter/generic/generalizer/map_test.go`
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] [codex] honor m tags during generic realization [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3504:
URL: https://github.com/apache/dubbo-go/pull/3504#issuecomment-5055901574
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3504) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3504&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3504&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3504&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3504&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3504&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3504)
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] [codex] honor m tags during generic realization [dubbo-go]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3504:
URL: https://github.com/apache/dubbo-go/pull/3504#issuecomment-5055946571
## [Codecov](https://app.codecov.io/gh/apache/dubbo-go/pull/3504?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `71.42857%` with `2 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 54.49%. Comparing base ([`60d1c2a`](https://app.codecov.io/gh/apache/dubbo-go/commit/60d1c2a949f0ee0da4be3fe09fb79d295491e040?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8bbc5ba`](https://app.codecov.io/gh/apache/dubbo-go/commit/8bbc5ba1ff3ffbbbf3242f8eb06dcb9d72e13297?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 873 commits behind head on develop.
| [Files with missing lines](https://app.codecov.io/gh/apache/dubbo-go/pull/3504?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [filter/generic/generalizer/map.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3504?src=pr&el=tree&filepath=filter%2Fgeneric%2Fgeneralizer%2Fmap.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZmlsdGVyL2dlbmVyaWMvZ2VuZXJhbGl6ZXIvbWFwLmdv) | 71.42% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #3504 +/- ##
===========================================
+ Coverage 46.76% 54.49% +7.72%
===========================================
Files 295 462 +167
Lines 17172 35613 +18441
===========================================
+ Hits 8031 19406 +11375
- Misses 8287 14669 +6382
- Partials 854 1538 +684
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/dubbo-go/pull/3504?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] [codex] honor m tags during generic realization [dubbo-go]
Posted by "Oxidaner (via GitHub)" <gi...@apache.org>.
Oxidaner closed pull request #3504: [codex] honor m tags during generic realization
URL: https://github.com/apache/dubbo-go/pull/3504
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org