Commit Graph

6407 Commits

Author SHA1 Message Date
Craig Tiller 727c92a15c
[cpp] Remove legacy channel filter C++ wrapper (#34522)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-28 20:59:56 -07:00
Mark D. Roth 7a06614f95
[resolver and LB policy APIs] reland: change address list to support multiple addresses per endpoint (#34531)
Re-land #33567, which was reverted in #34527.

First commit is a pure revert, second commit is a small fix needed to
avoid breaking internal callers.
2023-09-28 15:40:05 -07:00
Mark D. Roth 41f26de3b6
Revert "[resolver and LB policy APIs] change address list to support multiple addresses per endpoint" (#34527)
Reverts grpc/grpc#33567 due to import problems.
2023-09-28 12:15:35 -07:00
Mark D. Roth fd2e8c9462
[resolver and LB policy APIs] change address list to support multiple addresses per endpoint (#33567)
More changes as part of the dualstack design:
- Change resolver and LB policy APIs to support multiple addresses per
endpoint. Specifically, replace `ServerAddress` with
`EndpointAddresses`, which encodes more than one address. Per-address
channel args are retained at the same level, so they are now
per-endpoint. For now, `EndpointAddress` provides a single-address ctor
and a single-address accessor for backward compatibility, so
`ServerAdress` is an alias for `EndpointAddresses`; eventually, this
alias and the single-address methods will be removed.
- Add an `EndpointAddressSet` class, which represents an unordered set
of addresses to be used as a map key. This will be used in a number of
LB policies that need to store per-endpoint state.
- Change the LB policy API's `ChannelControlHelper::CreateSubchannel()`
method to take the address and per-endpoint channel args as separate
parameters, so that we don't need to construct a legacy `ServerAddress`
object as we create a new subchannel for each address in the endpoint.
- Change pick_first to flatten the address list.
- Change ring_hash to use `EndpointAddressSet` as the key for its
endpoint map, and to use the first address of the endpoint as the hash
key.
- Change WRR to use `EndpointAddressSet` as the key for its endpoint
weight map.

Note that support for multiple addresses per endpoint is guarded in RR
by the existing `round_robin_delegate_to_pick_fist` experiment and in
WRR by the existing `wrr_delegate_to_pick_first` experiment.

This PR does *not* include support for multiple addresses per endpoint
for the outlier_detection or xds_override_host LB policies; those will
come in subsequent PRs.
2023-09-28 09:32:36 -07:00
Mark D. Roth 835775e347
[pick_first] implement Happy Eyeballs (#34426) 2023-09-27 11:10:53 -07:00
Craig Tiller 59d886cb5c
[fuzzing] Expose random number generator to some fuzzers (#34415)
Expand our fuzzing capabilities by allowing fuzzers to choose the bits
that go into random number distribution generators.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-25 10:17:58 -07:00
Yash Tibrewal a0e3794f4b
[OTel C++] Method attribute filtering (#34350)
Implements method attribute filtering as defined by the gRFC
https://github.com/grpc/proposal/pull/380
2023-09-22 23:48:01 +00:00
Yash Tibrewal 06b55bdaa4
[RegisteredMethod] Set information on initial metadata about whether method is registered or not (#34432)
Summary - 
On the server-side, we are changing the point at which we decide whether
a method is registered or not from the surface to the transport at the
point where we are done receiving initial metadata and before we invoke
the recv_initial_metadata_ready closures from the filters. The main
motivation for this is to allow filters to check whether the incoming
method is a registered or not. The exact use-case is for observability
where we only want to record the method if it is registered. We store
the information about the registered method in the initial metadata.

On the client-side, we also set information about whether the method is
registered or not in the outgoing initial metadata.

Since we are effectively changing the lookup point of the registered
method, there are slight concerns of this being a potentially breaking
change, so we are guarding this with an experiment to be safe.

Changes - 
* Transport API changes -
* Along with `accept_stream_fn`, a new callback
`registered_method_matcher_cb` will be sent down as a transport op on
the server side. When initial metadata is received on the server side,
this callback is invoked. This happens before invoking the
`recv_initial_metadata_ready` closure.
* Metadata changes -
* We add a new non-serializable metadata trait `GrpcRegisteredMethod()`.
On the client-side, the value is a uintptr_t with a value of 1 if the
call has a registered/known method, or 0, if it's not known. On the
server side, the value is a (ChannelRegisteredMethod*). This metadata
information can be used throughout the stack to check whether a call is
registered or not.
* Server Changes -
* When a new transport connection is accepted, the server sets
`registered_method_matcher_cb` along with `accept_stream_fn`. This
function checks whether the method is registered or not and sets the
RegisteredMethod matcher in the metadata for use later.
* Client Changes -
* Set the metadata on call creation on whether the method is registered
or not.
2023-09-22 13:13:16 -07:00
Eugene Ostroukhov 2f78fffa37
[xds ssa] Remove environment variable protection for stateful affinity (#34435) 2023-09-22 13:06:51 -07:00
Craig Tiller 1dabdfbe6f
[per-cpu] Change up the cpu caching mechanism (#34421)
Lets us sever the dependency between stats & exec ctx (finally).

More work likely needs to go into the *mechanism* used here (I'm not a
fan of the per thread index), but that's also something we can address
later.
2023-09-22 11:23:11 -07:00
Yash Tibrewal 1091cc3211
[CSM] Update labels (#34412)
Changes - 
* Remove `csm.remote_workload_pod_name` and
`csm.remote_workload_container_name`.
* Add `csm.remote_workload_name`, the value for which is sent through
MetadataExchange, from the `CSM_WORKLOAD_NAME` env var. (Note that this
is not added in local labels.)
* Add a local `csm.canonical_service` (@markdroth, please verify the key
that we want here) that is read from `CSM_CANONICAL_SERVICE_NAME` env
var, and we continue to send it over via MetadataExchange
2023-09-21 16:02:03 -07:00
Gregory Cooke aa17285f8e
[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials, version 2. (#34408)
Revert the reversion of the SSL_CTX_new change (#34355 reverted #34180 )
with a fix.

There was an issue with using `strcpy` on a `new[] string` in the
constructor of `ssl_credentials`. An ASAN test caught this in some CI
down the line - `ERROR: AddressSanitizer: alloc-dealloc-mismatch
(operator new [] vs free)`

That `strcpy` call was changed to `grp_strdup` which duplicates a string
in a way that can be freed by `gpr_free` and should resolve the ASAN
failure.
2023-09-21 10:07:18 -07:00
Yash Tibrewal 112fffcdb4
[OTel] Minor test cleanup (#34353)
<!--

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-09-21 09:23:47 -07:00
Eugene Ostroukhov 98ac00d7d2
[interop test] Fix the test (#34424) 2023-09-20 11:53:08 -07:00
Eugene Ostroukhov 490f6a3ee9
[test interop] Add HookService to the maintenence server (#34413)
This pull request adds another hook service on the maintenance server.
This will enable clients to gradually migrate from the standalone hook
server.

Changes:
1. Hook service can now be used separately.
2. Copied latest protos and updated the hook service to new API.
3. Added the hook service to the maintenance server.
2023-09-19 18:06:31 -07:00
Stanley Cheung fc159a6901
[Observability Testing] register prometheus exporter (#34380)
Working towards testing against CSM Observability. Added ability to
register a prometheus exporter with our Opentelemetry plugin. This will
allow our metrics to be available at the standard prometheus port
`:9464`.
2023-09-19 16:54:58 -07:00
AJ Heller 3707b42bec
[reland][EventEngine] Move combiner executor usage to EventEngine (#34396)
Relands #31713
2023-09-19 14:41:17 -07:00
Mark D. Roth 0bffb766ff
[grpclb e2e test] increase RPC deadlines to fix flakes (#34403) 2023-09-19 11:29:34 -07:00
apolcyn 87eed73a47
[dns] unskip c-ares tests on arm (#34232)
Now that we have https://github.com/grpc/grpc/pull/33942 (and another
follow-up [fix](https://github.com/grpc/grpc/pull/34185)), I think the
issue from https://github.com/grpc/grpc/issues/25289 is likely fixed
2023-09-18 12:18:29 -07:00
Craig Tiller 0375a585e2
[work-serializer] Fix synchronous test assumption (#34392)
This test assumed synchronous work serializer execution (or at least
faster async than we always get)... make a trivial change to keep the
test semantics but allow for the implementation to be more async.
2023-09-18 09:27:49 -07:00
Yash Tibrewal d670ffa92c
[CSM] Create an experimental target (#34381) 2023-09-15 17:51:33 -07:00
Craig Tiller 86b931c354
[work-serializer] Dispatch on run experiment (relanding) (#34372)
Reverts grpc/grpc#34371
2023-09-15 12:46:04 -07:00
Craig Tiller d589caa679
Revert "[work-serializer] Dispatch on run experiment" (#34371)
Reverts grpc/grpc#34274

(needs some changes internally)
2023-09-15 09:10:31 -07:00
Craig Tiller 1705470950
[work-serializer] Dispatch on run experiment (#34274)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Mark D. Roth <roth@google.com>
2023-09-15 07:49:42 -07:00
Yash Tibrewal 037979c0d8
[CSM] Remaining cleanup from GSM to CSM renaming (#34352)
<!--

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-09-14 16:58:23 -07:00
nanahpang a4ac80c394
Revert "[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials." (#34355)
Reverts grpc/grpc#34180
2023-09-14 14:54:17 -07:00
Gregory Cooke 36dc5e7391
[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials. (#34180)
Move the SSL_CTX to the level of the credentials rather than the
subchannel.
The SSL_CTX should only get created once per credential rather than once
per subchannel.

We should observe no behavior change with this PR, only efficiency
gains.
2023-09-14 17:00:23 -04:00
Gregory Cooke 8d62fc2b0b
[Test] Add concurrent test for session reuse (#34293)
Add a test that runs concurrent requests using session caching.
2023-09-14 14:43:43 -04:00
Mark D. Roth 1986007e1e
[round_robin] 4th attempt: delegate to pick_first as per dualstack design (#34337)
Most recent attempt was #34320, reverted in #34335.

The first commit here is a pure revert. The second commit fixes the
outlier_detection unit test to pass both with and without the
experiment.
2023-09-14 08:55:51 -07:00
Eugene Ostroukhov 77f80f3de5
[ssa test] Test TTL attribute on cookie (#34326) 2023-09-13 14:09:44 -07:00
Mark D. Roth 6534f0a6bf
Revert "[round_robin] third attempt: delegate to pick_first as per dualstack design" (#34335)
Reverts grpc/grpc#34320
2023-09-13 11:14:54 -07:00
Eugene Ostroukhov 59bab7f27f
[ssa test] Add test for per-route SSA configuration (#34313) 2023-09-12 21:02:13 -07:00
Yash Tibrewal ee6ed6ab4f
[CSM] Add target selector for csm channels (#34311)
<!--

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-09-12 18:43:36 -07:00
Mark D. Roth d713427cec
[round_robin] third attempt: delegate to pick_first as per dualstack design (#34320)
Previous attempt was #34241, reverted in #34317.

The second commit here makes the experiment disablable, so that we can
roll it out slowly internally.
2023-09-12 17:46:31 -07:00
Stanley Cheung e66cb7f2de
[GSM Observability] Update opentelemetry cpp bazel deps (#34290)
This is needed for the upcoming work for GSM Observability integration
testing.
2023-09-12 11:02:02 -07:00
Craig Tiller e6bf7c12cf
Revert "[round_robin] delegate to pick_first as per dualstack design" (#34317)
Reverts grpc/grpc#34241
2023-09-11 19:42:54 -07:00
Yash Tibrewal 03776a2f3e
[OTel and Csm] Cosmetic API changes (#34294)
Changes - 
* OTel API - Metrics enabling/disabling is updated to reflect design
changes.
* GSM is renamed to CSM
2023-09-11 12:23:45 -07:00
Mark D. Roth 97571ebf81
[round_robin] delegate to pick_first as per dualstack design (#34241)
Rolls forward the remaining changes from #32692, which were rolled back
in #33718.
2023-09-11 12:09:57 -07:00
Yash Tibrewal 1d136fd05f
[OTel] Add API to allow filtering target attribute on client side call/attempt metrics (#34285)
Based on https://github.com/grpc/proposal/pull/380
2023-09-08 01:35:05 -07:00
Eugene Ostroukhov 3d1f242abe
[Session Affinity] Update validation and add a test case (#34277) 2023-09-07 17:41:56 -07:00
Yash Tibrewal d4ca41d22d
[OTel C++] Add ability to select channels for stats based on the target (#34273)
@ctiller PTAL for core configuration changes. I converted the type from
std::function to absl::AnyInvocable. Do you think the functor in
RegisteredBuilder should be callable just once or multiple times?
<!--

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-09-07 17:41:26 -07:00
Yash Tibrewal 938d19f63e
[GSM Observability] Add mesh_id support in injected labels (#34247)
Changes - 
1) Change local mesh labels to not be reported on 'started' metrics at
all (even those that we know about) to be consistent. (Since xDS labels
atleast on the server side would not be available on started metric.)
2) Add mesh_id as a local label that is populated by reading the xDS
bootstrap. As part of this, also added a minimal xds bootstrap parsing
logic.

<!--

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-09-07 14:07:57 -07:00
Mark D. Roth a315171880
[ring_hash] delegate to pick_first as per dualstack design (#34244)
Rolls forward the changes from #33093 and some from #33568, which were
rolled back in #33718.
2023-09-07 09:39:35 -07:00
Craig Tiller 5bab2976c4
[max-age] Add jitter to max idle, use absl bitgen for rng (#34225)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-06 10:38:28 -07:00
Mark D. Roth 6dea42c874
[XdsClient] replace e2e test with unit test (#34258)
This should address one of the failures we're seeing in #34224.

The test failure is caused by the changes in timing triggering a race
condition. In the code at head, we delay sending out the subscription
for the first CDS watch until we've already seen the other two CDS
watches, because the previous send_message op has not yet completed, and
by the time it does, we've seen all 3 watches, so we can send a
subscription for all 3 at the same time. With the WorkSerializer change,
the send_message op is complete by the time we see the first CDS watch,
so we subscribe to only that resource, and then later add the other two.
The result is that we'll NACK twice with two different messages, the
first one including only the error about the first resource, and the
second one including all three.

I suspect this same race condition would have been triggered eventually
by the EventEngine migration anyway; the current test basically depends
on the single-thread timing of the iomgr approach. So I'm addressing it
by replacing the e2e test with a unit test that covers the same cases
without the timing issue.
2023-09-06 09:58:35 -07:00
Mark D. Roth b7e680ad46
[health checking] move to generic health watch for dualstack design (#34222)
Rolls forward part of the dualstack changes, mostly from #33427 and a
little bit from #32692, both of which were reverted in #33718.
Specifically:
- For petiole policies, unconditionally start health watch on
subchannels, even if client side health checking is not enabled; in this
case, the health watch will report the subchannel's raw connectivity
state.
- Fix edge cases in health check reporting that occur when a watcher is
started before the initial state is reported.
- When client-side health checking fails, add the subchannel's address
to the RPC failure status message.
- Outlier detection now works only via the health checking watch, not
via the raw connectivity state watch.
- Remove now-unnecessary hack to ensure that outlier detection does not
work for pick_first.
2023-09-05 10:17:30 -07:00
Yash Tibrewal 0dd8a056b8
Revert "[GSM Observability] "Revert Metadata Exchange Implementation"" (#34234)
Reverts grpc/grpc#34233
2023-09-01 12:04:19 -07:00
Eugene Ostroukhov 9800546913
[GSM Observability] "Revert Metadata Exchange Implementation" (#34233)
Reverts grpc/grpc#34051 as it caused issues with import.
2023-09-01 09:06:45 -07:00
Yash Tibrewal 7c79712d13
[GSM Observability] Metadata Exchange Implementation (#34051)
A new metadata type `x-envoy-peer-metadata` is being introduced. We
don't have a better way to do this at the moment compared to just adding
it in `metadata_batch.h`.

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

<!--

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

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

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

<!--

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

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

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

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

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

-->

---------

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

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

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

- c-ares removes the fd from the set ARES_GETSOCK_READABLE

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

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

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

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

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

---------

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

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

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

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

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


<!--

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

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

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

Reason: break import



<!--

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

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

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

---------

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

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

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

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

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

<!--

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

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

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

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

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

---------

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

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

---------

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

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

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

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

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

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

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

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

<!--

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

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

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

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

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

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

<!--

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

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

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

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

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

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

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

---------

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

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

<!--

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

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

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

Second and third commits here fix internal build issues

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

---------

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

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