Commit Graph

127 Commits

Author SHA1 Message Date
yifeizhuang 71c5eb07d3
Update README etc to reference 1.42.1 (#8694) 2021-11-12 16:54:35 -08:00
Sergii Tkachenko d548a35ab9 Update README etc to reference 1.42.0 2021-11-05 13:01:50 -04:00
ZHANG Dapeng 2e84b0f20a
android: bump min Android SDK version to 19 (#8583)
As Google Play Service [discontinued updates for Jelly Bean (API levels 16, 17 & 18)](https://android-developers.googleblog.com/2021/07/google-play-services-discontinuing-jelly-bean.html).
2021-10-06 10:02:32 -07:00
Eric Anderson e76efbb5da Update README etc to reference 1.41.0 2021-09-22 16:50:35 -07:00
ZHANG Dapeng 8a5694b7f8
Update README etc to reference 1.40.1 (#8448) 2021-08-25 10:58:42 -07:00
yifeizhuang 90606abdf1 Update README etc to reference 1.40.0 2021-08-17 15:03:54 -07:00
Eric Anderson 57bd087cdf buildscripts: Build android instrumentation tests in android CI
Binder's :build was missing. Cronet build failed without specifying
Java 8 because of the transitive Guava dependency.
2021-08-02 16:52:30 -07:00
ZHANG Dapeng 860e97d12a
all: API refactoring in preparation to support retry stats (#8355)
Rebased PR #8343 into the first commit of this PR, then (the 2nd commit) reverted the part for metric recording of retry attempts. The PR as a whole is mechanical refactoring. No behavior change (except that some of the old code path when tracer is created is moved into the new method `streamCreated()`).

The API change is documented in go/grpc-stats-api-change-for-retry-java
2021-07-31 18:33:02 -07:00
ZHANG Dapeng f86dc6c89f
Update README etc to reference 1.39.0 (#8298) 2021-06-30 09:23:15 -07:00
ZHANG Dapeng 4f09073e0f
all: remove 2-arg ClientStreamListener.closed()
We used to have two ClientStreamListener.closed() methods. One is simply calling the other with default arg. This doubles debugging (e.g. #7921) and sometimes unit testing work. Deleting the 2-arg method to cleanup.

This PR is purely refactoring.
2021-06-29 10:27:03 -07:00
Eric Anderson 5642e01243
Replace failOnVersionConflict() with custom requireUpperBoundDeps
failOnVersionConflict has never been good for us. It is equivalent to
Maven dependencyConvergence which we discourage our users to use because
it is too tempermental and _creates_ version skew issues over time.
However, we had no real alternative for determining if our deps would be
misinterpeted by Maven.

failOnVersionConflict has been a constant drain and makes it really hard
to do seemingly-trivial upgrades. As evidenced by protobuf/build.gradle
in this change, it also caused _us_ to introduce a version downgrade.

This introduces our own custom requireUpperBoundDeps implementation so
that we can get back to simple dependency upgrades _and_ increase our
confidence in a consistent dependency tree.
2021-06-11 14:01:18 -07:00
Eric Gribkoff 465c932b41
Update README etc to reference 1.38.0 (#8189) 2021-05-19 00:09:36 -07:00
Chengyuan Zhang fd8964f7d1
Update README etc to reference 1.37.1 (#8179) 2021-05-14 12:42:28 -07:00
Eric Anderson e08b9db208
Use @DoNotCall for static methods in Builders that throw
Since static methods are pseudo-inherited by Builder implementations but
are trivially accidentally used, we re-define static methods in each
builder to make them behave more like the caller would expect. However,
not all the methods actually work; some just throw because the caller
was certainly not getting what they would expect.

Annotating with `@DoNotCall` can expose the problems at compile time
instead of runtime. While `@Deprecated` would also be an option, it is a
bit harder to figure out the ramifications and whether we want to go
that route.

This change was suggested by a lint tool for XdsServerBuilder and it
seems appropriate so I applied it to the other similar cases I could
find.
2021-05-12 10:12:52 -07:00
Chengyuan Zhang f33658a6d7
Migrate away from Jcenter (#8111)
Replaces jcenter with mavenCentral.
2021-04-22 15:59:36 -07:00
Sergii Tkachenko 1b996b171b Update README etc to reference 1.37.0 2021-04-08 12:34:06 -04:00
Eric Anderson ae574434ee Update README etc to reference 1.36.0 2021-02-24 10:51:14 -08:00
ZHANG Dapeng 45a151810c
all: implement Helper.createResolvingOobChannelBuilder(target, creds)
- Add APIs to `ClientTransportFactory`:
```java
public interface ClientTransportFactory {
  /**
   * Swaps to a new ChannelCredentials with all other settings unchanged. Returns null if the
   * ChannelCredentials is not supported by the current ClientTransportFactory settings.
   */
  SwapChannelCredentialsResult swapChannelCredentials(ChannelCredentials channelCreds);

  final class SwapChannelCredentialsResult {
    final ClientTransportFactory transportFactory;
    @Nullable final CallCredentials callCredentials;
  }
}
```

- Add `ChannelCredentials` to constructor args of `ManagedChannelImplBuilder`:
 ```java
public ManagedChannelImplBuilder(
      String target, @Nullable ChannelCredentials channelCreds, @Nullable CallCredentials callCreds, ...)
  ```
2021-01-28 09:49:53 -08:00
Nick Hill 2072df9be6
Random acts of garbage reduction
I noticed some opportunities to reduce allocations on hot paths
2021-01-21 10:45:31 -08:00
Eric Gribkoff 3b03d317cd
Update README etc to reference 1.35.0 (#7804) 2021-01-13 19:34:33 -08:00
Chengyuan Zhang 64d2bf1256
android, cronet, android-interop-testing: bump Android versions (#7740)
Bumps target SDK version of grpc-android, grpc-cronet, grpc-android-interop-testing to API 29. Major related changes are:

- Migrated android.support to androidx, which is required for Android Q.
- android.net.NetworkInfo is deprecated in SDK 29, suppressed compiler warnings as it is needed for supporting old Android versions.
- Robolectric requires Java 9+ for Android 29, which causes unit tests in grpc-cronet fail. Added annotation to emulate Android 28 for grpc-cronet's test.
- Upgraded Android dependencies accordingly in android-interop-testing.
2020-12-29 18:05:09 -08:00
Eric Anderson d10d4a6a65 Update README etc to reference 1.34.1 2020-12-15 12:45:28 -08:00
Chengyuan Zhang 9b276aa73a Update README etc to reference 1.34.0 2020-12-01 15:47:37 -08:00
Sergii Tkachenko bb6679eec7 Update README etc to reference 1.33.1 2020-11-02 14:21:41 -05:00
Sergii Tkachenko d314c68126
Fix builders ABI backward compatibility broken in v1.33.0
* fix channel builders ABI backward compatibility broken in v1.33.0
* fix server builders ABI backward compatibility broken in v1.33.0
* makes ForwardingServerBuilder package-private
2020-10-29 12:06:37 -04:00
ZHANG Dapeng 0b6e6e5fd5
Update README etc to reference 1.33.0 2020-10-20 19:31:38 -07:00
Eric Anderson 49e47a4089 Update README etc to reference 1.32.1 2020-09-10 14:50:48 -05:00
Sergii Tkachenko a429b9767c cronet: CronetChannelBuilder extends a public API class 2020-09-02 13:28:52 -04:00
Chengyuan Zhang c30505df04
core, alts, cronet: fix ByteBuffer covariant method usages (#7349)
Java 9 introduces overridden methods with covariant return types for the following methods in java.nio.ByteBuffer:

- position​(int newPosition)
- limit​(int newLimit)
- flip​()
- clear​()
- mark​()
- reset​()
- rewind​()

In Java 9 they all now return ByteBuffer, whereas the methods they override return Buffer, resulting in exceptions like this when executing on Java 8 and lower:

java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer

This is because the generated byte code includes the static return type of the method, which is not found on Java 8 and lower because the overloaded methods with covariant return types don't exist (the issue appears even with source and target 8 or lower in compilation parameters).
The solution is to cast ByteBuffer instances to Buffer before calling the method.
2020-08-25 17:21:34 -07:00
Eric Anderson 4185081fd6 Update README etc to reference 1.31.1 2020-08-13 10:01:52 -07:00
Eric Gribkoff de36e42458
Update README etc to reference 1.31.0 (#7267) 2020-07-30 08:50:21 -07:00
Chengyuan Zhang f444b7bcc0
android, cronet, android-interop-testing, example/drop support for android SDK versions older than 16 (#7253) 2020-07-28 12:40:55 -07:00
Sanjay Pujare 158e98f982 Update README etc to reference 1.30.2 2020-06-23 16:03:09 -07:00
Chengyuan Zhang 3b81701c77
Update README etc to reference 1.30.1 (#7154) 2020-06-23 15:24:06 -07:00
Eric Anderson 295d927d8b core: Add migrating deframer
This provides a substantial ~3x performance increase to Netty async
streaming with small messages. It also increases OkHttp performance for
the same benchmark 40% and decreases unary latency by 3µs for Netty and
10µs for OkHttp.

We avoid calling listener after closure because the Executor used for
RPC callbacks may no longer be available. This issue was already
present in the ApplicationThreadDeframer, but full-stream compression is
not really deployed so was unnoticed.

DirectExecutor saw a 5-6µs latency increase via MigratingDeframer.
DirectExecutor usages should see no benefit from MigratingDeframer, so
disable it in that case.
2020-06-18 15:48:29 -05:00
Chengyuan Zhang a3a7a5e399 Update README etc to reference 1.30.0 2020-06-08 22:40:57 +00:00
ZHANG Dapeng 0044f8ce56
all: migrate gradle build to java-library plugin
- Use gradle configuration `api` for dependencies that are part of grpc public api signatures.
- Replace deprecated gradle configurations `compile`, `testCompile`, `runtime` and `testRuntime`.
- With minimal change in dependencies: If we need dep X and Y to compile our code, and if X transitively depends on Y, then our build would still pass even if we only include X as `compile`/`implementation` dependency for our project. Ideally we should include both X and Y explicitly as `implementation` dependency for our project, but in this PR we don't add the missing Y if it is previously missing.
2020-05-04 16:44:30 -07:00
ZHANG Dapeng 4947774475
Update README etc to reference 1.29.0 2020-04-22 09:45:09 -07:00
Chengyuan Zhang a1815417de Update README etc to reference 1.28.1 2020-04-03 16:11:41 -07:00
Jihun Cho 111e348def
Update README etc to reference 1.28.0 (#6815) 2020-03-10 16:10:04 -07:00
Jihun Cho df1b678698
Update readme to v1.27.2 (#6758) 2020-02-25 18:32:32 -08:00
Chengyuan Zhang 19de229b7f
Update readme to specify 1.27.1 (#6730) 2020-02-19 14:36:47 -08:00
Eric Anderson 45bb403f8a Update README etc to reference 1.27.0 2020-02-11 10:06:58 -08:00
Eric Anderson 8cf0196548
Add Cronet to main build
Building now requires an Android SDK unless you specify
-PskipAndroid=true
2020-01-09 15:20:41 -08:00
Tomo Suzuki 75f6fd8f10 Upgrade error_prone_annotations to 2.3.4 2020-01-03 14:50:34 -08:00
Graeme Morgan d3c77f2d87 all: Add suppressions for GuardedBy violations
This supports releasing a new version of GuardedBy which finds more mistakes than it used to.

Filed #6578 to try to clean up the suppressions.
2019-12-30 10:17:05 -08:00
Eric Gribkoff 91853036e6
Update README etc to reference 1.26.0 (#6548) 2019-12-18 13:40:28 -08:00
Eric Gribkoff bfa085a1cf
Start 1.27.0 development cycle (#6480) 2019-12-03 17:27:55 -08:00
Chengyuan Zhang d4e8962277
cronet: disable code shrinking for library build (#6448) 2019-11-20 12:12:53 -08:00
ZHANG Dapeng 2d454d478c
Revert "Revert "all: remove deprecated usePlaintext(boolean)""
This reverts commit 316a739e67.
2019-11-18 16:53:52 -08:00