Commit Graph

5592 Commits

Author SHA1 Message Date
Easwar Swaminathan b0bc6dc1ce
xdsclient: revert #8369: delay resource cache deletion (#8527)
The change being reverted here (#8369) is a prime suspect for a race
that can show up with the following sequence of events:
- create a new gRPC channel with the `xds:///` scheme
- make an RPC
- close the channel
- repeat (possibly from multiple goroutines)

The observable behavior from the race is that the xDS client thinks that
a Listener resource is removed by the control plane when it clearly is
not. This results in the user's gRPC channel moving to TRANSIENT_FAILURE
and subsequent RPC failures.

The reason the above mentioned PR is not being rolled back using `git
revert` is because the xds directory structure has changed significantly
since the time the PR was originally merged. Manually performing the
revert seemed much easier.

RELEASE NOTES:
* xdsclient: Revert a change that introduces a race with xDS resource
processing, leading to RPC failures
2025-08-21 10:52:40 -07:00
Doug Fawley 01ae4f4c48
github: add PR template (#8524) 2025-08-21 09:53:13 -07:00
Arjan Singh Bal 5ed7cf6a5c
transport: ensure header mutex is held while copying trailers in handler_server (#8519)
Fixes: https://github.com/grpc/grpc-go/issues/8514


The mutex that guards the trailers should be held while copying the
trailers. We do lock the mutex in [the regular gRPC server
transport](9ac0ec87ca/internal/transport/http2_server.go (L1140-L1142)),
but have missed it in the std lib http/2 transport. The only place where
a write happens is `writeStatus()` is when the status contains a proto.


4375c78445/internal/transport/handler_server.go (L251-L252)

RELEASE NOTES:
* transport: Fix a data race while copying headers for stats handlers in
the std lib http2 server transport.
2025-08-21 12:20:13 +05:30
Stanley Cheung fa0d658320
deps: bump Go version in Dockerfiles (#8522) 2025-08-20 02:34:51 +05:30
eunsang 33ec81b40e
xds: move all functionality from `xds/internal` to `internal/xds` (#8515)
Fixes grpc#7290, ensuring that only user-facing functionality remains in
the top-level xds package.

Updates all import paths and aliases to reference the new internal/xds
package, using aliases (e.g., `internal` → `xds` or `xdsinternal`) where
needed to minimize changes to call sites.

No functional changes intended; this is purely a package path
reorganization.

RELEASE NOTES: none
2025-08-19 10:05:46 -07:00
eshitachandwani 9ac0ec87ca
xds/cdsbalancer: increase buffer size of requested resource channel in test (#8467)
RELEASE NOTES: N/A

Fixes: https://github.com/grpc/grpc-go/issues/8462

The main issue was that the requests were getting dropped since we use a
[non-blocking
send](a5e7cd6d4c/xds/internal/balancer/cdsbalancer/cdsbalancer_test.go (L222C5-L227C6))
for resources in test along with buffer size of just
[one](a5e7cd6d4c/xds/internal/balancer/cdsbalancer/cdsbalancer_test.go (L210))
which was resulting in resource request updates being dropped if the
receiver is not executing at the exact moment.
Fix:
Changed the `setupManagementServer` to take `listener` and `OnStreamReq`
function as a parameter and in the `TestWatcher` added a blocking send
whenever a cluster resource is requested.
2025-08-18 10:45:30 +05:30
Elric 0ebea3ebca
grpctest: add test coverages of `ExitIdle` (#8375)
Fixes: https://github.com/grpc/grpc-go/issues/8118
2025-08-15 10:57:04 -07:00
Kevin Krakauer e847f29f32
deps: bump go version to 1.24 (#8509) 2025-08-14 11:31:22 -07:00
vinothkumarr227 4375c78445
xdsclient: add an e2e style test for fallback involving more than 2 servers #7817 (#8427)
Fixes: https://github.com/grpc/grpc-go/issues/7817
2025-08-14 11:13:57 +05:30
Easwar Swaminathan 82925492c5
xdsclient: schedule serializer callback from the authority instead of from the xdsChannel (#8498)
This is a small code change that simplifies how a callback is scheduled.
The `xdsChannel` will no longer directly access the serializer inside
the `authority` type. Instead, the authority type will now handle the
scheduling itself. This makes the code cleaner and moves the scheduling
logic to where it belongs.

RELEASE NOTES: none
2025-08-13 11:44:50 -07:00
Turfa Auliarachman 18ee309ab1
grpcsync: use context.AfterFunc to close buffer after context canceled in CallbackSerializer (#8489)
[The current minimum supported Go version is now
1.23](62ec29fd9b/go.mod (L3)).
`context.AfterFunc` is available for all of grpc-go's latest version
users. Thus we can do this pending TODO.

`context.AfterFunc` would invoke the given function for both _immediate_
context cancelation and timer-based context cancelation (`WithTimeout`,
`WithDeadline`). So I think this change is safe.

RELEASE NOTES: N/A
2025-08-12 15:27:23 -07:00
Pranjali-2501 19c720f666
deps: update github.com/prometheus/client_golang (#8502)
This PR updates Prometheus-related dependencies in grpc-go to fix
compatibility issues caused by recent API changes in
github.com/prometheus/otlptranslator.
Complementing the broader dependency updates made in PR #8497.

RELEASE NOTES: N/A
2025-08-12 12:11:50 +05:30
Oleksandr Redko 31dc47107e
grpclb: simplify stringifying of IPv6 with net.JoinHostPort (#8503)
This PR simplifies IP address handling in
`lbBalancer.processServerList`.

From [net.JoinHostPort](https://pkg.go.dev/net#JoinHostPort):

> JoinHostPort combines host and port into a network address of the form
"host:port". If host contains a colon, as found in literal IPv6
addresses, then JoinHostPort returns "[host]:port".

RELEASE NOTES: none
2025-08-12 12:09:40 +05:30
Easwar Swaminathan 57b69b47a2
xdsclient: modify how the resource watch state is retrieved for testing (#8499) 2025-08-06 15:12:34 -07:00
Pranjali-2501 ab9fb6d8cc
deps: update dependencies for all modules (#8497) 2025-08-06 22:43:29 +05:30
Pranjali-2501 8729c7d017
Change version to 1.76.0-dev 2025-08-06 06:37:42 +00:00
Doug Fawley 2bd74b28f5
credentials: fix behavior of grpc.WithAuthority and credential handshake precedence (#8488) 2025-08-05 15:04:18 -07:00
cjqzhao 9fa3267859
xds: remove xds client fallback environment variable (#8482) 2025-08-05 09:04:11 -07:00
Pranjali-2501 62ec29fd9b
grpc: Fix cardinality violations in non-client streaming RPCs. (#8385) 2025-08-05 10:31:52 +05:30
Arjan Singh Bal 85240a5b02
stats: change non-standard units to annotations (#8481) 2025-08-01 10:10:49 +05:30
eshitachandwani ac13172781
update deps (#8478) 2025-07-30 14:12:56 +05:30
vinothkumarr227 0a895bc971
examples/opentelemetry: use experimental metrics in example (#8441) 2025-07-30 11:22:50 +05:30
Easwar Swaminathan 8b61e8f7b8
xdsclient: do not process updates from closed server channels (#8389) 2025-07-29 16:26:08 -07:00
Sotiris Nanopoulos 7238ab1822
Allow empty nodeID (#8476) 2025-07-29 15:48:53 -07:00
jishudashu 9186ebd774
cleanup: use slices.Equal to simplify code (#8472) 2025-07-24 14:25:26 -07:00
dependabot[bot] 55e8b901c5
protoc-gen-go-grpc: bump golang.org/x/net (#8458)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.35.0 to 0.38.0.
- [Commits](https://github.com/golang/net/compare/v0.35.0...v0.38.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.38.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arjan Bal <arjansbal@google.com>
2025-07-24 10:14:38 +05:30
Purnesh Dixit e1f69d8a85
xdsclient: delay resource cache deletion to handle immediate re-subscription of same resource (#8369) 2025-07-24 10:01:38 +05:30
Arjan Singh Bal 8adcc948ae
advancedtls: avoid txt lookups in test and use test logger instead of Printf (#8469) 2025-07-23 00:11:27 +05:30
Doug Fawley a5e7cd6d4c
stats: add DelayedPickComplete and follow correct semantics (#8465) 2025-07-21 11:35:33 -07:00
Arjan Singh Bal 89d228107c
github: run arm64 tests without emulation (#8463) 2025-07-21 11:23:22 -07:00
Arjan Singh Bal f69eaf05c3
testutils/roundrobin: Improve validation of WRR distribution (#8459) 2025-07-21 11:33:36 +05:30
Doug Fawley 4af0faa7a0
transport: add test case for zero second timeout (#8452) 2025-07-18 09:33:24 -07:00
Burkov Egor cc46259771
xdsclient: typed config better nil checks (#8412) 2025-07-18 08:20:15 -07:00
Doug Fawley c7b188f361
Retract v1.74.0 and v1.74.1 (#8456) 2025-07-17 12:54:20 -07:00
eshitachandwani 0a12fb0d84
Revert "credentials: allow audience to be configured (#8421) (#8442)" (#8450)
This reverts commit 7208cdc423.
2025-07-16 15:19:22 +05:30
Arjan Singh Bal 52d9f91b2d
transport: release mutex before returning on expired deadlines in server streams (#8451) 2025-07-16 10:46:15 +05:30
Arjan Singh Bal bed551a435
xds: add a test for deadlocks in nested xDS channels (#8448) 2025-07-15 11:25:39 +05:30
Doug Fawley b64eaf8684
endpointsharding: shuffle endpoint order before updating children (#8438) 2025-07-14 15:29:30 -07:00
Chris Staite 7208cdc423
credentials: allow audience to be configured (#8421) (#8442)
There are competing specifications around whether a method should be included in a JWT audience or not.  For example #4713 specifically excluded the method referencing https://google.aip.dev/auth/4111 whereas GCE IAP requires the full URI https://cloud.google.com/iap/docs/authentication-howto.

In order to facilitate both methods, we introduce a new environment variable, namely GRPC_AUDIENCE_IS_FULL_PATH, to allow the method stripping to be disabled.  This defaults to the existing behaviour of stripping the method, but can be set to avoid this.
2025-07-14 13:52:09 -04:00
Richard Belleville af2600d31c
Move erm-g to Emeritus Maintainer (#8418) 2025-07-11 15:11:52 -07:00
Richard Belleville cf1a8619d2
Remove inactive maintainers (#8416) 2025-07-11 15:11:39 -07:00
Doug Fawley eb4a783fd5
xds: give up pool lock before closing xdsclient channel (#8445) 2025-07-11 13:28:15 -07:00
Luwei Ge 3d0cb79a78
alts: improve alts handshaker error logs (#8444)
* improve alts handshaker error logs
2025-07-10 14:07:22 -07:00
Doug Fawley 12f9d9c0da
server: allow 0s grpc-timeout header values, as java is known to be able to send them (#8439) 2025-07-09 07:35:47 -07:00
Arjan Singh Bal a809a4644b
deps: update dependencies for all modules (#8434) 2025-07-09 11:09:21 +05:30
eshitachandwani a21e37488e
xds/cdsbalancer: correctly remove the unwanted cds watchers (#8428) 2025-07-08 08:12:35 +05:30
Ashesh Vidyut 64a6b623ba
grpctest: minor improvements to the test logger implementation (#8370) 2025-07-07 11:55:00 +05:30
Easwar Swaminathan aa57e6af6c
xds: cleanup internal testing functions for env vars that have long been removed (#8413) 2025-07-02 17:54:14 +05:30
Purnesh Dixit f9cf0f67e6
xdsclient: relay marshalled bytes of complete resource proto to decoders (#8422) 2025-07-02 09:51:43 +05:30
Doug Fawley 8acde50e5b
dns: add environment variable to disable TXT lookups in DNS resolver (#8377) 2025-07-01 14:33:13 -07:00