Commit Graph

5577 Commits

Author SHA1 Message Date
amirhadadi 7b80954fd5 core,interop-testing: avoid flushing after writing a message in case the server returns a single response 2022-06-24 07:13:25 -07:00
Wenlong Zhang 334fc32034 Adding loongarch suport for grpc-java 2022-06-24 07:11:47 -07:00
sumitd2 04f9bdc1fd
compiler: Cross-compile for ppc64le platform (#9284)
Fixes #9274
2022-06-23 09:18:19 -07:00
Eric Anderson 69abec5a28
api: Explain security constraints of ATTR_AUTHORITY_OVERRIDE
Half of the text was copied from NameResolver.getServiceAuthority().
However, that method can't perform I/O (which would block) so more text
was appropriate here to mention the implications of having a remote
service provide the authority.

I noticed the text was lacking while discussing #9266.
2022-06-22 13:16:42 -07:00
Eric Anderson 8996702715 SECURITY.md: grpc version table should include future versions 2022-06-22 09:04:32 -07:00
Sergii Tkachenko 306d407493 Update MAINTAINERS.md
Add Larry; move Penn and Srini to emeritus
2022-06-21 17:04:56 -07:00
Eric Anderson 95d2f734be bazel: Support maven_install's strict_visibility=True
This seems like a poorly thought-out feature for maven_install in a
world where the dependency list is being combined from multiple
repositories, as it means all Bazel-aware dependencies must subscribe to
the idea this is good and useful. It also loses effectiveness as
transitive dependencies are likely to be included directly in
maven_install; users of gRPC can use netty, guava, and other
dependencies without explicitly defining them even with
strict_visibility=True. Given maven_install still complains
about "Found duplicate artifact versions", it isn't too surprising it
doesn't make sense in a multi-repo world.

This isn't a bad feature for gRPC as we are pretty low-level and it can
be helpful when making bazel dependency versions match gradle dependency
versions. But it doesn't necessarily seem like something we need to be
too worried about making sure we use. Similarly, don't use it in the
example as it seems low-value for our users.

Fixes #9288
2022-06-21 15:36:13 -07:00
yifeizhuang f0c934e4c1
interop-test: fix import, no cast to ServerStreamCallObserver (#9299) 2022-06-21 12:41:33 -07:00
Sergii Tkachenko 12984db6a7 kokoro: standard TESTING_VERSION in k8s framework build scripts
This Addresses the issue with skips not working due to the
missing/inconsistent `--testing_version` flag, ref b/235688697.

1. Uses the new `TESTING_VERSION` variable populated in the shared
grpc_xds_k8s_install_test_driver.sh - new approach for detecting
versions applicable to all languages.
2. Use `TESTING_VERSION` in all build files in `--testing_version` and
when tagging docker images. This will be backported to all active
test branches. Build Scripts in all other languages will be updated
as well.

Corresponding grpc core change: https://github.com/grpc/grpc/pull/30027
2022-06-21 09:08:24 -07:00
Kurt Alfred Kluever 1ed4b778e0 Tidy up @CheckReturnValue / @CanIgnoreReturnValue annotations
Includes pushing @CanIgnoreReturnValue annotations down from the
class-level to method-level.
2022-06-17 14:57:42 -07:00
yifeizhuang 630d63b7cc
interop-testing: add orca_oob lock to allow only one test client at a time to perform the test case (#9260) 2022-06-17 10:41:30 -07:00
larry-safran 8e7793652b
core: Use offloadExecutor for CallCredentials (#9263)
Change the construction of CallCredentialsApplyingTransportFactory in
ManagedChannelImpl to use the offloadExecutor as indicated in
https://github.com/grpc/grpc-java/issues/6279#issuecomment-1147507365 .
2022-06-14 18:44:02 -07:00
sanjaypujare 75aeccd385
xds: when delegate server throws on start communicate the error to statusListener (#9277) 2022-06-14 17:53:38 -07:00
Eric Anderson c1c69829db build.gradle: Clear Class-Path from shadowJar manifest
The generated Class-Path is simply wrong and it will actually be
attempted to be used at runtime.

Fixes #8606
2022-06-14 17:39:14 -07:00
Eric Anderson d2b05380de core: Clear ConfigSelector in panic mode
If the failure is before the NameResolver has returned the first time,
RPCs would be queued waiting for service config. We don't want to use
the ConfigSelector, as we are trying to circumvent the NameResolver and
LoadBalancer.

Fixes #9257
2022-06-14 17:38:27 -07:00
Eric Anderson b06942d63b Use Gradle's version catalog
This moves our depedencies into a plain file that can be read and
updated by tooling. While the current tooling is not particularly better
than just using gradle-versions-plugin, it should put us on better
footing. gradle-versions-plugin is actually pretty nice, but will be
incompatible with Gradle 8, so we need to wait a bit to see what the
future holds.

Left libraries as an alias for libs to reduce the commit size and make
it easier to revert if we don't end up liking this approach.

We're using Gradle 7.3.3 where it was an incubating fetaure. But in
Gradle 7.4 is became stable.
2022-06-14 14:04:10 -07:00
Eric Anderson 5b825e8b17 Remove classifiers from ext.libraries
Classifier can't be specified in version catalog.
2022-06-14 14:04:10 -07:00
sanjaypujare 428b541114
xds: delete the permanent error logic in processing LDS updates in XdsServerWrapper (#9268) 2022-06-13 12:44:35 -07:00
Terry Wilson c589441bde
xds: Support least_request LB in LoadBalancingPolicy (#9262) 2022-06-10 16:00:39 -07:00
Sergii Tkachenko a4a67b7fc7
testing: minor lint-suggested improvements (#9259)
Use for-each and Lists.reverse() instead of classic for
2022-06-10 15:42:51 -07:00
Sergii Tkachenko 9cebe0aa2b
api: Add missing RunWith annotation to GlobalInterceptorsTest (#9258)
Internal build failed with 

```
grpc/api/src/test/java/io/grpc/GlobalInterceptorsTest.java:28: error: 
[JUnit4RunWithMissing] Test class may not be run because it is missing a @RunWith annotation
public class GlobalInterceptorsTest {
       ^
  Did you mean '@RunWith(JUnit4.class)' or 'public abstract class GlobalInterceptorsTest {'?
```
2022-06-10 10:30:42 -07:00
yifeizhuang 0d6c40227b
interop-testing: skip empty orca updates for unary at the server (#9256) 2022-06-09 16:42:45 -07:00
DNVindhya 395fae59f0
api: Add GlobalInterceptors API (#9235)
* added GlobalInterceptors API
2022-06-09 16:27:25 -07:00
Eric Anderson 65bf2dc61b xds: Fix hash gen in RingHash when generating more than 10 hashes 2022-06-09 15:50:56 -07:00
Eric Anderson 97845fb72e testing: Have GrpcCleanupRule extend ExternalResource
This allows using GrpcCleanupRule with JUnit 5 when combined with
ExternalResourceSupport. We don't really lose anything important when
running with JUnit 4 and this eases migration to JUnit 5.

ExternalResource is now responsible for combining exceptions. after()
cannot throw checked exceptions, so we must now wrap the
InterruptedException. When used with JUnit 5 we are unable to detect the
test failed; we accept that for now but it may be fair to create a new
class for JUnit 5 to be used with `@RegisterExtension` that implements
BeforeEachCallback and AfterTestExecutionCallback to restore the JUnit 4
behavior.

See #5331
2022-06-09 10:25:55 -07:00
yifeizhuang a738bc8f22
alts: support google credential CFE cluster name in XDSTP format (#9246) 2022-06-08 14:26:47 -07:00
Feng Li 56e28bc9fa
Change the gRPC o11y logName when sending logs to GCP. (#9145)
* Change the gRPC o11y logName when sending logs to GCP.
2022-06-08 13:57:45 -07:00
yifeizhuang ecb2210cc1
interop-test: test_orca_oob add retry limit 5 (#9251) 2022-06-07 15:11:47 -07:00
Eric Anderson 746cb15fdd Bump Guava to 31.1
error_prone_core itself was not upgraded, even though the annotations
were to keep the change minimal.
2022-06-06 16:15:43 -07:00
yifeizhuang deea4e737a
xds: fix NullPointerException for unknown xdstp resources (#9245) 2022-06-06 14:36:01 -07:00
Eric Anderson 4d00e0cb02 xds: Remove unused Bouncy Castle dependency 2022-06-06 12:29:43 -07:00
Eric Anderson 01faeee877 api: Document illegal arguments for server connection management APIs
Most are not allowed to be zero. Grace period can be zero to immediately
close the connection when the age is hit. A zero permitKeepAliveTime()
simply doesn't enforce any limits on the client.

The choices here precisely matches the pre-existing Netty behavior, but
also seems to make sense in general.
2022-06-06 11:09:14 -07:00
Eric Anderson a2c0ae3295 api: Document Attributes.Key uses reference equality
The text here should be expanded once `keys()` is removed. But for now
this at least can make it clearer that the current behavior is on
purpose. The text here is the same as that in CallOptions.Key.

See https://github.com/grpc/grpc-java/issues/1764#issuecomment-1144935608
2022-06-06 11:08:51 -07:00
Eric Anderson 9a09021897
core: Add missed internal comment about idle mode workaround
This should have been included in #8746 but wasn't.
2022-06-06 09:34:33 -07:00
yifeizhuang c48b01a46c
interop-test:sync grpc-proto and fix typo (#9233) 2022-06-03 09:31:32 -07:00
yifeizhuang 3624d59b18
interop-test: orca test change gradle dependency to xds non-shaded to allow bazel run (#9230)
Co-authored-by: Eric Anderson <ejona@google.com>
2022-06-03 09:31:00 -07:00
Eric Anderson a206cda1a8 Change Attributes.Key debug strings to reference the API of the key
Users appear to be doing `attributes.toString()` to find keys they are
interested in and then unable to find the name of the Key in our API.
They workaround the problem by scanning through `attributes.keys()`
looking for the key of interest. This is an abuse of the keys() API and
unnecessary user friction. They'd happily use the API if they just knew
where to find it.

I added internal to some strings to make it clear that you shouldn't go
looking to use it. There were many strings I didn't change. I focused on
keys most likely to be seen by users, which meant keys in grpc-api and
keys that are available via transport attributes.

See https://github.com/grpc/grpc-java/issues/1764#issuecomment-1139250061
2022-06-02 16:11:02 -07:00
Sergii Tkachenko 1b620847ad Update README etc to reference 1.47.0, protobuf plugin 0.8.18 2022-06-02 12:02:16 -07:00
Jeremy Volkman 84edc33239
Update to handle rename of java_names.h to names.h in protobuf upstream (#9218) 2022-05-31 15:08:10 -07:00
Vladimir Chizhov 0490ced91c
Bump GSON to 2.9.0 (#9215) 2022-05-31 15:07:22 -07:00
Terry Wilson f8da92e176
xds: Update xDS protos (#9223) 2022-05-27 15:56:31 -07:00
apolcyn 6dbd1d8f58
interop-testing: bump client op timeout from 5 to 15 seconds (#9211)
JVM startup costs that happen when dependencies are loaded for the
first time can consume a lot of time (we've occasionally observed
around ~5 seconds of CPU time); this causes frequent test flakes
with xds (google-c2p) when using the current 5 second deadline.
Increasing to 15 seconds should give enough time.
2022-05-27 14:36:54 -07:00
Terry Wilson 69d4e71309
Enable xDS custom LB config by default. (#9214) 2022-05-26 17:03:14 -07:00
Eric Anderson 0ebf2f76c2 examples/xds: Remove unnecessary includeBuild ..
Previously examples-xds depended on the normal hello-world, as it used
the same classes. But since b6601ba273 it has had its own classes and
not had a dependency on `:examples.
2022-05-26 11:11:56 -07:00
yifeizhuang 45dd17c799
examples: add examples-orca (#9204) 2022-05-26 10:23:43 -07:00
Terry Wilson e2f7e676cf
xds: Make a copy of Metadata for thread safety. (#9212) 2022-05-25 15:57:24 -07:00
Lidi Zheng d6a23e4116 interop-test: Remove duplicated GCE tests 2022-05-25 15:56:29 -07:00
Terry Wilson fc406e8612
xds: Properly assign picker. (#9201)
* xds: Properly assign picker.

Fixes a bug where the picker was not getting used in RpcBehaviorLoadBalancer.
2022-05-25 12:40:12 -07:00
Terry Wilson de3388bd21
xds: Custom LB configs to support UDPA TypeStruct (#9198)
* xds: Custom LB configs to support UDPA TypeStruct

The legacy com.github.udpa.udpa.type.v1.TypedStruct proto should be supported in addition to the current com.github.udpa.udpa.type.v1.TypedStruct one.

Co-authored-by: Sergii Tkachenko <hi@sergii.org>
2022-05-24 13:55:02 -07:00
Terry Wilson 48ea07efce
xds: Use weighted_target LB provider in wrr_locality (#9195)
Fixes a bug where WrrLocalityLoadBalancer would use the endpoint picking policy provider instead of WeightedTargetLoadBalancerProvider.

Also adds a test to fake control plane integration test that caught this bug. The test scaffolding is also updated to have the test server echo all client headers back in the response.

The test load balancer in the test is an almost straight copy of: https://github.com/grpc/grpc-java/blob/master/interop-testing/src/test/java/io/grpc/testing/integration/RpcBehaviorLoadBalancerProviderTest.java
2022-05-24 13:51:12 -07:00