-
Notifications
You must be signed in to change notification settings - Fork 70
fix(spring): refactor retry settings to service and method-level nested properties #1143
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
fix(spring): refactor retry settings to service and method-level nested properties #1143
Conversation
src/test/java/com/google/api/generator/spring/composer/goldens/EchoSpringPropertiesFull.golden
Outdated
Show resolved
Hide resolved
src/test/java/com/google/api/generator/spring/composer/goldens/EchoSpringPropertiesGrpc.golden
Outdated
Show resolved
Hide resolved
zhumin8
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Dropped a small comment and 2 reminder notes below.
src/test/java/com/google/api/generator/spring/composer/goldens/EchoSpringPropertiesGrpc.golden
Outdated
Show resolved
Hide resolved
| .setPakkage(packageName) | ||
| .build()); | ||
|
|
||
| // TODO: This should move to static types once class is added into spring-cloud-gcp-core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a note here, we will need to load spring-cloud-gcp dependency from local .m2 instead of maven central, since the change is not published yet.
Change will be similar to Blake's commit here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhumin8 On a second thought, do you think it would be easier to leave this as a dynamic type in generator code until the shared classes are published and available in maven central?
Let me know if there's anything I'm missing here - currently, this use of dynamic type unblocks code generation, and the generated code is able to compile against a locally installed snapshot jar of spring-cloud-gcp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can leave as dynamic type temporarily and unblock.
But we do need to switch to local repo for spring-cloud-gcp dependencies eventually to develop on the snapshot version.
currently, this use of dynamic type unblocks code generation, and the generated code is able to compile against a locally installed snapshot jar of spring-cloud-gcp.
yes. But same argument on adding concrete types for other spring denpendencies, it's safer to have the imported class confirmed in the generator than validate via compile in generated module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, that makes sense. Thank you for the explanation!
src/main/java/com/google/api/generator/spring/composer/SpringAutoConfigClassComposer.java
Show resolved
Hide resolved
|
Kudos, SonarCloud Quality Gate passed! |








This PR goes together with GoogleCloudPlatform/spring-cloud-gcp#1392 and builds on top of commits from #1140. It:
Refactors the current setup (method-level and individual settings) to use a nested Retry object provided through properties at both service-level and method-level (poc).