Commit Graph

5577 Commits

Author SHA1 Message Date
DNVindhya 86e3362298
observability: add configurable value for flush from configuration (#9034) 2022-03-30 18:03:36 -07:00
beatrausch b20ce17817
okhttp: make okhttp dependencies compile only (#8971)
* okhttp: forked required files to make okhttp dep compile only

* okhttp: forked missing file to make okhttp dep compile only

* okhttp: moved url and request files to proxy packge

* okhttp: removed unused methods from forked files; fixed build
2022-03-30 13:43:30 -07:00
sanjaypujare 5113e92415
observability: rename Observability to GcpObservability (#9030)
* observability: rename Observability to GcpObservability
rename artifact to grpc-gcp-observability
enable maven publication of grpc-gcp-observability
2022-03-30 10:12:33 -07:00
Eric Anderson 30b5d6b840 RELEASING.md: Update variable name of grpc.io's config.yaml 2022-03-30 10:02:50 -07:00
Eric Anderson 0c642581e6 Update README etc to reference 1.45.1 2022-03-30 10:01:09 -07:00
DNVindhya 898e03b700
observability: implement filtering for logging and integrate tags to GcpLogSink (#9016) 2022-03-29 21:16:47 -07:00
Eric Anderson 957079194a xds: Unconditionally apply backoff on ADS stream recreation
This would limit ADS stream creation to one per second, even if the
old stream was considered good as it received a response. This shouldn't
really ever trigger, and if it does 1 QPS is probably still too high.
But 1 QPS is _substantially_ better than a closed loop and there's very
few additional signals we could use to avoid resetting the backoff.

b/224833499
2022-03-29 16:36:33 -07:00
yifeizhuang 72ae95792c
xds: add OrcaServiceImpl (#8993) 2022-03-29 08:48:02 -07:00
Carl Mastrangelo 6554061076
all: bump PerfMark to 0.25.0 (#8948) 2022-03-29 07:53:34 -07:00
sanjaypujare 9b1023bafe
observability: change the config parsing to not require logging_config (#9023)
and make Observability implement AutoCloseable
2022-03-28 16:20:26 -07:00
Eric Anderson 4a84c6fa96 bom: Remove protoc-gen-grpc-java
protoc-gen-grpc-java isn't useful in a BOM because the Gradle plugin
doesn't support BOMs (google/protobuf-gradle-plugin#412) and it seems
unlikely the Maven plugin would as well.

Right now the type is pom, which is useless; nobody cares about the pom
itself. We'd need to use a type of exe and repeat it for each platform
(classifier). Given that it is a strange case and we can't actually test
the results and having it in the bom might lead a user to trying to make
it work, let's just remove it for now until it provides value.

Fixes #8936
2022-03-28 14:39:12 -07:00
Kurt Alfred Kluever 31ce764723 Use `try/execute/fail/catch` instead of the strongly discouraged `@Test(expected=...)`
cl/437399696
2022-03-28 14:34:33 -07:00
Anirudh Ramachandra d3f7dc0059
xds: Support custom credentials using XdsCredentialsRegistry (#8924)
Currently the credentials used for xDS communications is hardcoded in the BootstrapperImpl. The bootstrap config chooses one of the possible hardcoded credential.

This commit adds support for a credential plugin which allows users to register custom credentials through XdsCredentialProviders. gRPC will automatically discover the implementations via Java's SPI mechanism

Bootstrapper will use XdsCredentialRegistry to retrieve the list of supported credentials. The current hardcoded list of credentials(google_default, insecure and tls) are registered by default to keep the behavior as is.
2022-03-28 10:20:50 -07:00
Eric Anderson cda0e9d996 android: Use Provider to construct OkHttpChannelBuilder
Doing any reflection on OkHttpChannelBuilder requires that all methods
can have their arguments resolved. We'd like to make okhttp an optional
dependency (to support okhttp 2 and 3/4 simultaneously). But making
okhttp optional means we can no longer construct OkHttpChannelBuilder
reflectively. We swap to the Provider that doesn't have this problem.
See #8971.

Note that ManagedChannelProvider itself only exposes its methods as
protected, so they wouldn't be accessible. However OkHttpChannelProvider
has its methods public. It is an open question of whether
ManagedChannelProvider's methods should become public, but in any case
we can hide a public OkHttpChannelProvider inside a package-private
class so it is only accessable via reflection. So this code assuming
public methods doesn't prevent future implementation hiding.
2022-03-24 14:51:57 -07:00
Terry Wilson 6c00f0052f xds: Return a null RouteAction when cluster has no cluster_specifier or route lookup is not enabled with a cluster_specifier_plugin.
We want to ignore the route in these situations, which is achieved by returning a null. The current behavior of returning an error triggers a NACK to the update.
2022-03-24 09:51:57 -07:00
Eric Anderson 700afafb10 xds: Fix LBs blindly propagating XdsClient errors
This is similar to 2a45524 (for #8950) but for additional similar cases.
2022-03-22 19:44:20 -07:00
ZHANG Dapeng 37904a02c0
rls: remove wrong empty address checke for child lb (#9005)
We shouldn't require addresses to be non-empty for the child lb of rls_lb. That might be a right requirement when the child lb is grpclb, but in our new usecase, the child lb will be cds lb and will only work if empty address is allowed.

Fixing b/223866089#comment24
2022-03-22 15:20:20 -07:00
Eric Anderson 4a0fe99f8a
netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods
The previous code assumed that only gRPC would be using these methods.
But twice now Netty has made a change (generally relating to security)
that used a method for pseudo headers that previously wasn't supported.
Let's stop the whack-a-mole and just implement them all.

This restores compatibility with Netty 4.1.75.Final. Fixes #8981
2022-03-22 07:39:48 -07:00
sanjaypujare 2d7302d4fd
observability: integrate globalTags and configuration into rest of observability (#9000)
* observability: integrate globalTags and configuration into rest of observability
wire observabilityConfig and globalTags into Observability and make
these available to the channel and server interceptors and specifically
to the LogHelper. Also separate globalTags into custom-tags and location-tags as required by the log-helper
2022-03-21 16:05:43 -07:00
ZHANG Dapeng c772eb0f4e
rls: fix wrong grpcKeybuilder field name (#8999)
The `grpcKeybuilders` [field](9fb243ce29/grpc/lookup/v1/rls_config.proto (L176)) should not be `grpcKeyBuilders` in json format.

The mistake in Java was introduced since the [beginning](0fd4975d4c (diff-585b634c79155b4ac9417f7805e1b9d5f6d5c11a940c88e27fdf53c209e619cfR104)).
2022-03-21 14:29:02 -07:00
Lidi Zheng d196e588a2
Add more xds_lb test cases (#8998)
This test suite is only fully enabled for C++ and Python at this
moment. This commit enables the rest of the test suite for grpc-java.

* change_backend_service_test
* failover_test
* remove_neg_test
* round_robin_test
* affinity_test
2022-03-21 12:17:26 -07:00
Eric Anderson d216f26f7a COMPILING.md: Update Android SDK instructions for new downloads 2022-03-21 10:32:50 -07:00
apolcyn 04c2b190c0
Simplify fallback test client and parameterize fallback deadline (#8989) 2022-03-21 10:03:48 -07:00
yifeizhuang 012dbaf5be
xds: accept resources wrapped in a Resource message (#8997) 2022-03-18 17:36:23 -07:00
DNVindhya b4d8fc2c40
observability: implement server interceptor for logging (#8992) 2022-03-18 11:23:50 -07:00
Lidi Zheng d71bef5afe
Redirect xDS tests to use grpc/grpc's master branch (#8982)
We are solving the issue of grpc/grpc delaying the release, causing GCE
tests to fail. Updating the master branch prevents similar cases from
happening.

Tested: [prod:grpc/java/master/branch/xds_v3](http://sponge/010f5353-e65e-4b1a-b6d3-f5a84e31546b)
2022-03-17 09:55:41 -07:00
John Cormie 2bf0a1f271
binder: Dispatch transact() calls on an Executor when FLAG_ONEWAY would not be respected. (#8987)
Fixes #8914
2022-03-16 23:19:06 -07:00
DNVindhya 0628cab226
observability: implement client interceptor for logging (#8956) 2022-03-16 22:09:25 -07:00
Jesse Schalken 1a6840accd
Pass use_default_shell_env = True for protoc (#8984)
If protoc is compiled with MinGW it will depend on libstdc++-6.dll which is found in C:\msys64\mingw64\bin and can only be found by inheriting PATH from the environment.
2022-03-16 13:38:37 -07:00
sanjaypujare 35a065dabc
observability: implement configuration parsing for observability (#8976) 2022-03-16 11:59:16 -07:00
Zhouyihai Ding ad2c0f93f4
Support setting gRPClb initial fallback timeout by service config (#8980) 2022-03-16 09:55:15 -07:00
sanjaypujare 2097d6b615
observability: change alts and google_auth_oauth2 dependencies to implementation from api (#8986) 2022-03-16 09:34:08 -07:00
yifeizhuang 86b74d9ecc
core: delayedClientCall returns drainPendingCalls runnable in setCall (#8978)
`setCall()` returns drainPendingCalls runnable only when there are calls to drain, otherwise return null. Preserved the behaviour of `start()` and `cancel()`, as they are protected by `delayOrExecute()`.
2022-03-15 12:57:24 -07:00
sanjaypujare 87e13daf1a
observability: add support for global tags using env vars and MDS (#8946) 2022-03-14 11:56:03 -07:00
Terry Wilson 3fe2f8e4ff Update README etc to reference 1.45.0 2022-03-10 10:25:32 -08:00
yifeizhuang 299851d149
stub: ClientCalls.ThreadlessExecutor throws rejectedExecutorException disable by default (#8973)
* stub: Have ClientCalls.ThreadlessExecutor reject Runnables after end of RPC

Changes originally proposed as part of #7106.

Fixes #3557

* add environment variable rejectExecutedException

Co-authored-by: Nick Hill <nickhill@us.ibm.com>
2022-03-08 10:43:43 -08:00
Eric Anderson 1d4eb49d1d
RELEASING.md: Before releasing, check TODO labels 2022-03-07 11:36:22 -08:00
apolcyn 42b32c64f5
interop-testing: Add a configurable warmup phase to fallback test client 2022-03-04 12:18:07 -08:00
Eric Anderson d00e7ee375 xds: BootstrapperImpl should not be public
It isn't used outside the package and is showing up in Javadoc. Instead
of excluding it from the Javadoc, just make it package-private.
2022-03-04 07:36:17 -08:00
Terry Wilson b8bcc3523c xds: Fix member variable ordering in FakeControlPlaneXdsIntegrationTest.java 2022-03-03 11:38:02 -08:00
Terry Wilson 2c9534d44f xds: Remove unnecessary "unchecked" warning suppression. 2022-03-03 11:38:02 -08:00
Terry Wilson b670131b55 xds: Fix constant names in FakeControlPlaneXdsIntegrationTest.java 2022-03-03 11:38:02 -08:00
Eric Anderson ecc8cc3405 googleapis: Move GoogleCloudToProdNameResolver from xds
GoogleCloudToProdNameResolver has a hard dependency on alts whereas xds
only has a weak dependency on alts that can be solved by a
ChannelCredentialsRegistry. So split out the code to a separate
artifact.
2022-03-03 11:24:49 -08:00
John Cormie abd1642371
New streams before transportReady() are not guaranteed to work (#8955)
Update javadoc to mention this previously-unwritten rule.

Update earlyServerClose_serverFailure_withClientCancelOnListenerClosed to obey it.

Update BinderTransport to fail sooner if this rule is broken.
2022-03-03 08:03:07 -08:00
Eric Anderson 9de15a4799
xds: Don't end status with '.' in XdsNameResolver (#8958)
2a45524 introduced '.' to the end of some status descriptions. We
typically don't end status descriptiosn in periods, but that's minor. In
this case though if the causal status ends in period then the new status
will end in two periods, which could easily be confusing to users.
2022-03-02 10:13:22 -08:00
yifeizhuang 2a455241a7
xds: fix XdsNameResolver blindly propagates XdsClient errors (#8953) 2022-03-01 17:34:51 -08:00
yifeizhuang 3b9ff362b9
xds: add end-2-end test with java control plane (#8715)
added a java control plane for xds tests end-to-end.
The FakeControlPlaneService manages full sets of xds resources. Use `setXdsConfig()` method to update the latest xds configurations; the method can be called anytime and multiple times dynamically. The fake control plane allows multiple clients connecting, delivers xds responses(for the data resources, or ACK/NACK) for the xds client requests.
The `FakeControlPlaneXdsIntegrationTest` only has one pingPong test case now. Other test case can be added in a similar way.
2022-02-25 13:22:03 -08:00
Penn (Dapeng) Zhang 89e53dc875 xds: Do not failoverpriority when IDLE->CONNECTING 2022-02-24 15:49:51 -08:00
Penn (Dapeng) Zhang c4d21410c6 xds: improve PriorityLoadBalancerTest 2022-02-24 15:49:51 -08:00
Eric Anderson 4d92b48ef8
xds: Squelch ADS reconnection error logs
Workaround for #8886, as we wait on a real fix. The regular load
balancing disconnections are confusing users and will train users to
start ignoring gRPC warnings. At present, it is better to have no log
than excessively log.
2022-02-23 13:55:02 -08:00