Commit Graph

6259 Commits

Author SHA1 Message Date
Yash Tibrewal 7c79712d13
[GSM Observability] Metadata Exchange Implementation (#34051)
A new metadata type `x-envoy-peer-metadata` is being introduced. We
don't have a better way to do this at the moment compared to just adding
it in `metadata_batch.h`.

The GSM Observability plugin uses this metadata to send topology
information to peers in the form of serialized and base64 encoded
`google::protobuf::Struct`. The individual keys being used inside the
struct are subject to change.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-31 22:43:36 -07:00
Yash Tibrewal f5e02f6c62
[OTel] Remove global fallback for meter provider (#34190)
Based on updates at https://github.com/grpc/proposal/pull/380

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-31 13:20:24 -07:00
apolcyn 2d2e9893cf
[DNS test] unskip a test on windows (#34209)
Unskip since https://github.com/grpc/grpc/pull/33965 merged
2023-08-30 20:05:23 -07:00
Craig Tiller 79a983472c
[promises] Client channel promise conversion (#33210)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->

---------

Co-authored-by: Mark D. Roth <roth@google.com>
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-08-30 14:47:59 -07:00
apolcyn c405f75a5a
[dns] remove overall test suite timeout on DNS cancellation test (#34204)
This overall timeout won't scale as we add more tests, and seems like a
flake waiting to happen
2023-08-30 13:22:28 -07:00
Mark D. Roth 1c54662866
[xDS] improve RPC failure status message when aggregate cluster graph has no leaf clusters (#34201)
Old message:
new_cluster_1: UNAVAILABLE: errors validating xds_cluster_resolver LB
policy config: [field:discoveryMechanisms error:must be non-empty]

New message:
new_cluster_1: FAILED_PRECONDITION: aggregate cluster graph has no leaf
clusters
2023-08-30 12:07:52 -07:00
apolcyn a35f282d58
[c-ares] fix spin loop bug when c-ares gives up on a socket that still has data left in its read buffer (#34185)
If we get a readable event on an fd and both the following happens:

- c-ares does *not* read all bytes off the fd

- c-ares removes the fd from the set ARES_GETSOCK_READABLE

... then we have a busy loop here, where we'd keep asking c-ares to
process an fd that it no longer cares about.

This is indirectly related to a change in this code one month ago:
https://github.com/grpc/grpc/pull/33942 - before that change, c-ares
would close the socket when it called
[handle_error](7f3262312f/src/lib/ares_process.c (L707))
and so `IsFdStillReadableLocked` would start returning `false`, causing
us to get away with [this
loop](f6a994229e/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc (L371)).
Now, because `IsFdStillReadableLocked` will keep returning true (because
of our overridden `close` API), we'll loop forever.
2023-08-30 08:03:53 -07:00
Yash Tibrewal 2da74beb96
[OTel] Remove authority attribute from server metrics (#34189)
Based on updates at https://github.com/grpc/proposal/pull/380
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-28 17:13:01 -07:00
Eugene Ostroukhov 73c5da6f02
[PSM Interop] Synchronize messages.proto (#34182) 2023-08-28 12:45:10 -07:00
Eugene Ostroukhov 88df0a1c71
[PSM Interop] Return trailing metadata. (#34096)
1. Trailing metadata is now reported.
2. messages.proto was synchronized.
3. Corrected order of arguments in EXPECT_EQ so the output makes sense now.
2023-08-25 14:02:23 -07:00
Craig Tiller b478add7ec
[experiments] Remove unused experiment (#34090)
We added this as an exploratory measure for a customer that thought they
were using open census (this turned out to be emphatically false).
Remove it since it's probably not how we ultimately want to do this, and
wait for something better to come along.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-08-24 23:45:22 -07:00
Eugene Ostroukhov a6689e6444
[PSM Interop] Maintain RPC behaviors order (#34164)
Fixes comment
https://github.com/grpc/grpc/pull/32810#discussion_r1304953101
2023-08-24 17:03:38 -07:00
Mark D. Roth b980f62ca6
[pick_first] adjust threshold on e2e test to address flake (#34157) 2023-08-24 11:40:54 -07:00
AJ Heller 82b00c0fa3
[benchmark][reland] Local loadtest scenario runner (#34159)
Relands  #34117, using a different json parsing mechanism.
2023-08-24 11:07:53 -07:00
Yijie Ma 28291781ba
[Windows] Make resolver_component_tests_runner_invoker run with Bazel on RBE (#34122)
This makes the resolver component tests suite run on Window RBE by
adding a flag in the test driver to further differentiate between Bazel
local run and Bazel RBE run on Windows since they have different
RUNFILES behavior.

Local Bazel run succeeds:
```
C:\Users\yijiem\projects\grpc>bazel --output_base=C:\bazel2 test --dynamic_mode=off --verbose_failures --test_arg=--running_locally=true //test/cpp/naming:resolver_component_tests_runner_invoker
INFO: Analyzed target //test/cpp/naming:resolver_component_tests_runner_invoker (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
Target //test/cpp/naming:resolver_component_tests_runner_invoker up-to-date:
  bazel-bin/test/cpp/naming/resolver_component_tests_runner_invoker.exe
INFO: Elapsed time: 196.080s, Critical Path: 193.21s
INFO: 2 processes: 1 internal, 1 local.
INFO: Build completed successfully, 2 total actions
//test/cpp/naming:resolver_component_tests_runner_invoker                PASSED in 193.1s

Executed 1 out of 1 test: 1 test passes.
```

RBE run succeeds:
```
C:\Users\yijiem\projects\grpc>bazel --bazelrc=tools/remote_build/windows.bazelrc test --config=windows_opt --dynamic_mode=off --verbose_failures --host_linkopt=/NODEFAULTLIB:libcmt.lib --host_linkopt=/DEFAULTLIB:msvcrt.lib --nocache_test_results //test/cpp/naming:resolver_component_tests_runner_invoker
INFO: Invocation ID: d467f2e3-7da6-4bb5-8b9b-84f1181ebc60
WARNING: --remote_upload_local_results is set, but the remote cache does not support uploading action results or the current account is not authorized to write local results to the remote cache.
INFO: Streaming build results to: https://source.cloud.google.com/results/invocations/d467f2e3-7da6-4bb5-8b9b-84f1181ebc60
INFO: Analyzed target //test/cpp/naming:resolver_component_tests_runner_invoker (0 packages loaded, 133 targets configured).
INFO: Found 1 test target...
Target //test/cpp/naming:resolver_component_tests_runner_invoker up-to-date:
  bazel-bin/test/cpp/naming/resolver_component_tests_runner_invoker.exe
INFO: Elapsed time: 41.627s, Critical Path: 39.42s
INFO: 2 processes: 1 internal, 1 remote.
//test/cpp/naming:resolver_component_tests_runner_invoker                PASSED in 33.0s

Executed 1 out of 1 test: 1 test passes.
INFO: Streaming build results to: https://source.cloud.google.com/results/invocations/d467f2e3-7da6-4bb5-8b9b-84f1181ebc60
INFO: Build completed successfully, 2 total actions
```


<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-24 11:05:50 -07:00
Eugene Ostroukhov 7efc7d2806
[PSM Interop] Reapply hook server and fix race condition (#34132)
1. Revert parts of 440eef2288 that
reverted 16b67ae312
2. Fix race conditions in the test case that caused TSAN failures.
2023-08-24 10:50:45 -07:00
Yijie Ma 3e24027820
Revert "[benchmark] Local loadtest scenario runner (#34117)" (#34158)
This reverts commit fe1ba18dfc.

Reason: break import



<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-24 09:53:47 -07:00
AJ Heller fe1ba18dfc
[benchmark] Local loadtest scenario runner (#34117)
This helps developers run benchmark loadtests locally. See comments in
scenario_runner.py for usage.

---------

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-08-23 17:51:20 -07:00
Eugene Ostroukhov 440eef2288
[Import] Revert #34027 and #34129 (#34133)
This reverts commit 16b67ae312.
2023-08-22 15:55:59 -07:00
Eugene Ostroukhov cd873f355b
Revert "[Windows] Make resolver_component_tests_runner_invoker run wi… (#34129)
…th Bazel on Windows (#34107)"

This reverts commit d540b4c088.
2023-08-22 13:44:15 -07:00
Eugene Ostroukhov 16b67ae312
[PSM Interop] Add "hook service" (#34027) 2023-08-21 16:23:38 -07:00
Yijie Ma d540b4c088
[Windows] Make resolver_component_tests_runner_invoker run with Bazel on Windows (#34107)
Local Bazel invocation succeeds:

```
C:\Users\yijiem\projects\grpc>bazel --output_base=C:\bazel2 test --dynamic_mode=off --verbose_failures //test/cpp/naming:resolver_component_tests_runner_invoker@poller=epoll1
INFO: Analyzed target //test/cpp/naming:resolver_component_tests_runner_invoker@poller=epoll1 (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
Target //test/cpp/naming:resolver_component_tests_runner_invoker@poller=epoll1 up-to-date:
  bazel-bin/test/cpp/naming/resolver_component_tests_runner_invoker@poller=epoll1.exe
INFO: Elapsed time: 199.262s, Critical Path: 193.48s
INFO: 2 processes: 1 internal, 1 local.
INFO: Build completed successfully, 2 total actions
//test/cpp/naming:resolver_component_tests_runner_invoker@poller=epoll1  PASSED in 193.4s

Executed 1 out of 1 test: 1 test passes.
```

The local invocation of RBE failed with linker error `LINK : error
LNK2001: unresolved external symbol mainCRTStartup`, but that does not
limited to this target:
https://gist.github.com/yijiem/2c6cbd9a31209a6de8fd711afbf2b479.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-21 16:20:55 -07:00
jrandolf 3489b6304e
[OpenSSL] Support for OpenSSL 3 (#31256)
Update from gtcooke94:
This PR adds support to build gRPC and it's tests with OpenSSL3. There were some
hiccups with tests as the tests with openssl haven't been built or exercised in a
few months, so they needed some work to fix.

Right now I expect all test files to pass except the following:
- h2_ssl_cert_test
- ssl_transport_security_utils_test

I confirmed locally that these tests fail with OpenSSL 1.1.1 as well,
thus we are at least not introducing regressions. Thus, I've added compiler directives around these tests so they only build when using BoringSSL.

---------

Co-authored-by: Gregory Cooke <gregorycooke@google.com>
Co-authored-by: Esun Kim <veblush@google.com>
2023-08-21 17:42:32 -04:00
Mark D. Roth 72e791402f
[pick_first] fix test flake (#34098)
CNR the flake, but I've changed the test (which is very old) to use some
of our more modern helper functions that have saner timeouts.

Also re-add a `return` statement that was accidentally removed in
#33753, which I noticed while working on this. Its absence doesn't cause
a real problem, but it does cause us to needlessly trigger a duplicate
connection attempt or report a duplicate CONNECTING update in some
cases.
2023-08-18 08:48:35 -07:00
Mohan Li ab024624da
[pick_first] de-experiment pick first (#34054)
De-experiment pick first since we have both affinity and randomness E2E
test running successfully.

---------

Co-authored-by: Yash Tibrewal <yashkt@google.com>
2023-08-17 09:54:55 -07:00
Eugene Ostroukhov 89209debad
[PSM Interop] Extend headers matching. (#34082)
1. Headers will now be matched ignoring the case.
2. "*" can now be set to return all metadata values.
2023-08-16 16:47:11 -07:00
Yash Tibrewal 6878609fc5
[GSM Observability] Add cloud c++ dependency.. this time for sure (#34071)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-16 13:35:05 -07:00
AJ Heller 0d5dc5c45b
[EventEngine] C++ Alarm migration and PosixEventEngine performance enhancements (#34056)
This PR is mainly a set of improvements that allow the C++ Alarm to be
migrated away from legacy iomgr. It cannot be landed without significant
speedup, due to third-parties relying on a fast path for immediate timer
execution with deadlines <= now.

Previous EventEngine performance of bm_alarm, compared to baseline iomgr
timers: *0.014%*
This PR: *2.5%*

Regarding previous failures to land this change: The cloud libraries
team agreed to reduce the amount of stress in their alarm stress test
https://github.com/googleapis/google-cloud-cpp/pull/12378
2023-08-16 11:54:04 -07:00
Mark D. Roth 64a318acd4
[pick_first] fix sticky-TF and handling of subchannels in TRANSIENT_FAILURE (#33753)
Fix sticky-TF behavior such that once we enter TRANSIENT_FAILURE, we do
not leave that state if we get a new address list.

Also, fix handling of subchannels in state TRANSIENT_FAILURE.
Previously, if a subchannel was already in state TRANSIENT_FAILURE when
we wanted to start a connection attempt on it (e.g., because the
subchannel already existed from a different channel, or because it
already existed in the previous subchannel list), we would wait for it
to report IDLE before attempting to connect. This PR changes pick_first
to instead immediately skip the subchannel and move on to the next one.
Now, the only time we wait for a subchannel in TRANSIENT_FAILURE is when
we wrap back around to the first subchannel in the list.
2023-08-15 17:12:21 -07:00
Yash Tibrewal 462a2cae35
Revert "[GSM Observability] Add bazel dependency on Google Cloud C++ OTel library" (#34069)
Reverts grpc/grpc#34043

This caused bazel distribtest failures
2023-08-15 16:24:40 -07:00
Yijie Ma 67ad297e61
[EventEngine] Port GrpcPolledFdFactoryPosix fix to EE (#34025)
Port https://github.com/grpc/grpc/pull/33871 to EE's
GrpcPolledFdFactoryPosix.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-11 15:52:01 -07:00
Yousuk Seung 4acb7d38b9
[xds] Apply the slowdown factor only once to LRS load reporting period (#34042)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-11 22:43:36 +00:00
Yash Tibrewal bd343fd51d
[GSM Observability] Add bazel dependency on Google Cloud C++ OTel library (#34043)
Not adding CMake support yet

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-11 12:54:18 -07:00
Eugene Ostroukhov 44de3ab221
[PSM Interop] Restore "Report per-RPC metadata if requested. (#33939)" (#34037) 2023-08-10 13:01:47 -07:00
Mohan Li 66f60aa763
[test] Allow set request/response size in interop soak test (#34010)
Internal bug: b/289109827
2023-08-10 09:34:27 -07:00
Eugene Ostroukhov fc9a1ccaed
[PSM Interop] Revert "Report per-RPC metadata if requested. (#33939)" (#34028)
This reverts commit 6fadb994ef.
2023-08-09 16:23:12 -07:00
Eugene Ostroukhov 6fadb994ef
[PSM Interop] Report per-RPC metadata if requested. (#33939) 2023-08-09 14:16:12 -07:00
Luwei Ge a5f1121982
[xDS] Remove filter name from GenerateServiceConfig (#33915)
We decided to not populate `policy_name` with the HTTP filter name in
xDS case. So removing it from `GenerateServiceConfig`. This will be
consistent across languages. The gRFC
[PR](https://github.com/grpc/proposal/pull/346) has been updated.
2023-08-08 12:23:52 -07:00
Eugene Ostroukhov 18be986e3b
[XDS Interop] Move XdsStatsWatcher to a separate file. (#34000)
This will help with introducing test coverage as the logic becomes more
complex.
2023-08-07 19:26:30 -07:00
Mario Jones Vimal 1c0f5d32a0
[core/gpr] Move subprocess to gpr and add subprocess creation using execve (#33983)
Move subprocess util to gpr.
Add support for communication with the subprocess.
This is required to support authentication using an executable.
2023-08-07 12:53:00 -07:00
Vignesh Babu 0616c8b838
[xds] Regex fix in test (#33981) 2023-08-03 13:14:21 -07:00
Craig Tiller 5325b65d84
Revert "[core/gpr] move subprocess to gpr" (#33972)
Reverts grpc/grpc#33870 - since it breaks memory usage tooling.
2023-08-02 20:40:12 -07:00
Yash Tibrewal 7e63a2f382
[GSM] Some initial structure (#33952)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-02 16:23:01 -07:00
Mario Jones Vimal f10a8e3418
[core/gpr] move subprocess to gpr (#33870)
Move subprocess util to gpr.
Add support for communication with the subprocess.
This is required to support authentication using an executable.
2023-08-02 13:19:08 -07:00
Craig Tiller 91e7f223d3
[server] Remove `Notification` from shutdown path (#33953)
I'm fairly certain that this path should be non-blocking (and making it
so makes the promise based code far more tractable).

This moves the blocking behavior into the blocking server_cc.cc function
that calls `grpc_server_shutdown_and_notify` instead of in that
non-blocking function.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-08-02 09:53:45 -07:00
Yash Tibrewal 860167a7d0
[OTel] Add target on client-rpc metrics, and authority on server-rpc metrics (#33946) 2023-08-01 16:37:31 -07:00
Yijie Ma 7f332ef69d
[Deps] Update pyyaml to 6.0.1 for bazel build system (#33932)
The previous version (`3.12`) is 7 years old and does not support the
newest Python 3 versions. This causes issues to move certain test
targets (which depends on `pyyaml`) to Python 3 when some CI environment
(e.g. `arm64v8/debian:11`) does not have Python 2 installed. And in
general, we should move away from Python 2. Thus, updated `pyyaml` to
the latest version.

This hopefully should also fix the
`prod:grpc/core/master/linux/arm64/grpc_bazel_test_c_cpp` job breakage.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-08-01 15:34:42 -07:00
apolcyn e923706d6f
[c-ares DNS resolver] Revert "Revert "[c-ares DNS resolver] Fix file descriptor use-after-close bug when c-ares writes succeed but subsequent read fails" (#33934)" (#33942)
Rolls forward https://github.com/grpc/grpc/pull/33871

Second and third commits here fix internal build issues

In particular, add a `// IWYU pragma: no_include <ares_build.h>` since
`ares.h` [includes that
anyways](bad62225b7/include/ares.h (L23))
(and seems unlikely for that to change since it would be breaking)
2023-08-01 14:45:45 -07:00
Alisha Nanda f7fc3fbed4
[tracing] Add annotation with metadata sizes and limits (#33910)
Only create annotation when call is sampled for cost reasons.

---------

Co-authored-by: ananda1066 <ananda1066@users.noreply.github.com>
2023-08-01 11:06:14 -07:00
Alisha Nanda 9aca06d38a
Revert "[c-ares DNS resolver] Fix file descriptor use-after-close bug when c-ares writes succeed but subsequent read fails" (#33934)
Reverts grpc/grpc#33871 due to build failures in google3.

Co-authored-by: Yijie Ma <yijiem@google.com>
2023-07-31 17:48:41 -07:00