Skip to content
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

Move gRPC deadline details to new internal module #1501

Merged
merged 2 commits into from
Apr 21, 2021

Conversation

bondolo
Copy link
Contributor

@bondolo bondolo commented Apr 17, 2021

Motivation:
Some of the details of the gRPC deadline implementation need to be
shared between the api and netty modules. The internal module can also
be used for other implementation code that does not need to reside in
the api module.
Modifications:
Creates gRPC internal module and moves some existing deadline related
details to a new DeadlineUtils class. Includes new tests for timeout
header parsing and generation.
Result:
Improved source organization for gRPC source.

@bondolo bondolo requested review from idelpivnitskiy and Scottmitch and removed request for idelpivnitskiy April 17, 2021 01:24
@bondolo bondolo self-assigned this Apr 17, 2021
@bondolo bondolo requested a review from tkountis April 17, 2021 01:24
Copy link
Contributor

@tkountis tkountis left a comment

Choose a reason for hiding this comment

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

LGTM after some minor comments


dependencies {
implementation project(":servicetalk-annotations")
implementation project(":servicetalk-concurrent-api")
Copy link
Member

Choose a reason for hiding this comment

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

concurrent-api is transitively taken through http-api, no need to define its explicitly. In the past it caused more issues when the transitive dependency was defined explicitly.

@@ -0,0 +1,20 @@
////
* Copyright © 2021 Apple Inc. and the ServiceTalk project authors
Copy link
Member

Choose a reason for hiding this comment

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

I don't see copyright at any other *.adoc file we have. Do we need it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we can, might as well start adding it. I am not sure why it would not have been included previously.

Motivation:
Some of the details of the gRPC deadline implementation need to be
shared between the api and netty modules. The internal module can also
be used for other implementation code that does not need to reside in
the api module.
Modifications:
Creates gRPC internal module and moves some existing deadline related
details to a new DeadlineUtils class. Includes new tests for timeout
header parsing and generation.
Result:
Improved source organization for gRPC source.
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

Assume that the code was moved with minimal changes (didn't go through it in details), module structure LGTM after the last comments:

apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"

dependencies {
api project(":servicetalk-annotations")
Copy link
Member

Choose a reason for hiding this comment

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

servicetalk-annotations is always implementation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. It seems like it could be api if anybody wanted to access the annotations at runtime, but I will make the change.

Copy link
Member

Choose a reason for hiding this comment

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

implementation gives users the dependency at runtime, api gives it at compile time

dependencies {
api project(":servicetalk-annotations")
api project(":servicetalk-http-api")
api "com.google.code.findbugs:jsr305:$jsr305Version"
Copy link
Member

Choose a reason for hiding this comment

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

same

@bondolo
Copy link
Contributor Author

bondolo commented Apr 21, 2021

Assume that the code was moved with minimal changes (didn't go through it in details)

There is one change for generating timeout header if the timeout durations greater than ~292 years that had been the original inspiration for moving this to a separate module and adding tests.

@bondolo bondolo merged commit a07bf29 into apple:main Apr 21, 2021
@bondolo bondolo deleted the grpc-internal branch April 21, 2021 23:05
idelpivnitskiy added a commit to idelpivnitskiy/servicetalk that referenced this pull request May 11, 2021
Motivation:

All public API breaking changes should be deferred until 0.41.0.

Modifications:

- Restore `grpc-api` that was removed in apple#1501.

Result:

No public API changes for 0.40.0.
idelpivnitskiy added a commit that referenced this pull request May 11, 2021
Motivation:

All public API breaking changes should be deferred until 0.41.0.

Modifications:

- Restore `grpc-api` that was removed in #1501.

Result:

No public API changes for 0.40.0.
hbelmiro pushed a commit to hbelmiro/servicetalk that referenced this pull request May 23, 2021
Motivation:

All public API breaking changes should be deferred until 0.41.0.

Modifications:

- Restore `grpc-api` that was removed in apple#1501.

Result:

No public API changes for 0.40.0.
@idelpivnitskiy idelpivnitskiy mentioned this pull request Jul 10, 2021
44 tasks
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.

3 participants