-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[confmap] Maintain nil slice values when marshaling and unmarshaling #11882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[confmap] Maintain nil slice values when marshaling and unmarshaling #11882
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11882 +/- ##
=======================================
Coverage 92.18% 92.18%
=======================================
Files 469 469
Lines 25394 25394
=======================================
Hits 23409 23409
Misses 1574 1574
Partials 411 411 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
…shaling (open-telemetry#11882)" This reverts commit b8830dd.
…shaling (open-telemetry#11882)" This reverts commit b8830dd.
…shaling (open-telemetry#11882)" This reverts commit b8830dd.
#### Description #11882 introduced issues with handling slices which have default values. It's likely that the removal of `zeroSliceHookFunc` is causing problems with overriding default lists.
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description <!-- Issue number if applicable --> Adds a test for #12661 and another test present on #11882. I verified that the first test fails in v0.123.0: on this version the slice has `[]S{A: "A", B: "B"}` instead.
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description <!-- Issue number if applicable --> A second attempt at #11882. Note that I added some tests in #12871 to prevent something like #12661 from happening again. #### Link to tracking issue Fixes #11749 <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> See tests from #12871 as well as the new tests added here.
Expands on #11755 to show how we could test for a 1:1 mapping between map[string]any <->
confmap.Conf
<-> Config structs for[]any(nil)
and[]any{}
slices.