Commit Graph

6198 Commits

Author SHA1 Message Date
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
Mark D. Roth 74e1023f0a
priority LB: fix dumb reversed-conditional bug (#30149)
* C++ end2end tests: refactor ConnectionAttemptInjector code

* priority LB: fix dumb reversed-conditional bug

* clang-format

* add test
2022-07-01 09:13:56 -07:00
Yash Tibrewal 5e19c780c3
XdsSecurityTest: Rework infrastructure (#30138)
* XdsSecurityTest: Rework infrastructure

* Reviewer comments

* Comment

* Add TODO
2022-06-30 16:25:28 -07:00
Mark D. Roth d379e811be
C++ end2end tests: refactor ConnectionAttemptInjector code (#30148)
* C++ end2end tests: refactor ConnectionAttemptInjector code

* clang-format
2022-06-30 14:32:27 -07:00
Ashitha Santhosh 9bc16ede7c
Update authz tests to use callback (#30058)
* Update authz core tests to use callback
2022-06-30 12:16:22 -07:00
Craig Tiller eb5ae61470
Reland (again) bytestream removal (#29987)
* Revert "Revert "Reland bytestream removal (#29911)" (#29964)"

This reverts commit e6c6840db3.

* initial fc fuzzer

* fixes

* add rq to fc fuzzer

* fleshing things out

* Automated change: Fix sanity tests

* cleanup

* send with payload

* ensure if no reader no flow control tokens are granted

* remove some public methods

* remove bogus benchmarks

* account for pending size

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* better logic

* Automated change: Fix sanity tests

* fix

* fixes

* fuzz pending size

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* huh

* increase too short timeout

* review feedback

* review feedback

* fix u32 overflow

* fix

* robustness fixes for channelz_servicer_test

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* Automated change: Fix sanity tests

* dont send window updates if read closed

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-27 21:21:23 -07:00
Yash Tibrewal 3aad52e4d3
XdsSecurityTest flakiness: Add broken pipe to expected error messages (#30091) 2022-06-27 13:19:00 -07:00
Craig Tiller 03dcd61068
[iomgr] Second take for iomgr shutdown (#30101)
* better api for ee up/down

* fixes

* mac fix

* review feedback

* nuke bm_cq_multiple_threads

* Revert "nuke bm_cq_multiple_threads"

This reverts commit dcda194a42.

* bleh-revert-fix

* fix tsan race in stats

* fix
2022-06-24 13:36:59 -07:00
Esun Kim c66c362191
Reland "Enable GRPC_ERROR_IS_ABSEIL_STATUS" (#30047)
* Revert "Revert "Enable GRPC_ERROR_IS_ABSEIL_STATUS (#29869)" (#30031)"

This reverts commit 2d0d1775a9.

* Fix the test
2022-06-23 12:38:19 -07:00
Mark D. Roth 870fe8624f
security handshaker: include security connector type in error message (#30046)
* weighted_target and RLS: delegate to child picker on error

* security handshaker: include security connector type in error message

* update test

* fix sanity

* fix crash

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-06-23 02:05:56 -07:00
Mark D. Roth 3a8e54b005
round_robin: update status upon each new connection failure (#30001)
* refactor connection injectors in client_lb_end2end_test and add test for sticky TF

* round_robin: update status upon each new connection failure

* fix ring_hash too

* clang-format
2022-06-22 15:40:29 -07:00
Mark D. Roth 86e282ba97
weighted_target and RLS: delegate to child picker on error (#29870)
* weighted_target and RLS: delegate to child picker on error

* fix RLS bug that caused us to always use the last target in the list

* add comment
2022-06-22 15:21:18 -07:00
Mark D. Roth 7976501534
client_lb_end2end_test: refactor connection injectors and add test for sticky TF (#29993)
* refactor connection injectors in client_lb_end2end_test and add test for sticky TF

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-06-22 12:22:00 -07:00
Mark D. Roth d0c8b29ef7
xDS: fix endpoint weight defaults (#30079)
* xDS: fix endpoint weight defaults

* add test

* NACK endpoint weight of 0

* iwyu

* clang-tidy

* fix test
2022-06-22 11:54:38 -07:00
Alisha Nanda e085568c88
Fix build failures with istio test (#30074)
* Fix ubsan failure

* Fix build failures with istio test

* Fix other status code
2022-06-21 12:14:28 -07:00
Yash Tibrewal c6145a93bf
xds Istio Interop: Handle failures properly (#30036)
* xds Istio Interop: Handle failures properly

* Unused parameters

* Remove unnecessary sleep
2022-06-17 11:27:15 -07:00
Yash Tibrewal f17110adef
xDS Istio Interop: Forward ForwardEcho requests for unhandled protocols (#30005)
* xDS Istio Interop: Forward ForwardEcho requests for unhandled protocols

* Add deadline

* clang-tidy

* Reviewer commentsg
2022-06-16 17:23:32 -07:00
Esun Kim 2d0d1775a9
Revert "Enable GRPC_ERROR_IS_ABSEIL_STATUS (#29869)" (#30031)
This reverts commit c6058b5e6b.
2022-06-15 21:41:55 -07:00
Esun Kim c6058b5e6b
Enable GRPC_ERROR_IS_ABSEIL_STATUS (#29869)
* Enable GRPC_ERROR_IS_ABSEIL_STATUS

* Sanitize

* Fix ServerRequestCallTest
2022-06-15 15:06:15 -07:00
Yash Tibrewal 78d6d71af3
Call: Send cancel op down the stack even when no ops are sent (#30004)
* Call: Send cancel op down the stack even when no ops are sent

* Add test
2022-06-14 13:10:41 -07:00
apolcyn a1e1d34f36
Log peer address in interop soak client (#30006) 2022-06-14 10:55:55 -07:00
Mark D. Roth f12972506e
xDS: improve status messages from xDS resolver failures (#29975) 2022-06-14 10:25:30 -07:00
Mark D. Roth a78df68e96
xds: add "ignore_resource_deletion" server feature (#29633)
* xds: add "ignore_resource_deletion" server feature

* add logging

* clang-format

* fix build

* fix build

* add test for LDS resource deletion on gRPC server

* clang-format
2022-06-13 14:01:13 -07:00
Craig Tiller 6532084a06
[iwyu] rest of the owl: src/core/lib - excluding iomgr, gpr (#29735)
* [iwyu] rest of the owl: src/core/lib - excluding iomgr, gpr

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fixes

* Automated change: Fix sanity tests

* fix

* fix

* fixes

* fixes

* x

* fix?

* fix

* windows fix

* fix

* fix

* fix

* fix

* fix

* debug

* fix

* fix

* Revert "debug"

This reverts commit c99b8d12dd.

* Automated change: Fix sanity tests

* fix?

* Automated change: Fix sanity tests

* header cleanup

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fixes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-10 13:04:47 -07:00
Vignesh Babu f8eedac1fc
Changing grpc_tcp_client_vtable to include TCP cancel connect method (#29968)
* Changing grpc_tcp_client_vtable to include TCP cancel connect method

* fix unused parameter error

* update

* fix sanity checks
2022-06-10 10:56:34 -07:00
Mark D. Roth 8459824e5c
xds end2end tests: change tests to check all RPC failure statuses (#29974)
* WIP

* fix from merge

* fix ring_hash tests

* ring hash: fix picker propagation bug in xds_cluster_manager policy

* fix build

* clang-format (ish)

* fix build

* more conversion

* remove old CheckRpcSendFailure

* fix SendRpcsAndCountFailuresWithMessage

* fix WaitForBackend

* clang-format

* revert xds resolver change, that will be done in a separate PR

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-06-09 18:00:38 -07:00
Yash Tibrewal 691199ab80
xDS Istop Interop: Add differentiation on the protocol being used (#29965)
* xDS Istop Interop: Add differentiation on the protocol being used

* Fixes

* clang-tidy
2022-06-09 13:51:39 -07:00
Mark D. Roth 470a3066c7
ring hash: fix picker propagation bug in xds_cluster_manager policy (#29959)
* ring hash: fix picker propagation bug in xds_cluster_manager policy

* fix build

* fix build
2022-06-09 10:08:47 -07:00
apolcyn e6c6840db3
Revert "Reland bytestream removal (#29911)" (#29964)
* Revert "Reland bytestream removal (#29911)"

This reverts commit 98dcba2807.

* Automated change: Fix sanity tests
2022-06-09 08:51:06 -07:00
Esun Kim c6ebbb5482
Added GRPC_ERROR_IS_NONE (#29937)
* Added GRPC_ERROR_IS_NONE

* Convert

* Fix
2022-06-08 11:24:20 -07:00
Yash Tibrewal 1e9fe0b8b3
Istio Echo Server Implementation (#29940)
* Istio Echo Server Implementation

* New line fix

* Fix race
2022-06-07 19:13:01 -07:00
Mark D. Roth 27e6a094e1
client_lb_end2end_test: fix broken tests (#29938)
* client_lb_end2end_test: fix broken tests

* poll polling engine gives slightly different error messages
2022-06-07 15:32:47 -07:00
Mark D. Roth 35b7d88654
client_lb_end2end_test: explicitly check failed RPC statuses (#29906)
* client_lb_end2end_test: explicitly check failed RPC statuses

* appease clang-tidy

* fix memory leak
2022-06-07 11:59:08 -07:00
Mark D. Roth 17bec49af7
rls: use UNAVAILABLE instead of status from RLS RPC, and test failure statuses (#29893)
* rls: use UNAVAILABLE instead of status from RLS RPC, and test failure statuses

* simplify
2022-06-07 10:11:20 -07:00
Craig Tiller 98dcba2807
Reland bytestream removal (#29911)
* Revert "Revert "Revert "Revert "[transport] Remove ByteStream (#29637)" (#29890)" (#29894)" (#29910)"

This reverts commit 713a1581d5.

* fix
2022-06-05 18:42:28 -07:00
Craig Tiller 713a1581d5
Revert "Revert "Revert "[transport] Remove ByteStream (#29637)" (#29890)" (#29894)" (#29910)
This reverts commit 93cdc8b77e.
2022-06-05 11:01:48 -07:00
Craig Tiller 93cdc8b77e
Revert "Revert "[transport] Remove ByteStream (#29637)" (#29890)" (#29894)
* Revert "Revert "[transport] Remove ByteStream (#29637)" (#29890)"

This reverts commit d53986657f.

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-04 15:51:16 -07:00
Mark D. Roth e49c61cd2f
client_channel: remove synchronous subchannel connectivity state API (#28339)
* ring_hash: don't recreate ring when individual subchannel states change

* client_channel: remove synchronous subchannel connectivity state API

* change subchannel list to automatically start watching all subchannels

* use a separate loop to start watches, so list size is logged correctly

* fix RR to re-resolve on IDLE again

* fix ring_hash to delay promoting new subchannel list

* fix pick_first to wait for all subchannels to report state

* clean up SubchannelList API

* fix unused argument error

* fix another unused argument error

* clang-format

* fix RR to not re-resolve on initial IDLE state

* also don't re-resolve in initial TF state; same for ring_hash

* clang-format

* change RR and PF to initially report CONNECTING, and add second loop to priority policy

* simplify priority logic a bit

* fix grpclb to drop ref to stats object even if the subchannel call is never started

* fix memory leak in ring_hash

* fix tsan failure in grpclb code

* iwyu

* add missing BUILD deps

* update outlier_detection policy

* fix test

* fix pick_first to not report TF prematurely due to subchannel sharing

* fix test to not depend on timing
2022-06-03 06:44:26 -07:00
Craig Tiller d53986657f
Revert "[transport] Remove ByteStream (#29637)" (#29890)
This reverts commit aacf0e252b.
2022-06-02 19:34:49 -07:00
Craig Tiller aacf0e252b
[transport] Remove ByteStream (#29637)
* A starter SliceBuffer implementation

* Add comments and fix sanity checks

* Minor fixes

* more minor fixes

* Addressing review comments and adding a slice_buffer_test

* fix sanity checks

* regenerate projects

* fixing undefined function error

* reverting changes from memory_allocator.cc and adding them to src/core/lib/slice/slice_buffer.cc to allow memory allocator lib to build correctly

* fix sanity checks

* adding an open source slice definition

* regnerate projects

* fix asan error

* Automated change: Fix sanity tests

* addressing review comments

* fix sanity checks

* regenerate projects

* update

* fix sanity checks

* Converting slice buffer to retarin ownership of the underlying ctype

* [slice_buffer] Introduce grpc_core::SliceBuffer

* add test

* Automated change: Fix sanity tests

* [byte-stream] Delete ByteStream

* progress

* progress

* missing files

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* progress

* sanity

* progress

* progress

* progress

* progress

* progress

* progress

* progress

* progress

* progress

* iwyu

* fix

* progress

* fix

* fix

* progress

* code compiles

* fix?

* bogus assert

* Automated change: Fix sanity tests

* fix

* fix

* fix?

* fix

* fix

* better expression of function

* fix?

* Automated change: Fix sanity tests

* x

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* add fullstack test without retry filter

* debug

* missing files

* gc

* fix h2_full_no_retry

* remove headers

* fixes

* Automated change: Fix sanity tests

* x

* fix

* fix

* fix

* progress

* x

* tear apart flow control

* continue itnegration

* fix

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* cleanup

* Automated change: Fix sanity tests

* fix

* x

* x

* Revert "debug"

This reverts commit 0120a94492.

* undo debug

* fix

* Automated change: Fix sanity tests

* better inproc

* fixes

* iwyu

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix stalled streams

* properly handle non-terminal trailers

* fix test

* fix channelz test

* fix subchannel_stream_client

* fix server load reporting

* review feedback

* review feedback

* review feedback

* review feedback

* Automated change: Fix sanity tests

* remove compression test from python

* fix

* x

* Automated change: Fix sanity tests

* iwyu fix

* Revert "remove compression test from python"

This reverts commit 5fe0512077.

* cripple python tests

* Revert "fix"

This reverts commit 6df476b22f.

* Automated change: Fix sanity tests

* review feedback

* Automated change: Fix sanity tests

* fix

* fix

* fix

* ugh

Co-authored-by: Vignesh Babu <vigneshbabu@google.com>
Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-02 16:04:32 -07:00
Anirudh Ramachandra e89883cc87
Revert "Revert "Fix grpc_sockaddr_to_uri to return URI encoded string. Also see #29323 which has a similar fix for unix abstract addresses."" (#29798)
Reverts #29639
2022-06-02 13:51:04 -07:00
Yash Tibrewal 5d9cdc8e67
xds: Add XdsLbRegistry (#29756)
* xds: Add XdsLbRegistry

* Formatting

* Fix upb output

* Allow alternative type url for Custom LBs

* Cleanup

* Reviewer comments

* Add some comments

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Unused parameters

* Change to make TextFormat usage work internally

* Fix namespace qualification error
2022-06-01 14:08:26 -07:00
Mark D. Roth bbf56baa88
client_lb_end2end_test: fix flake in RoundRobinTest.UpdateInError (#29847) 2022-06-01 07:47:19 -07:00
Yash Tibrewal 8cdf8beafd
xDS: Workaround to get gRPC clients working with istio (#29841)
* xDS: Workaround to get gRPC clients working with istio

* Formatting

* Comment test too

* Disable instead of commenting
2022-05-31 17:39:46 -07:00
apolcyn b8e3e59b15
testing: fix address sorting test on macos by removing a fragile assumption (#29820)
* Fix address sorting test: remove a fragile assumption
2022-05-31 16:24:40 -07:00
Mark D. Roth 65a7ce3f04
Revert "Revert "server: add method to expose authority seen by server (#29768)" (#29806)" (#29807)
This reverts commit e39e943529.
2022-05-31 14:15:45 -07:00
Mark D. Roth 64b422091e
xds_core_end2end_test: increase timeouts to fix flakiness (#29803)
* xds_core_end2end_test: increase timeouts to fix flakiness

* clang-format
2022-05-27 14:34:53 -07:00
Mark D. Roth a4cbeee699
xds_core_end2end_test: increase RPC timeout on BootstrapSource test (#29802) 2022-05-27 14:32:53 -07:00
Mark D. Roth 98c40ce772
client_lb_end2end_test: increase timeouts in RoundRobinTest.UpdateInError (#29805) 2022-05-27 08:11:23 -07:00
Mark D. Roth e39e943529
Revert "server: add method to expose authority seen by server (#29768)" (#29806)
This reverts commit 449adce98b.
2022-05-26 16:15:14 -07:00
Mark D. Roth 449adce98b
server: add method to expose authority seen by server (#29768)
* server: add method to expose authority seen by server

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-05-26 15:03:28 -07:00
Mark D. Roth fb1cc54d41
xds_core_end2end_test: fix federation test timeouts (#29789) 2022-05-26 12:05:57 -07:00
Mark D. Roth 9c23d7999c
subchannel: fix reset backoff when connection attempt is in flight (#29792)
* subchannel: fix reset backoff when connection attempt is in flight

* clang-tidy
2022-05-26 10:53:11 -07:00
Mark D. Roth 3f5931294e
xds_cluster_type_end2end_test: fix flake in AggregateClusterTest.FallBackWithConnectivityChurn test (#29786) 2022-05-25 14:29:09 -07:00
Mark D. Roth 709dff9ca8
security and subchannel: implement UniqueTypeName and use it in these interfaces (#29709)
* implement UniqueTypeName API

* convert security code to use UniqueTypeName

* change subchannel data producer API to use UniqueTypeName

* sanitize

* add missing build dep

* fix credentials_test

* fix certificate_provider_store_test

* fix tls_security_connector_test

* attempt to fix windows build

* avoid unnecessary allocation

* work around MSVC 2017 bug

* sanity

* change factory to not be templated

* fix sanity

* fix bug in chttp2 connector that used server creds instead of channel creds

* add missing build dep

* simplify API
2022-05-23 09:45:20 -07:00
Nicolas Noble 667691c499
server: per-rpc backend metric reporting (#29621)
Users can now report per-rpc metrics from servers to clients.
2022-05-20 15:54:30 -07:00
Esun Kim ec58a346f9
Changed C99 to C11 (#29687)
* Changed C99 to C11

* Remove gnu99 option

* Switch to gnu11 for xcode
2022-05-20 14:03:04 -07:00
Menghan Li 4a855552a9
xds/interop: add a testing server for istio integration test (#29590) 2022-05-20 13:50:16 -07:00
Mark D. Roth a6d70b449b
xds: don't start resource timer after ADS stream restart if resource is already cached (#29668)
* xds: don't start resource timer after ADS stream restart

* fix sanity

* add missing build dep

* attempt to use std::move() for absl::Status

* sanity
2022-05-20 13:40:43 -07:00
apolcyn 965feb5726
xds: Remove aggregate and logical dns clusters env var guard (#29742)
* Remove aggregate and logical dns clusters env var guard
2022-05-20 12:45:33 -07:00
AJ Heller 1df32ca680
Delete the EventEngine-driven iomgr implementation (#29654)
This code is not compiled by default and has fallen out of sync with the
rest of the codebase. There's a good chance it won't be used, given our
current work to use an iomgr-drive EventEngine instead.

This code will continue to live in git history, should we need to bring
pieces of it back.
2022-05-20 10:18:53 -07:00
Craig Tiller 0f9d024fec
[iwyu] c++ (#29721)
* Revert "Revert "[iwyu] grpc++ (#29610)" (#29720)"

This reverts commit 0642bc213d.

* fixup status_code_enum import issue

* fix

* Automated change: Fix sanity tests

* import fixes

* fix import

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-05-19 07:34:48 -07:00
Craig Tiller abf333337f
[visibility] Give grpc_cli explicit visibility (#29717)
* [visibility] Give grpc_cli explicit visibility

* x

* fix
2022-05-18 20:46:58 -07:00
Mark D. Roth 5c9a971904
xds: use federation env var to guard new-style resource name parsing (#29725) 2022-05-18 15:03:01 -07:00
Craig Tiller 0642bc213d
Revert "[iwyu] grpc++ (#29610)" (#29720)
This reverts commit c8159eabdf.
2022-05-18 09:58:08 -07:00
Craig Tiller c8159eabdf
[iwyu] grpc++ (#29610)
* [iwyu] grpc++

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* [iwyu] Better script

* eliminate race

* fixes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-05-18 07:16:53 -07:00
donnadionne 03cf989610
outlier detection: implement LB policy and xDS configuration (#29343)
* Initial skeleton for outlier detection

* fixing code review comments (modifying child policy)

* Skeleton and all tests passing except for 1

* small code review comments fix

* Adding the parsing of the policy in cds and put it in discovery
mechansim json format

* Parsing outlier detection json policy from parent

* Adding parsing of the updates

* Added Subchannel wrapper and watcher wrapper: and all states pass
through and all tests still pass

* added framework to do eject and uneject

* fixing code review comments

* restore a test

* fixing code review comments

* taking care of code review comments

* removing debug code and rebuild build files

* fixing according to code review comments

* fixing code review comments

* Adding address to subchannel map

* addressing code review comments

* adding call counter

* Refcount SubchannelState (in the map) and store them in Subcahnnel Wrapper

* fixing counterss

* Call counter and tracker skleton added

* Call counter

* addressing code review comments

* addressing code review comments

* Added CallCounter and timer

* fixing sanity; but more importantly: taking out timer temporarly as it
was causing test failures.

* sanity

* fixing according to code review comments

* addressing code review comments

* all algorithms implemented

* addressing code review comment about starting the timer

* protect private vars

* small fix

* Added one more corner case

* fixing EjectionTimer

* Fixing according to code review suggestions.

* fixing according to code reveiw comments

* taking care of code review comments

* fixing sanity issues

* Adding proto to tests

* First test

* Fixing according to code review comments

* Tests all working now

* fixing a crash

* fixing build files

* fixing sanity

* sanity

* Simplifying tests

* merge and update

* format

* sanity and format

* Fixing asan error

* fixing parsing logic and error handling

* 6 more tests done

* Added verifying unejection to tests

* Added all the tests

* fixing according to code review comments

* fixing asan and ubsan

* Fixing tests according to code review comments

* Added both algorithm tests

* added percentage enforcement tests

* fixing tsan error

* keeping debug, but fix warning

* remove debugs

* fixing IWYU and build errors after

* test comments change only but very important

* fixing code review comments

* one more refactorying of util function

* Removed debugs and added one more helper method

* one more logic fix

* Fixing last bit of code review comments and added disable tests

* fixing code review comments

* fixing IWYU

* sanity format

* protecting the feature with environment var:
registering policy and generating policy

* added a todo according to code review comments

* fixing a clang finding at import time

* build fix after synching to latest
2022-05-16 21:37:34 -07:00
Mark D. Roth 5fe979d756
xds: add tests for unknown authority (#29681)
* xds: add tests for unknown authority

* improve trace log message

* fix memory leak
2022-05-13 14:30:12 -07:00
Esun Kim 03e9ac6f1f
Requiring C++14 (#29589) 2022-05-12 21:17:32 -07:00
Anirudh Ramachandra 440ae5684c
Revert "Fix grpc_sockaddr_to_uri to return URI encoded string. Also see #29323 which has a similar fix for unix abstract addresses." 2022-05-11 09:57:13 -07:00
Anirudh Ramachandra a31224fc10
Fix grpc_sockaddr_to_uri to return URI encoded string. Also see #29323 which has a similar fix for unix abstract addresses. (#29478) 2022-05-10 13:40:39 -07:00
Craig Tiller f56282a6b6
[iwyu] surface (#29588)
* [iwyu] chttp2

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fwd file

* fix

* fix

* Automated change: Fix sanity tests

* fix

* [iwyu] surface

* [iwyu] surface

* add no-return hint

* fix

* Automated change: Fix sanity tests

* Add flag

* sweep1

* fixes

* speedup

* fixes

* fixes

* fixes

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fic

* x

* ugh

* fix

* fix

* Automated change: Fix sanity tests

* fix?

* fixes

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-05-09 15:56:44 -07:00
Craig Tiller 5918f98ecb
[iwyu] Enable nosafe_headers (#29591)
* Add flag

* sweep1

* fixes

* speedup

* fixes

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-05-06 11:31:11 -07:00
Craig Tiller 717732c044
[promises] Convert http server filter (#29273)
* Begin adding abstractions for capturing batches

* code written

* fixes

* fix

* fmt

* placate clang-tidy

* simplify

* fixes

* Automated change: Fix sanity tests

* annotate unrefs

* fix tsan

* fix

* Update subchannel.cc

* Update BUILD

* Update generate_tests.bzl

* Update BUILD

* Automated change: Fix sanity tests

* Promiseize

* Move server promise based filter to Flusher

* review feedback

* compiles!

* fix

* fix

* start server initial metadata emulation

* comment

* comment

* fix

* refactoring-to-fix-the-bugs

* fixfixfix

* fix

* support cancellation

* fuzzer

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-05-04 07:55:50 -07:00
Craig Tiller 18bec00b58
[channel-stack] Eliminate post-init in channel stack builder (#29514)
* Eliminate post-init in channel stack builder

We've had a post init function on channel stack builder for a very long
time, an it serves to run some code after initialization completes.

We need the functionality for a few things, but the function passed in
is intimately tied to the filter in use - we never vary it between
multiple functions for the same filter... which means it makes more
sense to locate this functionality as part of the filter interface.

* fix

* Automated change: Fix sanity tests

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-05-03 13:06:51 -07:00
Nicolas Noble 050e4c3abe
client_lb_end2end_test: add OrcaLoadReport into EchoRequest proto (#29505)
* Embed OrcaLoadReport into end2end test.

* Regenerate project files.

* Automated change: Fix sanity tests

* Address comments.

* Maybe fixing iOS test?

* Fixing grpc_tool_test.

* Derp.

* Automated change: Fix sanity tests

* Fixing internal import.

* Fixing Google3 build.

* iOS fix attempt: take 2.
2022-05-03 09:34:57 -07:00
Vignesh Babu b92f885756
Adding a max_frame_size argument to grpc_endpoint_write API to allow a sender to control frame sizes (#29526)
* adding a max_frame_size argument to grpc_endpoint_write API

* fix syntax error

* fix typo
2022-05-02 12:32:18 -07:00
Vignesh Babu 53e382729f
Adding a min progress size argument to grpc_endpoint_read to allow gRPC to use TCP optimizations on the read path (#29503)
* adding a min progress size argument to grpc_endpoint_read

* fix missing argument error

* adding a static_cast

* reverting changes in tcp_posix.cc

* add missing changes to CFStreamEndpointTests.mm
2022-04-28 13:23:09 -07:00
ZhenLian 2badafbc4d
Expose NoOpCertificateVerifier to C++ (#29322)
* expose NoOpCertificateVerifier to C+
2022-04-27 13:46:01 -07:00
Mark D. Roth 1cd6e69347
subchannel: report IDLE upon existing connection failure and after backoff interval (#29428)
* subchannel: report IDLE upon existing connection failure and after backoff interval

* rename AttemptToConnect() to RequestConnection()

* clang-format

* fix unused parameter warning

* fix subchannel to handle either TF or SHUTDOWN from transport

* fix handling of ConnectedSubchannel failure

* pass status up in IDLE state to communicate keepalive info

* update comment

* split pick_first and round_robin tests into their own test suites

* improve log message

* add test

* clang-format

* appease clang-tidy

* fix test to do a poor man's graceful shutdown to avoid spurious RPC failures

* simplify round_robin logic and fix test flakes

* fix grpclb bug
2022-04-26 15:25:47 -07:00
Craig Tiller d6e91959a7
mark test nomsan (#29488) 2022-04-22 14:22:40 -07:00
Mark D. Roth 0ba3c59672
xds_ring_hash_end2end_test: fix flake in ContinuesConnectingWithoutPicks (#29461) 2022-04-21 07:11:03 -07:00
Craig Tiller 8bb45aa3a6
Convert grpc_channel to C++ (#29266)
* begin

* tests

* fix

* http

* Filter fuzzer

* progress

* basics

* progress

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Revert "Revert "HTTP Client Filter --> promises (#29031)" (#29181)"

This reverts commit 6ee276f672.

* stuff

* debug

* minimal reproduction

* progress

* progress

* create call

* progress

* recv trailing metadata

* wakeups

* corpus

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* debug

* fix state machine for c#

* Revert "minimal reproduction"

This reverts commit 4d02d2e730.

* Revert "debug"

This reverts commit 7960842f48.

* Revert "debug"

This reverts commit a6f224e4a1.

* no-logging

* initial-metadata

* Revert "Revert "debug""

This reverts commit 951844e857.

* Better int conversion

* debug

* Fix for Cronet

* Revert "debug"

This reverts commit 4d641c4281.

* Revert "Better int conversion"

This reverts commit 4001b957cb.

* Revert "Revert "Revert "debug"""

This reverts commit d135c61043.

* progress

* progress

* Automated change: Fix sanity tests

* fix, c++ize

* handle transport, use objects

* enable more stuffs

* remove placeholder

* contexts

* fix

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* x

* exceptional toast

* include idle filters, time

* fix

* namespace

* fixes

* final info

* progress

* cleanup

* progress

* progress

* progress

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* progress

* Set int

* Set int

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fixes

* fixes

* fixes

* fixes

* fix

* fix race

* fix race

* mac fix

* review feedback

* getgetget

* fix ios

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
2022-04-20 20:55:15 -07:00
Mark D. Roth be53d2ce3f
LB policy API: add OOB backend metric API (#29012)
* WIP: add OOB backend metric API for LB policies

* fix some includes

* minor fixes

* picking this up again...

* more WIP

* health checking: cancel stream if response message fails to parse

* basic structure in place, but still have synchronization issues to address

* ORCA: implement ORCA RPC service for OOB backend metric reporting

* fix unused parameter error

* gen_upb_api

* add missing build deps

* increase test timing fudge factor

* add missing copyright header

* fix build and locking problems

* clang-format

* document API

* buildifier

* add test, but doesn't build yet

* new test working, but broke existing test, and need to fix server API

* don't register as a generic service

* update test for new orca service registration API

* fix build

* sanitize

* report interval defaults to min interval

* add channel trace event on UNIMPLEMENTED

* don't regenerate the response proto unless something changed

* add missing build dep

* fix comment
2022-04-20 14:14:30 -07:00
Mark D. Roth 6bda57194a
xds_end2end_test_lib: use DEBUG_LOCATION to log where failures originate (#29444) 2022-04-19 15:36:15 -07:00
Mark D. Roth 8ba275291a
connection delay injector: fix tsan problems (#29445) 2022-04-19 15:35:47 -07:00
Yash Tibrewal 8e0da602a8
HTTP: Rename PUT allowing channel arg (#29438) 2022-04-19 01:51:57 -07:00
Alisha Nanda 6753812278
Fix ubsan failure (#29437) 2022-04-18 19:57:02 -07:00
Yash Tibrewal eb96f90eb7
HTTP: Use channel arg instead of global to allow PUT requests (#29411)
* HTTP: Use channel arg instead of global to allow PUT requests

* Reviewer comments

* Reviewer comments

* clang-format

* Repo manager - AJ

* Reviewer comments

* unused parameter
2022-04-18 16:34:55 -07:00
Mark D. Roth 9a363dbf96
xds_end2end_test: Move CDS and EDS tests to their own file (#29430)
* xds_end2end_test: Move CDS and EDS tests to their own file

* fix build
2022-04-18 15:11:32 -07:00
Mark D. Roth 93a90e3c55
xds_ring_hash_end2end_test: increase RPC timeout to avoid failures on ARM (#29431) 2022-04-18 11:45:50 -07:00
Mark D. Roth 50df29bdec
ring_hash: trigger internal connection attemps on only one subchannel at a time (#29422)
* ring_hash: trigger internal connection attemps on only one subchannel at a time

* simplify logic

* add test

* clang-format
2022-04-18 09:36:27 -07:00
Yash Tibrewal f28695351e
Prevent direct usage of absl::Mutex (#29424)
* Add script to prevent absl::Mutex occurrences

* sanity and fixes

* shellcheck
2022-04-17 23:56:18 -07:00
Mark D. Roth e7ddd7b436
xds_end2end_test: Move aggregate and logical_dns cluster tests to their own file (#29298)
* move some code around

* remove num_backends parameter from XdsEnd2endTest

* remove use_xds_enabled_server param from XdsEnd2endTest

* remove xds_resource_does_not_exist_timeout_ms param from XdsEnd2endTest

* remove client_load_reporting_interval_seconds param from XdsEnd2endTest

* start moving CreateAndStartBackends() into individual tests

* finish moving CreateAndStartBackends() into individual tests

* remove unused variable

* remove SetEdsResourceWithDelay

* fix test flake

* clang-tidy

* clang-format

* move test framework to its own library

* fix build

* clang-format

* fix windows build

* rename TestType to XdsTestType

* move BackendServiceImpl inside of BackendServerThread

* clang-format

* move AdminServerThread to CSDS test suite

* remove unnecessary deps

* move aggregate and logical_dns cluster tests to their own file

* split aggregate and logical_dns tests into separate suites

* clang-format

* re-add flaky tag

* clang-tidy and remove unnecessary dep
2022-04-16 18:08:53 -07:00
Mark D. Roth bea5911569
xds_end2end_test: Move ring_hash tests to their own file (#29287)
* move some code around

* remove num_backends parameter from XdsEnd2endTest

* remove use_xds_enabled_server param from XdsEnd2endTest

* remove xds_resource_does_not_exist_timeout_ms param from XdsEnd2endTest

* remove client_load_reporting_interval_seconds param from XdsEnd2endTest

* start moving CreateAndStartBackends() into individual tests

* finish moving CreateAndStartBackends() into individual tests

* remove unused variable

* remove SetEdsResourceWithDelay

* fix test flake

* clang-tidy

* clang-format

* move test framework to its own library

* fix build

* clang-format

* fix windows build

* rename TestType to XdsTestType

* move BackendServiceImpl inside of BackendServerThread

* clang-format

* move AdminServerThread to CSDS test suite

* move ring_hash tests to their own file

* generate_projects

* remove unnecessary deps

* re-add flaky tag

* clang-format
2022-04-16 14:42:43 -07:00
Mark D. Roth b9d904da58
xds_end2end_test: move routing tests to their own file (#29409)
* xds_end2end_test: move routing tests to their own file

* clang-format and clang-tidy

* re-add flaky label
2022-04-16 08:26:32 -07:00
Yash Tibrewal 136055b043
xds_end2end_test: Fix race in security tests (#29408)
* xds_end2end_test: Fix race in security tests

* Reviewer comments
2022-04-15 15:49:48 -07:00
Yousuk Seung 371d231b53
Support unix socket in grpc_sockaddr_to_string (#29169)
* Support unix socket in grpc_sockaddr_to_string

* make it return statusor

* clang fix

* made grpc_sockaddr_to_string() to return statusor

* Let Chttp2ServerListener::Start crash

* test failure fixed

* api_fuzzer fixed

* comments addressed.

* more comments addressed

* comments addressed

* fix other broken builds
2022-04-15 14:56:15 -07:00
Lidi Zheng e9ad1d5f47
Improve the MaxFault test case (#29407) 2022-04-15 13:51:31 -07:00
Mark D. Roth dd14f803c3
xds_end2end_test: move core XdsClient tests to their own file (#29403)
* xds_end2end_test: move core XdsClient tests to their own file

* clang-format

* also move SecureNaming and XdsStreamErrorPropagation tests
2022-04-15 12:33:50 -07:00
Mark D. Roth 55e870dae6
orca_service_end2end_test: increase flake timing tolerance (#29405) 2022-04-14 17:12:26 -07:00
Mark D. Roth 6273832210
priority and ring_hash LBs: fix interactions when using ring_hash under priority (#29332)
* refactor connection delay injection from client_lb_end2end_test

* fix build

* fix build on older compilers

* clang-format

* buildifier

* a bit of code cleanup

* start failover time whenever the child reports CONNECTING, and don't cancel when deactivating

* clang-format

* rewrite test

* simplify logic in priority policy

* clang-format

* switch to using a bit to indicate child healthiness

* fix reversed comment

* more changes in priority and ring_hash.

priority:
- go back to starting failover timer upon CONNECTING, but only if seen
  READY or IDLE more recently than TRANSIENT_FAILURE

ring_hash:
- don't flap back and forth between IDLE and CONNECTING; once we go
  CONNECTING, we stay there until either TF or READY
- after the first subchannel goes TF, we proactively start another
  subchannel connecting, just like we do after a second subchannel
  reports TF, to ensure that we don't stay in CONNECTING indefinitely if
  we aren't getting any new picks
- always return ring hash's picker, regardless of connectivity state
- update the subchannel connectivity state seen by the picker upon
  subchannel list creation
- start proactive subchannel connection attempt upon subchannel list
  creation if needed

* ring_hash: fix connectivity state seen by aggregation and picker

* fix obiwan error

* swap the order of ring_hash aggregation rules 3 and 4

* restore original test

* refactor connection injector QueuedAttempt code

* add test showing that ring_hash will continue connecting without picks

* clang-format

* don't actually need seen_failure_since_ready_ anymore

* fix TSAN problem

* address code review comments
2022-04-14 17:08:38 -07:00
Mark D. Roth 214e3f3622
xds_end2end_test: Move RLS tests to their own file (#29290)
* move some code around

* remove num_backends parameter from XdsEnd2endTest

* remove use_xds_enabled_server param from XdsEnd2endTest

* remove xds_resource_does_not_exist_timeout_ms param from XdsEnd2endTest

* remove client_load_reporting_interval_seconds param from XdsEnd2endTest

* start moving CreateAndStartBackends() into individual tests

* finish moving CreateAndStartBackends() into individual tests

* remove unused variable

* remove SetEdsResourceWithDelay

* fix test flake

* clang-tidy

* clang-format

* move test framework to its own library

* fix build

* clang-format

* fix windows build

* rename TestType to XdsTestType

* move BackendServiceImpl inside of BackendServerThread

* clang-format

* move AdminServerThread to CSDS test suite

* move RLS tests to their own file

* remove unnecessary deps

* generate_projects
2022-04-14 11:22:39 -07:00
Nicolas Noble e9cf2894da
Fixes a flake with the LoadReporter end2end test. (#29383)
* Fixes a flake with the LoadReporter end2end test.

I *believe* the test is wrong, based on the .proto description of the
LoadReporter.

The protocol described in src/proto/grpc/lb/v1/load_reporter.proto has
the ReportLoad rpc returns a stream of LoadReportResponse, which itself
has a repeated field of Load messages. The comment before it states:

"It is not strictly necessary to aggregate all entries into one entry
per <tag, user_id> tuple, although it is preferred to do so."

Debugging the issue shows we are in fact properly getting all 3 expected
load report types, just in two separate messages instead of a single
one.

This new test codepath will coalesce the load report responses, and also
addresses the fact the original test wasn't verifying that we were
getting the 3 expected types.

* Automated change: Fix sanity tests

* Renaming variables.

* ASSERT_ -> EXPECT_

* Automated change: Fix sanity tests
2022-04-14 09:41:52 -07:00
Mark D. Roth 55b0405c86
xds_end2end_test: Move fault injection tests into their own file (#29283)
* move some code around

* remove num_backends parameter from XdsEnd2endTest

* remove use_xds_enabled_server param from XdsEnd2endTest

* remove xds_resource_does_not_exist_timeout_ms param from XdsEnd2endTest

* remove client_load_reporting_interval_seconds param from XdsEnd2endTest

* start moving CreateAndStartBackends() into individual tests

* finish moving CreateAndStartBackends() into individual tests

* remove unused variable

* remove SetEdsResourceWithDelay

* fix test flake

* clang-tidy

* clang-format

* move test framework to its own library

* fix build

* clang-format

* fix windows build

* move fault injection tests to their own file

* rename TestType to XdsTestType

* move BackendServiceImpl inside of BackendServerThread

* clang-format

* generate_projects

* appease clang-tidy

* move AdminServerThread to CSDS test suite

* remove unnecessary deps

* generate_projects

* don't mark test as flaky
2022-04-14 08:32:33 -07:00
Yash Tibrewal 5e989cf78d
HTTP: Conditionally allow PUT requests (#29397)
* Maybe fix for PUT deprecation

* Guard PUT request accepting with a flag and add tests

* Reviewer comments

* Add fallthrough notation

* Reviewer comments

Co-authored-by: Craig Tiller <ctiller@google.com>
2022-04-13 17:47:07 -07:00
Nicolas Noble 5a3cd992b0
Fixing the build breakage from #29285 (#29399) 2022-04-13 16:58:08 -07:00
Mark D. Roth 61987ec3a2
xds_end2end_test: Move CSDS tests to their own file (#29285)
* move some code around

* remove num_backends parameter from XdsEnd2endTest

* remove use_xds_enabled_server param from XdsEnd2endTest

* remove xds_resource_does_not_exist_timeout_ms param from XdsEnd2endTest

* remove client_load_reporting_interval_seconds param from XdsEnd2endTest

* start moving CreateAndStartBackends() into individual tests

* finish moving CreateAndStartBackends() into individual tests

* remove unused variable

* remove SetEdsResourceWithDelay

* fix test flake

* clang-tidy

* clang-format

* move test framework to its own library

* fix build

* clang-format

* fix windows build

* rename TestType to XdsTestType

* move BackendServiceImpl inside of BackendServerThread

* clang-format

* move CSDS tests to their own file

* move AdminServerThread to CSDS test suite

* remove unnecessary deps

* generate_projects

* fix build

* remove flaky label
2022-04-13 13:12:39 -07:00
Mark D. Roth 9a12b0def8
cds LB: fix diamond dependency handling (#29384)
* cds LB: fix diamond dependency handling

* instead of explicitly checking for loops, just check for max depth
2022-04-13 13:01:57 -07:00
Mark D. Roth d61433ecb2
cds LB: handle loops in aggregate cluster graph (#29382)
* cds LB: handle loops in aggregate cluster graph

* clang-format
2022-04-12 14:45:35 -07:00
Mark D. Roth 3a4058c07a
xds_end2end_test: move test framework to its own library (#29279)
* move some code around

* remove num_backends parameter from XdsEnd2endTest

* remove use_xds_enabled_server param from XdsEnd2endTest

* remove xds_resource_does_not_exist_timeout_ms param from XdsEnd2endTest

* remove client_load_reporting_interval_seconds param from XdsEnd2endTest

* start moving CreateAndStartBackends() into individual tests

* finish moving CreateAndStartBackends() into individual tests

* remove unused variable

* remove SetEdsResourceWithDelay

* fix test flake

* clang-tidy

* clang-format

* move test framework to its own library

* fix build

* clang-format

* fix windows build

* rename TestType to XdsTestType

* move BackendServiceImpl inside of BackendServerThread

* clang-format

* move AdminServerThread to CSDS test suite

* remove unnecessary deps
2022-04-12 13:42:58 -07:00
Mark D. Roth 94c538cd55
Second attempt: Adding is_optional case to RLS (#29378)
* Revert "Revert "Adding is_optional case to RLS (#29259)" (#29299)"

This reverts commit a6419dde06.

* change test to check the full error message
2022-04-12 11:21:44 -07:00
apolcyn 61b34dfaee
Improve logging in interop soak test and add a flag to limit QPS (#29357)
* Improve logging in interop soak test and add a flag to limit QPS
2022-04-08 21:16:23 -07:00
Mark D. Roth 60c56f7d01
Second attempt: implement ORCA RPC service for OOB backend metric reporting (#29352)
* Revert "Revert "ORCA: implement ORCA RPC service for OOB backend metric reporting (#29215)" (#29351)"

This reverts commit 71b355624f.

* move ORCA service to its own BUILD rule
2022-04-08 11:12:18 -07:00
Mark D. Roth 71b355624f
Revert "ORCA: implement ORCA RPC service for OOB backend metric reporting (#29215)" (#29351)
This reverts commit 6d6380de58.
2022-04-07 16:15:49 -07:00
Mark D. Roth 0b79940496
connection delay injector: cap delay by deadline (#29349) 2022-04-07 15:12:59 -07:00
Mark D. Roth 6d6380de58
ORCA: implement ORCA RPC service for OOB backend metric reporting (#29215)
* ORCA: implement ORCA RPC service for OOB backend metric reporting

* fix unused parameter error

* gen_upb_api

* add missing build deps

* increase test timing fudge factor

* add missing copyright header

* buildifier

* don't register as a generic service

* report interval defaults to min interval

* don't regenerate the response proto unless something changed

* use INTERNAL for proto parsing failure

* use absl::Duration in public API
2022-04-07 07:58:58 -07:00
Mark D. Roth 1fd3850502
client_lb_end2end_test: refactor connection delay injection into its own library (#29320)
* refactor connection delay injection from client_lb_end2end_test

* fix build

* fix build on older compilers

* clang-format

* buildifier
2022-04-06 15:23:41 -07:00
Mark D. Roth 96c19e8c98
weighted_target and xds_cluster_manager: don't update picker while update is in flight (#29313)
* weighted_target and xds_cluster_manager: don't update picker while update is in flight

* include deactivation and new child creation

* add test
2022-04-06 15:00:07 -07:00
Mark D. Roth e145c068f2
xds_cluster_resolver LB: don't reuse child numbers that might still be deactivated (#29316)
* xds_cluster_resolver LB: don't reuse child numbers that might still be deactivated

* clang-format
2022-04-06 06:43:39 -07:00
Mark D. Roth caacc7e3aa
xds_end2end_test: fix env var name in RLS tests (#29291)
* xds_end2end_test: fix env var name in RLS tests

* add ScopedExperimentalEnvVar to ensure env vars get unset after tests

* clang-format
2022-04-04 14:27:17 -07:00
Mark D. Roth a6419dde06
Revert "Adding is_optional case to RLS (#29259)" (#29299)
This reverts commit 2fd632a4c1.
2022-04-02 20:27:01 -07:00
Mark D. Roth 217ab2a793
xds_end2end_test: make each individual test start the number of backends it needs (#29271)
* move some code around

* remove num_backends parameter from XdsEnd2endTest

* remove use_xds_enabled_server param from XdsEnd2endTest

* remove xds_resource_does_not_exist_timeout_ms param from XdsEnd2endTest

* remove client_load_reporting_interval_seconds param from XdsEnd2endTest

* start moving CreateAndStartBackends() into individual tests

* finish moving CreateAndStartBackends() into individual tests

* remove unused variable

* fix test flake

* clang-tidy

* clang-format
2022-04-02 09:26:57 -07:00
donnadionne 2fd632a4c1
Adding is_optional case to RLS (#29259)
* Adding is_optional case to RLS

* integrated with the updated envoy data-plane

* Fixing an old bug and adding test

* Use the same plugin map for ignore

* Remove ignore set

* Fixed another test.

* addressing code review comments.

* clean up!
2022-04-01 12:33:39 -07:00
Mark D. Roth 775362a2ce
client_lb_end2end_test: fix internal build problem (#29265) 2022-03-30 18:33:29 -07:00
AJ Heller 18a8f6aad9
Refactor end2end tests to exercise each EventEngine (#29202)
* Refactor end2end tests to exercise each EventEngine

* fix incorrect bazel_only exclusions

* Automated change: Fix sanity tests

* microbenchmark fix

* sanitize, fix iOS flub

* Automated change: Fix sanity tests

* iOS fix

* reviewer feedback

* first pass at excluding EventEngine test expansion

Also caught a few cases where we should not test pollers, but should
test all engines. And two cases where we likely shouldn't be testing
either product.

* end2end fuzzers to be fuzzed differently via EventEngine.

* sanitize

* reviewer feedback

* remove misleading comment

* reviewer feedback: comments

* EE test_init needs to play with our build system

* fix golden file test runner

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-03-30 15:43:05 -07:00
Craig Tiller e122c64000
Revert "Revert "HTTP Client Filter --> promises (#29031)" (#29181)" (#29182)
* Revert "Revert "HTTP Client Filter --> promises (#29031)" (#29181)"

This reverts commit 6ee276f672.

* debug

* minimal reproduction

* debug

* fix state machine for c#

* Revert "minimal reproduction"

This reverts commit 4d02d2e730.

* Revert "debug"

This reverts commit 7960842f48.

* Revert "debug"

This reverts commit a6f224e4a1.

* no-logging

* Revert "Revert "debug""

This reverts commit 951844e857.

* Better int conversion

* debug

* Fix for Cronet

* Revert "debug"

This reverts commit 4d641c4281.

* Revert "Better int conversion"

This reverts commit 4001b957cb.

* Revert "Revert "Revert "debug"""

This reverts commit d135c61043.

Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
2022-03-30 10:04:42 -07:00
Mark D. Roth 3c4441fcdc
xds: add node ID to status messages generated by XdsClient (#29253)
* eliminate unnecessary templates

* add xDS node ID to error messages generated by XdsClient

* change test to verify that node ID is present in status message

* clang-format
2022-03-30 09:29:00 -07:00
Wanlin Du d2aafef157
Make scenario results to include start and end time for a test scenario. (#29207)
This commit update the scenario results to include the start_timestamp
and end_timestamp. These two fields are used in prometheus range queries
to indicate the period we are pulling data for.
2022-03-29 19:16:12 -07:00
Mark D. Roth ac8f0b690e
xds: NACK EDS resources with duplicate localities in the same priority (#29231) 2022-03-29 11:56:10 -07:00
Craig Tiller 44167bdfd3
Convert server load reporting to promises (#28927)
* Call finalization for promises

* Convert filter to a promise

* Call finalization for promises

* comment

* split out and test

* dont use promise_detail:: directly

* fix

* Automated change: Fix sanity tests

* fix

* ?

* fix

* finish it

* modernize

* fix-test

* fix

* Review feedback

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-29 08:11:36 -07:00
Mark D. Roth 23c4541392
xds_cluster_resolver: fix bug that caused us to incorrectly reuse priority child names (#29174)
* xds_cluster_resolver: fix bug that caused us to incorrectly reuse priority child names

* add debug logging

* assign child policy names within each discovery mechanism, not across all mechanisms

* clang-format

* add tests

* don't need EDS service name or LOGICAL_DNS hostname in child name

* remove unnecessary code
2022-03-24 14:27:47 -07:00
Mark D. Roth eded3b6bc3
client channel: record call completion even if recv_trailing_metadata was not started (#29198)
* client channel: record call completion even if recv_trailing_metadata was not started

* add test

* add test for opencensus filter

* remove unnecessary code
2022-03-24 14:22:16 -07:00
donnadionne 6989129db5
xDS RLS implementation (#29200)
* Revert "Revert "Initial structure for RLS (#28750)" (#29189)"

This reverts commit 7ece810843.

* fixing 1 unused using
2022-03-23 21:23:34 -07:00
donnadionne 7ece810843
Revert "Initial structure for RLS (#28750)" (#29189)
This reverts commit 362e0b8706.
2022-03-22 13:41:21 -07:00
donnadionne 362e0b8706
Initial structure for RLS (#28750)
* Initial structure for RLS

* Adding and building the proto to parse the Any proto for the plugins

* re-org

* Parsing the plugin

* Parsing more into json

* Parsed proto to json

* small cleanup

* Adding prefix

* Added new rls_experimental policy

* build files

* Fixing according to code review comments

* code review comments

* Adding sym changes

* adding action name check

* fixing code review comments.

* fixing unused var error

* clean up

* fixing code review comments

* fixing code review comments

* fixing according to code review comments.

* Remove unnecessary include

* small fix

* generate more, hard-code less

* Moving to using absl::variant

* absl::string_view and absl::variant of vector of std::string are not
playing nice together.

* fixed variant

* Using absl::variant now

* Checkint used plugins

* Refactor Parsing code and separating out Parsing of the plugin

* Fixing code review comments

* code review comments

* fixing code review comments.

* Addressing code review comments

* First end-to-end test

* generated build files

* commit generated files via tools/codegen/core/gen_upb_api.sh

* Fixing rls policy parsing tests

* Restore checks for the test server

* Refactor rls_server

* added keys to rls request

* fixing small logic error

* Complete the test using all the keys

* Separating out RLS test and rls_server thread

* sanity errors

* generated build files

* Complete the rest of the tests and sanity cleanup

* fixing code review comments: using upb_JsonEncode now!

* fixing code review comments

* fixing code review comments

* Fixing code review comments

* misisng fix

* simplifying tests

* simplify tests 2

* Linking in the correct proto for rls_config

* restore metadata check

* Add disable test

* Fixing RLS test and removing environment var that is no longer necessary

* Fixing "Wrong type" type of tests after json parsing change to accept
STRING for number

* adding json_encode.h/c to src/upb/gen_build_yaml.py and generate
necessary files.

* Fixing un-used var error

* fixing sanity errors

* Fixing the upb encoding buffer

* Fixing code review comments.

* Adding nack test for unkonwn plugin proto

* Last bit of code review comments

* fixing unused variable
2022-03-22 11:29:52 -07:00
Jan Tattermusch 6ee276f672
Revert "HTTP Client Filter --> promises (#29031)" (#29181)
This reverts commit 41debbf1a7.
2022-03-22 17:51:03 +01:00
Craig Tiller 41debbf1a7
HTTP Client Filter --> promises (#29031)
* Remove idempotent/cacheable requests

* more cleanup

* bump core version

* fix

* fix

* fix

* review feedback

* fixes

* fix

* remove more

* objc

* fix

* fix

* fix

* scrub

* introduce call args

* bs

* x

* Automated change: Fix sanity tests

* fix

* roughing out

* push/pull impl

* comment

* prove out new combinator

* Simplify naming

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* progress

* builds

* Automated change: Fix sanity tests

* progress

* tweak

* merge

* progress

* fix

* first test passes

* progress

* fix

* repair name

* fix

* small fix

* small fix

* properly stop call combiner

* fix allocation in this benchmark

* fix

* fix

* fix merge

* fix bad merge

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-21 13:11:05 -07:00