-
Notifications
You must be signed in to change notification settings - Fork 854
Feat(defaultRequestTimeout) add defaultRequestTimeout property for the client #1132
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
Feat(defaultRequestTimeout) add defaultRequestTimeout property for the client #1132
Conversation
5805901
to
72842c9
Compare
...ent-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/deadline/DeadlineHelper.java
Outdated
Show resolved
Hide resolved
...pring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java
Outdated
Show resolved
Hide resolved
...pring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java
Outdated
Show resolved
Hide resolved
...pring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java
Outdated
Show resolved
Hide resolved
tests/src/test/java/net/devh/boot/grpc/test/setup/DeadlineTests.java
Outdated
Show resolved
Hide resolved
...ent-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/deadline/DeadlineHelper.java
Outdated
Show resolved
Hide resolved
1094f3f
to
a19dbef
Compare
a19dbef
to
28b073d
Compare
...rter/src/main/java/net/devh/boot/grpc/client/interceptor/DeadlineSetupClientInterceptor.java
Outdated
Show resolved
Hide resolved
...pring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java
Outdated
Show resolved
Hide resolved
...pring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java
Outdated
Show resolved
Hide resolved
...pring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java
Outdated
Show resolved
Hide resolved
...c/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientDeadlineAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...c/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientDeadlineAutoConfiguration.java
Outdated
Show resolved
Hide resolved
…pc/client/config/GrpcChannelProperties.java Co-authored-by: ST-DDT <[email protected]>
…pc/client/config/GrpcChannelProperties.java Co-authored-by: ST-DDT <[email protected]>
...rter/src/main/java/net/devh/boot/grpc/client/interceptor/DeadlineSetupClientInterceptor.java
Outdated
Show resolved
Hide resolved
...c/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientDeadlineAutoConfiguration.java
Outdated
Show resolved
Hide resolved
18254e7
to
547045c
Compare
547045c
to
7505c7d
Compare
...rter/src/main/java/net/devh/boot/grpc/client/interceptor/DeadlineSetupClientInterceptor.java
Outdated
Show resolved
Hide resolved
...rter/src/main/java/net/devh/boot/grpc/client/interceptor/DeadlineSetupClientInterceptor.java
Outdated
Show resolved
Hide resolved
…pc/client/interceptor/DeadlineSetupClientInterceptor.java Co-authored-by: ST-DDT <[email protected]>
…pc/client/interceptor/DeadlineSetupClientInterceptor.java Co-authored-by: ST-DDT <[email protected]>
…cChannelConfigurer
66e240f
to
a8bbe07
Compare
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.
Looks good to me. Only a few small changes, and then this is good to go.
...c/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientDeadlineAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...c/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientDeadlineAutoConfiguration.java
Outdated
Show resolved
Hide resolved
tests/src/test/java/net/devh/boot/grpc/test/setup/DeadlineTests.java
Outdated
Show resolved
Hide resolved
...pring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
Outdated
Show resolved
Hide resolved
...pring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java
Outdated
Show resolved
Hide resolved
What do you think about calling the configured property timeout instead of deadline? I believe the current name create some confusion. Deadline in context of GRPC has special meaning and that is "An absolute point in time", although the configured property is a duration. |
…pc/client/autoconfigure/GrpcClientDeadlineAutoConfiguration.java Co-authored-by: ST-DDT <[email protected]>
1aaef80
to
650a978
Compare
Done, not sure about the names. We can improve the source code or comments if you think it is necessary. |
...rc/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientTimeoutAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...rc/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientTimeoutAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...arter/src/main/java/net/devh/boot/grpc/client/interceptor/TimeoutSetupClientInterceptor.java
Outdated
Show resolved
Hide resolved
...arter/src/main/java/net/devh/boot/grpc/client/interceptor/TimeoutSetupClientInterceptor.java
Outdated
Show resolved
Hide resolved
...pring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
Outdated
Show resolved
Hide resolved
tests/src/test/java/net/devh/boot/grpc/test/setup/TimeoutSetupTests.java
Outdated
Show resolved
Hide resolved
…pc/client/autoconfigure/GrpcClientTimeoutAutoConfiguration.java Co-authored-by: ST-DDT <[email protected]>
…pc/client/autoconfigure/GrpcClientTimeoutAutoConfiguration.java Co-authored-by: ST-DDT <[email protected]>
…pc/client/interceptor/TimeoutSetupClientInterceptor.java Co-authored-by: ST-DDT <[email protected]>
…ditional-spring-configuration-metadata.json Co-authored-by: ST-DDT <[email protected]>
7cf859b
to
9db6998
Compare
May be rename the timeout property to requestTimeout? Like this "grpc.client.GLOBAL.requestTimeout=1s". IMHO timeout is really abstract property name. |
requestTimeout or defaultRequestTimeout? |
I like both, can you choose one? May be defaultRequestTimeout is better. |
Then |
e7f1e3e
to
102d09e
Compare
Done. Please let me know if we can do comments or code better. |
...pring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java
Outdated
Show resolved
Hide resolved
…pc/client/config/GrpcChannelProperties.java Co-authored-by: ST-DDT <[email protected]>
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.
Looks good to me.
Thanks for your contribution. ❤️
Thanks for the review, it was very helpful. Is it possible to see this feature in the release? What needs to be done for this? |
The maintainers have to review/merge it. |
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
Hi! Could we add deadline property for client? @ST-DDT who will do review? what I'am doing wrong?