Commit Graph

5414 Commits

Author SHA1 Message Date
Yash Tibrewal 29d220a0ef
Re-experimentalize XdsServerBuilder (#26892)
* Re-experimentalize XdsServerBuilder

* Fix compiler issue
2021-08-06 10:29:28 -07:00
Alisha Nanda 0307759b9b
Fix OOM issues in qps tests (#26888) 2021-08-05 19:04:06 -07:00
Tamir Duberstein 013e67a029
Deprecate grpc{_core,::internal}::WaitUntil (#26866)
It is not possible for such a function to be implemented in a way that
is understood by annotalysis. Mark it deprecated and replace instances
of its use with direct mutex/condvar usage.

Add a bunch of missing thread safety annotations while I'm here.
2021-08-04 17:03:25 -07:00
Mark D. Roth 639b7acdfa
fix client_lb_end2end_test ClientLbPickArgsTest.Basic flakiness (#26868)
* fix client_lb_end2end_test ClientLbPickArgsTest.Basic flakiness

* clang-format
2021-08-04 09:46:47 -07:00
Tamir Duberstein 86c9de8231
Remove `grpc_core::WaitUntilWith{Deadline,Timeout}` (#26867)
These functions are essentially unused.
2021-08-03 15:46:36 -07:00
Mark D. Roth 6b71ec3704
LB policy API improvements (#26481)
* LB policy API improvements

* clang-format

* fix build

* a bit more cleanup

* use absl::variant<> for pick result

* fix retry_lb_drop test

* clang-format

* fix grpclb_end2end_test

* fix xds_end2end_test

* try to make variant code a bit cleaner

* clang-format

* fix memory leak

* fix build

* clang-format

* fix error refcount bug

* remove PickResult factory functions

* clang-format

* add ctors to structs

* clang-format

* fix clang-tidy

* update comments

* move LB recv_trailing_metadata callback instead of copying it

* use Match() instead of providing PickResult::Handle()

* don't use Match() for now, since it breaks lock annotations

* update retry_lb_fail test
2021-08-03 09:43:07 -07:00
Yash Tibrewal a3d264e8fd
Open census filter stats api (#26739)
* Use new stats API in open census filter

* Fix time and latency calculation

* Fix parent census context

* Add tests

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Fix error unref

* Add a context object for the overall call

* Remove TODO

* Reviewer comments
2021-08-02 14:00:15 -07:00
ZHANG Dapeng ca482bdbc7
Enable xds retry test for cpp (#26828)
* enable retry

* enable cpp

* fix cpp format

* fix indent
2021-07-29 15:39:35 -07:00
Yash Tibrewal 49b5f9c420
Fix XdsServerSecurityTest (#26817) 2021-07-29 13:28:18 -07:00
Craig Tiller 613b90ba93
Revert "Buffer HPACK parsing until the end of a header boundary (#26700)" (#26825)
This reverts commit 8bab3e4bf4.
2021-07-29 11:22:47 -07:00
Craig Tiller 8bab3e4bf4
Buffer HPACK parsing until the end of a header boundary (#26700)
HTTP2 headers are sent in (potentially) many frames, but all must be
sent sequentially with no traffic intervening.

This was not clear when I wrote the HPACK parser, and still indeed quite
contentious on the HTTP2 mailing lists.

Now that matter is well settled (years ago!) take advantage of the fact
by delaying parsing until all bytes are available.

A future change will leverage this to avoid having to store and verify
partial parse state, completely eliminating indirect calls within the
parser.
2021-07-28 15:36:51 -07:00
Lidi Zheng 2231c2ba77
Introduce Python import sorting to our sanity test suite (#26768)
* Add isort_code.sh to sanity tests

* Run tools/distrib/isort_code.sh

* Fine tune the import order for relative imports

* Make pylint and project generation happy

* Fix a few corner cases

* Use --check instead of --diff

* The import order impacts test result somehow

* Make isort print diff and check output at the same time

* Let tools/run_tests/python_utils be firstparty library

* Run isort against latest HEAD
2021-07-26 12:31:21 -07:00
donnadionne 7eaf37bce5
Adding retry policy (#26566) 2021-07-23 12:17:17 -07:00
Mark D. Roth 3104a9964c
xds: validate that terminal filters come at the end of the filter chain (#26742)
* xds: validate that terminal filters come at the end of the filter chain

* clang-format
2021-07-23 08:06:58 -07:00
Craig Tiller 4f9828fe0b
Remove unnecessary include (#26761) 2021-07-22 16:19:34 -07:00
Mark D. Roth 246c57829b
xds: notify watchers when NACKing resource updates (#26757)
* xds: notify watchers when NACKing resource updates

* check status of failed RPC when waiting for NACK
2021-07-22 13:12:19 -07:00
vperus 53701640c6
codegen: Correct indentation (#26702) 2021-07-21 10:52:08 -07:00
Craig Tiller d3e5803cb2
Move HPACK parser to C++ (#26689)
This is a fairly low effort migration of the current codebase into a C++ class, instead of free standing C code.
It builds upon #26657 as a necessary first step.
I've tried to minimize any changes to semantics or logic in this change, except where required to get a minimal amount of encapsulation - which is the major aim of this change.

A future change in this series will buffer slices until all HPACK headers are in memory for a stream prior to decoding -- it's important to have an encapsulated API to the parser before doing so however (hence this CL).

The next change after that will be an almost complete rewrite of the parsing functionality -- since we'll have the total set of header bytes, we'll no longer need to support suspending decoding at arbitrary points. This will allow us to move to a simple recursive descent parser, eliminate a bunch of indirection in this code, and end up in a much more malleable place for when we start doing metadata API changes.

(we likely also end up with some good performance wins!)
2021-07-15 13:51:23 -07:00
Alisha Nanda d73ec07fe7
Fix small typo in xds end2end test (#26685) 2021-07-14 10:53:55 -07:00
Yash Tibrewal c52005c161
NACK xDS updates when certificate provider instace names are unrecognized (#26614)
* NACK xDS updates when certificate provider instace names are unrecognized

* Reviewer comments

* Reviewer comments

* Clang format

* Fix compilation error
2021-07-11 22:10:04 -07:00
Lidi Zheng b97693d572
[Roll Forward] Tighten the error tolerance requirement by 100x (#26626)
* Tighten the error tolerance requirement by 10x

* Make it 5 sigma instead of 4.5

* Rewrap comments

* Loosen the max concurrent requests in certain test cases
2021-07-09 10:33:43 -07:00
Yash Tibrewal 670a26caef
NACK xDS updates where transport_name is not recognized (#26612)
* NACK xDS updates where transport_name is not recognized

* Reviewer comments
2021-07-08 11:14:07 -07:00
Yash Tibrewal 095045b31c
NACK xds updates requiring client certificates when no validation certificate provider instance is mentioned (#26613) 2021-07-07 13:22:13 -07:00
Yash Tibrewal 8b5fbf8900
TLS Security Connector: Add an always-fail-handshaker when certificates are not ready (#26561)
* TLS Security Connector: Add an always-fail-handshaker when certificates are not ready

* Reviewer suggestion

* Add test
2021-07-04 12:39:29 -07:00
Yash Tibrewal 4daedf0233
De-experimentalize XdsServerBuilder (#26543) 2021-07-02 19:33:15 -07:00
Lidi Zheng f198fb5b41
Revert "Tighten the error tolerance requirement by 100x (#26588)" (#26593)
This reverts commit f835f3f97c.
2021-07-01 16:21:12 -07:00
Lidi Zheng f835f3f97c
Tighten the error tolerance requirement by 100x (#26588)
* Tighten the error tolerance requirement by 10x

* Make it 5 sigma instead of 4.5

* Rewrap comments
2021-07-01 09:48:37 -07:00
Mark D. Roth 34bf26357b
Change StringMatcher to not support case-insensitive regex matching. (#26567)
* Change StringMatcher to not support case-insensitive regex matching.

* clang-format

* clang-tidy
2021-06-29 09:25:33 -07:00
Vijay Pai ea4b68e7a1
Drop experimental tags from core callback API (#26535) 2021-06-24 17:20:43 -07:00
Vijay Pai 4aa9591662
Devirtualize experimental_async() as a stub function (#26532) 2021-06-24 16:32:02 -07:00
Craig Tiller 03bdfa4a74
Make socket mutators work for server connections (#26328)
* Make socket mutators work for server connections

* compile fix

* compile fix

* compile fix

* compile fix

* cleanup

* Revert "cleanup"

This reverts commit 480fcc600a.

* Revert "Revert "cleanup""

This reverts commit 29fbc349d2.
2021-06-23 14:40:35 -07:00
Jan Tattermusch 7351fbb7ac
Make ARM64 C/C++ bazel tests greener (#26518)
* add no_arm64 tag to resolver_component_tests_runner_invoker tests

* skip no_arm64 tests when running on arm64

* increase kokoro jobs timeout for ARM64 C/C++ bazel tests

* use 8 core instance for arm64 bazel C/C++ tests
2021-06-21 18:31:54 +02:00
Vijay Pai cf1ebf7387
Remove experimental tag from uses of the C++ callback API (#26495) 2021-06-20 00:47:07 -07:00
AJ Heller 25d91e3091
New iomgr implementation backed by the EventEngine API (#26026)
This code adds an iomgr implementation that's backed by an EventEngine. This uses the EventEngine API alone, and separate work will introduce an EventEngine prototype to plug into it.

See also drfloob#1: @nicolasnoble has a pull request against this branch, implementing the libuv-based EventEngine. One goal here is to implement the iomgr code such that it can be merged independently without affecting normal builds.

This implementation can be built using bazel build --cxxopt='-DGRPC_USE_EVENT_ENGINE' :all

Some shortcuts are being taken to get a working, testable version of the engine. EventEngines are not pluggable, for example.
2021-06-18 12:30:09 -07:00
Tom Ward 0a97253cc2
Add MockServer{Reader|Writer} to enable mocking server streams. (#26429) 2021-06-08 11:15:32 -07:00
Ashitha Santhosh b9a643a817
Static policy provider implementation. (#26134) 2021-06-03 23:18:08 -07:00
Yash Tibrewal bb994526ba
Fix ExistingRpcsOnResourceDeletion flakiness (#26419) 2021-06-02 18:48:44 -07:00
Lidi Zheng a36199b2d5
Tighten the probability requirement from 99.99% to 99.995% (#26408)
* Tighten the probability requirement from 99.99% to 99.995%

* Update comments
2021-06-01 17:14:00 -07:00
Vijay Pai 8aff94558c
De-experimentalize C++ callback API (#25728)
* De-experimentalize callback API

* Make FromServerContext based on ServerContextBase

* Fix lambda

* Fix headers

* De-experimentalize tests

* clang-format

* Fix consistency checks

* wip

* Fix const-ness of callback client read RPC requests

* Fix golden file

* Give full route_guide callback client example with Hold etc

* Complete example route-guide server

* De-experimentalize test services

* Omit unneeded using

* Remove some uses of non-experimental macro from test

* clang-format examples

* De-experimentalize async stub calls

* Remove experimental namespace use in qps, ubms

* De-experimentalize alarms, generic stubs, and context allocator

* De-experimentalize SetContextAllocator

* clang-format

* Fix conflicts

* Leave obsolete API in place until users can be migrated
2021-05-27 14:55:25 -07:00
Esun Kim a99ead4bf4
Added new method to ByteBuffer & Slice (#26014) 2021-05-27 11:18:18 -07:00
Vijay Pai 153bc67f45
Revert "Revert "Revert "Revert "Expose trailers-only response status through C++ callback API"" (#26365)" (#26375)" (#26379)
This reverts commit 259a74c0e6.
2021-05-27 09:16:05 -07:00
Yash Tibrewal 259a74c0e6
Revert "Revert "Revert "Expose trailers-only response status through C++ callback API"" (#26365)" (#26375)
This reverts commit 66253c521a.
2021-05-26 22:20:23 -07:00
donnadionne e22fefb39a
Ring hash implementation (#26356)
* Ring hash implementation

* Fixing an error caught during import:
ipv6 addresses need small modifications when creating the ring entry.

* fixing an error

* removing debugs

* Remove unnecssary hashing

* small cleanup
2021-05-26 00:03:42 -07:00
shangwu-google 8b3f4fca25
Client context test peer (#25610)
* Create client_context_test_peer.h

mock-up class for ClientContext

* Add ClientContextTestPeer as a friend for test

* Update client_context_test_peer.h

* Update client_context_test_peer.h

* unit test for client_context_test_peer.h

* unit test for client_context_test_peer.h

* fix for tools/buildgen/generate_projects.sh

* Revert "fix for tools/buildgen/generate_projects.sh"

This reverts commit b007aa8c2b.

* re-fix for tools/buildgen/generate_projects.sh

* Remove an empty line

Co-authored-by: Vijay Pai <vpai@google.com>
2021-05-25 18:51:34 -07:00
Vijay Pai 66253c521a
Revert "Revert "Expose trailers-only response status through C++ callback API"" (#26365)
* Revert "Revert "Expose trailers-only response status through C++ callback API (#26249)" (#26363)"

This reverts commit 05c3b30ea0.

* Move the trailers_only check from ClientContext to ClientReactor

* Remove unneeded change in client_context.cc
2021-05-25 17:43:21 -07:00
Yash Tibrewal 05c3b30ea0
Revert "Expose trailers-only response status through C++ callback API (#26249)" (#26363)
This reverts commit 393bae7e88.
2021-05-25 13:44:10 -07:00
Richard Belleville 05aa736840
Fix bazel copyright notices (#26353)
* Add copyright to Bazel files

* Add check for copyright in Bazel files

* Remove unintentional file
2021-05-25 12:15:30 -07:00
Mark D. Roth edae7450f5
fix LOGICAL_DNS semantics (#26147)
* WIP: fix LOGICAL_DNS semantics

* fix tests and address FIXME

* clang-format

* add "dns:" prefix before creating resolver
2021-05-24 09:59:20 -07:00
Vijay Pai 393bae7e88
Expose trailers-only response status through C++ callback API (#26249)
* Expose trailers-only response status through callback API

* Fix change-detector test

* Address reviewer comment about trailers_only headers

* Add TODO requested by markdroth

* Move variable in struct to improve space efficiency

* Don't instantiate ExecCtx in channel_args destructor unless needed
2021-05-21 14:42:41 -07:00
donnadionne 2bb20d25a4
Revert "ring_hash LB policy implementation (#26285)" (#26303)
This reverts commit c55c7c065e.
2021-05-19 14:24:52 -07:00