Commit Graph

6446 Commits

Author SHA1 Message Date
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
apolcyn 76203ba589
[c-ares DNS resolver] Fix file descriptor use-after-close bug when c-ares writes succeed but subsequent read fails (#33871)
Normally, c-ares related fds are destroyed after all DNS resolution is
finished in [this code
path](c82d31677a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc (L210)).
Also there are some fds that c-ares may fail to open or write to
initially, and c-ares will close them internally before grpc ever knows
about them.

But if:
1) c-ares opens a socket and successfully writes a request on it
2) then a subsequent read fails

Then c-ares will close the fd in [this code
path](bad62225b7/src/lib/ares_process.c (L740)),
but gRPC will have a reference on the fd and will still use it
afterwards.

Fix here is to leverage the c-ares socket-override API to properly track
fd ownership between c-ares and grpc.

Related: internal issue b/292203138
2023-07-31 12:25:38 -07:00
Yash Tibrewal 9ea30fa9fd
[OTel] Add an OpenTelemetryPluginBuilder (#33895)
<!--

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-07-27 14:05:19 -07:00
Yijie Ma 2bb9aea332
[CI breakage] Fix health_check.py permission (#33815)
<!--

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-07-21 15:28:54 -07:00
Yijie Ma a7bf07e86a
[EventEngine] PosixEventEngine DNS Resolver (#32701)
This PR implements a c-ares based DNS resolver for EventEngine with the
reference from the original
[grpc_ares_wrapper.h](../blob/master/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h).
The PosixEventEngine DNSResolver is implemented on top of that. Tests
which use the client channel resolver API
([resolver.h](../blob/master/src/core/lib/resolver/resolver.h#L54)) are
ported, namely the
[resolver_component_test.cc](../blob/master/test/cpp/naming/resolver_component_test.cc)
and the
[cancel_ares_query_test.cc](../blob/master/test/cpp/naming/cancel_ares_query_test.cc).
The WindowsEventEngine DNSResolver will use the same EventEngine's
grpc_ares_wrapper and will be worked on next.

The
[resolve_address_test.cc](https://github.com/grpc/grpc/blob/master/test/core/iomgr/resolve_address_test.cc)
which uses the iomgr
[DNSResolver](../blob/master/src/core/lib/iomgr/resolve_address.h#L44)
API has been ported to EventEngine's dns_test.cc. That leaves only 2
tests which use iomgr's API, notably the
[dns_resolver_cooldown_test.cc](../blob/master/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc)
and the
[goaway_server_test.cc](../blob/master/test/core/end2end/goaway_server_test.cc)
which probably need to be restructured to use EventEngine DNSResolver
(for one thing they override the original grpc_ares_wrapper's free
functions). I will try to tackle these in the next step.
<!--

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-07-21 13:24:16 -07:00
Craig Tiller 801f106992
[promises] Add logging_test to promise_based_server_call testing (#33774) 2023-07-20 12:54:26 -07:00
Mark D. Roth 38da78e416
[test] delete client_channel_stress_test (#33763)
This test has been disabled for a long time now due to flakiness, but
it's now causing problems with the import. And stress tests don't
provide positive ROI anyway, so let's just get rid of it.
2023-07-19 17:32:10 -07:00
Vignesh Babu 67f4e4e4c2
[resource quota] Reduce stress test size to prevent OOMs (#33776) 2023-07-19 16:41:19 -07:00
Yash Tibrewal d2f37b8b45
[OTel] Basic C++ OTel Stats Functionality (#33650)
Note that the plugin is still under `grpc::internal` namespace and not
under `experimental` intentionally.

<!--

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-07-17 09:30:47 -07:00
Mark D. Roth 083bbee480
[LB policies] revert changes for dualstack design (#33718)
This reverts the following PRs: #32692 #33087 #33093 #33427 #33568

These changes seem to have introduced some flaky crashes. Reverting
while I investigate.
2023-07-14 15:59:42 -07:00
Mark D. Roth ec39600872
[WRR] fix bugs that caused us to re-enter blackout period upon updates (#33694)
As per gRFC A58, when WRR sees a subchannel report READY, it reset the
non_empty_since value, thus restarting the blackout period. However,
there were two cases where we were incorrectly triggering this code:
1. When WRR got an updated address list that contained addresses that
were already present on the old list and whose subchannels were already
in READY state, the initial notification for those subchannels on the
new list was READY, which incorrectly triggered resetting the
non_empty_since value.
2. Due to a bug in the outlier_detection policy, whenever an update was
propagated down through the OD policy without actually enabling OD, it
would incorrectly send a duplicate connectivity state notification for
the subchannels. This meant that a subchannel that was already in state
READY would report READY again, which would also incorrectly trigger
resetting the non_empty_since value.

This PR makes two changes:
1. Fix the bug in outlier_detection that caused it to generate the
spurious duplicate READY updates.
2. Fix WRR to reset the non_empty_since value when a subchannel goes
READY only if the subchannel has seen a previous state update and only
if that previous state was not READY. (The duplicate READY notifications
should not actually happen anymore now that the OD policy has been
fixed, but better to be defensive.)

Fixes b/290983884.
2023-07-13 15:35:17 -07:00
Craig Tiller af257b8a39
[hpack] Fix benchmarking timeout (#33675)
Disable uninteresting sanitizers for this benchmark
2023-07-12 16:22:04 -07:00
Craig Tiller b7077f4bbf
[hpack] Rollforward huffman read optimization (#33657)
Rollforward in first commit, fixes in subsequent.
2023-07-11 15:26:54 -07:00
Craig Tiller 57c697d8ae
Revert "[hpack] Huffman read optimization" (#33655)
Reverts grpc/grpc#33269
2023-07-11 12:58:49 -07:00
Craig Tiller 4ce51fe45d
[hpack] Huffman read optimization (#33269)
In real services most of our time ends up in the `Read1()` function,
which populates one byte into the bit buffer.
Change this to read in as many as possible bytes at a time into that
buffer.

Additionally, generate all possible (to some depth) parser geometries,
and add a benchmark for them. Run that benchmark and select the best
geometry for decoding base64 strings (since this is the main use-case).

(gives about a 30% speed boost parsing base64 then huffman encoded
random binary strings)

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-11 08:41:15 -07:00
Eugene Ostroukhov e0bc8a2c85
[xDS LB] xDS pick first support (#33540) 2023-06-30 14:06:08 -07:00
Mark D. Roth 51e54ed636
[outlier detection] remove support for ejection via raw connectivity state (#33427)
More work on the dualstack backend design:
- Now that all petiole policies have been changed to delegate to
pick_first, outlier detection no longer needs to eject via the
subchannel's raw connectivity state; it can now eject only via the
health state. See #33340.
- This also removes the now-unnecessary hack to explicitly disable
outlier detection in pick_first. See #33336.
2023-06-28 08:44:04 -07:00
Mark D. Roth f09357ccb4
[ring hash] delegate to pick_first instead of creating subchannels directly (#33093)
More work on the dualstack backend design:
- Change ring_hash policy to delegate to pick_first instead of creating
subchannels directly.
- Note that, as mentioned in the WIP gRFC, because we lazily create the
pick_first child policies, so there's no need to swap over to a new list
as an atomic whole. As a result, we don't use the endpoint_list library
in this policy; instead, we just update a map in-place.
- Remove now-unused subchannel_list library.
2023-06-28 06:49:53 -07:00
Yash Tibrewal 98417f3bd0
Revert "Revert "[otel] Add bazel dependency"" (#33560)
Reverts grpc/grpc#33559
2023-06-27 12:28:47 -07:00
Mark D. Roth 017153a0c5
Revert "[otel] Add bazel dependency" (#33559)
Reverts grpc/grpc#33548
2023-06-27 10:34:45 -07:00
Mark D. Roth 27a778fece
[round robin] delegate to pick_first instead of creating subchannels directly (#32692)
More work on the dualstack backend design:
- Change round_robin to delegate to pick_first instead of creating
subchannels directly.
- Change pick_first such that when it is the child of a petiole policy,
it will unconditionally start a health watch.
- Change the client-side health checking code such that if client-side
health checking is not enabled, it will return the subchannel's raw
connectivity state.
- As part of this, we introduce a new endpoint_list library to be used
by petiole policies, which is intended to replace the existing
subchannel_list library. The only policy that will still directly
interact with subchannels is pick_first, so the relevant parts of the
subchannel_list functionality have been copied directly into that
policy. The subchannel_list library will be removed after all petiole
policies are updated to delegate to pick_first.
2023-06-27 09:54:12 -07:00
Yash Tibrewal 875b7fdcff
[otel] Add bazel dependency (#33548)
Add bazel dependency on opentelemetry-cpp.
<!--

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-06-27 00:47:01 -07:00
Esun Kim 16a11fadff
[Test] Explicitly cast `enum class` to `int` before passing it with a format string (#33554)
Corresponding internal cl/542804880

> Explicitly cast `enum class` to `int` before passing it with a format
string.
> 
> Next version of the crosstool will start warning about this (see:
>
[https://github.com/llvm/llvm-project/issues/38717](https://www.google.com/url?sa=D&q=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-project%2Fissues%2F38717))
2023-06-26 23:18:09 -07:00
Mark D. Roth 8427bacaea
[resolver API] remove address attribute interface (#33514)
The address attribute interface was intended to provide a mechanism to
pass attributes separately from channel args, for values that do not
affect subchannel behavior and therefore do not need to be present in
the subchannel key, which does include channel args. However, the
mechanism as currently designed is fairly clunky and is probably not the
direction we will want to go in the long term.

Eventually, we will want some mechanism for registering channel args,
which would provide a cleaner way to indicate that a given channel arg
should not be used in the subchannel key, so that we don't need a
completely different mechanism. For now, this PR is just doing an
interim step, which is to establish a special channel arg key prefix to
indicate that an arg is not needed in the subchannel key.
2023-06-26 10:02:06 -07:00
Eugene Ostroukhov fc4736c1ad
[interop] Fix crash in pick_first LB policy (#33519)
Fixes http://b/288420022
2023-06-22 16:29:15 -07:00
Yash Tibrewal 441ff0e757
[logging] Add tests for cases where we don't send any metadata and improve debuggability (#33486)
<!--

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-06-21 14:48:23 -07:00
Vignesh Babu cd4ff81b3f
Revert "Revert "[resource quota] Fix bugs in iomgr and event engine endpoint interactions with resource quota"" (#33499)
Reverts grpc/grpc#33417

Deadlock
https://fusion2.corp.google.com/invocations/99834386-79ff-4707-86eb-52e604774ea9/details
fixed in the c9a1bdc3dc commit.
2023-06-21 09:36:44 -07:00
Eugene Ostroukhov d55431995c
[interop] Implement "hostname" for RPC behavior (#33446)
This enables outlier detection test. See #33135
2023-06-16 11:14:01 -07:00
Mark D. Roth d20e8d141b
[LB policies] add delegating helper classes (#33445)
This eliminates the need to modify every parent policy whenever we add
new helper methods. It should also eliminate some binary bloat.
2023-06-15 08:08:47 -07:00
Eugene Ostroukhov 6451beba8e
Revert "Revert "Revert "Revert "[xDS LB] Override cluster with value … (#33424)
Previous attempt: #33416

This reverts commit 19460ea82f.
2023-06-14 13:42:59 -07:00
Mark D. Roth f34a39af74
[xDS e2e tests] add 1K RPCs to try to work around statistical problem (#33409) 2023-06-14 10:58:15 -07:00
Craig Tiller 80dbe90c18
Revert "[resource quota] Fix bugs in iomgr and event engine endpoint interactions with resource quota" (#33417)
Reverts grpc/grpc#33375

Breaks import
2023-06-13 08:11:53 -07:00
Craig Tiller 19460ea82f
Revert "Revert "Revert "[xDS LB] Override cluster with value from cookie"" (#33379)" (#33416)
Reverts grpc/grpc#33388

Breaks import
2023-06-13 07:23:46 -07:00
Vignesh Babu e6c1b13aed
[resource quota] Fix bugs in iomgr and event engine endpoint interactions with resource quota (#33375)
The following bugs are fixed:

* Missing ExecCtx in event engine endpoints and listeners
* Ref counting issue with iomgr endpoint which causes crashes in
overloaded situations

The PR includes a test which triggers these bugs by simulating an
overloaded system.
2023-06-12 16:20:08 -07:00
Eugene Ostroukhov 57bb6fb65c
Revert "Revert "[xDS LB] Override cluster with value from cookie"" (#33388)
Reapplying #32973
2023-06-12 16:12:17 -07:00
Sergii Tkachenko de6ed9ba9f
[Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
Eugene Ostroukhov 6f685274a1
Revert "[xDS LB] Override cluster with value from cookie (#32973)" (#33379)
This reverts #32973 that causes breakages in internal CI.
2023-06-08 16:50:47 -07:00
Eugene Ostroukhov 8fe3472e53
[xDS LB] Override cluster with value from cookie (#32973) 2023-06-08 13:52:13 -07:00
Yousuk Seung c03cd744b2
[WRR] Prefer application_utilization to cpu_utilization (#33355)
<!--

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-06-07 17:38:29 -07:00
Mark D. Roth 6b4a1e4243
[outlier detection] hack to prevent OD from working with pick_first (#33336)
As per discussion in #32967.
2023-06-05 10:59:40 -07:00
apolcyn 889412c416
[Rls] de-experimentalize RLS in XDS (#33290)
Integration tests are passing, so we should be ready to
de-experimentalize.

Related: internal bug b/265209578
2023-06-02 12:26:45 -07:00
Eugene Ostroukhov 0980076bb9
[interop] fix C++ server to add mutex for orca_oob test (#33278)
Following improvements were made to `orca_oob` interop test to increase
compatibility and stability:

1. Timeout was increased to 10s (see #33098)
2. Server will block clients trying to run this test concurrently.
3. Data is cleared in the beginning of the call.
2023-05-31 20:07:51 -07:00
Luwei Ge d1c0dc58cc
[Audit Logging] xDS e2e test for audit logging. (#33252)
Added tests involve:
1. Checking the # of logger invocations with multiple RBACs in the
chain.
2. Verifying content in audit context with action and audit condition
permutations.
3. Confirm custom logger and built-in logger configurations are working.
4. Confirm the feature is protected by the environment variable.

---------

Co-authored-by: rockspore <rockspore@users.noreply.github.com>
2023-05-26 12:43:37 -07:00
Mark D. Roth 52d687ad42
[xDS] second attempt: clean up cert provider factory and registry APIs (#33249)
Original was #33226, reverted in #33248.
2023-05-25 12:59:21 -07:00
Craig Tiller 9faa39d88b
Revert "[xDS] clean up cert provider factory and registry APIs" (#33248)
Reverts grpc/grpc#33226

(looks to be creating some import problems)
2023-05-25 09:56:01 -07:00
Mark D. Roth eb2b1edd1c
[xDS] clean up cert provider factory and registry APIs (#33226)
- switch to json_object_loader for config parsing
- use `absl::string_view` instead of `const char*` for cert provider
names
- change cert provider registry to use a map instead of a vector
- remove unused mesh_ca cert provider factory
2023-05-24 15:38:39 -07:00
Luwei Ge de9d398e8f
[Audit Logging] End2end test for audit logging in authorization policy (#33196)
I generated a new client key and cert where a Spiffe ID is added as the
URI SAN. As such, we are able to test the audit log contains the
principal correctly.

Update: I switched to use the test logger to verify the log content and
removed stdout logger here because one the failure of [RBE Windows Debug
C/C++](https://source.cloud.google.com/results/invocations/c3187f41-bb1f-44b3-b2b1-23f38e47386d).

Update again: Refactored the test logger in a util such that the authz
engine test also uses the same logger. Subsequently, xDS e2e test will
also use it.

---------

Co-authored-by: rockspore <rockspore@users.noreply.github.com>
2023-05-24 14:09:32 -07:00
Hannah Shi 988c85535d
[ObjC] Upgrade podspec xx.deployment_target (#33091)
Upgrade apple platform deployment_target versions to fix the cocoapods
push of BoringSSL-GRPC about the following error:
```
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
ref: https://developer.apple.com/forums/thread/725300

This also aligns with the versions required by
[protobuf](https://github.com/protocolbuffers/protobuf/pull/10652)

```
ios.deployment_target = '10.0'
osx.deployment_target = '10.12'
tvos.deployment_target = '12.0'
watchos.deployment_target = '6.0'
```
2023-05-20 20:38:24 +00:00
Mark D. Roth a78001a087
[resolver] remove unused ctor for ServerAddress (#33148)
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-05-16 16:53:01 -07:00
AJ Heller 252ebad341
[infra] Fix absl::Mutex check and remove all uses (#33144)
`tools/run_tests/sanity/check_absl_mutex.sh` was broken, a missing paren
crashed the script if run locally. It's unclear yet how our sanity
checks were not complaining about this, `run_tests.py` does not save the
log.
2023-05-16 12:50:52 -07:00
Mark D. Roth 8fdfb22848
[JSON] generalize handling of RefCountedPtr<> (#33048)
Also remove a check in the weighted_target LB policy that I somehow
missed in #32932.
2023-05-11 13:49:59 -07:00
Yash Tibrewal 1b01336504
[Logging] Fix flakiness in test (#33077)
Change - just make sure that before we verify the logging entries, we'll
wait for the expected number of entries to show up.

Logging_test has been recently reported as flaky. Sample failure -
https://source.cloud.google.com/results/invocations/ba581ad8-b652-4b9d-af56-07593f5d2deb/targets/%2F%2Ftest%2Fcpp%2Fext%2Ffilters%2Flogging:logging_test@poller%3Depoll1/tests

Failed to reproduce, but i have a suspicion that what's happening is
that the logging for the half-close events on the server side can happen
after the call has ended.. It is currently being logged after the
server-trailer (which has the status).
2023-05-11 11:15:47 -07:00
Mark D. Roth 1432fe4e4c
[JSON] make API public but experimental (#32987)
This makes the JSON API visible as part of the C-core API, but in the
`experimental` namespace. It will be used as part of various
experimental APIs that we will be introducing in the near future, such
as the audit logging API.
2023-05-09 08:05:24 -07:00
AJ Heller 3fb738b9b1
[EventEngine] Implement work-stealing in the EventEngine ThreadPool (#32869)
This PR implements a work-stealing thread pool for use inside
EventEngine implementations. Because of historical risks here, I've
guarded the new implementation behind an experiment flag:
`GRPC_EXPERIMENTS=work_stealing`. Current default behavior is the
original thread pool implementation.

Benchmarks look very promising:

```
bazel test \
--test_timeout=300 \
--config=opt -c opt \
--test_output=streamed \
--test_arg='--benchmark_format=csv' \
--test_arg='--benchmark_min_time=0.15' \
--test_arg='--benchmark_filter=_FanOut' \
--test_arg='--benchmark_repetitions=15' \
--test_arg='--benchmark_report_aggregates_only=true' \
test/cpp/microbenchmarks:bm_thread_pool
```

2023-05-04: `bm_thread_pool` benchmark results on my local machine (64
core ThreadRipper PRO 3995WX, 256GB memory), comparing this PR to
master:


![image](https://user-images.githubusercontent.com/295906/236315252-35ed237e-7626-486c-acfa-71a36f783d22.png)

2023-05-04: `bm_thread_pool` benchmark results in the Linux RBE
environment (unsure of machine configuration, likely small), comparing
this PR to master.


![image](https://user-images.githubusercontent.com/295906/236317164-2c5acbeb-fdac-4737-9b2d-4df9c41cb825.png)

---------

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-05-08 13:38:23 -07:00
Mark D. Roth 1fcaccdf5f
[client channel] Second attempt: use ChunkedVector for call attributes (#33015)
Original was #33002, reverted in #33014.

The second commit here adds a build visibility tag necessary to fix the
internal build problems.
2023-05-04 15:11:07 -07:00
AJ Heller 18aab6ffb5
Revert "[client channel] use ChunkedVector for call attributes" (#33014)
Reverts grpc/grpc#33002. Breaks internal builds:
`.../privacy_context:filters does not depend on a module exporting
'.../src/core/lib/channel/context.h'`
2023-05-04 10:55:21 -07:00
Mark D. Roth 2f89fd5528
[client channel] use ChunkedVector for call attributes (#33002)
Change call attributes to be stored in a `ChunkedVector` instead of
`std::map<>`, so that the storage can be allocated on the arena. This
means that we're now doing a linear search instead of a map lookup, but
the total number of attributes is expected to be low enough that that
should be okay.

Also, we now hide the actual data structure inside of the
`ServiceConfigCallData` object, which required some changes to the
`ConfigSelector` API. Previously, the `ConfigSelector` would return a
`CallConfig` struct, and the client channel would then use the data in
that struct to populate the `ServiceConfigCallData`. This PR changes
that such that the client channel creates the `ServiceConfigCallData`
before invoking the `ConfigSelector`, and it passes the
`ServiceConfigCallData` into the `ConfigSelector` so that the
`ConfigSelector` can populate it directly.
2023-05-04 08:33:51 -07:00
Craig Tiller 65a2a895af
[chttp2] Fix some fuzzer found bugs. (#33005)
<!--

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-05-03 18:18:10 -07:00
Mark D. Roth 844e740183
[JSON] Replace ctors with factory methods (#32834) 2023-05-02 09:22:42 -07:00
Yousuk Seung 8b02295e58
[xDS] Accept cpu_utilization over 100% (#32954)
<!--

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-05-02 03:25:17 +00:00
Mark D. Roth 020e9b4dd6
[WRR] Remove env var guard for WRR policy (#32936)
- remove the `_experimental` suffix from the gRPC policy name
- remove the env var guard for the xDS policy config
2023-04-26 09:40:22 -07:00
apolcyn 017d9943ef
[XDS] Revert "Revert "XDS: enable XDS federation by default (#32711)" (#32814) (#32902)
Previous lack-of-load-reporting issue has been fixed (b/276944116)
2023-04-20 08:00:10 -07:00
Esun Kim c523bdac1e
[C++] Added a cord support to gRPC protobuf serializer (#32617)
As Protobuf is going to support Cord to reduce memory copy when
[de]serializing Cord fields, gRPC is going to leverage it. This
implementation is based on the internal one but it's slightly modified
to use the public APIs of Cord. only
2023-04-19 08:55:25 -07:00
Eugene Ostroukhov e59a3e25ca
[xds] Remove variable protection from custom LB policies (#32888) 2023-04-18 15:53:41 -07:00
Yash Tibrewal e49cfd494c
[GCP Observability C++] Add empty config test (#32790)
<!--

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-04-14 16:42:47 -07:00
Mark D. Roth 26df3d14e2
[XDS] fix federation bug that prevented load reports from being sent (#32826)
This bug occurred when the same xDS server was configured twice in the
same bootstrap config, once in an authority and again as the top-level
server. In that case, we were incorrectly failing to de-dup them and
were creating a separate channel for the LRS stream than the one that
already existed for the ADS stream. We fix this by canonicalizing the
server keys the same way in both cases.

As a separate follow-up item, I will work on trying to find a better way
to key these maps that does not suffer from this kind of fragility.
2023-04-14 14:31:12 -07:00
Yash Tibrewal 4a1bf8778b
[OpenCensus Test] Don't depend on compression algorithm (#32863)
We shouldn't depend on how much the compression algorithm compresses the
bytes to. This is causing flakiness internally.

<!--

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-04-14 00:37:07 +00:00
AJ Heller 8f6ae3599f
[revert] Revert "Revert "[EventEngine] Implement the EventEngine-driven client channel resolver" (#32768)" (#32772)
This is a clean, OSS-only revert of
https://github.com/grpc/grpc/pull/32632, but depends on
https://github.com/grpc/grpc/pull/32771 landing first, which requires a
cherrypick.
2023-04-12 16:30:01 -07:00
AJ Heller c268ac2c25
[revert] Revert "Revert "[gprpp] Add ValidationErrors::message retrieval" (#32767)". (#32771)
This reverts commit 4f444aaabf, which
needed a cherrypick.
2023-04-10 13:11:53 -07:00
Mark D. Roth 9393cd887c
[JSON] remove mutable accessor methods. (#32806)
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-04-06 13:37:42 -07:00
Craig Tiller 63c094cf5b
[promises] Run C++ end to end tests with server promises (#32537)
Expand server promises to run with C++ end2end tests.

Across connected_channel/call/batch_builder/pipe/transport:
- fix a bug where read errors weren't propagated from transport to call
so that we can populate failed_before_recv_message for the c++ bindings
- ensure those errors are not, however, used to populate the returned
call status

Add a new latch call arg to lazily propagate the bound CQ for a server
call (and client call, but here it's used degenerately - it's always
populated). This allows server calls to be properly bound to
pollsets.(1)/(2)

In call.cc:
- move some profiling code from FilterStackCall to Call, and then use it
in PromiseBasedCall (this should be cleaned up with tracing work)
- implement GetServerAuthority

In server.cc:
- use an RAII pattern on `MatchResult` to avoid a bug whereby a tag
could be dropped if we cancel a request after it's been matched but
before it's published
- fix deadline export to ServerContext

In resource_quota_server.cc:
- fix some long standing flakes (that were finally obvious with the new
test code) - it's legal here to have client calls not arrive at the
server due to resource starvation, work through that (includes adding
expectations during a `Step` call, which required some small tweaks to
cq_verifier)

In the C++ end2end_test.cc:
- strengthen a flaky test so it passes consistently (it's likely we'll
revisit this with the fuzzing efforts to strengthen it into an actually
robust test)

(1) It's time to remove this concept
(2) Surprisingly the only test that *reliably* demonstrates this not
being done is time_change_test

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-04-06 12:32:23 -07:00
Stanley Cheung 2845a248d6
[GcpObservability] Remove sleep from observability test client (#32817)
.. as it is now part of the `GcpObservabilityClose()` routine
[itself](https://github.com/grpc/grpc/pull/32715/files#diff-e1ce0ccb4650e20b62a6d6b31655f446ad9ef72efca5849143e65f4a5a5e0310R223).

Background: #32715 may have broken the CI for observability interop
testing. The client seems to be taking too long to finish. More info at
b/277145074

We need to backport this to the `v1.54.x` branch if this is the right
fix.
2023-04-06 05:25:22 +00:00
apolcyn b0636e7a23
Revert "XDS: enable XDS federation by default (#32711)" (#32814)
This reverts commit 4b46dbc19e.

Reason: this seems to be breaking load reports in certain cases,
b/276944116

Let's revert so this doesn't accidentally get released.
2023-04-05 17:34:23 -07:00
Yash Tibrewal bdd1ac4d1d
[GcpObservability C++] De-experimentalize API (#32715)
This PR aims to de-experimentalize the APIs for GCP Observability. 

We would have ideally wanted public feedback before declaring the APIs
stable, but we need stable APIs for GA.

Changes made after API review with @markdroth @veblush, @ctiller and the
entire Core/C++ team -
* The old experimental APIs `grpc::experimental::GcpObservabilityInit`
and `grpc::experimental::GcpObservabilityClose` are now deprecated and
will be deleted after v.1.55 release.
* The new API gets rid of the Close method and follows the RAII idiom
with a single `grpc::GcpObservability::Init()` call that returns an
`GcpObservability` object, the lifetime of which controls when
observability data is flushed.
* The `GcpObservability` class could in the future add more methods. For
example, a debug method that shows the current configuration.
* Document that GcpObservability initialization and flushing (on
`GcpObservability` destruction) are blocking calls.
* Document that gRPC is still usable if GcpObservability initialization
failed. (Added a test to prove the same).
* Since we don't have a good way to flush stats and tracing with
OpenCensus, the examples required users to sleep for 25 seconds. This
sleep is now part of `GcpObservability` destruction.

Additional Implementation details -
* `GcpObservability::Init` is now marked with `GRPC_MUST_USE_RESULT` to
make sure that the results are used. We ideally want users to store it,
but this is better than nothing.
* Added a note on GCP Observability lifetime guarantees.

<!--

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-04-05 21:45:21 +00:00
Eugene Ostroukhov be99673d06
[PSM interop test] implement error-code- RPC behavior (#32810)
This reverts commit 47ea5062cb.
2023-04-05 11:56:50 -07:00
Craig Tiller 724441d85b
[tests] Convert core e2e tests to gtest (#32603)
Notes:
- `+trace` fixtures haven't run since 2016, so they're disabled for now
(7ad2d0b463 (diff-780fce7267c34170c1d0ea15cc9f65a7f4b79fefe955d185c44e8b3251cf9e38R76))
- all current fixtures define `FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER`
and hence `authority_not_supported` has not been run in years - deleted
- bad_hostname similarly hasn't been triggered in a long while, so
deleted
- load_reporting_hook has never been enabled, so deleted
(f23fb4cf31/test/core/end2end/generate_tests.bzl (L145-L148))
- filter_latency & filter_status_code rely on global variables and so
don't convert particularly cleanly - and their value seems marginal, so
deleted

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-04-03 22:19:57 -07:00
Craig Tiller 47ea5062cb
Revert "[xds interop tests] implement error-code- RPC behavior" (#32769)
Reverts grpc/grpc#32765
2023-03-31 22:16:48 -07:00
Craig Tiller 4f444aaabf
Revert "[gprpp] Add ValidationErrors::message retrieval" (#32767)
Reverts grpc/grpc#32761
2023-03-31 21:42:58 -07:00
Craig Tiller b5a2e90fbf
Revert "[EventEngine] Implement the EventEngine-driven client channel resolver." (#32768)
Reverts grpc/grpc#32632

Needs to be rolled back for #32767 to land
2023-03-31 21:31:27 -07:00
BrandonY bc6a2ee918
[RLS] Change case of RLS 'x-google-rls-data' header to lowercase. (#32760)
"X-Google-RLS-Data" does not work as gRPC metadata key.
2023-03-31 17:09:38 -07:00
Eugene Ostroukhov 50fce40409
[PSM Interop] Add custom_lb test client (#32757) 2023-03-31 14:03:44 -07:00
Eugene Ostroukhov a4af6250d8
[xds interop tests] implement error-code- RPC behavior (#32765)
Implements handling for the `error-code-xx` `rcp-behavior` header.
Compare to similar implementation in
[java-server](42b4c61d5e/interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java (L379))
2023-03-31 13:58:43 -07:00
AJ Heller 7dec55de5a
[EventEngine] Implement the EventEngine-driven client channel resolver. (#32632)
This PR also centralizes the client channel resolver selection. Resolver
selection is still done using the plugin system, but when the Ares and
native client channel resolvers go away, we can consider bootstrapping
this differently.
2023-03-31 13:52:06 -07:00
AJ Heller b94d55bd20
[gprpp] Add ValidationErrors::message retrieval (#32761)
For cases where an absl::Status is unnecessary.
2023-03-31 11:56:06 -07:00
Mark D. Roth 36d2716d52
[JSON] move Parse() and Dump() methods out of JSON object (#32742)
More prep for making this a public API.
2023-03-30 13:30:54 -07:00
Mark D. Roth 656e5f283b
[JSON] use updated style for enum values (#32741)
More preparation for making this a public API.
2023-03-30 09:39:07 -07:00
Yousuk Seung c02b3e695c
xDS: Include orca named_metrics in LRS load reports (#32690)
<!--

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-03-28 12:04:01 -07:00
apolcyn 4b46dbc19e
XDS: enable XDS federation by default (#32711)
Integration tests have been green so let's enable this (verification of
test results in https://b.corp.google.com/issues/262593165#comment30).
2023-03-28 09:55:35 -07:00
Craig Tiller 175ccc3a90
Reland global config changes (#32661)
<!--

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: ctiller <ctiller@users.noreply.github.com>
2023-03-27 18:55:24 -07:00
Craig Tiller a363b6c001
[fuzzing] Implement endpoints for FuzzingEventEngine (#32689)
Implement listeners, connection, endpoints for `FuzzingEventEngine`.
Allows the fuzzer to select write sizes and delays, connection delays,
and port assignments.

I made a few modifications to the test suite to admit this event engine
to pass the client & server tests:
1. the test factories return shared_ptr<> to admit us to return the same
event engine for both the oracle and the implementation - necessary
because FuzzingEventEngine forms a closed world of addresses & ports.
2. removed the WaitForSingleOwner calls - these seem unnecessary, and we
don't ask our users to do this - tested existing linux tests 1000x
across debug, asan, tsan with this change

Additionally, the event engine overrides the global port picker logic so
that port assignments are made by the fuzzer too.

This PR is a step along a longer journey, and has some outstanding
brethren PR's, and some follow-up work:
* #32603 will convert all the core e2e tests into a more malleable form
* we'll then use #32667 to turn all of these into fuzzers
* finally we'll integrate this into that work and turn all core e2e
tests into fuzzers over timer & callback reorderings and io
size/spacings

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-03-27 17:43:47 -07:00
Yousuk Seung 16c03db9ac
Revert "Revert "WRR: Support EPS" (#32723)" (#32725)
This reverts commit 7bd9267f32.




<!--

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-03-27 16:49:50 -07:00
Alisha Nanda 19d06a78ec
Add random early rejection for metadata (#32600)
(hopefully last try)

Add new channel arg GRPC_ARG_ABSOLUTE_MAX_METADATA_SIZE as hard limit
for metadata. Change GRPC_ARG_MAX_METADATA_SIZE to be a soft limit.
Behavior is as follows:

Hard limit
(1) if hard limit is explicitly set, this will be used.
(2) if hard limit is not explicitly set, maximum of default and soft
limit * 1.25 (if soft limit is set) will be used.

Soft limit
(1) if soft limit is explicitly set, this will be used.
(2) if soft limit is not explicitly set, maximum of default and hard
limit * 0.8 (if hard limit is set) will be used.

Requests between soft and hard limit will be rejected randomly, requests
above hard limit will be rejected.
2023-03-27 14:13:20 -07:00
Craig Tiller 8d2f70d53c
Reland "[promises] Convert call to a party" (#32651)" (#32653)
<!--

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: ctiller <ctiller@users.noreply.github.com>
2023-03-27 14:02:36 -07:00
Esun Kim 7bd9267f32
Revert "WRR: Support EPS" (#32723)
Reverts grpc/grpc#32657
2023-03-27 11:53:17 -07:00
Yousuk Seung 4429066516
WRR: Support EPS (#32657)
<!--

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-03-24 16:23:51 -07:00
Eugene Ostroukhov 0fb7fbf7f0
[testing] Do not pass metric recorder to EnableCallMetricRecording (#32708) 2023-03-24 12:13:44 -07:00
Yash Tibrewal fcff4bd1d0
Gcp Observability Logging: The Call ID should use a UUIDv4 format (#32699)
Earlier, we were simply using a 64 bit random number, but the spec
actually calls for UUIDv4.

<!--

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-03-23 19:07:13 -07:00
Gregory Cooke a4f345ff96
TlsCreds: Support revocation of intermediate in chain. (#32544)
This PR is a small code change with a lot of new test data.
[In OpenSSL, there are two flags that configure CRL checks. Coping
relevant
section:](https://www.openssl.org/docs/man1.0.2/man3/X509_VERIFY_PARAM_get_depth.html)

> - X509_V_FLAG_CRL_CHECK enables CRL checking for the certificate chain
leaf certificate. An error occurs if a suitable CRL cannot be found.
> - X509_V_FLAG_CRL_CHECK_ALL enables CRL checking for the entire
certificate chain.

We currently only set `X509_V_FLAG_CRL_CHECK`, so we will only ever
check if the leaf certificate is revoked. We should check the whole
chain. I am open to making this a user configuration if we want to do it
that way, but we certainly need to be able to check the whole chain.

So, this PR contains the small code change in
`ssl_transport_security.cc` to use the `X509_V_FLAG_CRL_CHECK_ALL` flag.
Then the rest of the changes are in tests. I've added all the necessary
files to have a chain built that looks as follows
`Root CA -> Revoked Intermediate CA -> Leaf Certificate`, and added a
test for this case as well.
You can verify that on master this new test will fail (i.e. the
handshake will succeed even though the intermediate CA is revoked) by
checking out this branch, running `git checkout master --
./src/core/tsi/ssl_transport_security.cc`, then running the test.

I also slightly reorganized test/core/tsi/test_creds/ so that the CRLs
are in their own directory, which is the way our API intends to accept
CRLs.
2023-03-23 11:34:59 -04:00
Yash Tibrewal 625b3544e7
writes_per_rpc_test: TSAN data race fix (#32688)
Fixing TSAN data races of the kind -
https://source.cloud.google.com/results/invocations/c3f02253-0d0b-44e6-917d-07e4bc0d3d62/targets/%2F%2Ftest%2Fcpp%2Fperformance:writes_per_rpc_test@poller%3Dpoll/log

I think the original issue was the non-atomic load in
writes_per_rpc_test.cc but also making the change to use barriers
instead of relaxed atomics (probably unimportant but I'll prefer safety
in the absence of otherwise comments).

Could probably also use std::atomic but feeling a bit lazy to make the
changes throughout.

<!--

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-03-22 19:15:25 -07:00
Yash Tibrewal 3eae5bc5a1
GcpObservability: Plumb tracing information to logs (#32643)
<!--

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-03-22 18:45:01 -07:00
Yash Tibrewal bf1a26cde8
GcpObservability: Add client api latency (#32645)
This PR adds the view `grpc.io/client/api_latency` for GCP Observability
which aims to collect the end-to-end time taken by a call.

Changes made to support this -
1) A global interceptor factory registration is created for stats
plugins.
2) OpenCensus plugin now provides a new interceptor that's responsible
for collecting the new latency.
3) Gcp Observability registers this plugin.
4) A new OpenCensus measurement and view is created for api latency.
Note that this is internal as of now, since it's not clear if it should
be exposed as public experimental API. Leaving that decision for the
future.

<!--

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-03-22 15:31:47 -07:00
Yash Tibrewal f04e1a9589
OpenCensus: Add annotations for messages (#32646)
This PR adds annotations to client attempt spans and server spans on
messages of the form -
* `Send message: 1026 bytes`
* `Send compressed message: 31 bytes` (if message was compressed)
* `Received message: 31 bytes`
* `Received decompressed message: 1026 bytes` (if message needed to be
decompressed)

Note that the compressed and decompressed annotations are not present if
compression/decompression was not performed.

<!--

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-03-22 13:41:05 -07:00
Jan Tattermusch 0c1797cd9f
Revert "[config] Move global config alongside core configuration" (#32659)
Reverts grpc/grpc#30788

(it breaks grpc_objc_bazel_test (see
https://github.com/grpc/grpc/pull/30788#issuecomment-1476372187) and
also seems to be breaking some other internal stuff).
2023-03-20 08:22:29 -07:00
Craig Tiller b7a83305e6
[config] Move global config alongside core configuration (#30788)
This is a big rewrite of global config.

It does a few things, all somewhat intertwined:
1. centralize the list of configuration we have to a yaml file that can
be parsed, and code generated from it
2. add an initialization and a reset stage so that config vars can be
centrally accessed very quickly without the need for caching them
3. makes the syntax more C++ like (less macros!)
4. (optionally) adds absl flags to the OSS build

This first round of changes is intended to keep the system where it is
without major changes. We pick up absl flags to match internal code and
remove one point of deviation - but importantly continue to read from
the environment variables. In doing so we don't force absl flags on our
customers - it's possible to configure grpc without the flags - but
instead allow users that do use absl flags to configure grpc using that
mechanism. Importantly this lets internal customers configure grpc the
same everywhere.

Future changes along this path will be two-fold:
1. Move documentation generation into the code generation step, so that
within the source of truth yaml file we can find all documentation and
data about a configuration knob - eliminating the chance of forgetting
to document something in all the right places.
2. Provide fuzzing over configurations. Currently most config variables
get stashed in static constants across the codebase. To fuzz over these
we'd need a way to reset those cached values between fuzzing rounds,
something that is terrifically difficult right now, but with these
changes should simply be a reset on `ConfigVars`.

<!--

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: ctiller <ctiller@users.noreply.github.com>
2023-03-17 16:56:45 -07:00
Yash Tibrewal 29ce6463d1
Revert "[promises] Convert call to a party" (#32651)
Reverts grpc/grpc#32359
2023-03-17 12:36:19 -07:00
Yousuk Seung 3cc76171a9
Merge per-request and per-server named metrics field-wise (#32634)
We currently take named metrics recorded per-request only. Instead we
should merge field-wise.

<!--

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-03-16 13:30:04 -07:00
Eugene Ostroukhov 65fa0f605a
[testing] Update orca-* tests for better compatibility (#32630)
1. Make channel creation lazy. This allows test cases to update the
configuration before the connection is made.
2. Pass load reports tracker when creating the policy. This way other
test cases do not see any changes to ChannelArguments.

Using grpc_core::CoreConfiguration::RunWithSpecialConfiguration was
considered but did not work as it removes other builders setup prior to
starting the test cases.
2023-03-16 12:54:59 -07:00
Eugene Ostroukhov a70fd8e5e2
[testing] Synchronize interop test protos. (#32631)
Fixes: issue #32628
2023-03-16 12:37:54 -07:00
Craig Tiller a9873e8357
[promises] Convert call to a party (#32359)
<!--

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: ctiller <ctiller@users.noreply.github.com>
2023-03-16 01:09:53 -07:00
Mark D. Roth a67a46e7a3
xds_cluster_e2e_test: fix test flake from #32571 (#32623) 2023-03-15 11:52:42 -07:00
Eugene Ostroukhov acec3a6975
[testing]: Add "orca_oob" test case (#32599) 2023-03-15 08:24:36 -07:00
Mike Kruskal b7e430174b
Fix unused variable warning (#32616) 2023-03-14 13:04:12 -07:00
Eugene Ostroukhov c62ecd5cb4
[testing]: Add "orca_per_rpc" test case (#32524) 2023-03-14 11:06:31 -07:00
Yash Tibrewal 6f960be41b
Gcp Observability: Make GcpObservabilityInit blocking (#32612)
<!--

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-03-13 15:08:45 -07:00
Yijie Ma ac7faf75ba
Fix a race on vptr for UnimplementedAsyncRequest (#32547)
It is reported in https://github.com/grpc/grpc/issues/32356 that there
is a race on vptr for `UnimplementedAsyncRequest` which would cause
crashes for multi-threaded server if clients send unimplemented RPC
request to the server.

The cause is that the server requests a call for
`UnimplementedAsyncRequest` in its base class `GenericAsyncRequest` when
the `vptr` still points to the base class's `vtable`. If the call went
in and another server thread picks up the tag before the `vptr` points
back to the derived class's `vtable`, it would call the wrong virtual
function and also this is a data race. This fix makes the request of the
call inside the derived class's constructor.

<!--

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-03-10 13:00:56 -08:00
Yousuk Seung 0003c320f4
xDS e2e tests: use ServerMetricRecorder (#32546)
<!--

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-03-10 10:29:50 -08:00
Mark D. Roth e81002cfda
xDS: fix crash when removing the last endpoint from the last locality in weighted_target (#32571)
Fixes #32486.
2023-03-10 09:22:53 -08:00
Gregory Cooke ca9e365002
Added verified_root_cert_subject pass up through cpp api (#32335)
PR #32215 added the verified root cert subject to the lower level
`tsi_peer`. This PR is a companion to that and completes the feature by
bubbling the information up to the `TsiCustomVerificationCheckRequest`
which is part of the user facing API for implementing custom
verification callbacks.
2023-03-08 13:41:26 -05:00
Stanley Cheung db62c06171
GCP Observability testing for C++ (#32531)
Third try for #32466. 

This adds an interop client / server for GCP Observability integration
testing.

Everything is new here with no refactor. Plan is to get this in first
before trying to refactor out the flags.
2023-03-02 18:10:48 -08:00
Craig Tiller 78bcf51496
Revert "Refactor C++ interop client flags" (#32519)
Reverts grpc/grpc#32509
2023-03-01 23:12:26 -08:00
Craig Tiller 78c799bce6
Revert "GCP Observability testing for C++" (#32518)
Reverts grpc/grpc#32466
2023-03-01 23:11:07 -08:00
Stanley Cheung f217a732d3
GCP Observability testing for C++ (#32466)
This PR enables GCP Observability testing for C++.

This re-uses the existing interop test client and server and adds an
`--enable_observability=true` flag.

This also adds a `Dockerfile` and `run.sh` script to allow the test
framework to execute the test.


Framework PR:
https://github.com/GoogleCloudPlatform/grpc-gcp-tools/pull/18
Java PR: https://github.com/grpc/grpc-java/pull/9858
Golang PR: https://github.com/grpc/grpc-go/pull/5979
2023-03-01 14:25:02 -08:00
Stanley Cheung 0479698f3a
Refactor C++ interop client flags (#32509)
Refactor C++ interop test client flags into the common
`client_helper.h/cc`. This is needed by the observability testing PR
#32466

We need the `ABSL_DECLARE_FLAG` in the header file so that we can share
that across different implementation.
2023-03-01 11:57:53 -08:00
Yijie Ma 2ce147a131
Add a test case to verify SubchannelStreamClient retry when Health.Watch ends (#31850)
<!--

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-02-28 19:14:57 -08:00
Yash Tibrewal 7af4bc7f1a
Logging: Move filter to Core (#32467)
This filter was originally written only for the C++ wrapped layer, but
we have plans to use this for Python (and maybe other wrapped languages
too in the future.)

<!--

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-02-24 16:41:39 -08:00
Yash Tibrewal 7b79173991
Logging: Fill status code, status message and status details (#32464)
<!--

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-02-23 17:03:58 -08:00
Yash Tibrewal 184d4826d4
Gcp Observability: Fix resource labels for stats and tracing (#32460)
For stats, the StackDriver/OpenCensus API allows setting the
MonitoredResource directly, so use that.

For tracing, there is no explicit MonitoredResource to use, so just
insert it into the attributes for a span.
2023-02-22 23:35:20 -08:00
Yash Tibrewal d93d0022cd
GCP Observability: Fix constant labels support for stats when tracing is disabled (#32451)
<!--

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-02-22 14:49:55 -08:00
Yousuk Seung 420180c6d7
deflake server_load_reporting_end2end_test (#32434)
This test is flaky only with iomgr, this fix will likely fix this.

<!--

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-02-22 10:41:07 -08:00
Yash Tibrewal 4b05dc88b7
GCP Observability: Plumb environment autodetection for OpenCensus stats and tracing (#32431) 2023-02-19 22:25:23 -08:00
Mark D. Roth e022a3dfa9
xDS fault injection e2e test: fix flakes caused by processing queued calls in parallel (#32429)
The `XdsFaultInjectionMaxFault` test has seen a few flakes since #32326
was merged. I believe the flakiness is caused by the fact that when a
large number of RPCs are queued up before the resolver result comes in,
those RPCs are now re-processed in parallel instead of sequentially,
which can cause us to delay more RPCs than we should due to the
`max_faults` setting. To fix this, we change the test to ensure that the
channel is connected (i.e., the resolver result has already been
returned) before we start sending a large number of concurrent RPCs.

Although this is the only test that I've seen flakes in, I've made this
same change consistently to all fault injection tests that are creating
a large number of concurrent RPCs, since the same flake could affect any
of them.
2023-02-17 15:50:14 -08:00
Yash Tibrewal 04e3a8e73d
GCP Observability : Framework for detecting the environment (#32294)
This code is not plumbed through yet, but it provides the core
infrastructure needed to detect the proper GCP environment resources
needed to set up the labels/attributes/resources for stats, tracing and
logging.

Details on how the various environment resources are setup has been
derived by looking at java's cloud logging library and OpenTelemetry's
future plans. (Could be better explained in an offline review since some
links are internal).

Requesting @veblush for a full review and @markdroth for a structural
review.

<!--

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-02-16 16:20:20 -08:00
Hannah Shi 2ac1b1708d
[ObjC] run cpp ios cronet test with bazel (#31808)
Cleanup and remove ios cpp test cronet

To test manually:
./tools/bazel test //src/objective-c/tests:CppCronetTests

@sampajano 
<!--

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-02-13 17:51:03 -08:00
Craig Tiller 033d55ffd3
[arena] Fix ABA problem in pooled allocation (#32336)
The pooled allocator currently has an ABA issue in the allocation path.

This change should fix that - algorithm is described reasonably well in
the PR.
<!--

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-02-09 18:06:19 -08:00
Mark D. Roth 9dd6a98ed6
e2e tests: update regex used for connection failure messages (#32325)
* e2e tests: update regex used for connection failure messages

* attempt to tweak regex syntax to work on mac
2023-02-08 14:31:07 -08:00
Craig Tiller ae969b274b
[chttp2] Eliminate legacy huffman decoder (#32289)
* [chttp2] Eliminate legacy huffman decoder

* Automated change: Fix sanity tests

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-02-07 19:53:41 -08:00
Craig Tiller 135f6e84b6
[flake] Remove inproc thread stress tests (#32283)
These tests are failing because they're running with too few threads,
however if we give them sufficient threads to catch bugs they're flaky.

Remove them and get the team some bandwidth back.
2023-02-07 08:58:41 -08:00
Yousuk Seung b98f527260
Revert "Revert "Revert "Revert "server: introduce ServerMetricRecorde… (#32301)
* Revert "Revert "Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)" (#32279)" (#32293)"

This reverts commit 1f960697c5.

* Do not create CallMetricRecorder if call is null.
2023-02-06 12:00:39 -08:00
Craig Tiller 1f960697c5
Revert "Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)" (#32279)" (#32293)
This reverts commit 4475e74c6a.
2023-02-03 13:18:23 -08:00
Yousuk Seung 4475e74c6a
Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)" (#32279)
* Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)"

This reverts commit deb1e25543.

* Fix by caching call metric recording stuff in async request

PR #32106 caused msan errors in some tests while de-referencing the
server object where async calls are active after the server is
destroyed. Instead cache the ServerMetricRecorder pointer.

* copyright headers fixed

* clang fixes.
2023-02-03 11:49:32 -08:00
Eugene Ostroukhov 72872fc29d
stateful session affinity: add e2e test for draining state (#32248) 2023-02-02 14:59:10 -08:00
Yijie Ma 08555c8723
Add enforcement for cpp-style comment license in check_copyright.py (#32273)
* enforce cpp style comment copyright license in check_copyright.py

also add functionality to fix(replace) c-style comment with cpp style
comment

* fix tools/codegen/core/gen_stats_data.py

* review
2023-02-02 13:00:20 -08:00
AJ Heller e4af983819
Reland "EventEngine::RunAfter: GrpcLb" (#32262)" (#32269)
There was a ~1% flake in grpclb end2end tests that was reproducible in opt builds, manifesting as a hang, usually in a the SingleBalancerTest.Fallback test. Through experimentation, I found that by skipping the death test in the grpclb end2end test suite, the hang was no longer reproducible in 10,000 runs. Similarly, moving this test to the end of the suite, or making it run first (as is the case in this PR) resulted in 0 failures in 3000 runs.

It's unclear to me yet why the death test causes things to be unstable in this way. It's clear from the logs that one test does affect the rest, grpc_init is done once for all tests, so all tests utilize the same EventEngine ... until the death test completes, and a new EventEngine is created for the next test.

I think this death test is sufficiently artificial that it's fine to change the test ordering itself, and ignore the wonky intermediate state that results from it.

Reproducing the flake:

```
tools/bazel --bazelrc=tools/remote_build/linux.bazelrc test \
  -c opt \
  --test_env=GRPC_TRACE=event_engine \
  --runs_per_test=5000 \
  --test_output=summary \
  test/cpp/end2end/grpclb_end2end_test@poller=epoll1 
```
2023-02-02 11:20:42 -08:00
Xuan Wang deb1e25543
Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)
This reverts commit c7f641da0d.
2023-02-02 09:58:29 -08:00
Craig Tiller 0893fca089
[promises] Roll forward server promise calls with fixes (#32261)
* stuff

* spam-cleanup

* Revert "Revert "[promises] Server call (#31448)" (#32260)"

This reverts commit dbfb888e1f.

* spam-cleanup

* Automated change: Fix sanity tests

* asserts-for-sanity

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-02-01 16:07:46 -08:00
Yousuk Seung c7f641da0d
server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)
* backend metric sampling

* Comments addressed.

* More comments addressed.

* Pushing changes left behind locally.

* Removed empty lines

* Update OrcaService to use ServerMetricRecorder (no named metrics yet)

* Comments addressed.

* More comments addressed

* More comments addressed.

* Comments fixed

* Comments addressed.

* Test fixed

* make seq returned always up-to-date

* skip atomic load when not cached

* Fixed ABSL_GUARDED_BY

* Comments addressed except client_lb_end2end_test

* test updated

* Comments addressed

* BUILD fix.

* BackendMetricDataState moved to a separate header

* comments addressed

* Fixed clang and buildifier errors

* More sanity check errors fixed.

* Fixed xds tests

* Ran generate_projects.sh

* Comments addressed

* comments addressed.

* generate project

* Build fixed

* generate project

* sanity check errors fixed

* test fixed

* Backup poller period override moved to main()

* Also move cfstream override

* Clang fixes, sanitize

* generate_projects.sh

* portable print format fix

* Removed outdated comment
2023-02-01 14:54:57 -08:00
Craig Tiller 439c7518a3
[thread_stress_test] reduce thread count to a reasonable number (#32263) 2023-02-01 12:16:18 -08:00
Craig Tiller dbfb888e1f
Revert "[promises] Server call (#31448)" (#32260)
* Revert "[promises] Server call (#31448)"

This reverts commit bbeb15006a.

* clang-fmt
2023-02-01 09:18:04 -08:00
Mark D. Roth 75f4ee6e5e
xDS: fix bug when receiving an update for an aggregate cluster child (#32249) 2023-01-31 14:58:03 -08:00
Eugene Ostroukhov b168e9cc9d
stateful session affinity: add end2end tests (#32009)
Co-authored-by: Mark D. Roth <roth@google.com>
2023-01-31 10:10:36 -08:00
Craig Tiller 32be2c2179
[benchmark] Fix static initialization bug in bm_huffman_decode (#32245)
* [benchmark] Fix static initialization bug in bm_huffman_decode

* fix performance
2023-01-31 07:07:08 -08:00
Craig Tiller bbeb15006a
[promises] Server call (#31448)
* add experiment

* allow instantiation

* scratchings

* scratchings

* sniffly

* Automated change: Fix sanity tests

* fix

* fix

* fix

* Automated change: Fix sanity tests

* progress

* change pipe labels to enable server code to be written

* better api

* Automated change: Fix sanity tests

* progress

* [promises] Implementation of deadline for server-based-calls

* compression filter compiles again

* Automated change: Fix sanity tests

* fix

* server tracing fixes

* get client initial metadata

* progress

* progress

* server call surface progress

* Automated change: Fix sanity tests

* move payload

* server-progress

* recv-message-server-connchan

* logging

* fix context-gate

* recv fix@top

* Automated change: Fix sanity tests

* recv close on server

* top termination start

* [promises] Move Empty to be first class

* fixes

* fix

* flow control fix

* got to orphan!

* orphan

* call orphan

* spam cleanup

* fix

* new cancelation semantics

* progress

* large metadata fixes

* fix

* fix

* log

* better logs

* fix-chanz

* logging, necessaryness

* fix typo

* fixes

* fix

* fix

* fix-pipe

* cleanup logging

* fix

* build-fix

* fix

* Automated change: Fix sanity tests

* logging

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* better primitive

* Revert "better primitive"

This reverts commit 119b5ee244.

* fix

* fix

* trrracing

* Automated change: Fix sanity tests

* get-trailing-metadata

* cancellation

* Automated change: Fix sanity tests

* add transform pipeline to pipe

* add transform pipeline to pipe

* interceptor lists

* new server initial md api into filters

* convert connected_channel

* convert call

* initial promise based filter conversion

* convert promise based filter

* build fixes

* compile fix

* fixes

* fix ordering

* fixes

* check-metadata

* revert later: debug code

* better debug

* fix metadata ordering with messages in promise based filter

* fix ordering problem between batch completion and promise completion

* properly handle failure on receive message path on client

* more debug, fix a repoll bug in pbf

* Automated change: Fix sanity tests

* fixes

* Automated change: Fix sanity tests

* cleanup logging

* fixes

* missing file

* fixes

* logging

* Automated change: Fix sanity tests

* fixes

* convert logging filter

* fix

* Automated change: Fix sanity tests

* fix bad server response test

* Revert "Disable logging test (#32049)"

This reverts commit 5fc92eaeae.

* fix

* Automated change: Fix sanity tests

* fix memory leaks, logging

* Automated change: Fix sanity tests

* slice refcount debugging

* asan-canaries

* leak-fix

* leak-fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* remove mistaken line

* add-comment

* fix refcounting bug

* Automated change: Fix sanity tests

* rename variable

* renames

* bleh

* carry pipe close status from bottom of pipe to top to appease
recv-close-on-server

* backport cancellation

* Revert "carry pipe close status from bottom of pipe to top to appease"

This reverts commit fa33301dcd.

* fix

* Automated change: Fix sanity tests

* review-feedback

* comment-ordering

* monostate

* renames

* undo-review-feedback

* fix

* review-feedback

* review-feedback

* fix

* review-feedback

* drop debugloc constructor

* interceptor-list-rev-feedback

* interceptor-list-rev-feedback

* pipe test

* review-feedback

* undo-mistaken-change

* Automated change: Fix sanity tests

* pipe error state

* detect send/recv failures and report

* iwyu, build

* fix submodules

* fix

* warning

* cleanup

* Automated change: Fix sanity tests

* fix

* fix for windows

* fix

* null pointer fix

* iwyu

* gen projex

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-01-30 21:39:11 -08:00
Mark D. Roth 05a75d2d8c
rls_e2e_test: increase RPC timeout (#32222) 2023-01-26 14:54:11 -08:00
AJ Heller 6a92df7237
[fixup] EventEngine Nomenclature (#32195) 2023-01-25 09:31:46 -08:00
AJ Heller 2e69349731
[codegen] Escape variable delimiters in raw comment printing (#32190) 2023-01-24 14:39:19 -08:00
Craig Tiller 7b02b7c253
[stats] Add experiment to use transport reported request latency whenever available (#32168)
* [stats] Add experiment to use transport reported request latency whenever available

* redux: add a new metric

* review-feedback

* Automated change: Fix sanity tests

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-01-24 08:09:59 -08:00
Yash Tibrewal beffe313e5
GCP Observability Logging: Base64 Encode metadata, message and status-details (#32184)
* GCP Observability Logging: Base64 Encode metadata, message and status-details

* Use padding for message and status-details
2023-01-23 18:57:09 -08:00
Mark D. Roth 1c4b138322
Revert "Revert "WRR: xDS LB policy support (#32067)" (#32180)" (#32182)
This reverts commit d7193a28c4.
2023-01-23 14:14:32 -08:00
Yash Tibrewal 7f7a352ccc
Fix flakiness in test/cpp/ext/filters/census/... (#32174) 2023-01-23 12:13:45 -08:00
Alisha Nanda d7193a28c4
Revert "WRR: xDS LB policy support (#32067)" (#32180)
This reverts commit 8a024963f5.
2023-01-23 09:16:11 -08:00
Mark D. Roth 8a024963f5
WRR: xDS LB policy support (#32067)
* WRR: port StaticStrideScheduler to OSS

* WIP

* Automated change: Fix sanity tests

* fix build

* remove unused aliases

* fix another type mismatch

* remove unnecessary include

* move benchmarks to their own file, and don't run it on windows

* Automated change: Fix sanity tests

* add OOB reporting

* generate_projects

* clang-format

* add config parser test

* clang-tidy and minimize lock contention

* add config defaults

* add oob_reporting_period config field and add basic test

* Automated change: Fix sanity tests

* fix test

* change test to use basic RR

* WIP: started exposing peer address to LB policy API

* first WRR test passing!

* small cleanup

* port RR fix to WRR

* test helper refactoring

* more test helper refactoring

* WIP: trying to fix test to have the right weights

* more WIP -- need to make pickers DualRefCounted

* fix timer ref handling and get tests working

* clang-format

* iwyu and generate_projects

* fix build

* add test for OOB reporting

* keep only READY subchannels in the picker

* add file missed in a previous commit

* fix sanity

* iwyu

* add weight expiration period

* add tests for weight update period and OOB reporting period

* Automated change: Fix sanity tests

* lower bound for timer interval

* consistently apply grpc_test_slowdown_factor()

* cache time in test

* add blackout_period tests

* avoid some unnecessary copies

* clang-format

* add field to config test

* simplify orca watcher tracking

* attempt to fix build

* iwyu

* generate_projects

* update xds proto dependency

* add xDS LB policy entry to registry

* add "_experimental" suffix to policy name

* update LB policy name and remove debug log

* add env var protection

* generate_projects

* gen_upb_api

* WRR: update tests to cover qps plumbing

* WIP

* Automated change: Fix sanity tests

* more WIP

* basic WRR e2e test working

* add OOB test

* add xDS WRR e2e test

* clang-format

* fix sanity

* ignore duplicate addresses

* Automated change: Fix sanity tests

* add new tracer to doc/environment_variables.md

* retain scheduler state across pickers

* Automated change: Fix sanity tests

* use separate mutexes for scheduler and timer

* sort addresses to avoid index churn

* remove fetch_sub for wrap around in RR case

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-01-23 08:08:52 -08:00
Yash Tibrewal aa11978541
Fix include guards for src/ and test/ directories (#32167)
* Fix include guards for src/ and test/ directories

* Sanity

* Update new files
2023-01-20 16:27:27 -08:00
Mark D. Roth 76c82265b4
WRR: implement WRR LB policy (#31904)
* WRR: port StaticStrideScheduler to OSS

* WIP

* Automated change: Fix sanity tests

* fix build

* remove unused aliases

* fix another type mismatch

* remove unnecessary include

* move benchmarks to their own file, and don't run it on windows

* Automated change: Fix sanity tests

* add OOB reporting

* generate_projects

* clang-format

* add config parser test

* clang-tidy and minimize lock contention

* add config defaults

* add oob_reporting_period config field and add basic test

* Automated change: Fix sanity tests

* fix test

* change test to use basic RR

* WIP: started exposing peer address to LB policy API

* first WRR test passing!

* small cleanup

* port RR fix to WRR

* test helper refactoring

* more test helper refactoring

* WIP: trying to fix test to have the right weights

* more WIP -- need to make pickers DualRefCounted

* fix timer ref handling and get tests working

* clang-format

* iwyu and generate_projects

* fix build

* add test for OOB reporting

* keep only READY subchannels in the picker

* add file missed in a previous commit

* fix sanity

* iwyu

* add weight expiration period

* add tests for weight update period and OOB reporting period

* Automated change: Fix sanity tests

* lower bound for timer interval

* consistently apply grpc_test_slowdown_factor()

* cache time in test

* add blackout_period tests

* avoid some unnecessary copies

* clang-format

* add field to config test

* simplify orca watcher tracking

* attempt to fix build

* iwyu

* generate_projects

* add "_experimental" suffix to policy name

* WRR: update tests to cover qps plumbing

* WIP

* more WIP

* basic WRR e2e test working

* add OOB test

* fix sanity

* ignore duplicate addresses

* Automated change: Fix sanity tests

* add new tracer to doc/environment_variables.md

* retain scheduler state across pickers

* Automated change: Fix sanity tests

* use separate mutexes for scheduler and timer

* sort addresses to avoid index churn

* remove fetch_sub for wrap around in RR case

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-01-20 12:14:37 -08:00
Mark D. Roth 7a96bed837
xDS: fix WeightedClusters total weight handling (#32134)
* xDS: fix WeightedClusters total weight handling

* iwyu
2023-01-19 08:01:26 -08:00
Yash Tibrewal 21618f3aef
GCP Observability: Add labels support for logging (#32130)
* GCP Observability: Add labels support for logging

* clang format

* Reviewer comments
2023-01-18 16:08:30 -08:00
Yash Tibrewal 05491fb2f6
Gcp Observabiliy : Add constant labels support for stats and tracing (#32128)
* Gcp Observabiliy : Add constant labels support for stats and tracing

* Register GCP Observability labels

* sanity

* Fix build for CI

* TEST_TAG_KEY fix

* Remove duplicitous constant label setting
2023-01-18 14:32:36 -08:00
Yash Tibrewal 25465100fd
LoggingTest: s/GUARDED_BY/ABSL_GUARDED_BY (#32144) 2023-01-18 14:24:11 -08:00
Yijie Ma f2bcdf3bbc
Add a test case for infinite past or unix epoch expiry in alarm_test.cc (#32101)
* initial commit

* review
2023-01-18 11:09:17 -08:00
Yash Tibrewal 33be15bdb6
Gcp Observability: Lazily initialize channels post-init (#32091)
* Gcp Observability: Lazily initialize channels post-init

* IWYU and fix build deps

* Run RegistryPostInit for client census filters too

* Remove unused function
2023-01-13 11:13:20 -08:00
Craig Tiller 67f364e23e
[cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757)
* crash function

* progress

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fixes

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

* fix

* use cpp attr

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix

* fix

* add exclusion

* fix

* typo

* fix

* fmt

* Update tcp_socket_utils.cc

* Automated change: Fix sanity tests

* fix

* revert php changes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-01-11 08:50:32 -08:00
Mark D. Roth daded8a59f
WRR: update tests to cover qps plumbing (#32068) 2023-01-11 08:14:29 -08:00
Mark D. Roth e5a37d59fa
xDS: don't NACK RouteConfig with a VirtualHost containing no valid routes (#32069) 2023-01-11 08:03:55 -08:00
Yash Tibrewal d5c1dc1667
GCP Observability: Fix env var names (#32066) 2023-01-10 14:02:07 -08:00
Yash Tibrewal 5fc92eaeae
Disable logging test (#32049) 2023-01-10 10:50:56 -08:00
cut4th aa2956b05b
Change ProtoReflectionDescriptorDatabase to take grpc::ChannelInterface. (#31858)
Updates the ProtoReflectionDescriptorDatabase ctor to take a reference
to std::shared_ptr<grpc::ChannelInterface> rather than
std::shared_ptr<grpc::Channel>. This helps code that is making use of
grpc::ChannelInterface from having to perform a cast from the Base to
the Derived when creating the refelction db.
2023-01-06 18:05:38 -08:00
Yash Tibrewal ad6f6c49e0
Logging filter (#31755)
* initial

* Intermediate

* Another try

* Try multiple necesary pulls

* Filter works other than client half close

* Fixes

* Add a cancelled RPC test

* Handle trailer only responses

* Tests for disabled logging and truncated payloads

* Fix authority and peer

* Add TODOs and asserts for half-close

* Fix tests for half-close and cancel

* 2d748fcb1cf45cac62729b8346ad15e6abc79e97

* Fix sanity checks

* Strict bazel build

* Fix package

* IWYU

* Fix cmake

* Explicit cast to string

* Size casts

* Fix Arena leak and disable macos build for now

* Reviewer comments
2023-01-06 13:52:15 -08:00
Hannah Shi d8a52a5043
build multi arc ios unit test for m1 (#31930) 2023-01-05 16:27:21 -08:00
Vignesh Babu 4806da6041
Fix flakiness in xds_cluster_end2end_test: XdsTest/CdsTest.CircuitBreaking/V3 (#32027)
* Fix flakiness in xds_cluster_end2end_test: XdsTest/CdsTest.CircuitBreaking/V3

* update comment and add sleep in one more instance
2023-01-05 15:46:54 -08:00
apolcyn c952d37814
[testing] add test client for use in XDS federation tests (#32020)
[testing] add test client for use in XDS federation tests
2023-01-05 14:14:47 -08:00
Yash Tibrewal d3d4dd7325
StatsPluginEnd2EndTest: Add QueueOnceLoadBalancingPolicy to remove flakiness from test (#32019)
* StatsPluginEnd2EndTest: Add QueueOnceLoadBalancingPolicy to remove flakiness from test

* Unused arg

* Remove unnecessary DelegatingPicker

* Reviewer comments

* explicit constructor

* Remove unnecessary dependency

* Reviewer comments

* Sanity

* clang tidy
2023-01-05 12:45:52 -08:00
Cheng-Yu Chung 384982ba2b
[bugfixes] Fix vulnerability for PyYAML (#32007)
* Fix vulnerability for PyYAML

* Fix

* Revert "Fix"

This reverts commit 5522d226c4.

* Fix

* Fix format
2023-01-04 12:33:29 +08:00
Yijie Ma f99b8b5bc4
Convert c-style comments to C++-style comments (#31923)
* baseline

* fix clang-tidy

* manually revert these files

* manually fixup at eof

* revert 2 more files

* change check_deprecated_grpc++.py

* change end2end_defs.include template

* fix check_include_guards.py

* untrack tools/distrib/python/convert_cstyle_comments_to_cpp.py

not yet ready to be submitted

* fix

yapf check_include_guards.py
remove a space...

* fix version.cc.template

* fix version_info.h.template
2022-12-22 23:01:53 -08:00
Esun Kim 27bf7238f4
Added include guard to mock headers (#31909)
* Added include guard to mock headers

* Fix test
2022-12-16 14:42:41 -08:00
Yash Tibrewal 9e7c8bff55
Tracing: Add annotations for when call is removed from resolver result queue and lb pick queue (#31913)
* Tracing: Add annotations for when call is removed from resolver result queue and lb pick queue

* Add test for pending resolver result queue as well

* Update annotation messages
2022-12-16 10:31:48 -08:00
Cheng-Yu Chung 1b05576aa3
[cleanups] Clean up `GrpcLibraryInitializer` (#31894)
* Clean up `GrpcLibraryInitializer`

* Update

* Automated change: Fix sanity tests
2022-12-17 01:08:35 +08:00
Cheng-Yu Chung e28419f1f9
[cleanups] Remove `class CoreCodegen` and `g_core_codegen_interface` (#31875)
* Delete `g_core_codegen_interface`

* Automated change: Fix sanity tests

* Fix

* Update
2022-12-14 23:47:13 +08:00
Cheng-Yu Chung ac365cadfb
Remove `include/grpc/impl/codegen/port_platform.h` (#31778) 2022-12-14 10:46:33 +08:00
Mark D. Roth 5192021637
Second attempt: xDS stateful session affinity: add config plumbing (#31874)
* Revert "Revert "xDS stateful session affinity: add config plumbing (#31827)" (#31873)"

This reverts commit 4f15d3dcf9.

* fix build for compilers too dumb to recognize the full set of enum values
2022-12-13 15:47:24 -08:00
Yijie Ma fe9f9afaa0
EventEngine::RunAfter migration ConnectionAttemptInjector (#31865) 2022-12-13 11:14:40 -08:00
Cheng-Yu Chung 9a7e77318b
[cleanups] Remove `include/grpc/impl/codegen/grpc_types.h` (#31835)
* Remove `include/grpc/impl/codegen/grpc_types.h`

* Automated change: Fix sanity tests

* Fix typo

* Automated change: Fix sanity tests
2022-12-14 02:29:17 +08:00
Richard Belleville 4f15d3dcf9
Revert "xDS stateful session affinity: add config plumbing (#31827)" (#31873)
This reverts commit f76948b12d.
2022-12-12 14:26:27 -08:00
Mark D. Roth f76948b12d
xDS stateful session affinity: add config plumbing (#31827)
* WIP

* sanitize

* add endpoint tests

* add plumbing through LB policies

* clang-tidy
2022-12-12 08:19:31 -08:00
Eryu Xia a8ac4e7265
Revert "[ObjC]fix 64 to 32 bit clang conversion warning in src/core/lib (#29877)" (#31843)
This reverts commit eb0a591811.
2022-12-08 15:33:49 -08:00
Hannah Shi eb0a591811
[ObjC]fix 64 to 32 bit clang conversion warning in src/core/lib (#29877) 2022-12-08 14:46:38 -08:00
Cheng-Yu Chung 4e90f43a75
Remove functions in `class CoreCodegen` (#31796)
* Update include

* Clean up `grpc_empty_slice()`

* Clean up `grpc_slice_malloc()`

* Clean up `grpc_slice_unref()`

* Clean up `grpc_slice_ref()`

* Clean up `grpc_slice_split_tail()`

* Clean up `grpc_slice_split_head()`

* Clean up `grpc_slice_sub()`

* Clean up `grpc_slice_buffer_add()`

* Clean up `grpc_slice_buffer_add_indexed()`

* Clean up `grpc_slice_buffer_pop()`

* Clean up `grpc_slice_from_static_buffer()`

* Clean up `grpc_slice_from_copied_buffer()`

* Clean up `grpc_metadata_array_init()`

* Clean up `grpc_metadata_array_destroy()`

* Clean up `gpr_inf_future()`

* Clean up `gpr_time_0()`
2022-12-07 18:55:47 +08:00
Cheng-Yu Chung 5fe132a211
Revert "Revert "Remove `include/grpc/impl/codegen/gpr_slice.h` (#31774)" (#31805)" (#31806)
This reverts commit 39a4343044.

Fixing forward the original PR. The content should be the same as the original PR. The broken part is in the internal.
2022-12-07 00:43:18 +08:00
Yijie Ma 6b79989d86
EventEngine::RunAfter: PollingResolver (#31717)
* EventEngine::RunAfter: polling_resolver

initial draft

* restore some iwyu change

* fix: get rid of OnNextResolution

* fix some test crashes

* fix more tests

* clang-tidy

* review

* clang-tidy

* fix

* review

* review

* review

* fix use-after-move

* revert

* review
2022-12-05 17:05:00 -08:00
Cheng-Yu Chung 39a4343044
Revert "Remove `include/grpc/impl/codegen/gpr_slice.h` (#31774)" (#31805)
This reverts commit ac1dee8ac1.
2022-12-05 11:11:42 -08:00
Cheng-Yu Chung ac1dee8ac1
Remove `include/grpc/impl/codegen/gpr_slice.h` (#31774) 2022-12-06 02:33:11 +08:00
Alisha Nanda ad91404e0e
Remove static initialization of memory allocator in tests (#31776)
* Add more info to error

* Fix tests

* Remove static initialization of memory allocator

* Fix test failure

* Automated change: Fix sanity tests

Co-authored-by: ananda1066 <ananda1066@users.noreply.github.com>
2022-12-05 10:29:01 -08:00
Cheng-Yu Chung dba82c9be6
Remove `include/grpc/impl/codegen/log.h` (#31775)
* Remove `include/grpc/impl/codegen/log.h`

* Automated change: Fix sanity tests
2022-12-05 20:51:35 +08:00
Cheng-Yu Chung 1d968a36aa
Remove functions in `class CoreCodegen` (#31767)
* Clean up `grpc_byte_buffer_copy()`

* Clean up `grpc_byte_buffer_destroy()`

* Clean up `grpc_byte_buffer_length()`

* Clean up `grpc_byte_buffer_reader_init()`

* Clean up `grpc_byte_buffer_reader_destroy()`

* Clean up `grpc_byte_buffer_reader_next()`

* Clean up `grpc_byte_buffer_reader_peek()`

* Clean up `grpc_raw_byte_buffer_create()`

* Clean up `grpc_slice_new_with_user_data()`

* Clean up `grpc_slice_new_with_len()`

* Clean up `grpc_call_start_batch()`

* Clean up `grpc_call_cancel_with_status()`

* Clean up `grpc_call_failed_before_recv_message()`

* Clean up `grpc_call_ref()`

* Clean up `grpc_call_unref()`

* Clean up `grpc_call_error_to_string()`

* Fix typos

* Automated change: Fix sanity tests
2022-12-03 05:27:42 +08:00
Cheng-Yu Chung f5d21653fc
Revert "[event_engine] Move combiner executor usage to event engine (#31713)" (#31753)
This reverts commit b04aa1cf92.

Co-authored-by: AJ Heller <hork@google.com>
2022-11-30 11:13:57 -08:00
Mark D. Roth 7e201fbe42
rls_e2e_test: stop setting env var that isn't actually being used (#31770) 2022-11-29 16:43:38 -08:00
Cheng-Yu Chung 5498481265
Remove `include/grpcpp/impl/codegen/proto_utils.h` (#31532) 2022-11-29 21:33:55 +08:00
Cheng-Yu Chung 77b3972f95
Clean up the TODO item in build target `grpc_base` part `channel_args` (#31642)
* Clean up the TODO item in build target `grpc_base` part `channel_args`

* Update

* Update

* Update

* Automated change: Fix sanity tests

* update

* Automated change: Fix sanity tests
2022-11-23 16:01:34 -05:00
Craig Tiller b04aa1cf92
[event_engine] Move combiner executor usage to event engine (#31713)
* [event_engine] Move combiner executor usage to event engine

* fix

* review feedback

* fix

* x

* fix

* fix
2022-11-22 12:14:22 -08:00
Cheng-Yu Chung e9b287997a
Remove `include/grpcpp/impl/codegen/sync.h` (#31545)
* Remove `include/grpcpp/impl/codegen/sync.h`

* Fix sanity tests
2022-11-22 13:45:53 -05:00
Yash Tibrewal 15c4a98bc7
Gcp Observability Logging: Add handling for adding entry as a json payload (#31723) 2022-11-21 14:32:04 -08:00
Cheng-Yu Chung e7f9fb03f4
Remove `include/grpcpp/impl/codegen/server_callback_handlers.h` (#31533) 2022-11-21 11:40:58 -05:00
Yash Tibrewal 0389940093
GcpObservability: Add config support for constant labels (#31710) 2022-11-18 17:26:20 -08:00
Esun Kim f3fedae7c8
Added readability-redundant-string-cstr (#31707)
* Added readability-redundant-string-cstr

* Auto fix

* No need to wrap std::string
2022-11-18 17:12:46 -08:00
Cheng-Yu Chung 7e3ada34e6
Clean up the TODO item in build target `grpc_base` -- part `closure` (#31001)
* Clean up the TODO item in build target `grpc_base` part `closure`

* Update

* Update

* Revert "Update"

This reverts commit daf3118390.

* Update

* Update

* Automated change: Fix sanity tests
2022-11-18 18:35:22 -05:00
Esun Kim 0ba0c4bf74
Added googletest clang-tidy checks (#31610)
* Added google-googletest

* Autofix

* Fix test names

* Fix
2022-11-18 13:02:20 -08:00