Commit Graph

5737 Commits

Author SHA1 Message Date
Terry Wilson b5b7cacba9
Upgrade Android Gradle plugin to 7.4.0 (#9933)
This is the latest version of the plugin supported by the Gradle version
in use at the moment (7.6).

Note that this also upgrades the R8 optimizer to a version (4.0.48) that
now uses "full mode" optimization by default.

This also splits off Android projects to run under Java 11 (Gradle
plugin requirement) while the other projects continue to run under Java
8.
2023-03-08 11:18:27 -08:00
Terry Wilson 2351e37dd7
binder: Do not fail binder build on javadoc errors (#9941)
We will be running this with Java 11, which has elevated some earlier
warnings to errors that fail the build. We don't want the build to fail
because of this.
2023-03-08 10:02:02 -08:00
Terry Wilson 3332199106
Start 1.55.0 development cycle (#9939) 2023-03-07 18:14:31 -08:00
Eric Anderson 4229191a23 Move gcp-observability interop binary out of interop-testing
gcp-observability has many dependencies so is a bit annoying in some
build systems to get working... just for it not to be used in
non-observability scenarios.

grpc-go and c core are using separate binaries for gcp-observability
interop testing, so do the same in Java, which makes interop-testing a
bit lighter.
2023-03-07 10:57:38 -08:00
Larry Safran 7aa5598dc0
api:stabilize offloadExecutor. (#9931)
* api:Stabalize offloadExecutor.

fixes #6279
2023-03-06 12:49:37 -08:00
Terry Wilson 56e4ce49bd
Rename AbstractXdsClient to ControlPlaneClient (#9934)
AbstractXdsClient is not abstract.
2023-03-06 10:35:32 -08:00
Stanley Cheung b55ecd5c35
GCP Observability Interop Testing Client/Server for Java (#9858) 2023-03-06 08:24:42 -08:00
Benjamin Peterson 4b6853b6dd
errorprone: enable UnnecessaryAnonymousClass (#9927)
The Java 7 compatibility rationale no longer holds.
2023-03-03 15:16:17 -08:00
DNVindhya 66f95b7ade
census: add per call latency metric (#9906)
* updated call latency measure with AGGREGATION_WITH_MILLIS_HISTOGRAM; added test for call latency view
2023-03-03 09:36:14 -08:00
Benjamin Peterson 5be17e8b22 build: allow Java 11+ to use modern error prone 2023-03-02 17:31:50 -08:00
Larry Safran 95a44e0592
Move retrieval of elapsed time in handleRpcStreamClosed to make TSan happy (#9923)
* In `handleRpcStreamClosed()`, move retry handling to before the call to `xdsResponseHandler.handleStreamClosed()` so that TSan doesn't report a race condition that is completely meaningless.

fixes #9920
2023-03-02 15:28:37 -08:00
yifeizhuang c367b267c6
xds, wrr: randomize the initial deadline in the scheduler (#9922) 2023-03-02 15:17:54 -08:00
Eric Anderson 7e41d82b5a .github/workflows: Bump dessant/lock-threads to v4 2023-03-02 10:42:45 -08:00
yifeizhuang c7f556a9a6
xds: exclude generated error prone (#9921) 2023-03-02 09:41:31 -08:00
Benjamin Peterson ae6c506f96
all: fix build with errorprone 2.18 (#9886)
errorprone cannot be updated past 2.10 because later versions do not support Java 8.

Fixes https://github.com/grpc/grpc-java/issues/9916.
2023-03-01 13:45:18 -08:00
Eric Anderson a9a7cd129c api: Forward getMethodDescriptor() in ForwardingServerCall 2023-03-01 09:38:38 -08:00
yifeizhuang 8d12baa447
xds: add weighted round robin LB policy support (#9873) 2023-02-27 10:34:51 -08:00
Eric Anderson cc28dfdb36 compiler: Inform the compiler that GRPC_CODEGEN_FAIL aborts
This is enough for the linter to realize that the missing break cases
do not imply fallthrough.
2023-02-27 10:01:07 -08:00
Eric Anderson c3f02d5957
gcp-observability: Fix transitive gRPC versions
google-cloud-logging brings in xds, services, and netty-shaded versions
1.43.2. grpc-netty-shaded and xds use internal APIs, so their version
needs to align with grpc-api and grpc-core.  OpenCensus stackdriver
components also brings in netty-shaded version 1.27.2, but it was later
in the dependency list so google-cloud-logging's versions won out even
if using Maven.

We don't need an explicit dependency on netty-shaded because xds depends
on it transitively.

This was discovered because our GAE interop test failed in the course of
PR #9858 which added grpc-gcp-observability to interop-testing (and thus
also gae-interop-test):
```
Caused by: java.lang.AbstractMethodError: io.grpc.ManagedChannelProvider.getSupportedSocketAddressTypes()Ljava/util/Collection;
    at io.grpc.ManagedChannelRegistry.newChannelBuilder(ManagedChannelRegistry.java:186)
    at io.grpc.ManagedChannelRegistry.newChannelBuilder(ManagedChannelRegistry.java:155)
    at io.grpc.Grpc.newChannelBuilder(Grpc.java:101)
    at io.grpc.testing.integration.LongLivedChannel.<init>(LongLivedChannel.java:44)
    ... 44 more
```
2023-02-24 13:45:19 -08:00
Stanley Cheung 111033e818
servlet: Don't assume ManagedChannelBuilder will be NettyChannelBuilder (#9914) 2023-02-24 13:44:32 -08:00
Carl Mastrangelo 26c2db9c39
api: forward getSecurityLevel on PartialForwardingServerCall (#9912)
* api: forward getSecurityLevel on PartialForwardingServerCall
2023-02-23 22:36:39 -08:00
Terry Wilson d8c572dde6
compiler: add missing break in switch statement (#9901)
Linters don't like this kind of stuff.
2023-02-17 12:18:04 -08:00
Eric Anderson 305dfee2a8 api: Target schema should be case insensitive
URI schema are case-insensitive. Previously the code would do
case-sensitive matching. We expect NameResolverProviders to return the
typical canonical scheme formatting, which is lower-case. If a
NameResolverProvider returns an unexpected string (upper case, unicode,
etc), then it simply won't ever match. Channel users, however, can use
either casing in target strings.

The code implicitly already handled relative URIs by returning null, as
Map.get(null) returned null.
2023-02-17 07:57:20 -08:00
Terry Wilson b481f34855
xds: deletion only to watchers of same control plane (#9896)
When XdsClient learns that a control plane no longer tracks a resource,
it should only notify watchers associated with that control plane.

This matters in control plane federation cases when more than one
control plane is in use.
2023-02-17 06:34:30 -08:00
yifeizhuang 4ef0200f6b
xds: import envoy proto for WRR (#9898) 2023-02-16 15:23:28 -08:00
Terry Wilson e3bd5baeda
grpclb: no SRV lookup for "metadata.google.internal."
This change is to address b/269159638 about GCP metadata server returning an unexpected REFUSED status instead of NXDOMAIN. This causes a 15s delay with older versions of systemd-resolved.

This issue was observed with systemd 245.4. Version 251 worked without issue.
2023-02-16 12:57:54 -08:00
Larry Safran 3fb9abcb2c
Remove ExperimentalApi from ServerBuilder.intercept. (#9894)
Fixes #3117
2023-02-16 07:19:41 -08:00
DNVindhya 7942b9e7f5
gcp-observability: add new *compressed_bytes_per_rpc views (#9893)
* Add new metric views; Register latency and bytes per metrics views for observability
* update view description to inlcude client/server
* Use pre-defined aggregation from OpenCensus for bytes histogram
* updated view names
2023-02-15 17:17:39 -08:00
Larry Safran 19eab29f8d
compiler: Generate interfaces for services to implement (#9688)
Introduce an AsyncService interface in the generated code and move the methods from <service>ImplBase to default implementation of the interface.
* update pom files to allow java 1.8
* Add a bindService(<service>Async) method
* Change TestServiceImpl to use the interface and include a bind method instead of extending TestServiceImplBase.
2023-02-15 10:33:44 -08:00
Sergey Matyukevich 67d6600f71
core: add logger to OutlierDetectionLoadBalancer (#9880) 2023-02-14 13:27:21 -08:00
yifeizhuang 3d4d46d9ff
Revert "core: add subchannel list LB commons utility function, refactor for WRR (#9875)" (#9892)
This reverts commit 5a2adcc7c6.
2023-02-13 17:28:24 -08:00
Terry Wilson d42678a3bf
core: fix outlier detection default ejection time (#9889) 2023-02-13 14:40:31 -08:00
Terry Wilson c194c71c50
protobuf: update external javadoc link (#9890) 2023-02-13 08:23:12 -08:00
Ivan Bahdanau 5beae3a53b
Updating ServerInterceptors.java to support different marshallers for Request and Response messages. (#9877)
Fixes #9870
2023-02-10 11:43:39 -08:00
yifeizhuang f6a0028fe5
orca: support remove listener in OrcaOobUtil (#9881) 2023-02-08 09:50:32 -08:00
Larry Safran b8d23a3c2c
netty:Upgrade Netty from 4.1.79 to 4.1.87, tcnative from 2.0.54 to 2.0.56 (#9784)
* Upgrade Netty from 4.1.79 to 4.1.87 and tcnative from 2.0.54 to 2.0.56
2023-02-06 17:54:28 -08:00
Larry Safran 5983be1369
rls:Fix throttling in route lookup (b/262779100) (#9874)
* Correct value being passed to throttler which had been backwards.

* Fix flaky test.

* Add a test using AdaptiveThrottler with a CachingRlsLBClient.

* Address test flakiness.
2023-02-06 15:19:16 -08:00
Asaf Flescher 56a08c3506
Build Improvements (#9855)
* Made dependency on build.gradle in protobuf tasks relative so as to make downstream tasks cacheable

* Made transformer cacheable

* Add property name to path to root build.gradle

Co-authored-by: Nelson Osacky <nelson@osacky.com>
2023-02-06 14:57:09 -08:00
Terry Wilson fcb5c54e4b
Move name resolution retry from managed channel to name resolver (take #2) (#9812)
This change has these main aspects to it:

1. Removal of any name resolution responsibility from ManagedChannelImpl
2. Creation of a new RetryScheduler to own generic retry logic
     - Can also be used outside the name resolution context
3. Creation of a new RetryingNameScheduler that can be used to wrap any
   polling name resolver to add retry capability
4. A new facility in NameResolver to allow implementations to notify
   listeners on the success of name resolution attempts
     - RetryingNameScheduler relies on this
2023-02-03 18:23:32 -08:00
yifeizhuang 5a2adcc7c6
core: add subchannel list LB commons utility function, refactor for WRR (#9875) 2023-02-03 17:53:51 -08:00
Eric Anderson 8154fadf7e compiler: Add docs describing requirements for generated code 2023-02-03 12:53:03 -08:00
Larry Safran 54c1f37093
xds:Allow big cluster total weight (#9864)
* xds:  allow sum of cluster weights above MAX_INT up to max of unsigned int.

* Define nextLong(long bound) method in FakeRandom for WeightedRandomPickerTest.
2023-02-03 10:53:50 -08:00
Kun Zhang 04afea0fbd
test: new JDK fixed InetSocketAddress toString so we are updating our test (#9876)
The change was introduced in JDK 14 (f8440c33d2) so JDK 17 for us to care about.

Fixes internal issue: b/261217361
2023-02-02 21:35:24 -08:00
Eric Anderson 51913f6e9e Bump os-maven-plugin to 1.7.1 2023-02-02 18:30:32 -08:00
Eric Anderson 43917f052e Use Apache CDN to download Maven
Maven seems to have improved their download management and instead of
having their webpage choose a host they now have a CDN domain.
apache.cs.utah.edu is slow and is failing to finish the downloading.
2023-02-02 16:42:06 -08:00
yifeizhuang 6119f6ec94
services: add qps in orca api (#9866) 2023-02-02 15:16:27 -08:00
Benjamin Einaudi fb70a66e2c Fixes MethodDescriptor java documentation
According to git history, method 'getBareMethodName' and 'extractBareMethodName' of MethodDescriptor appeared in 1.33.0
2023-02-02 12:46:18 -08:00
yifeizhuang b7164f0791
xds: import cncf/xds (#9862) 2023-01-30 10:42:11 -08:00
yifeizhuang 4876996d84
Start 1.54.0 development cycle (#9857) 2023-01-25 10:56:58 -08:00
Larry Safran 501ca8f7b4
xds: Update logic so that an error being reported when stream is closed gets propagated to subscribers (#9827)
* Stop setting waitForReady in XdsClient's AbstractXdsClient.
* Handle bad URL cleanly.  

Fix test cases to deal with asynchronous flow.
2023-01-24 18:31:50 -08:00