Skip to content

Allow named channels to inherit default configuration#347

Closed
o-shevchenko wants to merge 1 commit intospring-projects:mainfrom
o-shevchenko:gh-345
Closed

Allow named channels to inherit default configuration#347
o-shevchenko wants to merge 1 commit intospring-projects:mainfrom
o-shevchenko:gh-345

Conversation

@o-shevchenko
Copy link
Contributor

@o-shevchenko o-shevchenko commented Jan 16, 2026

Named channels now inherit settings from default configuration. Explicitly configured values in named channels take precedence over defaults.

[resolves #345]

@o-shevchenko o-shevchenko force-pushed the gh-345 branch 2 times, most recently from 707a333 to 1218da9 Compare January 16, 2026 17:35
@onobc onobc self-requested a review January 19, 2026 22:57
@onobc onobc self-assigned this Jan 19, 2026
@o-shevchenko o-shevchenko force-pushed the gh-345 branch 2 times, most recently from c8c0055 to 04de180 Compare January 21, 2026 16:44
@o-shevchenko o-shevchenko changed the title Allow named channels to inherit configuration from default-channel Allow named channels to inherit default configuration Jan 22, 2026
Copy link
Contributor

@onobc onobc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for another awesome contribution @o-shevchenko . I have left a few comments, other than that we are close to merge.

Signed-off-by: Oleksandr Shevchenko <oleksandr.shevchenko@datarobot.com>
@o-shevchenko o-shevchenko requested a review from onobc January 23, 2026 14:08
@onobc onobc added this to the 1.1.0-M1 milestone Jan 23, 2026
onobc pushed a commit that referenced this pull request Feb 4, 2026
Allows definining a set of channel defaults
(`spring.grpc.client.channel-defaults`) that are applied to the default
channel, named channels, and unkwnown channels when their
`inherit-defaults` property is set to `true`.

Original Pull Request #347
Resolves #345

Signed-off-by: Oleksandr Shevchenko <oleksandr.shevchenko@datarobot.com>
onobc added a commit that referenced this pull request Feb 4, 2026
Adds back in code level defaults to channel config which give the
benefit of automatic metadata generation which contains the default
values. Without this the additional metadata json file would need to be
maintained manually.

Moves from `spring.grpc.client.channel.defaults` to
`spring,.grpc.client.channel-defaults` to simplify the nested classes
and match the naming of the default channel which is
`spring.gprc.client.default-channel`.

Adds in `ChannelConfigUtils` to handle the nasty diff detection.

Modifies the tests so that the GrpcClientPropertiesTests ensure that
the defaults are applied in the proper scenarios but does not test the
application of all fields. The fields are instead heavily verified in
the config utils tests.

Original Pull Request #347
See #345

Signed-off-by: onobc <chris.bono@gmail.com>
@onobc
Copy link
Contributor

onobc commented Feb 4, 2026

Thanks for the great contribution @o-shevchenko , nice work! I did add a follow-on commit (d2266d7) which applies the defaults to the following channels when their inherit-defaults is true:

  • default channel
  • named channels
  • unknonwn channels (copy of default)

Also, moved the defaults back to code w/ the "diff detection" being "did the user change the value from the coded default in the class". See my commit msg for reasoning.

Again, since this is about to go into Spring Boot, and all auto-config / props will be under scrutiny I wanted to get this in asap. Otherwise I would have done more back/forth to get your opinion on my recent updates.

Please review and we can address any of your concerns in subsequent movements.

Thanks,
Chris

Closing via 0bc8c88.

@onobc onobc closed this Feb 4, 2026
@o-shevchenko
Copy link
Contributor Author

Thanks @onobc !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow named channels to inherit default configuration

2 participants