Skip to content

Conversation

@aaron-steinfeld
Copy link
Contributor

BREAKING CHANGE: changed new apis added in last release before they're adopted

Description

The last release hasn't been adopted yet, so I'm taking the chance to improve some of the newly added APIs. This change should only break APIs added in 0.6.0.

The changes: remove the usage of a clock, and instead take a deadline to both shutdown channels and shutdown servers. Before, the server shutdown was relative and the channel shutdown absolute (for consistency across each channel). The deadline addresses all concerns:

  • It better matches other interactions with the grpc framework
  • It retains the testability since a deadline can take a test ticker, and removes the need to pass in a clock
  • It's absolute, so can be shared across multiple shutdowns
  • It's defined relatively, which is how we normally invoke

Testing

Updated unit tests.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

BREAKING CHANGE: changed new apis added in last release before they're adopted
@github-actions

This comment has been minimized.


dependencies {
implementation(project(":grpc-context-utils"))
api("io.grpc:grpc-context:1.40.0")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

also did some dependency cleanup. Could potentially have downstream affects, but only if the consumers are misconfigured.

@codecov
Copy link

codecov bot commented Aug 25, 2021

Codecov Report

Merging #21 (58e061b) into main (3a96620) will decrease coverage by 0.39%.
The diff coverage is 54.54%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #21      +/-   ##
============================================
- Coverage     72.84%   72.44%   -0.40%     
  Complexity      101      101              
============================================
  Files            17       17              
  Lines           302      294       -8     
  Branches         20       21       +1     
============================================
- Hits            220      213       -7     
+ Misses           66       64       -2     
- Partials         16       17       +1     
Flag Coverage Δ
unit 72.44% <54.54%> (-0.40%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ace/core/grpcutils/client/GrpcChannelRegistry.java 80.00% <50.00%> (+1.05%) ⬆️
...ce/core/grpcutils/server/ServerManagementUtil.java 66.66% <57.14%> (-5.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a96620...58e061b. Read the comment docs.

@aaron-steinfeld aaron-steinfeld merged commit cb552a0 into main Aug 25, 2021
@aaron-steinfeld aaron-steinfeld deleted the consistent-api branch August 25, 2021 17:07
@github-actions
Copy link

Unit Test Results

12 files  12 suites   15s ⏱️
55 tests 55 ✔️ 0 💤 0 ❌

Results for commit cb552a0.

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