Merged
Conversation
f6db821 to
c9e45a2
Compare
zalimeni
commented
Jun 6, 2023
Comment on lines
279
to
289
Member
Author
There was a problem hiding this comment.
I'd be happy to have someone highly familiar w/ this code review it, since I'm halfway between cargo culting and having a full understanding of these decoder patterns. That said, I'm pretty confident that we need both the hook and WeaklyTypedInput for this to behave, as that combo is what made the integration test pass and docs indicate WeaklyTypedInput is needed when the hook is used in prior decoding steps, which it is.
The difference between this and the prior version is the inclusion of the HookWeakDecodeFromSlice hook, which appears necessary to handle the nested []*ServiceName parsing.
Hand-testing indicates normal patching continues to work as expected.
Ensure that the embedded api struct is properly parsed when deserializing config containing a set ResourceFilter.Services field. Also enhance existing integration test to guard against bugs and exercise this field.
c9e45a2 to
daf021f
Compare
zalimeni
commented
Jun 6, 2023
|
|
||
| type ServiceName struct { | ||
| api.CompoundServiceName | ||
| api.CompoundServiceName `mapstructure:",squash"` |
Member
Author
There was a problem hiding this comment.
erichaberkorn
approved these changes
Jun 6, 2023
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.
Ensure that the embedded
apistruct is properly parsed when deserializing config containing a setResourceFilter.Servicesfield.Also enhance existing integration test to guard against bugs and exercise this field.
Description
Follow-up to #17569.
PR Checklist