Commit Graph

6380 Commits

Author SHA1 Message Date
Benjamin Peterson 6e25c03a7b core: remove GrpcUtil.getHost
This utility is not relevant on supported JDK versions anymore.
2024-07-02 08:18:03 -07:00
Larry Safran ccfd351a2e
Enable new PickFirst LB (#11348) 2024-06-28 16:30:54 -07:00
Larry Safran 0b68eff120
core:Change address deduping to be across EAGs (#11345)
* Change dedup to be cross EAG, not just within an EAG
2024-06-28 14:58:50 -07:00
yifeizhuang 9e2145970a
doc: add document on WRR configure examples from service config and xds (#11344) 2024-06-27 16:55:38 -07:00
Larry Safran 7a53fa8bc1
Dualstack interop testing enablement (#11231)
* Have java test server listen on appropriate address based upon new optional flag "address_type"
2024-06-27 16:37:48 -07:00
Larry Safran 3777c303f5
deduplicate addresses within a single EAG (#11342) 2024-06-27 16:12:24 -07:00
Larry Safran 603033f1fa
Add null check to cleanup to avoid NPE (#11340) 2024-06-27 14:08:05 -07:00
cooper 25a8b7c507 Support setting onReadyThreshold through AbstractStub
Add copy of the onReadyThreshold property when copying CallOptions(fix bug)
2024-06-27 09:36:49 -07:00
Eric Anderson e7c3803b5a
xds: Remove unused opencensus-proto dependency
opencensus-proto is old generated code, which is not compatible with
protobuf-java 4.27.2 and may not be fixed since the project is dead.
Since it is unused, I think this doesn't cause any trouble for
downstream users trying to use protobuf-java 4.x. Related to #11015.
2024-06-26 15:30:31 -07:00
John Cormie 5770114d08
google-java-format binder/src/*/*.java (#11297)
https://github.com/grpc/grpc-java/blob/master/CONTRIBUTING.md#code-style

We've been talking about an incremental approach in https://github.com/grpc/grpc-java/issues/1664 but https://github.com/google/google-java-format/issues/1114 causes a bunch of manual formatting toil every time I run ~/google-java-format-diff.py because we have a LOT of lines >100 characters. Establishing a gjf-clean baseline will make things a lot easier for me.
2024-06-24 09:42:31 -07:00
Matthew Stevenson 46e54aeb4b
util: Add ExperimentalApi to AdvancedTlsX509KeyManager
There may be reordering of `updateIdentityCredentialsFromFile()`
arguments. Avoid making it stable while it is being evaluated.
2024-06-24 09:20:43 -07:00
Vindhya Ningegowda 4849e0a191
core: Add label values size validation in MetricRecorder (#11306)
Enhance MetricRecorder: Validate label values count against registered label keys count for default record APIs
2024-06-21 17:06:55 -07:00
Vindhya Ningegowda 1eec1459c2
Remove unused imports from CSM Observability example (#11307) 2024-06-21 16:17:33 -07:00
Vindhya Ningegowda 9e287f939e
all:Add GCP CSM Observability (#11305) 2024-06-21 14:35:39 -07:00
Vindhya Ningegowda 1aabc12955
Upgrade OpenTelemetry to 1.39.0 (#11300) 2024-06-21 14:35:24 -07:00
Vindhya Ningegowda a409a1b459
examples: Add gRPC OpenTelemetry example (#11299)
Add gRPC OpenTelemetry example. The example uses Prometheus exporter to export metrics and can be verified locally.
It also provides an example using LoggingMetricExporter to export and log the metrics using java.util.logging.
2024-06-21 14:35:02 -07:00
Larry Safran 9b39b3ec6b
Eliminate NPE after recovering from a temporary name resolution failure. (#11298)
* Eliminate NPE after recovering from a temporary name resolution failure.

* Add test case for 2 failing subchannels to make sure it causes channel to go into TF.
2024-06-21 13:20:44 -07:00
Larry Safran 0fea7dd32e
netty:Fix Netty composite buffer merging to be compatible with Netty 4.1.111 (#11294)
* Use addComponent instead of addFlattenedComponent and do not append to components that are composites.
2024-06-20 15:55:06 -07:00
Sergii Tkachenko d57f2719b2
services: restore //services:binarylog bazel target (#11292)
The target was wrongly deleted in 75492c8 / #10832.
See details in https://github.com/grpc/grpc-java/issues/4017#issuecomment-2159516522.
2024-06-20 15:40:52 -07:00
John Cormie 15ad9f546c
binder: Simplify ownership of ServerAuthInterceptor's executor. (#11293)
Allocating this executor before BinderServer even exists is convoluted and actually leaks if the built server is never actually start()ed. Instead, have BinderServer own this executor directly, with a lifetime from start() until termination. Pass it to the ServerAuthInterceptor via TransportAuthorizationState Attribute instead of at construction time.
2024-06-18 18:56:33 -07:00
Eric Anderson c540993aaa
bazel: Upgrade and fix import issues with envoy_api
Bazel was not updated as part of feab4e54. Also, `(( X++ ))` exits 1 if
X is zero. The patch to data-plane-api was upstreamed in
https://github.com/envoyproxy/envoy/pull/34759
2024-06-17 14:58:14 -07:00
Vindhya Ningegowda 889893dd8c
examples: Add GCP CSM Observability example (#11267)
Add GCP CSM observability example client and example server.
2024-06-13 13:12:01 -07:00
Terry Wilson 85ed053006
api: Stabilize ServerBuilder.AddServices() (#11285) 2024-06-13 13:06:01 -07:00
Vindhya Ningegowda b43d2830e4
opentelemetry: Add explicit histogram buckets for per-call metrics (#11281)
Add explicit histogram buckets for per-call metrics as specified in gRFC A66 https://github.com/grpc/proposal/blob/master/A66-otel-stats.md#units.
2024-06-12 16:57:33 -07:00
Eric Anderson a4ef77174d
Disable ErrorProne's MutableConstantField check (#11283)
It is simultaneously overly zealous and doesn't notice basic cases. As
noticed in #11281.
2024-06-12 13:42:20 -07:00
Mike Kruskal 5322414505
Advertise editions support in plugin 2024-06-12 10:47:54 -07:00
Kannan J 14fd81f59b
Adding missing synchronization in the runnable that is causing access guard violation error. (#11277) 2024-06-12 11:09:59 +05:30
John Cormie 7fee6a3fea
Don't block an offload thread when the client's SecurityPolicy is async (#11272)
https://github.com/grpc/grpc-java/issues/10566
2024-06-09 22:38:41 -07:00
Eric Anderson 47249c5f00 Start 1.66.0 development cycle 2024-06-07 10:33:57 -07:00
Daniel Liu 4943b4c1e5 fix logging to be compatible with Android for AdvancedTlsX509KeyManager 2024-06-07 10:02:06 -07:00
Mateus Azis 34ee600dce
Wait for all BinderServerTransports to terminate before ... (#11240)
... returning security policy executor to the object pool.

Fixes #10897.
2024-06-06 14:52:11 -07:00
John Cormie 1670e97f74
Reject further SETUP_TRANSPORT requests post-BinderServer shutdown (#11260)
Fixes https://github.com/grpc/grpc-java/issues/8931
2024-06-06 14:18:45 -07:00
Eric Anderson a28357e197 okhttp: Workaround SSLSocket not noticing socket is closed
Using --runs_per_test=1000, this changes the flake rate of TlsTest from
2% to 0%.

While I believe it is possible to write a reliable test for this
(including noticing the SSLSocket behavior), it was becoming too
invasive so I gave up.

Fixes #11012
2024-06-06 09:39:35 -07:00
Eric Anderson 0a4df9f93c binder: Make transport notification methods package-private
These are overrides of BinderTransport itself, so not used elsewhere.
They are essentially private. It was scary seeing `@GuardedBy` for a
public method. I copied the annotation to the base class to make sure
ErrorProne could verify the calls.
2024-06-06 08:59:32 -07:00
John Cormie 791f894e25
binder: Add a connection timeout (#11255)
Timeout is initially infinite so that we can release/import the supporting code and the behavior change independently.

Fixes #11137
2024-06-05 15:11:30 -07:00
Eric Anderson 22642465d3 gcp-csm-o11y: Add resource attributes from environment
This fixes csm_remote_workload_namespace_name being unknown when running
the interop test.
2024-06-05 10:21:50 -07:00
Eric Anderson 9e2cca08fa gcp-csm-o11y: Use xds's shadow configuration
This prevents mixing shaded and non-shaded class files. We do the same
thing in all the other projects that depend on xds.
2024-06-05 06:56:27 -07:00
Eric Anderson 0358c508da gcp-csm-o11y: Enable maven-publish plugin 2024-06-05 06:23:42 -07:00
Eric Anderson 839d2770ab
interop-testing: Add gcp-csm-o11y testing support 2024-06-04 17:15:58 -07:00
Eric Anderson b2731f27ad core: Delete AbstractTransportTest.clientShutdownBeforeStartRunnable
The test was added in e4e7f3a06 when InProcess stopped returning a
Runnable from start(). In c5a63a1 we realized (indirectly) that there's
no point in using the Runnable any more.

This test failed with Binder (which seems to have been using the
Runnable unnecessarily), and InProcess, Netty, and OkHttp don't use the
Runnable. Instead of fixing it, we'll just move toward stopping using
Runnable.

I'm not removing the Runnable usage from Binder in this commit because
this test is currently causing CI failures and I don't want to do a
behavior change when fixing it.
2024-06-04 13:43:14 -07:00
Eric Anderson 62cf8427be gcp-csm-o11y: s/csm.service_namespace/csm.service_namespace_name/
Just a typo, maybe because service_namespace is used in filter metadata
from CDS.
2024-06-04 13:41:22 -07:00
Eric Anderson 9792c9f106 kokoro: Remove unavailable API levels 21-23
There are no longer any devices (virtual or otherwise) that support API
level 21, 22, or 23. Google Play services is still supporting API level
21 (although there is a pattern of notifying of dropped levels in July,
and dropping them in August).
2024-06-04 13:05:15 -07:00
Eric Anderson c5a63a16a7 core: Remove "can't call transport listener from start()" restriction
This hasn't been needed since f8f569e07, when InternalSubchannel stopped
calling start() with a lock held. Note that also means no transport
needs to return a Runnable (but some still are).

I had noticed in e4e7f3a06 that it was safe for InProcess to call the
listener directly within start(), but I didn't notice this Javadoc that
said it wasn't allowed.
2024-06-04 11:26:08 -07:00
Eric Anderson 0fcd8cc19f kokoro: Add psm-csm build config 2024-06-03 11:12:36 -07:00
Eric Anderson dc490ae0cb
gcp-csm-observibility: Fill in experimental issue URL 2024-05-30 16:42:18 -07:00
erm-g 781b4c4575
security: Stabilize AdvancedTlsX509KeyManager. (#11139)
* Clean up and de-experimentalization of KeyManager

* Unit tests for API validity.
2024-05-30 13:54:11 -04:00
Eric Anderson df8cfe9ddc Create gcp-csm-observability 2024-05-29 14:40:44 -07:00
Eric Anderson 6dde844c04 opentelemetry: Plumb plugins for CSM o11y 2024-05-29 14:40:44 -07:00
Eric Anderson 5c6b80881d rls: Make LinkedHashLruCache non-threadsafe
CachingRlsLbClient already calls it with a lock held. The only reason
the cache needs to manage the lock itself is for the periodic cleanup.
Let the consumer of the cache handle the timer.
2024-05-29 08:24:56 -07:00
Mir3605 c31dbf48ad
Minor - add missing instruction (#11131)
The "list" instruction was missing, so the command didn't work properly
2024-05-29 12:45:44 +05:30