Skip to content

Split service discoverer and configurer #212

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

Merged
merged 1 commit into from
Jul 1, 2025

Conversation

onobc
Copy link
Contributor

@onobc onobc commented Jun 30, 2025

This commit simplifies the DefaultGrpcServiceDiscoverer by removing its dependence on the DefaultGrpcServiceConfigurer. Now the expectation is the discoverer returns a spec of the service definition rather than a bound service. The configurer then accepts that spec and binds and configures it.

See #208

This commit simplifies the DefaultGrpcServiceDiscoverer by
removing its dependence on the DefaultGrpcServiceConfigurer.
Now the expectation is the discoverer returns a spec of the
service definition rather than a bound service. The configurer
then accepts that spec and binds and configures it.

See spring-projects#208

Signed-off-by: Chris Bono <chris.bono@gmail.com>
@onobc onobc added this to the 0.9.0 milestone Jun 30, 2025
@onobc onobc requested a review from dsyer June 30, 2025 20:40
Comment on lines -54 to -62
TestServiceConfigurer configurer = context.getBean(TestServiceConfigurer.class);
assertThat(configurer.invocations).hasSize(2);
assertThat(configurer.invocations.keySet()).containsExactly(SERVICE_B, SERVICE_A);
assertThat(configurer.invocations).containsEntry(SERVICE_B, null);
assertThat(configurer.invocations).hasEntrySatisfying(SERVICE_A, (serviceInfo) -> {
assertThat(serviceInfo.interceptors()).isEmpty();
assertThat(serviceInfo.interceptorNames()).isEmpty();
assertThat(serviceInfo.blendWithGlobalInterceptors()).isFalse();
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is one of the fruits of this simplification (goodbye verifying cofigurer things in discoverer tests)

@dsyer dsyer merged commit 94b9ef9 into spring-projects:main Jul 1, 2025
5 checks passed
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.

2 participants