chore(deps): update grpc-java monorepo to v1.76.0 #191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.40.0->1.76.01.40.0->1.76.01.40.0->1.76.01.40.0->1.76.01.40.0->1.76.0v1.48.1->v1.76.0v1.49.2->v1.76.0Release Notes
grpc/grpc-java (io.grpc:grpc-api)
v1.76.0Bug Fixes
Improvements
New Features
Documentation
Dependencies
Thanks to
@JoeCqupt
@Sangamesh1997
@benjaminp
@camelcc
@dmytroreutov
@duckladydinh
@jirkafm
@kilink
@panchenko
@umairk79
@vimanikag
@werkt
@xuhongxu96
@zrlw
v1.75.0Behavior Changes
Bug Fixes
grpc-timeoutshould always be positive (#12201) (6dfa03c). There is a local race between when the deadline is checked before sending the RPC and when the timeout is calculated to put on-the-wire. The code replaced negative timeouts with 0 nanoseconds. gRPC’s PROTOCOL-HTTP2 spec states that timeouts should be positive, so now non-positive values are replaced with 1 nanosecond6ff8eca). Delayed calls are the first calls on a Channel before name resolution has resolved addresses. Previously you could see confusing errors saying the deadline “will be exceeded in” X time. The message tense was simply wrong, and now will be correct: deadline “was exceeded after” X time.c4256ad). You should no longer see “Connection timeout for priority” errors.Improvements
NettyServerBuilder.maxRstFramesPerWindow()limit (#12288). This extends the Rapid Reset tool to also cover MadeYouReset. the reset stream count will cause a 420 "Enhance your calm response" to be sent. This depends on Netty 4.1.124 for a bug fix to actually call the encoder by the frame writer.XdsDepManager(297ab05). This is part of gRFC A74 to have atomic xDS config updates. This is an internal change, but does change the error description seen in certain cases, especially DEADLINE_EXCEEDED on a brand-new channel.9193701). Client channel and server builders with interceptors and factories respectively for stats and tracing.BlockingClientCallinfinite blocking (#12217) (ba0a732). Move deadline computation into overloads with finite timeouts. Blocking calls without timeouts now do not have to read the clock.42e1829). In gRPC-Java, the xDS clusters were lazily subscribed, which meant the fallback target which is returned in the RLS config wasn’t subscribed until a RPC actually falls back to it. The delayed resource subscription process in gRPC Java made it more susceptible to the effects of the INITIAL_RESOURCE_FETCH_TIMEOUT compared to other programming languages. It also had impact beyond the RLS cache expiration case, for example, when the first time the client initialized the channel, we couldn't fallback when the intended target times out, because of the lazy subscription. This change starts the fallback LB policy for the default target at the start of RLS policy instead of only when falling back to the default target, which fixes the above mentioned problems.7e982e4). The earlier implementation of aggregate clusters concatenated the priorities from the underlying clusters into a single list, so that it could use a single LB policy defined at the aggregate cluster layer to choose a priority from that combined list. However, it turns out that aggregate clusters don't actually define the LB policy in the aggregate cluster; instead, the aggregate cluster uses a special cluster-provided LB policy that first chooses the underlying cluster and then delegates to the LB policy of the underlying cluster. This change implements that.Metadatavalues to be exchanged during a call (#12229) (8021727)failOverTimerwhich would then wait the 10 seconds for the child to finish CONNECTING. We only want to give the child one opportunity after transitioning out of READY/IDLE.XdsClientImplandControlPlaneClient(#12287).ControlPlaneClientuses "xds-cp-client" now instead of "xds-client" while logging.Dependencies Changes
NettyAdaptiveCumulator(#11284), which can have a performance impact. We delayed upgrading Netty to give time to rework the optimization, but we've gone too long already without upgrading which causes problems for vulnerability tracking.jar_jarto avoid xds deps (#12243) (8f09b96). The //xds and //xds:orca targets now usejar_jarto shade the protobuf generated code. This allows them to use their own private copy of the protos and drop direct Bazel dependencies on cel-spec, grpc, rules_go, com_github_cncf_xds, envoy_api, com_envoyproxy_protoc_gen_validate, and opencensus_proto. This mirrors the shading of protobuf messages done for grpc-xds provided on Maven Central and should simplify dependency managementDocumentation
@SystemApiruntime visibility requirement isn't really new. It has always been implicit in the required INTERACT_ACROSS_USERS permission, which can only be held by system apps in production. Now deprecatedBinderChannelBuilder#bindAsUserhas always required SDK_INT >= 30. This change just copies that requirement forward to its replacement APIs inAndroidComponentAddressand the TARGET_ANDROID_USERNameResolver.Args.NameResolver.Listener2interface (#12220) (d352540)Thanks to
@benjaminp
@werkt
@kilink
@vimanikag
v1.74.0Behavior Changes
@generated=omit(f8700a1). This omitsjavax.annotation.Generatedfrom the generated code and makes theorg.apache.tomcat:annotations-apicompile-only dependency unnecessary (README and examples changes forthcoming; we delayed those changes until the release landed). You can use the option@generated=javaxfor the previous behavior, but please also file an issue so we can develop alternativesa16d655). Previously, the new blocking stub API was identical to the older blocking stub for unary RPCs and used the uncheckedStatusRuntimeException. However, feedback demonstrated it was confusing to mix that with the checkedStatusExceptioninBlockingClientCall. Now the new blocking stub uses StatusException throughout. grpc-java continues to support the old generated code, but the version of protoc-gen-grpc-java will dictate which API you see. If you support multiple generated code versions, you can use the older blocking v1 stub for unary RPCsBug Fixes
b04c673,15c7573). This was a very old race, not a recent regression. All streams should now properly fail instead of hanging, although in some cases they may be transparently retried1c43098). Previously, changes in the wall time would impact its accounting482dc5c). Only IP addresses were handled properly, and only IP addresses should be handled per gRFC A27efe9ccc). Previously the resource was NACKed, but gRPC would continue waiting for the resource until a timeout was reached and claim the control plane didn’t send the resource. Now it will fail quickly with an informative errora5eaa66). Previously all configuration refreshes were considered a new config, which had the potential for causing unexpected inefficiency problems. This was noticed by new code for gRFC A74 xDS Config Tears that is not yet enabled, so there are no known problems that this caused1df2a33). This fixed pick_first and ring_hash behavior that could cause rare and “random” races in parent load balancers like aNullPointerExceptioninClusterImplLoadBalancer.createSubchannel(), which had a ring_hash child. This is most likely to help xDS, as it heavily uses hierarchical LB policiesImprovements
f07eb47). Previously, connections were created in-order (but non-blocking), so in a fast network the first address could be more likely to connect first given a "microsecond" headstart. That first connection then receives all the buffered RPCs, which could cause temporary, but repeated, load imbalances of the same backend when all clients receive the same list of addresses in the same order. This has been seen in practice, but it is unclear how often it happens. Shuffling has the potential to improve load distribution of new clients when using round_robin, weighted_round_robin, and least_request, which connect simultaneously to multiple addresses26bd0ee). This avoids the potential of unnecessarily formatting an exception as a string when a subchannel fails to connect6f69363). This adds compatibility for--incompatible_disable_target_default_provider_fieldsc206428)30d40a6)Dependencies
46485c8). This is used by the pre-built protoc-gen-grpc-java plugin on Maven Central. This should have no visible benefit, but gets us closer to upgrading to Protobuf 27 which added edition 2023 supportf99b2aa). We aren’t aware of any visible changes to the results on Maven Centralv1.73.0API Changes
xds: Enable least request by default (#12062)
core: Delete the long-deprecated GRPC_PROXY_EXP env variable (#11988) (
908f9f1). This was experimental and has been warning when used since v1.8.0. Use the Java-standard -Dhttps.proxyHost and -Dhttps.proxyPort insteadapi: Remove deprecated SubchannelPicker.requestConnection() (
f79ab2f). This API was replaced by LoadBalancer.requestConnection() in v1.22.0Bug Fixes
config: prevents global stats config freeze in ConfiguratorRegistry.getConfigurators() (#11991) (
d4c46a7)xds: XdsDepManager should ignore updates after shutdown (
25199e9). This fixes a source of java.lang.NullPointerException: Cannot invoke "io.grpc.xds.XdsDependencyManager$RdsUpdateSupplier.getRdsUpdate()" because "routeSource" is null regression introduced in v1.72.0Improvements
xds: listener type validation (#11933) (
c8d1e6e)xds: add the missing xds.authority metric defined in gRFC A78 (#12018) (
6cd007d)New Features
xds: float LRU cache across interceptors (#11992) (
7a08fdb)xds: propagate audience from cluster resource in gcp auth filter. This completes the gRFC A83, implementation of GCP Authentication Filter. (#11972) (
84c7713)opentelemetry: Implement grpc.lb.backend_service optional label (
9619453). This completes the gRFC A89 implementation, which is enabled when requesting the new labelDocumentation
api: Remove mention of "epoch" from Ticker.nanoTime() javadocs (
84bd014)v1.72.0API Changes
f207be3). It is rarely used outside of gRPC itself. The configuration is passed as lb policy configuration instead1958e42)892144d)Bug Fixes
ca4819a)d82613a)94f8e93)8681786)Improvements
a57c14a)fca1d3c)e80c197). While there is more remaining, users may already see reduced latency when resources are replaced. For example, if changing a route from one backend service to another, RPCs may see less latency during the transition3961a92). This prevents the exception from propagating up the stack on an arbitrary thread. Such exceptions are rarely interesting. Instead, the exception that caused the channel panic is the important one, and RPCs will still fail with its details2e260a4). Previously when using xDS and the configuration changes the LB policy, the old LB policy is used until the new one is READY. Now the old LB policy is used until the new policy becomes READY, TRANSIENT_FAILURE, or IDLE7507a9e)350f90e)c340f4a)602aece)2f52a00). gRPC will no longer observe the HTTP/2 priorities, which were not used directly by gRPC and deprecated in RFC 9113666136b)a6e1c1f)New Features
1219706)cdab410)Thanks to
@panchenko
@emmanuel-ferdman
@JoeCqupt
v1.71.0API Changes
176f3ee)ProtoUtilsis now stabilized (#11884) (90b1c4f)Bug Fixes
199a7ea). They were previously processed as int32, although the sum of weights was checked to be positive. So this would have caused a very large weight to never be selected and to reduce the chances of immediately-following clusters to be selected. There have been no reports of control planes using such large weights199a7ea). Triggering required the old cluster to no longer be used, an RPC processing when the update arrived, and for a RPC to not match any route in the new config. There have been no reports of this actually happeningdc316f7)Improvements
CheckReturnValuewith Error Prone's (#11811) (7b5d069)5a7f350)44e92e2)7585b16). This makes it much easier to debug connectivity issues when using wait-for-ready RPCs0f5503e)MessageFramer.flush() is being called between every message, so messages are never combined and the larger allocation just wastes memory. (4a10a38,7153ff8)ClientStreamObservercloses the response observer log the error message if this operation fails (#11880) (302342c)3142928)c506190,b3db8c2). This was an internal refactor that should have no user-visible changeAltsContextUtilto allow getting theAltsContexton client-side (b1bc0a9)b44ebce)Documentation
HelloWorldServerto use Executor (#11850) (16edf7a)9e86299)Dependencies
fc8571a)122b683)Thanks to
@benjamin
@panchenko
@harshagoo94
@NaveenPrasannaV
v1.70.0Bug Fixes
8ea3629). Violations would only have triggered on API level 23 and earlier, and the violations fixed here were highly unlikely to be triggeredebe2b48). This fixes a regression introduced in 1.64.0. The regression should have caused failures on API level 23 and earlier when a StatusRuntimeException or StatusException was created. However, for unknown reasons tests on old devices didn’t notice issuesa0982ca). Hostnames are considered trusted and CAs are required to use punycode for non-ASCII hostnames, so this is expected to provide defense-in-depth. See also the related GoSecure blog post and the AOSP fix65b32e6)1cf1927). This (along with6c12c2b) fixes a nonce-handling regression introduced in 1.66.0 that could cause resources to appear to not exist until re-creating the ADS stream. Triggering the behavior required specific config changes. It is easiest to trigger when clusters use EDS and routes are changed from one cluster to another. The error “found 0 leaf (logical DNS or EDS) clusters for root cluster” might then be seen6c12c2b)e8ff6da). They were previously required to be strings6516c73). This fixes the error “Incorrect number of required labels provided. Expected: 4” introduced in 1.69.0f8f6139). This fixes clients treating large max_requests as “no requests” and failing all requestsImprovements
0b2d440)ea8c31c)805cad3)1126a8e)ef7c2d5)1edc4d8). Not used actively, but this adds validation. The validation is unlikely to fail but may reject invalid resources.ebb43a6). This only impacts thegrpc.targetlabel ingrpc.xds_client.*metrics. Previously the empty string was used7f9c1f3). This only matters when debug logging is enabledDocumentation
f1109e4)c96e926)5e8abc6)Dependencies
8a5f777)Thanks to
v1.69.1Bug Fixes
a0982ca). Hostnames are considered trusted and CAs are required to use punycode for non-ASCII hostnames, so this is expected to provide defense-in-depth. See also the related GoSecure blog post and the AOSP fix1cf1927). This (along with6c12c2b) fixes a nonce-handling regression introduced in 1.66.0 that could cause resources to appear to not exist until re-creating the ADS stream. Triggering the behavior required specific config changes. It is easiest to trigger when clusters use EDS and routes are changed from one cluster to another. The error “found 0 leaf (logical DNS or EDS) clusters for root cluster” might then be seen6c12c2b)e8ff6da). They were previously required to be stringsf8f6139). This fixes clients treating large max_requests as “no requests” and failing all requests6516c73). This fixes the error “Incorrect number of required labels provided. Expected: 4” introduced in 1.69.0v1.69.0v1.69.0
New Features
LoadBalancers to specify an authority per-RPC.(#11631) (c167ead) CallOptions.withAuthority() has higher precedence.735b3f3) The soft limit is a lower size limit that fails an increasing percentage of RPCs as the Metadata size approaches the upper limit. This can be used as an “early warning” that the Metadata size is growing too largeGoogleDefaultChannelCredentials(#11634) (ba8ab79)20d09ce).grpc.xds.authorityis not yet availableBug Fixes
ListeneronAddresses toListener2continue to use onResult (#11666) (dae078c). This fixes a 1.68.1 "IllegalStateException: Not called from the SynchronizationContext" regression (#11662) that could be seen in certain custom NameResolversef1fe87). This fixes a 1.68.1 NullPointerException regression when a custom transportExecutor was provided to the channel and it did not have enough threads to run new tasksImprovements
java.time.Durationoverloads toCallOptions,AbstractStubmethods that take TimeUnit and a time value (#11562) (766b923)9176b55). This increases the timestamp precision from millisecondsAndroidComponentAddressspecify a target UserHandle (#11670) (e58c998)a5db67d)29dd9ba). The target s2a had been referenced by IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS but didn’t previously existb170334). This compatibility is on the source level. There is not a pre-built binary on Maven Central that supports proto lite921f88a). The class implements the deprecated v1alpha of the reflection protocol. Prefer ProtoReflectionServiceV1, which implements the v1 version of the reflection protocolDependencies
1993e68)1993e68)1993e68)1993e68)1993e68)664f1fc). This had been done for the Maven Central binaries in 1.63.0, but had been missed for Bazel buildsDocumentation
fe350cf)a79982c)Thanks to
@niloc132
@rockspore
@SreeramdasLavanya
@vinodhabib
v1.68.3Bug Fixes
a0982ca). Hostnames are considered trusted and CAs are required to use punycode for non-ASCII hostnames, so this is expected to provide defense-in-depth. See also the related GoSecure blog post and the AOSP fix1cf1927). This (along with6c12c2b) fixes a nonce-handling regression introduced in 1.66.0 that could cause resources to appear to not exist until re-creating the ADS stream. Triggering the behavior required specific config changes. It is easiest to trigger when clusters use EDS and routes are changed from one cluster to another. The error “found 0 leaf (logical DNS or EDS) clusters for root cluster” might then be seen6c12c2b)e8ff6da). They were previously required to be stringsf8f6139). This fixes clients treating large max_requests as “no requests” and failing all requestsv1.68.2Bug Fixes
Improvements
v1.68.1v1.68.0 was a mistake. This is the first release of version 1.68.x
Bug Fixes
Behavior Changes
4be69e3). This is the existing behavior in C core. Duplicate keys in objects are dangerous as which value takes effect is undefined. Previously, the last value was used3a6be9c). The transport uses two threads, but one is on-demand. If the executor provided tobuilder.transportExecutor()runs out of threads (e.g., it is a fixed-size thread pool), all transports can be wedged, unable to run on-demand tasks, until keepalive kills one of them. Two threads are now used when handshaking a new transport, and the transport will time out after 1 second with “Timed out waiting for second handshake thread” if two threads are unavailablemesh_idvalue fromCSM_MESH_IDenvironment variable, instead of getting it from bootstrap file (84d30af)Improvements
782a44a) (#11599) (e59ae5f). This is aio.grpc.Contextstorage override to store its state inio.opentelemetry.context.Context. Libraries should not add a dependency on this artifact, as applications can only have one storage override in their classpathio.grpc.s2a.S2AChannelCredentialsConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.