Commit Graph

6435 Commits

Author SHA1 Message Date
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
Cheng-Yu Chung a02cc7d88a
Remove `include/grpcpp/impl/codegen/delegating_channel.h` (#31495)
* Remove `include/grpcpp/impl/codegen/delegating_channel.h`

* Update

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
2022-11-18 14:10:37 -05:00
Cheng-Yu Chung 405de7ac72
Remove `include/grpcpp/impl/codegen/status.h` (#31285)
* Remove `include/grpcpp/impl/codegen/status.h`

* Include removing status_code_enum

* Update

* Update

* Update zlib (#31356) (#31357)

To mitigate CVE-2022-37434

* Update

Co-authored-by: Mikhail Lappo <miklelappo@users.noreply.github.com>
2022-11-18 13:22:55 -05:00
Cheng-Yu Chung e69592d29c
Remove `include/grpc/impl/codegen/atm.h` (#31673) 2022-11-17 21:16:46 -05:00
Craig Tiller c545350633
Reland: [promises] Compression filter conversion (#31686)
* Revert "Revert "[promises] Compression filter conversion (#31204)" (#31682)"

This reverts commit fa31b36cb1.

* fix?

* fix
2022-11-17 14:08:43 -08:00
Cheng-Yu Chung 3d68bb735a
Remove `include/grpc/impl/codegen/byte_buffer.h` (#31674) 2022-11-17 15:50:03 -05:00
Yash Tibrewal 7372e55ba9
Revert "Revert "Observability Logging: Interfaces and structure"" (#31681)
* Revert "Revert "Observability Logging: Interfaces and structure (#31651)" (#31669)"

This reverts commit 3be177223e.

* Generate projects
2022-11-17 11:12:36 -08:00
Mark D. Roth 589fee0530
xDS: fix crash on wrong listener type (both client and server side) (#31684)
* xds resolver: fix crash on wrong listener type

* fix same bug on server side

* fix clang-tidy and add requested TODO
2022-11-17 07:38:05 -08:00
Craig Tiller fa31b36cb1
Revert "[promises] Compression filter conversion (#31204)" (#31682)
This reverts commit a8c983528a.
2022-11-16 17:01:11 -08:00
Mark D. Roth 64589d7ff3
xds resolver: fix edge cases in interactions between LDS and RDS (#31668)
* xds resolver: fix edge cases in interactions between LDS and RDS

* improve SwitchFromInlineRouteConfigToRds test

* clang-tidy

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-11-16 11:04:20 -08:00
Craig Tiller a8c983528a
[promises] Compression filter conversion (#31204)
* Convert compress filter

* decompress sketch

* Automated change: Fix sanity tests

* progress

* progress

* got the new filter impls compiling

* Automated change: Fix sanity tests

* declare the bits

* allocate control types

* stub in pipe accessors

* init pipes

* send-path

* working through the state machines

* [arena] pool allocator

* add tests

* Automated change: Fix sanity tests

* better sizes

* iwyu

* Automated change: Fix sanity tests

* first pass cut fragments

* fix1

* fix

* Automated change: Fix sanity tests

* fix

* iwyu

* build-deps

* fix for windows

* fix

* fixes

* better-logs

* better-logs

* callpushpush-->tryconcurrently

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* logging improvements

* logging improvements

* fixes

* Automated change: Fix sanity tests

* respect flag

* handle eos

* cancel_after_client_done

* handle failed sends

* more error handling

* Automated change: Fix sanity tests

* more stuff

* remove unnecessary conversion

* hackity hack hack

* fixes

* progress

* Automated change: Fix sanity tests

* capture metadata from promise to recieve up

* spacing

* debug,fix

* not-used

* fix

* fix

* tune

* unify compress/decompress

* fixes

* send_message/send_trailing_metadata ordering

* cleanup loop

* remove minimal stack bits

* better error generation

* fix-build

* Automated change: Fix sanity tests

* cancellation of recv message for forwarded receives

* fix

* compile fix

* fix clobbering

* fix test, convert to gtest

* fix

* Automated change: Fix sanity tests

* cleanup

* fixes

* fix

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fixes

* add test

* Automated change: Fix sanity tests

* fix

* fix

* fix

* no need to store message per filter

* Automated change: Fix sanity tests

* danke yash

* iwyu

* clang-tidy

* Automated change: Fix sanity tests

* fix

* [promise] CallPushPull -> more general TryConcurrently

* Automated change: Fix sanity tests

* [promise] Introduce map_pipe, cleanup factories

* [promise] Promise based filter changes for messages

* [log] Longer space for filenames

* [test] Add some debugability affordances to async_end2end_test

* add comment

* Automated change: Fix sanity tests

* fix-merge

* fix-merge

* fix

* [chttp2] Fix a bug whereby trailers-only is not reported

We don't report trailers-only if the trailers are parsed prior to executing recv_initial_metadata

* comments

* fix for ruby

* review feedback

* merge

* fix

* Automated change: Fix sanity tests

* fix bm?

* re-add dropped flag

* turn on some traces to try and debug ruby

* debug for ruby problem

* proposed chttp2 fix

* Revert "turn on some traces to try and debug ruby"

This reverts commit 1bf3cfd552.

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-11-15 20:16:18 -08:00
Craig Tiller 3be177223e
Revert "Observability Logging: Interfaces and structure (#31651)" (#31669)
This reverts commit 2146107e25.
2022-11-15 18:24:00 -08:00
Yash Tibrewal 2146107e25
Observability Logging: Interfaces and structure (#31651)
* Observability Logging: Interfaces and structure

* Revert unrelated changes

* Fix test build

* Add dependency on Google Apis Logging V2 service and add a dummy logging call

* Add authority
2022-11-15 18:02:22 -08:00
Cheng-Yu Chung 3ef817b3bf
Clean up the TODO item in build target `grpc_base` -- part `slice` (#31003)
* Clean up the TODO item in build target `grpc_base` part `slice`

* Automated change: Fix sanity tests
2022-11-15 13:47:27 -05:00
Mark D. Roth df80a31199
Second attempt: xDS RouteConfig: use ValidationErrors and add unit test (#31658)
* Revert "Revert "xDS RouteConfig: use ValidationErrors and add unit test (#31418)" (#31653)"

This reverts commit 335b74fea7.

* use auto instead of explicitly naming the protobuf map type
2022-11-15 09:31:28 -08:00
Mark D. Roth 335b74fea7
Revert "xDS RouteConfig: use ValidationErrors and add unit test (#31418)" (#31653)
This reverts commit c72a67b6da.
2022-11-14 18:34:42 -08:00
Mark D. Roth c72a67b6da
xDS RouteConfig: use ValidationErrors and add unit test (#31418)
Specific changes:
- Use absl::variant<> for HashPolicy types.
- Pull validation of resulting LB policy configs out of ClusterSpecifierPlugin registry and into RouteConfig validation.
- Don't ignore missing Any fields in HTTP filter configs if is_optional is true, since is_optional should apply only to unsupported filter types, not to malformed resource protos.
- Use ExtractXdsExtension() for HttpConnectionManager config itself.
- Minor API improvements to StatusCodeSet to make it a bit more useful in tests.
- Changed StringMatcher to return the underlying error message when a regex fails to compile.
- Fix a bug whereby a ClusterSpecifierPlugin would not be returned if it was not used in a vhost, even if it was used in another vhost.
2022-11-14 15:17:53 -08:00
Cheng-Yu Chung 47b9a57de9
Remove `g_glip` and `class GrpcLibraryInterface` (#30414)
* Remove `g_glip` and `class GrpcLibraryInterface`

* Update

* Update

* Update

* Automated change: Fix sanity tests (#20)

* Update

* Update

* Update

* Test

* Fix

* Revert "Test"

This reverts commit 2f5c77e98d.

* More fix

* More fix

* More fix

* Minor fix

* Revert "Minor fix"

This reverts commit 1ee3ae4da1.

* Revert "More fix"

This reverts commit 1fc234896b.

* Revert "More fix"

This reverts commit 851393c0e6.

* Revert "More fix"

This reverts commit ed342a51d0.

* Revert "Fix"

This reverts commit 286ad8e639.
2022-11-14 15:30:09 -05:00
aeitzman d934aabb09
Added url validation for aws metadata endpoints in aws external account (#31626)
* Added url validation for aws metadata endpoints in aws external account

* addressing review comments

* fix error message back

* Fix broken test
2022-11-12 11:56:33 -08:00
Esun Kim 250f9fc026
Revived google-readability-casting (#31607)
* Added google-readability-casting

* Fix

* Use brace init for constants

* more

* Fix

* Fix 2

* More fix

* Fixf
2022-11-11 16:44:37 -08:00
Esun Kim 660a6f281e
Added readability-redundant-string-init (#31609)
* Added readability-redundant-string-init

* Fix
2022-11-10 11:14:36 -08:00
Mark D. Roth ddfa85f42b
xDS: fix error message when the request does not match any route (#31593)
* improve error message when there is no matching route

* clean up ConfigSelector API

* clang-format

* fix client_lb_end2end_test

* clang-format
2022-11-09 14:29:22 -08:00
Mark D. Roth 43c8cdd2e9
xDS: fix bug when a cluster specifier plugin was not used in all vhosts (#31583) 2022-11-09 14:23:29 -08:00
Yash Tibrewal 829f41b733
ObservabilityLogging: Add interface for logging and config parsing implementation for GCP observability (#31571)
* ObservabilityLogging: Add interface for logging and config parsing implementation for GCP observability

* Trailing new lines

* Fix naked include

* clang-tidy

* Reviewer comments

* Reviewer comments
2022-11-09 14:13:20 -08:00
Yash Tibrewal 5dfd384655
ObservabilityConfig: Add missing test (#31572) 2022-11-09 12:30:09 -08:00
Esun Kim 530b702259
Update Clang 15 (#31518)
* clang-15

* iwyu

* run clang_format_code

* Clang-Tidy config

* Fix misc-unused-using-decls

* Fixed performance-inefficient-vector-operation

* Sanity
2022-11-04 09:08:03 -07:00
Mark D. Roth a0fb351023
xds_core_e2e_test: fix federation test flake (#31487) 2022-10-31 17:15:34 -07:00
Yash Tibrewal a99a65b6e2
GcpObservability: Add parsing for logging config (#31502)
* GcpObservability: Add parsing for logging config

* Unused parameters

* Reviewer comments
2022-10-31 17:02:20 -07:00
Mark D. Roth 49da06c3a1
Revert "Revert "service config: use new JSON API (#30467)" (#31485)" (#31486)
This reverts commit 008661a5d6.
2022-10-28 16:03:59 -07:00
apolcyn e5f7b1b8cd
c-ares DNS resolver: fix logical race between resolution timeout/cancellation and fd readability (#31443)
* Fix race between c-ares resolution timeout and fd readability
2022-10-27 22:25:17 -07:00
Mark D. Roth 008661a5d6
Revert "service config: use new JSON API (#30467)" (#31485)
This reverts commit b853ccc6db.
2022-10-27 15:13:18 -07:00
Mark D. Roth b853ccc6db
service config: use new JSON API (#30467)
* Declarative JSON parser

* Automated change: Fix sanity tests

* fix

* shrinking stuff a little

* static vtables

* separate fns

* simpler?

* make maps work

* windows fixes

* Automated change: Fix sanity tests

* simplify code

* Automated change: Fix sanity tests

* vtable-test

* dont always create vec/map impls for every type

* comments

* make error consistent

* move method private

* progress

* durations!

* Automated change: Fix sanity tests

* fix

* fix

* fix

* Automated change: Fix sanity tests

* post-load

* Automated change: Fix sanity tests

* document JsonPostLoad() and add static_assert

* don't copy field names, to avoid length limitations

* use absl::Status

* accept either string or number for numeric values

* add test for direct data member of another struct type

* remove unused method

* add support for retaining part of the JSON wirthout processing

* update test for changes in Json::Parse() API

* add absl::optional support

* Automated change: Fix sanity tests

* fix tests, improve error messages, and add overload to parse to existing object

* remove overload of LoadFromJson()

* change special case for Json to instead use Json::Object

* rename resolver_result_parsing to client_channel_service_config

* split up service_config_test into a separate test for each component

* convert client channel service config parser to new API

* fix build

* converted retry global params

* convert retry method-level parsing, but still need to find a way to control parsing via a channel arg

* improve error structure, add missing types, and improve tests

* clang-format

* Automated change: Fix sanity tests

* fix build

* add LoadJsonObjectField(), add LoadFromJson() overload that takes an ErrorList parameter, and add tests for parsing bare top-level types

* fix msan

* Automated change: Fix sanity tests

* fix error message

* Automated change: Fix sanity tests

* fix test

* add ability to disable fields

* plumb in channel args to disable parsing

* Automated change: Fix sanity tests

* use const char* instead of absl::string_view for enable_key

* fix resolver_component_test

* Automated change: Fix sanity tests

* work around mac build problem

* Automated change: Fix sanity tests

* work around gcc6 problem

* Automated change: Fix sanity tests

* fix build

* fix build

* don't use alternative builder in tests

* convert message size service config parser

* convert fault injection service config parser

* rename files

* add specialization for unique_ptr

* avoid moves in client channel service config parser

* avoid moves in retry service config parser, and do some cleanup

* avoid moves in message_size service config parser

* avoid moves for fault injection service config parser, and use internal channel arg

* convert rbac service config parser

* clang-format

* WIP

* convert top-level service config parser

* clang-format

* fix build

* fix rbac service config parser test

* fix signed-ness problem and reversed-conditional bug

* fix unused param

* fix json_string method

* fix max message length defaults

* add copy ctors to appease windows compiler

* fix RLS LB config parser test

* fix name resolution test

* fix build

* work around gmock portability bug

* fix sanity

* add missing build dep

* make RBAC principal and permissions movable, not copyable

* Revert "make RBAC principal and permissions movable, not copyable"

This reverts commit 53315bccc9.

* attempt to simplify HeaderMatcher and StringMatcher parsing

* more bloat reduction in RBAC service config parser

* fix sanity

* add missing build dep

* attempt work-around for MSVC bug

* Revert "attempt work-around for MSVC bug"

This reverts commit e54c89e1e4.

* attempt work-around for Windows build problem

* try another work-around

* fix sanity

* appease clang-tidy

* generate_projects

* attempt to fix Windows build

* more windows fixes

* more windows fix

* yet more windows fixes

* try without noexcept

* remove unnecessary boilerplate

* code review changes

* fix breakage

Co-authored-by: Craig Tiller <craig.tiller@gmail.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Craig Tiller <ctiller@google.com>
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-10-27 11:51:05 -07:00
AJ Heller cbbadf5714
Relax the benchmarks' default minimum execution time (#31479) 2022-10-27 10:41:16 -07:00
Mark D. Roth 447a058837
xDS: remove deprecated C++ APIs in the experimental namespace (#31451) 2022-10-26 14:53:57 -07:00
AJ Heller 05ab5c08a4
Reland "Precondition ChannelArgs with EventEngines (#31166)" (#31469)
This reverts commit a63c81135c.

Needs a cherrypick
2022-10-26 14:52:59 -07:00
Mark D. Roth ba5e477446
xds_end2end_test: fix test flake (#31468) 2022-10-26 11:05:19 -07:00
AJ Heller a63c81135c
Revert "Precondition ChannelArgs with EventEngines (#31166)" (#31462)
This reverts commit 23c7e48779.
2022-10-25 16:41:48 -07:00
Mark D. Roth b9aca8db8a
Second attempt: xDS Listener: use ValidationErrors and add unit test (#31457)
* Revert "Revert "xDS Listener: use ValidationErrors and add unit test (#31351)" (#31456)"

This reverts commit ab3d62ae8f.

* Revert "Revert "xds_http_filters_test: fix includes for import (#31454)" (#31455)"

This reverts commit 32590d110a.

* fix import

* work around internal differences in Any API (string vs. cord)

* iwyu
2022-10-25 15:03:16 -07:00
AJ Heller 23c7e48779
Precondition ChannelArgs with EventEngines (#31166)
* Precondition ChannelArgs with EventEngines

If an EventEngine is not explicitly provided to ChannelArgs, the default
EventEngine will be set when ChannelArgs are preconditioned.

* channel_idle_filter: EE from channel_args

* grpclb: EE from channel_args

* weighted_target: ee from channel_args

* sanitize

* xds cluster manager

* posix native resolver: own an EE ref from iomgr initialization

* reviewer feedback

* reviewer feedback

* iwyu

* iwyu

* change ownership and remove unneeded methods

* clang_format and use consistent engine naming

* store EE ref in channel_stack and use it in channel idle filter

* don't store a separate shared_ptr in NativeDNSResolver

* add GetEventEngine() method to LB policy helper interface

* stop holding refs to the EE instance in LB policies

* clang-format

* change channel stack to get EE instance from channel args

* update XdsWrrLocalityLb

* fix lb_policy_test

* precondition channel_args in ServerBuilder and microbenchmark fixtures

* add required engine to channel_stack test

* sanitize

* dep fix

* add EE to filter fuzzer

* precondition BM_IsolatedFilter channelargs

* fix

* remove unused using statement

* iwyu again??

* remove preconditioning from C++ surface API

* fix bm_call_create

* Automated change: Fix sanity tests

* iwyu

* rm this->

* rm unused deps

* add internal EE arg macro

* precondition filter_fuzzer

* Automated change: Fix sanity tests

* iwyu

* ChannelStackBuilder requires preconditioned ChannelArgs

* iwyu

* iwyu again?

* rm build.SetChannelArgs; rm unused declaration

* fix nullptr string creation

Co-authored-by: Mark D. Roth <roth@google.com>
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-10-25 14:49:59 -07:00
Craig Tiller ab3d62ae8f
Revert "xDS Listener: use ValidationErrors and add unit test (#31351)" (#31456)
This reverts commit 7229bea2fd.
2022-10-25 12:22:18 -07:00
Mark D. Roth 7229bea2fd
xDS Listener: use ValidationErrors and add unit test (#31351)
Additional changes:
- Use absl::variant<> to differentiate between API listeners and TCP listeners.
- Use absl::variant<> to differentiate between an RDS reference and an inline RouteConfig.
- Use common xDS extension code for transport socket extensions in both Listener and Cluster resources.
- Improve xDS HTTP filter registration mechanism.
- Use ValidationErrors for HTTP filter config validation.
2022-10-25 10:01:00 -07:00
Cheng-Yu Chung 493b961dfb
Remove `include/grpcpp/impl/codegen/sync_stream.h` (#31289) 2022-10-24 18:01:12 -04:00
Craig Tiller 74ca6fe586
[test] Add some debugability affordances to async_end2end_test (#31433) 2022-10-24 14:24:24 -07:00
AJ Heller 99aa924a5c
Use minimal benchmark time for bm_event_engine_run in CI (#31440) 2022-10-24 11:15:44 -07:00
Cheng-Yu Chung f4b25ab837
Remove `include/grpcpp/impl/codegen/stub_options.h` (#31287) 2022-10-21 20:23:54 -04:00
Micah Paul Ramos 1f0c6a6748
fix gprc_cli segfault when using binary in and out (#31411) 2022-10-21 12:05:33 -07:00
AJ Heller 8b4c4fc47d
ThreadPool benchmarks (#31419)
* ThreadPool benchmarks

These are nearly identical to the EventEngine benchmarks at the moment. We can consider removing the redundant tests from the EventEngine code and focusing on EventEngine-specific things (e.g., timer cancellation)

* rm unused header

* rm leak

* fix: moved dependencies
2022-10-21 10:56:09 -07:00
Yash Tibrewal 5f6c357e74
Move some targets from //: to //src/core: (#31402)
* temp

* temp

* temp

* top BUILD builds

* everything builds

* buildify

* temp fix_build_deps change

* fix gpr_atm

* additional changes

* fix build files

* nofixdeps

* Generate projects

* json_args

* fix context

* Generate projects

* Sprinkle some avoid_dep tags

* Run fix_build_deps

* Remove additional avoid_dep

* Revert some targets

* grpc_mock_cel
2022-10-20 20:12:53 -07:00
Yash Tibrewal 3b6675c2de
OpenCensus: Move measures, views and CensusContext to include file (#31341)
* OpenCensus: Move measure and view declarations to include file

* Move CensusContext class too

* Fix IWYU

* Guard with experimental

* Formatting

* clang tidy fixes

* cleanup

* Reviewer comments
2022-10-20 17:42:08 -07:00
Vignesh Babu e8c30b487f
Invoking Poller::Work in posix event engine constructor (#31128)
* adding Poller::Work to event engine constructor

* iwyu

* iwyu

* cleanup

* regenerate projects

* fix

* comments

* add experiments flag

* fix

* newline

* newline

* iwyu

* remove some ifdefs

* fix tsan issue in bm_event_engine_run

* Add a quiesce to threadpool

* fix

* Automated change: Fix sanity tests

* disable posix_event_engine_test on windows

Co-authored-by: Craig Tiller <ctiller@google.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-10-19 23:25:04 -07:00
Cheng-Yu Chung 34b1633944
Remove `include/grpcpp/impl/codegen/string_ref.h` (#31286) 2022-10-19 22:56:36 -04:00
Mark D. Roth bd4b5d70c8
xDS: remove v2 support (#31327)
* xDS: remove v2 support

* remove unnecessary templating in fake xDS server code

* remove now-unnecessary workaround for clang bug

* clang-format

* fix unit tests

* iwyu

* remove now-unused v2 proto files

* fix from merge

* clang-format

* fix typo
2022-10-18 08:45:42 -07:00
Cheng-Yu Chung 0fbc4a715c
Remove `include/grpcpp/impl/codegen/service_type.h` (#31282) 2022-10-17 16:26:03 -04:00
Yash Tibrewal 727ae8c885
GcpObservability: Add experimental public target (#31339)
* GcpObservability: Add experimental public target

* Yapf and IWYU
2022-10-17 12:43:45 -07:00
Yash Tibrewal 2c98fe0119
SerializationTraits: Remove unnecessary 2nd template parameter (#31363) 2022-10-17 12:43:12 -07:00
Mark D. Roth 5d0d5fe1a7
xDS: implement xds_wrr_locality LB policy and return xDS LB config from XdsClient (#31160)
* XdsBootstrap: move two more methods out of the interface

* Automated change: Fix sanity tests

* XdsClient: add unit test

* Automated change: Fix sanity tests

* fix memory leaks

* add helper method

* add unsubscription

* add test for multiple subscriptions

* clang-format

* fix build

* fix flakiness

* add checking for other node fields

* add v2 test

* add response builder

* add test for update from server

* add test for update containing only changed resources

* clang-format

* fix build

* add test for resource not existing upon subscription

* add test for stream closed by server

* add test for multiple watchers for the same resource

* add test for connection failure

* clang-format

* add test for resources wrapped in Resource wrapper message

* add test for resource validation failure

* add test for multiple invalid resources, and fix a case in XdsClient

* add test for validation failure for already-cached resource

* add test for server not resending resources after stream disconnect

* clang-format

* fix XdsClient to report channel errors to newly started watchers

* fix XdsClient to send cached errors/does-not-exists to newly started watchers

* fix watcher to ensure events arrive in the expected order

* fix tests

* clang-format

* add test for multiple resource types

* fix xds_cluster_e2e_test

* Automated change: Fix sanity tests

* cleanup

* add federation tests

* clang-format

* remove now-unnecessary XdsCertificateProviderPluginMapInterface

* code review comments

* simplify XdsResourceType::Decode() API

* XdsClient: add unit tests for XdsClusterResourceType

* add XdsClient with gRPC bootstrap config

* add LB policy tests

* started adding CertificateProvider tests

* update for recent API changes

* fix merge bugs

* xDS resource validation: identify extensions by type_url instead of name

* fix build

* migrate to ValidationErrors

* add xds_common_types_test

* finish TLS tests and add LRS tests

* move ScopedExperimentalEnvVar to its own library and remove redundant e2e tests

* add circuit breaking and outlier detection tests

* add validation to outlier detection LB policy parsing

* clang-format

* Automated change: Fix sanity tests

* fix signedness

* fix sanity

* xDS: implement xds_wrr_locality LB policy and return xDS LB config from XdsClient

* fix unused parameter

* fix sanity

* fix test

* Automated change: Fix sanity tests

* fix aggregate cluster bug

* Automated change: Fix sanity tests

* absl::make_unique -> std::make_unique

* fix sanity

* fix sanity

* iwyu

* iwyu

* update code for XdsResourceTypeImpl changes

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-10-17 11:22:43 -07:00
Cheng-Yu Chung ad04dc3766
Remove `include/grpcpp/impl/codegen/slice.h` (#31283) 2022-10-17 14:19:27 -04:00
Mark D. Roth 93433d2faf
xDS RBAC: remove env var protection (#31348)
* xDS RBAC: remove env var protection

* fix federation server test

* fix sanity
2022-10-17 08:50:05 -07:00
Yash Tibrewal 2ffff621a4
OpenCensusTest: Fix flakiness (#31349) 2022-10-13 16:06:51 -07:00
Craig Tiller d1bce5c868
reduce test size (#31345) 2022-10-13 11:58:55 -07:00
Mark D. Roth 14c914dee0
xDS: refactor code for handling xDS extensions and add tests (#31295)
* general-purpose utility for validation xDS extensions

* plumb XdsExtension into HTTP filters and ClusterSpecifiers

* clang-format

* fix tests

* iwyu

* fix build with old compilers
2022-10-13 05:16:34 -07:00
Cheng-Yu Chung d699b574a8
Remove `include/grpcpp/impl/codegen/server_callback.h` (#31279) 2022-10-12 15:37:14 -04:00
Mark D. Roth 3475489bf3
xDS: NACK EDS resources with duplicate addresses (#31321)
* xDS: NACK EDS resources with duplicate addresses

* iwyu

* update e2e tests

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-10-12 11:45:11 -07:00
Cheng-Yu Chung a1cb2f3d6f
Remove `include/grpcpp/impl/codegen/server_callback.h` (#31280) 2022-10-12 14:34:18 -04:00
Mark D. Roth b6bdde391a
client_lb_e2e_test: add another error case to the regex (#31318) 2022-10-11 16:13:32 -07:00
Cheng-Yu Chung d1c04427f3
Remove `include/grpcpp/impl/codegen/rpc_method.h` (#31269) 2022-10-11 10:57:44 -04:00
Mark D. Roth ede4e42c7d
weighted_target LB: use uint64_t for aggregate weights to avoid overflow (#31244)
* weighted_target LB: use uint64_t for aggregate weights to avoid overflow

* iwyu

* fix undefined behavior

* iwyu

* iwyu again

* fix test weights to sum to uint32 max
2022-10-10 10:29:01 -07:00
Cheng-Yu Chung cc58369279
Remove `include/grpcpp/impl/codegen/completion_queue.h` (#31059)
* Remove `include/grpcpp/impl/codegen/completion_queue.h`

* Update

* Update

* Fix build error

* Update
2022-10-10 11:35:09 -04:00
Craig Tiller 20d1efc38a
[stats] Move core stats to C++ (#30936)
* begin c++

* Automated change: Fix sanity tests

* progress

* progress

* missing-files

* Automated change: Fix sanity tests

* moved-from-stats

* remove old benchmark cruft, get tests compiling

* iwyu

* Automated change: Fix sanity tests

* fix

* fix

* fixes

* fixes

* add needed constructor

* Automated change: Fix sanity tests

* iwyu

* fix

* fix?

* fix

* fix

* Remove ResetDefaultEventEngine

Now that it is a weak_ptr, there's no need to explicitly reset it. When
the tracked shared_ptr is deleted, the weak_ptr will fail to lock, and a
new default EventEngine will be created.

* forget existing engine with FactoryReset

* add visibility

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: AJ Heller <hork@google.com>
2022-10-09 21:22:08 -07:00
Craig Tiller afa3a6c890
[event_engine] Fix for the EE/iomgr shutdown ordering problem (#31265)
* Remove ResetDefaultEventEngine

Now that it is a weak_ptr, there's no need to explicitly reset it. When
the tracked shared_ptr is deleted, the weak_ptr will fail to lock, and a
new default EventEngine will be created.

* forget existing engine with FactoryReset

* init/shutdown in event engine for now

* fix

* fix

* fix windows deadlock

* Automated change: Fix sanity tests

* fix

* better windows fix

Co-authored-by: AJ Heller <hork@google.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-10-07 21:35:49 -07:00
Vignesh Babu 8f1004f435
Increase timeout in xds_cluster_end2end_test (#31260)
* Add testonly attribute to mock_event_engine

* Increase rpc timeout in xds_cluster_end2end_test.cc
2022-10-06 13:25:26 -07:00
Cheng-Yu Chung d76c6f61f0
Remove `include/grpcpp/impl/codegen/method_handler.h` (#31249) 2022-10-06 15:50:54 -04:00
Mark D. Roth 11fbb63279
outlier detection: remove env var protection (#31251)
* outlier detection: remove env var protection

* fix sanity
2022-10-06 11:26:29 -07:00
Cheng-Yu Chung 488f17eb46
Remove `include/grpcpp/impl/codegen/message_allocator.h` (#31246) 2022-10-06 13:18:24 -04:00
Cheng-Yu Chung a192f155b9
Remove `include/grpcpp/impl/codegen/config.h` (#31061)
* Remove `include/grpcpp/impl/codegen/config.h`

* Update
2022-10-06 13:14:16 -04:00
Yash Tibrewal 8cffd1044e
OpenCensus: Ability to globally disable stats and tracing (#31252)
* OpenCensus: Ability to globally disable stats and tracing

* Fix docs
2022-10-05 14:38:15 -07:00
Mark D. Roth f2a377d35e
xDS cluster resource type: use ValidationErrors and add unit test (#31025)
* XdsBootstrap: move two more methods out of the interface

* Automated change: Fix sanity tests

* XdsClient: add unit test

* Automated change: Fix sanity tests

* fix memory leaks

* add helper method

* add unsubscription

* add test for multiple subscriptions

* clang-format

* fix build

* fix flakiness

* add checking for other node fields

* add v2 test

* add response builder

* add test for update from server

* add test for update containing only changed resources

* clang-format

* fix build

* add test for resource not existing upon subscription

* add test for stream closed by server

* add test for multiple watchers for the same resource

* add test for connection failure

* clang-format

* add test for resources wrapped in Resource wrapper message

* add test for resource validation failure

* add test for multiple invalid resources, and fix a case in XdsClient

* add test for validation failure for already-cached resource

* add test for server not resending resources after stream disconnect

* clang-format

* fix XdsClient to report channel errors to newly started watchers

* fix XdsClient to send cached errors/does-not-exists to newly started watchers

* fix watcher to ensure events arrive in the expected order

* fix tests

* clang-format

* add test for multiple resource types

* fix xds_cluster_e2e_test

* Automated change: Fix sanity tests

* cleanup

* add federation tests

* clang-format

* remove now-unnecessary XdsCertificateProviderPluginMapInterface

* code review comments

* simplify XdsResourceType::Decode() API

* XdsClient: add unit tests for XdsClusterResourceType

* add XdsClient with gRPC bootstrap config

* add LB policy tests

* started adding CertificateProvider tests

* update for recent API changes

* fix merge bugs

* xDS resource validation: identify extensions by type_url instead of name

* fix build

* migrate to ValidationErrors

* add xds_common_types_test

* finish TLS tests and add LRS tests

* move ScopedExperimentalEnvVar to its own library and remove redundant e2e tests

* add circuit breaking and outlier detection tests

* add validation to outlier detection LB policy parsing

* clang-format

* Automated change: Fix sanity tests

* fix signedness

* fix sanity

* fix sanity

* iwyu

* update code for XdsResourceTypeImpl changes

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-10-05 11:27:30 -07:00
Mark D. Roth 126393c9c1
client_lb_end2end_test: update failure regex to include "Socket closed" (#31242) 2022-10-05 10:09:17 -07:00
Craig Tiller 2d00d50c59
[event_engine] Improve scaling in threadpool (#31234)
* fixes

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fixes

* fixes

* fix

* fix-win

* fix iwyu

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-10-05 00:17:23 -07:00
Esun Kim 3c96517fc0
Simplified GRPC_ERROR_CREATE macros (#31222)
* Simplified GRPC_ERROR_CREATE macros

* Code migration
2022-10-04 15:55:47 -07:00
Cheng-Yu Chung 4ba0f9afb5
Revert "Revert "Remove `include/grpcpp/impl/codegen/client_callback.h` (#31005)" (#31079)" (#31087)
This reverts commit da08fe1d6f.
2022-10-04 13:59:32 -04:00
Cheng-Yu Chung 0e8a6515df
Remove `include/grpcpp/impl/codegen/client_context.h` (#31006)
* Remove `include/grpcpp/impl/codegen/client_context.h`

* Update

* Update
2022-10-03 18:01:22 -04:00
Esun Kim 347bf1a1f4
Removed GRPC_ERROR_[INT|STR] macros (#31195)
* Clean-up which

* Reformat
2022-10-03 11:33:56 -07:00
Esun Kim 4bd27c524a
More changes (#31194) 2022-09-30 17:10:01 -07:00
Craig Tiller a23eae84c9
Revert "[flakes] Update flakiness (#31121)" (#31173)
This reverts commit bdc799af73.
2022-09-29 14:06:44 -07:00
Craig Tiller bdc799af73
[flakes] Update flakiness (#31121)
* update

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-29 11:04:22 -07:00
Craig Tiller 9c98d67d7a
[c++14] absl::make_unique --> std::make_unique (#31159)
* [c++14] absl::make_unique --> std::make_unique

* fix

* fix
2022-09-29 06:45:17 -07:00
AJ Heller 2ee2c91c92
Reland x2: Make GetDefaultEventEngine return a shared_ptr (#30619)
* Reland x2: Make GetDefaultEventEngine return a shared_ptr

* remove thread leak from NativeDNSResolver

This is not going to work for resolvers that support cancellation.

* give resolvers bounded lifetimes

Some resolver own EventEngines. EventEngines cannot run off the end of
the process since they have unjoined threads (problematic in a small set
of environments). This gives resolvers bounded lifetimes, and allows
replacement of resolvers without ASAN issues of deleting resolvers in
active use (occurs in tests).

* fix

* fix windows

* fix surface init test

* fix

* sanitize

* use after move

* the test must wait for the callback to be destroyed

* windows fix: delete the resolver on iomgr shutdown, not before

* Make TimerManager threads non-joinable

On gRPC shutdown, any unjoined TimerManager threads will cause TSAN to
detect thread leaks. This fix resolves issues I saw in end2end test
shutdown in another PR, where a single timer manager thread was always
alive after the test ended.

The long-term solution is to integrate the new ThreadPool here, but this
unblocks me for now.

* backport fix

* fix

* shared_ptr<EventEngine> in EventEngine benchmarks
2022-09-28 08:39:56 -07:00
Esun Kim d43511f4af
Removed GRPC_ERROR_NONE (#31131) 2022-09-27 23:17:39 -07:00
AJ Heller a874b8f6ca
EventEngine::Run microbenchmarks (#30769)
* [WIP] EventEngine::Run microbenchmarks

* Add fanout impl and fix tracking of time spent doing work in threads

* tune down benchmarks; fix fanout counting logic.

* tune down closure fanout tests

* format

* odr

* reviewer feedback

* unify some fanout logic; add a large-AnyInvocable test

lambdas that take an allocation are about 10x slower

* reviewer feedback

* fix invalid vector access

* rm DNS

* format

* copy params for each lambda callback

This fixes segfaults when we cannot ensure all callbacks are complete
before exiting the test.

* s/promise/Notification/g bm_exec_ctx

* ODR and leak

* fix division by zero

* fix
2022-09-27 14:57:36 -07:00
Yash Tibrewal 6d249c0af2
Observability: Experimental arg to disable client side tracing (#31093)
* Observability: Experimental arg to disable client side tracing

* Fix IWYU

* Reviewer comments

* Reviewer comments

* Reviewer comment: Move experimental/internal arg to different file

* Fix build

* Fix IWYU
2022-09-27 14:34:07 -07:00
Esun Kim ba8af0157b
Removing GRPC_ERROR_[REF|UNREF|IS_NONE] (#31089)
* Removing GRPC_ERROR_[REF|UNREF|IS_NONE]

* Clean up unnecessary error

* Fix

* Fix2

* Remove unnecessary else
2022-09-26 15:41:12 -07:00
Mark D. Roth cdb7d2c93c
XdsEndpointResourceType: use ValidationErrors and add unit tests (#31076)
* simplify XdsResourceType::Decode() API

* fix xds_client_test

* xDS endpoint: use ValidationErrors to improve error messages

* fix sanity

* add xDS endpoint resource type test

* clang-format

* remove a couple of now-unnecessary end2end tests

* generate_projects

* fix xds_csds_e2e_test

* iwyu

* attempt to avoid ubsan failure
2022-09-26 11:45:56 -07:00
Craig Tiller ebc4f236b6
[slice] Remove _internal variants of APIs (#30953)
* [slice] Remove _internal variants of APIs

* Automated change: Fix sanity tests

* fix

* reduce bloat

* fixes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-24 13:34:00 -07:00
Craig Tiller 32b43f0168
[channel_args] Make channel_stack_init take new type (#30841)
* [channel_args] Make channel_stack_init take new type

* fix

* fix

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-23 11:31:03 -07:00
Yousuk Seung 747d016397
Support --max_recv_msg_size in grpc cli (#31106)
* Support --max_recv_msg_size in grpc cli

* Comment typos fixed in tests.
2022-09-23 11:13:29 -07:00
AJ Heller fb14fdf0e0
Performant thread-safe Work Queue (#30821)
* WorkQueue

* weaken the large obj stress test for Windows; documentation

* update comment

* Add WorkQueue microbenchmark. Results below ...

------------------------------------------------------------------------------------------
Benchmark                                Time             CPU   Iterations UserCounters...
------------------------------------------------------------------------------------------
BM_WorkQueueIntptrPopFront/1           297 ns          297 ns      2343500 items_per_second=3.3679M/s
BM_WorkQueueIntptrPopFront/8          7022 ns         7020 ns        99356 items_per_second=1.13956M/s
BM_WorkQueueIntptrPopFront/64        59606 ns        59590 ns        11770 items_per_second=1074k/s
BM_WorkQueueIntptrPopFront/512      477867 ns       477748 ns         1469 items_per_second=1071.7k/s
BM_WorkQueueIntptrPopFront/4096    3815786 ns      3814925 ns          184 items_per_second=1073.68k/s
I0902 19:05:22.138022069      12 test_config.cc:194]         TestEnvironment ends
================================================================================

* use int64_t for times. 0 performance change

------------------------------------------------------------------------------------------
Benchmark                                Time             CPU   Iterations UserCounters...
------------------------------------------------------------------------------------------
BM_WorkQueueIntptrPopFront/1           277 ns          277 ns      2450292 items_per_second=3.60967M/s
BM_WorkQueueIntptrPopFront/8          6718 ns         6716 ns       105497 items_per_second=1.19126M/s
BM_WorkQueueIntptrPopFront/64        56428 ns        56401 ns        12268 items_per_second=1.13474M/s
BM_WorkQueueIntptrPopFront/512      458953 ns       458817 ns         1550 items_per_second=1.11591M/s
BM_WorkQueueIntptrPopFront/4096    3686357 ns      3685120 ns          191 items_per_second=1.1115M/s
I0902 19:25:31.549382949      12 test_config.cc:194]         TestEnvironment ends
================================================================================

* add PopBack tests: same performance profile exactly

* use Mutex instead of Spinlock

It's safer, and so far equally performant in benchmarks of opt builds

* add deque test for comparison. It is faster on all tests.

* Add sparsely-populated multi-threaded benchmarks.

* fix

* fix

* refactor to help thread safety analysis

* Specialize WorkQueue for Closure*s and AnyInvocables

* remove unused callback storage

* add single-threaded benchmark for closure vs invocable

* sanitize

* missing include

* move bm_work_queue to microbenchmarks so it isn't exported

* s/workqueue/work_queue/g

* use nullptr instead of optionals for popped closures

* reviewer test suggestion

* private things are private

* add a work_queue fuzzer

Ran for 10 minutes @ 42 jobs @ 42 workers. Zero failures.

Checked in a selection of 100 good seeds after merging the thousands of
results.

* fix

* fix header guards

* nuke the corpora

* feedback

* sanitize

* Timestamp::Now

* fix

* fuzzers do not work on windows

* windows does not like multithreaded benchmark tests
2022-09-23 09:10:42 -07:00
Craig Tiller f15ba1ffc7
[tls] Remove support for pthread tls (#31040)
* [tls] Remove support for pthread tls

* fix

* fix

* fix

* lalala

* fix

* fix

* Clean up deployment target changes

* additional clean up of deployment target

* regen podspec for updated file list

* remove destination change

* deployment target override for ios cpp test

* fix?

* fix run test script & update test destination

* [tls] Remove support for pthread tls

* fix

* fix

* fix

* lalala

* fix

* fix

* Clean up deployment target changes

* additional clean up of deployment target

* regen podspec for updated file list

* remove destination change

* deployment target override for ios cpp test

* fix?

* fix run test script & update test destination

* merge

* fix

* final script fix for proper destination & target

* more deployment target fix

* objc ios test script fix

Co-authored-by: Denny C. Dai <dennycd@me.com>
Co-authored-by: dennycd <dennycd@google.com>
2022-09-22 22:39:35 -07:00
Craig Tiller 1ad4bbe78e
Revert "fix (#31018)" (#31021)
This reverts commit 2e6f268dfc.
2022-09-21 09:28:28 -07:00
Craig Tiller da08fe1d6f
Revert "Remove `include/grpcpp/impl/codegen/client_callback.h` (#31005)" (#31079)
This reverts commit 17f515744f.
2022-09-20 18:58:54 -07:00
Yash Tibrewal 9cff4d2d28
OpenCensus Plugin: Add missing measure and views for started RPCs (#31034) 2022-09-20 17:26:16 -07:00
Mark D. Roth 07df5ff9c7
json_object_loader: refactor ErrorList into its own library (#31049)
* json_object_loader: refactor ErrorList into its own library

* fix observability_config_test

* generate_projects

* iwyu
2022-09-20 11:58:27 -07:00
Cheng-Yu Chung 0cb5faf8e4
Remove `include/grpcpp/impl/codegen/client_interceptor.h` (#31054)
* Remove `include/grpcpp/impl/codegen/client_interceptor.h`

* Update comment
2022-09-20 14:03:46 -04:00
Cheng-Yu Chung 17f515744f
Remove `include/grpcpp/impl/codegen/client_callback.h` (#31005) 2022-09-20 13:51:55 -04:00
Mark D. Roth e475e165a7
LB policies: convert to new JSON API (#30468)
* Declarative JSON parser

* Automated change: Fix sanity tests

* fix

* shrinking stuff a little

* static vtables

* separate fns

* simpler?

* make maps work

* windows fixes

* Automated change: Fix sanity tests

* simplify code

* Automated change: Fix sanity tests

* vtable-test

* dont always create vec/map impls for every type

* comments

* make error consistent

* move method private

* progress

* durations!

* Automated change: Fix sanity tests

* fix

* fix

* fix

* Automated change: Fix sanity tests

* post-load

* Automated change: Fix sanity tests

* document JsonPostLoad() and add static_assert

* don't copy field names, to avoid length limitations

* use absl::Status

* accept either string or number for numeric values

* add test for direct data member of another struct type

* remove unused method

* add support for retaining part of the JSON wirthout processing

* update test for changes in Json::Parse() API

* add absl::optional support

* Automated change: Fix sanity tests

* fix tests, improve error messages, and add overload to parse to existing object

* remove overload of LoadFromJson()

* change special case for Json to instead use Json::Object

* fix build

* improve error structure, add missing types, and improve tests

* clang-format

* Automated change: Fix sanity tests

* update grpclb parsing

* fix build

* convert outlier_detection LB config

* convert priority LB policy

* convert ring_hash LB config

* add LoadJsonObjectField(), add LoadFromJson() overload that takes an ErrorList parameter, and add tests for parsing bare top-level types

* fix msan

* Automated change: Fix sanity tests

* WIP on RLS parsing conversion

* fix error message

* Automated change: Fix sanity tests

* fixed RLS parser tests

* fix error prefix in OD, priority, and ring_hash policies

* convert weighted_target policy

* convert xds_cluster_manager

* convert cds policy

* convert xds_cluster_resolver

* convert xds_cluster_impl

* Automated change: Fix sanity tests

* fix test

* fix xds_cluster_impl drop config parsing

* Automated change: Fix sanity tests

* attempt to fix mac build

* work around gcc6 problem

* Automated change: Fix sanity tests

* fix build

* add mechanism to conditionally disable individual fields

* fix build

* Automated change: Fix sanity tests

* fix move assignment operator

* fix build

* Automated change: Fix sanity tests

* fix build and simplify RLS duplicate key check

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix build

* iwyu

* fix build

* fix sanity

* add LoadRefCountedFromJson() and use it to eliminate some moves

* fix build

* Automated change: Fix sanity tests

Co-authored-by: Craig Tiller <craig.tiller@gmail.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Craig Tiller <ctiller@google.com>
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-09-20 09:14:14 -07:00
Mark D. Roth 6d792b6bce
xDS resource validation: identify extensions by type_url instead of name (#31024)
* xDS resource validation: identify extensions by type_url instead of name

* fix build
2022-09-20 09:06:01 -07:00
Yash Tibrewal 5cd8ee25f8
GcpObservabilityConfig: New changes (#31038)
* GcpObservabilityConfig: New changes

* Fix IWYU
2022-09-19 15:29:46 -07:00
Yash Tibrewal 27e5b4e187
GcpObservabilityConfig: Fall-back to GCP environment variables (#31022) 2022-09-19 11:48:35 -07:00
Yash Tibrewal 6098202c09
GcpObservabilityTest: Cleanup (#31023) 2022-09-19 11:47:53 -07:00
Craig Tiller 2e6f268dfc
fix (#31018) 2022-09-16 12:41:08 -07:00
Craig Tiller d9ac89a441
[gprpp] absl::Notification polyfill (#31008)
* [gprpp] absl::Notification polyfill

* grpc_core::

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-16 09:06:03 -07:00
Craig Tiller 96f5cddb5f
[time] Introduce time sources (#30815)
* [time] Introduce time sources

* make import trivial

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* review feedback

* fix

* Automated change: Fix sanity tests

* ios fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-15 21:41:04 -07:00
Craig Tiller c2ab8c99bb
Revert "Revert "[c++] Move environment functions to C++ (#30937)" (#30986)" (#30988)
This reverts commit 96264e07b8.
2022-09-14 14:19:36 -07:00
Craig Tiller 96264e07b8
Revert "[c++] Move environment functions to C++ (#30937)" (#30986)
This reverts commit 74c0d6fe3f.
2022-09-14 11:53:55 -07:00
Mark D. Roth e5aadf985e
Revert "Revert "client_channel: allow LB policy to communicate update errors to resolver (#30809)" (#30970)" (#30981)
This reverts commit 1648bc08e0.
2022-09-14 11:46:42 -07:00
Cheng-Yu Chung b765b06155
Remove `include/grpcpp/impl/codegen/async_stream.h` (#30941)
* Remove `include/grpcpp/impl/codegen/async_stream.h`

* Fix

* Fix

* Update
2022-09-14 13:40:35 -04:00
Craig Tiller 74c0d6fe3f
[c++] Move environment functions to C++ (#30937)
* [gprpp] Move env to C++

* move headers/impl

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* Update http_proxy.cc

* fix

* fix

* rename

* fix merge

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-14 10:17:15 -07:00
Richard Belleville 1648bc08e0
Revert "client_channel: allow LB policy to communicate update errors to resolver (#30809)" (#30970)
This reverts commit 9ff943b81e.
2022-09-13 15:07:50 -07:00
Craig Tiller 92f58c18a8
Revert "Revert "[chttp2] Improve huffman decode efficiency (#30479)" (#30961)" (#30962)
This reverts commit bfea47093f.
2022-09-13 13:16:55 -07:00
Cheng-Yu Chung cb3d7a9e9e
Revert "Revert "Remove `include/grpcpp/impl/codegen/async_unary_call.h`"" (#30955)
* Revert "Revert "Remove `include/grpcpp/impl/codegen/async_unary_call.h` (#30945)" (#30950)"

This reverts commit 0c454fa875.

* Fix
2022-09-13 15:57:15 -04:00
Carlos Sobrinho 63df245532
If `-infile` is not readable, bail out and show an error! (#30760)
Without this, `grpc_cli` will connect, send the metadata and then completely stall until it is killed leading to believe it is the server that is stalled instead of `grpc_cli` that won't send the message.
2022-09-13 12:55:42 -07:00
Craig Tiller bfea47093f
Revert "[chttp2] Improve huffman decode efficiency (#30479)" (#30961)
This reverts commit 6c7f921f5f.
2022-09-13 12:25:00 -07:00
Yash Tibrewal b3ad894e05
GcpObservability: Use the observability config (#30932)
* GcpObservability: Use the observability config

* iwyu

* Fix build
2022-09-13 11:47:19 -07:00
Cheng-Yu Chung 6e57952589
Revert "Revert "Remove `include/grpcpp/impl/codegen/async_generic_service.h` (#30450)" (#30951)" (#30956)
This reverts commit a81b61113c.
2022-09-13 14:45:38 -04:00
Craig Tiller 6c7f921f5f
[chttp2] Improve huffman decode efficiency (#30479)
* first pass

* refinement #1

* fix

* opt

* 8

* 5

* 12

* 10

* 7

* 15

* 8n

* 15n

* 8a

* 16a

* 15a

* 5a

* 10a

* 7a

* 9a

* 12a

* 11a

* 11b

* 11b

* 7b

* 15b

* 14b

* 15i

* 12i

* 9i

* 10i

* finalizing

* fix

* tweak

* 10f

* 10r

* 7r

* 8r

* 9r

* more

* rething

* 8s

* 9s

* 12s

* 7s

* 10s

* 15snr

* 12snr

* 14snr

* 13snr

* 11snr

* 20snr

* 15snr

* 18snr

* 7snr

* 7snr

* 12-2stp

* 13-2stp

* 14-2stp

* 11-2stp

* 10-2stp

* 9-3stp

* 8-3stp

* 7-3stp

* 8-2stp

* auto-tune1

* max-depth-2

* max-depth-3

* max-depth-2

* abbreviate

* working version

* add benchmark

* fix

* fix

* fix

* ditch define

* better code layout

* static fns

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix build

* cleanup and comment

* fmt

* fix

* test

* tag

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* progress

* progress

* progress

* fixes

* cleanup

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fmt

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* fix

* add encode/decode fuzzer

* Automated change: Fix sanity tests

* fix

* fix

* fix

* review feedback

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-13 11:24:35 -07:00
Mark D. Roth 9ff943b81e
client_channel: allow LB policy to communicate update errors to resolver (#30809)
* client_channel: allow LB policy to communicate update errors to resolver

* fix tests

* Automated change: Fix sanity tests

* fix build

* fix another "ignoring return value" warning

* fix use-after-move

* fix channel to invoke resolver callback when service config fails on initial resolution

* remove outdated TODO

* improve comments

* fix PollingResolver to defer re-resolution requests while waiting for result-health callback

* Automated change: Fix sanity tests

* absl::exchange -> std::exchange

* fix dns_resolver_cooldown_test

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-09-12 17:17:03 -07:00
Mark D. Roth aaec373a10
Second attempt: XdsClient: add unit test and fix watcher notification bugs (#30943)
* Revert "Revert "XdsClient: add unit test and fix watcher notification bugs (#30823)" (#30942)"

This reverts commit 6d2c4a8314.

* use GRPC_CUSTOM_JSONUTIL macro for JsonPrintOptions
2022-09-12 16:58:31 -07:00
Craig Tiller 0c454fa875
Revert "Remove `include/grpcpp/impl/codegen/async_unary_call.h` (#30945)" (#30950)
This reverts commit 7dbc73d4f3.
2022-09-12 16:44:07 -07:00
Craig Tiller a81b61113c
Revert "Remove `include/grpcpp/impl/codegen/async_generic_service.h` (#30450)" (#30951)
This reverts commit c6326bbc75.
2022-09-12 16:43:55 -07:00
Cheng-Yu Chung c6326bbc75
Remove `include/grpcpp/impl/codegen/async_generic_service.h` (#30450)
* Remove `include/grpcpp/impl/codegen/async_generic_service.h`

* Fix test

* Reserve compatibility
2022-09-12 18:19:59 -04:00
Cheng-Yu Chung 7dbc73d4f3
Remove `include/grpcpp/impl/codegen/async_unary_call.h` (#30945) 2022-09-12 18:05:10 -04:00
Richard Belleville 6d2c4a8314
Revert "XdsClient: add unit test and fix watcher notification bugs (#30823)" (#30942)
This reverts commit bcd8c991e6.
2022-09-12 12:01:42 -07:00
Mark D. Roth bcd8c991e6
XdsClient: add unit test and fix watcher notification bugs (#30823)
This adds a unit test for XdsClient and fixes several watcher-notification bugs found in the process.  Specifically:
- When an ADS stream fails or an xDS channel reports a connectivity failure, report an error only to the watchers for resources being subscribed to on that particular channel, not to watchers on other channels.
- Cache the error status for the channel, so that if a new watcher is started after the channel reports the error, we can immediately report that error to the new watcher.
- If a resource is NACKed and has not been previously cached, or does not exist, report that fact to any new watcher that may be started later.
- If a resource in an ADS response is unparseable but is wrapped in a `Resource` wrapper, we do know its name, so record the validation failure in the cache and report it to the watchers.

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-09-12 09:44:35 -07:00
Yash Tibrewal ebcda5f0c1
GcpObservabilityConfig: s/disabled/enabled (#30905) 2022-09-09 15:58:38 -07:00
Yash Tibrewal f7f4c9b584
GcpObservability: Code for reading config from env var (#30889)
* GcpObservability: Code for reading config from env var

* Comments

* Fix deps

* clang-tidy
2022-09-09 15:14:15 -07:00
Craig Tiller 2b46cb40d3
[config] Move certificate provider registry into core config (#30890)
* [config] Move certificate provider registry into core config

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-09 11:29:05 -07:00
Yash Tibrewal a644d8c9b4
GcpObservabilityConfig: cloud_trace.sampling_rate (#30904) 2022-09-08 21:43:47 -07:00
Yash Tibrewal 260a02d1ad
Revert "Revert "GcpObservabilityConfig: Add some basic field parsing structure"" (#30894)
* Revert "Revert "GcpObservabilityConfig: Add some basic field parsing structure (#30866)" (#30892)"

This reverts commit 37b631d1fd.

* Add json_args deps for layering check
2022-09-08 13:43:37 -07:00
Craig Tiller 37b631d1fd
Revert "GcpObservabilityConfig: Add some basic field parsing structure (#30866)" (#30892)
This reverts commit 31c68b5f10.
2022-09-07 20:20:44 -07:00
Craig Tiller 7ba58bb925
[build] Move certificate provider registry into its own build target (#30836)
* [build] Move cert registry into its own build target

* Automated change: Fix sanity tests

* fix

* forgot to save file

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-07 17:23:03 -07:00
Yash Tibrewal 31c68b5f10
GcpObservabilityConfig: Add some basic field parsing structure (#30866)
* GcpObservabilityConfig: Add some basic field parsing structure

* IWYU

* clang format
2022-09-07 15:27:23 -07:00
Craig Tiller b463cabeec
Update flaky tests (#30873)
* Update flaky tests list

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-07 10:16:34 -07:00
Craig Tiller fed6c180e9
[census] Add time scaling to test (#30851) 2022-09-06 08:40:39 -07:00
Vignesh Babu 70dd34b438
Revert "Revert "Modifying iomgr tcp code to use event engine EndpointConfig instead of channel_args"" (#30509)
* Revert "Revert "Modifying iomgr tcp code to use event engine EndpointConfig instead of channel_args (#30028)" (#30495)"

This reverts commit 0b1a8c984b.

* bug fix

* bug fix

* fix sanity
2022-09-01 16:51:17 -07:00
Mark D. Roth bf9304ef17
client_channel, client_auth: rewrite disallowed status codes from the control plane (#30789)
* client_channel: rewrite illegal status codes from control plane

* rewrite illegal status codes for call creds

* move fail_lb policy out of retry_lb_fail test so it can be reused

* test resolver and LB policy status rewrites

* add test for ConfigSelector status rewriting

* attempt to add client_auth filter unit test

* fix client_auth_filter test

* cleanup test

* fix build

* fix some memory leaks

* Automated change: Fix sanity tests

* Update client_auth_filter_test.cc

* fix build

* code review comments

* clang-tidy

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
Co-authored-by: Craig Tiller <ctiller@google.com>
2022-09-01 15:15:14 -07:00
Mark D. Roth 2142183ef4
XdsClient: don't ignore resources after an invalid Resource wrapper (#30819) 2022-09-01 14:02:00 -07:00
Craig Tiller 622dd886e6
Update flaky tests list (#30771)
* Update flaky tests list

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-30 21:42:59 -07:00
Craig Tiller 6746f670c1
[cleanup] Remove low level counters (#30611)
* [cleanup] Remove low level counters

* clean up code

* Automated change: Fix sanity tests

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-30 21:13:15 -07:00
Mark D. Roth 2c28b44852
subchannel: include IP address in status messages (#30784)
* subchannel: include IP address in status messages

* Automated change: Fix sanity tests

* add comment about lock annotations

* clang-format

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-08-30 17:01:59 -07:00
Craig Tiller 004788af3d
[cleanup] Remove profiling timers (#30779)
* [cleanup] Remove profiling timers

- nobody has used this system in years
- if we needed it, we'd probably rewrite it at this point to be something more modern
- let's remove it until that need arises

* fix

* fixes
2022-08-30 13:40:08 -07:00
Yash Tibrewal 60a1b4ad6f
Revert "Revert "GCP Observability: Add plugin registry API"" (#30766)
* Revert "Revert "GCP Observability: Add plugin registry API (#30571)" (#30765)"

This reverts commit b8fde2ab47.

* Remove gcp observability target from header
2022-08-29 17:22:03 -07:00
Vignesh Babu 602c5e8e97
Add a provision to allow specification of separate set of channel args for the channel to grpclb server (#30755)
* Add a provision to allow specification of separate set of channel args for the grpclb channel

* fix asan issue

* review comments

* review comments

* add missing file

* remove unused hdr

* fix sanity

* fix comments

* remove unused hdr
2022-08-29 17:21:46 -07:00
Craig Tiller 535168431a
[lb_policy] Move to core configuration system (#30483)
* [load_balancing] Move interfaces to src/core/lib/load_balancing

* Automated change: Fix sanity tests

* progress

* progress

* fix

* missed file

* Automated change: Fix sanity tests

* update tests

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fixes

* fix

* fix

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-27 08:35:40 -07:00
Alisha Nanda b94fb2b894
Fix PickFirstTest.PendingUpdateAndSelectedSubchannelFails flake in client_lb_end2end_test (#30741)
* ConnectionAttemptInjector: fix tsan failures

* Add hold to test

* Add hold to test

* Address comments

* Address comments

* Address comments

* Fix typo

Co-authored-by: Mark D. Roth <roth@google.com>
2022-08-26 14:26:54 -07:00
Craig Tiller 5b6dac02ac
[stats] Cleanup & re-enable stats system (#30610)
* [stats] Cleanup stats system

* clear out optionality

* fix

* might as well...

* Automated change: Fix sanity tests

* clean out more unused stuff

* clean out more unused stuff

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-26 10:18:06 -07:00
Craig Tiller b8fde2ab47
Revert "GCP Observability: Add plugin registry API (#30571)" (#30765)
This reverts commit 486710317f.
2022-08-26 09:42:19 -07:00
Yash Tibrewal 486710317f
GCP Observability: Add plugin registry API (#30571)
* GCP Observability: Add plugin registry API

* Restrict visibility for now

* Move GcpObservability to its own thing

* Reviewer comments
2022-08-26 09:22:48 -07:00
Mark D. Roth 5f7096614a
xds_e2e_test_lib: increase default timeouts in test framework (#30756)
* e2e tests: add test scaling factor to durations in channel args

* apply test scaling factor when encoding durations in xDS protos

* apply scaling factor in fixed timeout in WaitForNack()

* fix overflow

* clang-format

* adjust timeouts in fault injection tests

* add missing slowdown factor

* clang-format

* xds_e2e_test_lib: increase default timeouts in test framework
2022-08-26 09:22:35 -07:00
Mark D. Roth 121a08f6a9
end2end tests: apply test slowdown factor in various places where it was missed (#30749)
* e2e tests: add test scaling factor to durations in channel args

* apply test scaling factor when encoding durations in xDS protos

* apply scaling factor in fixed timeout in WaitForNack()

* fix overflow

* clang-format

* adjust timeouts in fault injection tests

* add missing slowdown factor

* clang-format

* add tests for duration multiplication
2022-08-26 07:35:28 -07:00
Mark D. Roth 143c852d2f
end2end tests: fix test service impl to apply test slowdown factor (#30750)
* end2end tests: fix test service impl to apply test slowdown factor

* fix build
2022-08-25 14:49:42 -07:00
Yousuk Seung 807e93f250
[fixit] Deflake xds_outlier_detection_end2end_test (#30690)
* timing deflake

* Removed empty lines, unused setter.

* Shorten sleep time, removed 3 sleeps.

* hardcode sleep times everywhere

* add back test factor

* sanity check fix
2022-08-25 12:14:34 -07:00
Yash Tibrewal 2805b523d9
XdsRingHash: Tune timeouts (#30742)
* XdsRingHash: Tune timeouts

* Add WaitForBackendOptions timeout

* More tuning

* Fix
2022-08-24 18:01:58 -07:00
Vignesh Babu 09558e9052
Adjust rpc timeouts in xds tests to reduce Deadline exceeded errors in msan (#30732) 2022-08-24 16:50:45 -07:00
Mark D. Roth 03b6b01043
ConnectionAttemptInjector: fix tsan failures (#30730) 2022-08-24 12:47:17 -07:00
Mark D. Roth 4a27b432b6
xds_cluster_e2e_test: change tests to provide better failure messages (#30727) 2022-08-24 10:17:01 -07:00
Mark D. Roth dc1cb1fb59
grpclb_e2e_test: increase timeout in InitiallyEmptyServerlist test (#30726) 2022-08-24 10:15:22 -07:00
Craig Tiller 93fb6add2a
[fixit] Reduce the size of this benchmark under expensive sanitizers (#30715) 2022-08-23 13:48:05 -07:00
AJ Heller f7d8ee068a
[fixit] Extend timeout for SameBackendListedMultipleTimes/V3 test (#30716)
Previously this failed 1/1000 times with a 1s timeout, giving a
`Deadline Exceeded` error. I was able to reproduce the failure in
22/1000 times with a 500ms timeout. Changing it to a 2s timeout in this
PR, the failure did not reproduce in 5000 runs.
2022-08-23 13:43:39 -07:00
Craig Tiller a6d67ab6db
[fixit] Disable ub/msan on all qps, tsan on some qps tests (#30713) 2022-08-23 09:34:50 -07:00
Cheng-Yu Chung 7c86c34e63
[fixit] Solve the flakiness for test case `End2endTest.ClientCancelsBidi` (#30664)
* First try to solve the flakiness of End2endTest.ClientCancelsBidi

* Update using `absl::Notification`

* Update
2022-08-22 18:59:14 -07:00
Craig Tiller f133d81714
[fixit] Scale down large tests (#30676)
We have many tests that create 100 threads or more, and mounting evidence that
this is harmful to our CI environment.

When the original code for many of these tests was written we ran our tests
under run_tests, which had explicit handling for tracking the number of threads
each test needed and making sure that we weren't over subscribing the test
runner. Bazel has no such facility (and the facility in run_tests has since
been removed) and so we need to adjust.

This PR adjusts down a single test and is part of a series so that we can
review and roll back easily if required.
2022-08-22 16:34:33 -07:00
Mark D. Roth 72e76f6a86
client_lb_e2e_test: fix flake in PickFirstTest.CheckStateBeforeStartWatch (#30698) 2022-08-22 14:42:10 -07:00
Craig Tiller c03b2f6b38
[fixit] Scale down large tests (#30677)
We have many tests that create 100 threads or more, and mounting evidence that
this is harmful to our CI environment.

When the original code for many of these tests was written we ran our tests
under run_tests, which had explicit handling for tracking the number of threads
each test needed and making sure that we weren't over subscribing the test
runner. Bazel has no such facility (and the facility in run_tests has since
been removed) and so we need to adjust.

This PR adjusts down a single test and is part of a series so that we can
review and roll back easily if required.
2022-08-22 07:41:56 -07:00
Mark D. Roth eed4766424
rls_e2e_test: check authority on server side instead of using death test (#30652) 2022-08-19 17:19:46 -07:00
Vignesh Babu 9f9d87cfa6
Fix CBF on mac by switching to grpc_core::Mutex and grpc_core::CondVar (#30666) 2022-08-19 16:59:18 -07:00
Craig Tiller f573fd44f9
[test] Semi-automatic flaky test tracking (#30638)
* [test] Semi-automatic flaky test tracking

* fix

* Automated change: Fix sanity tests

* Update update_flakes.py

* fix formatting

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-19 16:22:31 -07:00
Mark D. Roth fedba4654d
xds_routing_e2e_test: fix XdsRetryPolicyMaxBackOff flake (#30649) 2022-08-19 15:41:25 -07:00
Mark D. Roth 221a969e04
client_lb_end2end_test: fix flake caused by not doing graceful server shutdown (#30647) 2022-08-19 13:56:42 -07:00
Alisha Nanda 96af4084c9
Fix StatusCancelledWithoutStartingRecvTrailingMetadata flake in client_lb_end2end_test (#30629)
* Fix metadata flake in client_lb_end2end_test

* Address review comments

* Return bool

* Address review comment
2022-08-19 12:37:51 -07:00
Cheng-Yu Chung dca225be95
[fixit] Increase sleep time for test `ProxyEnd2endTest.RpcDeadlineExpires` to reduce flakiness (#30631)
* Increase sleep time for test `ProxyEnd2endTest.RpcDeadlineExpires`

* Update
2022-08-18 18:46:23 -04:00
Yash Tibrewal 02df22f52f
FaultInjection: Fix random number generation (#30623)
* FaultInjection: Fix random number generation

* Put random generation under a mutex

* Fix IWYU

* Regenerate projects

* Modify timeouts

* Dbg build knobs

* Remove unnecessary slowdown factor

* Tune error tolerance and add note on broken computation of ComputeIdealNumRpcs
2022-08-18 15:34:55 -07:00
Yash Tibrewal aba48793f8
XdsSecurityTest: Use a timeout of 5000ms for RPCs (#30621)
* XdsSecurityTest: Use a timeout of 5000ms for RPCs

* Reviewer comments

* Remove old comment
2022-08-17 17:30:48 -07:00
Cheng-Yu Chung feeb54ec33
[fixit] Fix flakiness for test case ChannelzSamplerTest.SimpleTest by reducing the chance of port conflict (#30620)
* Fix flakiness for test case ChannelzSamplerTest.SimpleTest by reducing the chance of port conflict

* Update
2022-08-17 19:32:29 -04:00
Vignesh Babu f0a2b3d660
Fix flakiness in //test/cpp/common:timer_test (#30606) 2022-08-16 18:08:55 -07:00
Yash Tibrewal b9f6b2663c
XdsEnd2EndTest: Increase default RPC timeout (#30609) 2022-08-16 17:34:08 -07:00
Alisha Nanda faa0679c57
Fix flake in client_lb_end2end_test (#30601)
* Fix ubsan failure

* Fix build failures with istio test

* Fix other status code

* Fix flake in client_lb_end2end_test
2022-08-16 14:17:46 -07:00
Cheng-Yu Chung 103f4c2f1e
[fixit] Increase timeout value for XDS Core End2End Test (#30593) 2022-08-16 15:44:48 -04:00
Enrico Pertoso 3c9cbb2d4d
OpenCensus: fixes broken traces exporting caused by a missing EndSpan (#29745)
* OpenCensus: fixes broken traces exporting caused by a missing EndSpan

* Fix variable name

* Fixes test.

* Adds timeout to span test
2022-08-10 17:18:21 -07:00
Mark D. Roth dc4414aa0c
XdsClient: access certificate provider data via dependency injection (#30506)
* don't pass context through AdsResponseParser::ParseResource()

* don't pass certificate provider info through XdsApi

* use dependency injection for cert provider map

* move XdsEncodingContext into XdsResourceType

* remove unnecessary field

* clang-format

* Automated change: Fix sanity tests

* fix xds_bootstrap_test

* fix build

* Automated change: Fix sanity tests

* fix test and clang-format

* remove unnecessary field

* fix test

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-08-05 11:27:59 -07:00
Craig Tiller ae70e65e13
[build] Shard tests a little more (#30489)
* [build] Shard tests a little more

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-04 11:44:46 -07:00
Vignesh Babu 0b1a8c984b
Revert "Modifying iomgr tcp code to use event engine EndpointConfig instead of channel_args (#30028)" (#30495)
This reverts commit 2c977a4d98.
2022-08-04 11:35:27 -07:00
Vignesh Babu 2c977a4d98
Modifying iomgr tcp code to use event engine EndpointConfig instead of channel_args (#30028)
* convert tcp code to use EndpointConfig and successfully compile

* regenerate projects

* copying config options used in tcp code to create map backed endpoint configs

* fix minor build issues

* fix includes in tests

* fix some build and test issues

* modifying endpoint config definition from an abstract interface into a concrete implementation

* minor fix

* add unreachable code check

* fix some windows build issues

* fix more build issues

* adding a grpc_tcp_generic_options struct to hold data extracted from EndpointConfig

* code formatting

* simplify

* fix sanity checks

* fix windows issues

* some posix fixes

* disabling copy constructor and copy assignment operator for endpoint config

* fix sanity checks

* fix syntax error

* fix weird formatting

* fix build issue

* fix review comments

* reverting un-necessary change

* remove channel args completely from windows impl since it is unused

* remove unused headers and fix usage in endpoint_pair_windows.cc

* cleanup

* cleanup

* fix some initialization issues

* re-generate projects

* removing some files

* fix ifdef for windows

* fixing windows build issue due to improper header file include

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* review comments

* add comment

* review comments

* rename GetPointer to GetVoidPointer

* cleanup

* Automated change: Fix sanity tests

* removing EndpointConfig::Get method

* Automated change: Fix sanity tests

* minor fix

Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2022-08-03 13:41:48 -07:00
Yash Tibrewal f78581a18f
Istio Echo: Add version string (#30477) 2022-08-03 10:35:31 -07:00
Mark D. Roth 7fcb2e1229
outlier_detection LB: reset state when OD is disabled (#30418)
* outlier_detection LB: reset state when OD is disabled

* leave interval unset when no OD config is present

* Automated change: Fix sanity tests

* fix clang-tidy

* don't check for interval of infinite duration

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-08-02 08:02:36 -07:00
Mark D. Roth 536b9351ec
JSON: use absl::Status instead of grpc_error (#30397)
* JSON: use absl::Status instead of grpc_error

* Automated change: Fix sanity tests

* fix credentials_test

* fix tests

* add missing build dep

* fix build

* fix test

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-07-27 09:52:21 -07:00
Mark D. Roth f4edc883ab
service config API: use absl::Status instead of grpc_error (#30321)
* service config API: use absl::Status instead of grpc_error

* Automated change: Fix sanity tests

* add missing build deps

* attempt to work around build breakage on older compilers

* trying the work-around in more spots

* more work-arounds

* more workarounds

* Automated change: Fix sanity tests

* work around another compiler problem

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-07-26 09:29:07 -07:00
Craig Tiller 05e6bf2e4a
[build] Add test/core/util, test/core/event_engine to auto build deps (#30364)
* [build] Add test/core/util, test/core/event_engine to auto build deps

* deal with suppressions

* fix suppressions

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* progress

* Automated change: Fix sanity tests

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-25 21:59:25 -07:00
Craig Tiller 856abd9446
[iwyu] Add test/core/util (#30289)
* [iwyu] Add test/core/util

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-20 16:18:19 -07:00
Craig Tiller f5bb60d8e8
[channel_args] Improve comparison performance (#30322)
* [channel_args] Improve comparison performance

* fix

* Automated change: Fix sanity tests

* faster still

* fix

* fix

* some no cost boosts if they get hit

* fix

* final tweak for pointers

* check

* fix

* Automated change: Fix sanity tests

* fix

* ugh

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-19 15:40:09 -07:00
AJ Heller 785d6b656a
Add logging for invalid client PayloadConfig in QPS test (#30261)
* Add invalid PayloadConfig logging to QPS test

* flip conditions
2022-07-19 12:18:02 -07:00
Mark D. Roth a1d42f84ef
xds_cluster_resolver: pass useful resolution_note to children (#30283)
* xds_cluster_resolver: pass useful resolution_note to children

* clang-format
2022-07-18 16:54:16 -07:00
Mark D. Roth 201213c681
client channel: add tests for authority override precedence (#30172)
* client channel: add tests for authority override precedence

* add unit test

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-07-18 16:02:59 -07:00
Craig Tiller 3ec0e29bcf
[test] Convert cq verifier to C++ (#30256)
* [test] Convert cq verifier to C++

* Automated change: Fix sanity tests

* fix

* dead code

* strength reduction

* dead code

* fix

* when search/replace goes wrong

* review feedback

* review feedback

* cleanup

* fixes

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-14 04:41:30 -07:00
Mark D. Roth 4491ed26aa
BUILD: move work_serializer to its own build target (#30255)
* BUILD: move work_serializer to its own build target

* add autodeps tag

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-07-13 13:21:07 -07:00
Esun Kim 98b1a7710e
Changed num_threads based on slowness factor for xSAN (#30240)
* Changed num_threads

* Update by review

* Update by review
2022-07-11 14:47:55 -07:00
Craig Tiller d7e6878ec4
[chttp2] use new channel args type (#30252)
* x

* x

* Automated change: Fix sanity tests

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-10 22:43:44 -07:00
Craig Tiller 1b5295a4a2
[iomgr] Remove executor/...
I've tried this before in #27445 and we found some internal usage of this code. Today I can find no such usage, so let's try again.
2022-07-08 12:07:36 -07:00
Craig Tiller d304712f64
[channel_args] Spread grpc_core::ChannelArgs through client channel code (#30008)
* [channel_args] Spread grpc_core::ChannelArgs through client channel code

* progress

* progress

* grpc compiles

* uniqueptr+compiles

* fix

* fix

* fix

* fix

* fix

* fix

* fixes

* fix

* fix

* fixes

* fix-lb

* fix

* fix up arg construction

* fix

* fix

* fix

* fix

* move to const& to save bytes

* fix

* fix

* progress

* review feedback

* fix

* fix

* fixes

* fixes

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* debug-helper

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-07 19:19:11 -07:00
Mark D. Roth 694e634a79
client_lb_end2end_test: fix flake in RoundRobin.SingleReconnect test (#30229)
* client_lb_end2end_test: fix flake in RoundRobin.SingleReconnect test

* fix condition used to determine when client has seen backend 0 down

* remove duplicate counter reset

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-07-07 14:59:13 -07:00
Mark D. Roth a3afb81274
Second attempt: XdsClient: refactor transport code to make it injectable (#30225)
* Revert "Revert "XdsClient: refactor transport code to make it injectable (#30183)" (#30223)"

This reverts commit fa57b9d0bc.

* fix deadlock seen internally

* Automated change: Fix sanity tests

* fix memory leak

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-07-07 10:03:23 -07:00
AJ Heller fa57b9d0bc
Revert "XdsClient: refactor transport code to make it injectable (#30183)" (#30223)
This reverts commit bd9bc5fd3e.
2022-07-06 12:29:57 -07:00
Mark D. Roth bd9bc5fd3e
XdsClient: refactor transport code to make it injectable (#30183)
* XdsClient: refactor transport code to make it injectable

* clang-format

* Automated change: Fix sanity tests

* remove unnecessary dtor

* fix build

* re-add missing drain of WorkSerializer queue after receiving a message

* remove unused code

* fix memory leak

* Automated change: Fix sanity tests

* fix another memory leak

* fix unused parameter

* fix tsan failure

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-07-06 09:26:34 -07:00