Commit Graph

4354 Commits

Author SHA1 Message Date
apolcyn 778f04dccf
Bump version on master branch to 1.50.0.dev (#30614)
* bump version to 1.50.0-dev

* regenerate projects
2022-08-17 18:20:27 -07:00
AJ Heller 0c5b6171ad
EventEngine Forkables (#30473)
A (currently) pthread_atfork-based fork support mechanism, allowing EventEngines - or any other object that wants to implement the Forkable interface - respond to forks.
2022-08-09 08:41:16 -07:00
AJ Heller 8f5300b95d
Rename the default EventEngine headers (#30528)
* Rename the default EventEngine headers

Small cleanup. This code hasn't been related to factories for a month or
two.

* ensure only one target contains default_event_engine.h

* src + hdr in same target

* include guards
2022-08-08 13:13:53 -07:00
Yash Tibrewal 41ec08c69a
Update third_party/protobuf to 3.21.4 (#30377)
* Update third_party/protobuf

* run tools/distrib/python/make_grpcio_tools.py

* regenerate protos for ruby, php

* update build_handwritten.yaml

* regenerate projects

* Build - Use :well_known_type_protos instead of :well_known_protos

* Fix target

* Update upb

* Update Python for Protobuf 4.21 (#140)

* Update protobuf dependency on grpcio-tools

* Off by one

* Drop python 3.6 support

* Try upgrading pip

* And in the other script

* Try to figure out if we're compatible with abi3

* See what we've already got installed

* Update the requirements.txt file I didn't know existed

* And here too

* See what's installed

* Let's try that again

* Remove

* Try to confirm version

* Let me see the generated code

* Fix non-Bazel test runner

* Work for all test directories

* Regenerate example protos

* Clean up

* Generate .pyi files

* Fix type checking and linting

* Exclude pyi files from isort

* Upgrade to 3.21.4

* Update iwyu to get around messy protobuf IWYU rules

Co-authored-by: Richard Belleville <gnossen@gmail.com>
2022-08-04 09:39:49 -07:00
Mark D. Roth af634e19b4
Declarative JSON parser (#30442)
* 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

* fix build

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

* fix msan

* Automated change: Fix sanity tests

* fix error message

* Automated change: Fix sanity tests

* add mechanism to conditionally disable individual fields

* fix build

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-08-03 16:35:48 -07:00
AJ Heller c752a6b25e
Reland: Windows IOCP implementation for the WindowsEventEngine (#30480)
Reverts #30466, relanding #30389. Requires a cherrypick.
2022-08-03 15:18:57 -07:00
Craig Tiller a5cab10d6f
[load_balancing] Move interfaces to src/core/lib/load_balancing (#30465)
* [load_balancing] Move interfaces to src/core/lib/load_balancing

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-03 13:45:56 -07:00
AJ Heller 9d4e0e17fe
Revert "Windows IOCP implementation for the WindowsEventEngine (#30389)" (#30466)
This reverts commit 52402afdd4.
2022-08-02 12:27:13 -07:00
AJ Heller 52402afdd4
Windows IOCP implementation for the WindowsEventEngine (#30389)
This is a partial fork of the windows iomgr code - specifically the IOCP and Socket pieces - with some improved architecture and encapsulation. And the start of a WindowsEventEngine.

Once this code is used in a gRPC TCP context, I imagine a few issues will shake out. Also, getting sanitizers set up with MSVC will take a bit of work (see a commit referencing abseil and MSVC bugs to hack around).

I forked the IomgrEventEngine's posix poller interfaces in the hope of negotiating compatibility between the platforms, but the interfaces diverged a fair bit, and I'm doubtful we'll be able to use these "pollers" generically in the same TCP code. Reunification might not happen, and that's probably fine, we'll see how similar the TCP code looks once it's fleshed out.

I also extracted the IomgrEventEngine's timer piece into a separate component, usable by both engines.
2022-08-01 17:06:03 -07:00
Craig Tiller 6fc2511e4d
[resource_quota] Periodically return memory to central quota (#30268)
* [resource_quota] Periodically return memory to central quota

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* optionalize features

* fix periodic update behavior around initialization

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-19 07:56:43 -07:00
Mark D. Roth 90cc6fa706
xDS: upgrade the commit of the xDS protos that we're using (#30318)
* xDS: upgrade the commit of the xDS protos that we're using

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-07-18 13:37:34 -07:00
Craig Tiller 830940a103
[gprpp] Move time averaged stats to gprpp (#30265)
* move to gprpp

* use the shared thing

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-14 15:38:28 -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
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
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
Michael Lumish 7b10852a98
xDS k8s: Enable outlier detection tracing in client images (#30227) 2022-07-06 15:17:44 -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
Yash Tibrewal 89f7534e43
Bump dev version 202207012203 (#30177)
* bump version to 1.49.0-dev

* regenerate projects
2022-07-04 16:38:08 -07:00
Esun Kim 27509c345c
Update upb to 20220621 (#30156)
* Update third_party/upb to e4635f223e7d36dfbea3b722a4ca4807a7e882e2

* Update grpc_deps

* Update src/upb/gen_build_yaml.py

* Regen projects

* Gen_upb_api

* Fix missing json files

* Fix missing textformat

* Fix missing upb/arena

* Sanitize

* Fix missing port_def

* Fix missing array.h
2022-07-01 13:57:56 -07:00
Esun Kim dcf9612186
Upgrade Abseil to LTS 20220623.0 (#30155)
* Upgrade abseil to 20220623.0

* Fix subchannel include
2022-06-30 16:02:08 -07:00
Craig Tiller 6648dd7447
[slice] Remove dead code (#30139)
* Remove dead code

* More dead code

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-29 11:18:04 -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
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
Craig Tiller 24caf53835
Roll forward iomgr ee fork (#30022)
* Revert "Revert "[event-engine] Fork timer code (#29816)" (#30020)"

This reverts commit cda2127776.

* fix-import

* [event_engine] Use durations for scheduling things

* fix

* Automated change: Fix sanity tests

* run-after

* fix

* Automated change: Fix sanity tests

* rename

* Automated change: Fix sanity tests

* format is changing, expunge corpus

* update api_fuzzer

* fix

* Automated change: Fix sanity tests

* fix

* review feedback

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-21 13:55:27 -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
AJ Heller cda2127776
Revert "[event-engine] Fork timer code (#29816)" (#30020)
This reverts commit 977ebbef09.
2022-06-15 11:17:33 -07:00
Craig Tiller 977ebbef09
[event-engine] Fork timer code (#29816)
* move files

* [event-engine] Fork timer code from iomgr

* progress

* thread-pool

* x

* fixes

* tests

* Automated change: Fix sanity tests

* x

* wip

* Automated change: Fix sanity tests

* timer-heap-test

* flesh-things-out

* wip

* Automated change: Fix sanity tests

* fix-test

* fix

* Automated change: Fix sanity tests

* fix

* fix windows

* Automated change: Fix sanity tests

* fix mac

* fix

* review feedback

* fix

* Automated change: Fix sanity tests

* fixes

* Automated change: Fix sanity tests

* review feedback

* Automated change: Fix sanity tests

* fix

* annotate

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-14 21:07:18 -07:00
Ben Beasley c805c4e2d4
Replace deprecated Python “inspect.getargspec” (#29963)
This has been deprecated since Python 3.0 and is removed in Python 3.11.
We can use “inspect.getfullargspec” instead.

Fixes #29962.
2022-06-14 08:36:05 -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
Alessio Buraggina 990bb66ebf
Add MacOS system roots loading support. (#29957)
This change includes:
* adding a cert file path for MacOS
* updating related test to run on MacOS too
* s/linux/supported/ since this now includes more platforms
* regenerating files affected by the name change
2022-06-09 07:20:45 -07:00
Lidi Zheng 347d9ed3ea
Add ring_hash_lb to trace logs for Python/C++ xds interop clients (#29956) 2022-06-08 15:41:29 -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
Richard Belleville 569e397025
Fix error message (#29882) 2022-06-03 14:57:59 -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
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
Lidi Zheng 8558f46d35
[Aio] Ensure Core channel closes when deallocated (#29797)
* [Aio] Ensure Core channel closes when deallocated

* Keep channel object alive

* Let Multicallable objects hold the reference to Channel

* Make YAPF happy
2022-05-27 15:46:38 -07:00
Richard Belleville 761bb3bfc3
Bump version to 1.48.0-dev (on master branch) (#29829)
* bump version to 1.48.0-dev

* regenerate projects
2022-05-27 15:16:27 -07:00
Lidi Zheng abde72280d
[Aio] Fix the wait_for_termination return value (#29795) 2022-05-27 10:53:34 -07:00
Lidi Zheng 8d83842c76
[xDS Proto] Remove Python's usage of copied proto files (#29516) 2022-05-25 15:19:53 -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
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
AJ Heller 250b8d2dae
IomgrEventEngine Redux (#29693)
* Revert "Revert "IomgrEventEngine (#29616)" (#29692)"

This reverts commit 246d13e392.

* temporarily disable EE usage to coordinate landing

* spelling
2022-05-16 10:32:07 -07:00
AJ Heller 246d13e392
Revert "IomgrEventEngine (#29616)" (#29692)
This reverts commit 7f09b98201.
2022-05-13 16:06:19 -07:00
AJ Heller 7f09b98201
IomgrEventEngine (#29616) 2022-05-13 13:12:05 -07:00
Esun Kim 03e9ac6f1f
Requiring C++14 (#29589) 2022-05-12 21:17:32 -07:00
Anirudh Ramachandra 063c36cb46
Revert "Revert "Move TCP Connect into its own handshaker. (#29111)" (#… (#29626)
Rollforward with TCP connect handshaker again(#29111) after fixing broken internal targets.

The changes needed were just visibility changes to the handshaker and the http_connect_handshaker libraries as they are used internally.
2022-05-12 13:29:12 -07:00
Craig Tiller 7798e3b741
[slice] Introduce grpc_core::SliceBuffer (#29635)
* 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

* missing files

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* sanity

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-05-11 13:44:35 -07:00
Vignesh Babu 1494b1ef26
A starter slice buffer implementation to unblock event engine endpoints (#29367)
* 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

* fix nits

Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2022-05-11 10:32:32 -05:00
Craig Tiller f7f0dcf2cb
[build] Move unnecessary absl includes from metadata_batch.h (#29523)
* Move unnecessary absl includes from metadata_batch.h

metadata_batch.h is a widely used header, and so any includes it takes
that are for its internal use can negatively impact our build times.

* missing file

* build

* review feedback
2022-05-04 09:33:26 -07:00
AJ Heller 815029fe2b
Revert "Move TCP Connect into its own handshaker. (#29111)" (#29558)
This reverts commit 0675af8511.
2022-05-02 20:07:51 -07:00
Anirudh Ramachandra 0675af8511
Move TCP Connect into its own handshaker. (#29111)
Currently the tcp connect is performed in chttp2_connector before the handshaking is triggered. For
use cases where the application wants to perform business logic before
the tcp connection, this is problematic. By moving the TCP connect into
its own handshaker and registering it by default at the beginning, this
allows applications to add a new handshaker at the beginning allowing
handshaker logic before a TCP connect.

This approach has the advantage of slightly simplifying the logic in
tcp_connect_handshaker and httpcli as tcp_connect/callback can be
removed.

As the TCP connect needs parameters like resolved_addr,
interested_parties, a new struct called connection args is created as a
member for Handshaker Args.

For server handshakers most of the arguments here are not directly
useful, other than the deadline.
2022-05-02 09:21:12 -07:00
Richard Belleville 409b375980
Revert "Revert "Fix Python xDS Interop Client Time Slicing (#29423)" (#29458)" (#29460)
This reverts commit c2052d4b24.
2022-04-20 15:11:35 -07:00
Yash Tibrewal c2052d4b24
Revert "Fix Python xDS Interop Client Time Slicing (#29423)" (#29458)
This reverts commit be1b4a6d3a.
2022-04-20 14:15:46 -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
Richard Belleville be1b4a6d3a
Fix Python xDS Interop Client Time Slicing (#29423)
* Initial unit testbench

* Tentative fix

* Reduce scope of fix. Clean up test

* Formatting

* Protect writing to RPC status store

* Don't start client until server is running

* Typo

* Remove redundant log

* More formatting

* Review comments
2022-04-19 15:10:42 -07:00
Lidi Zheng 98fc0260e3
Bump dev version to v1.47.0-dev (#29414)
* bump version to 1.47.0-dev

* regenerate projects
2022-04-15 13:25:15 -07:00
Lidi Zheng 7ea775f607
[PSM interop] Set hostname in initial metdata for Python server (#29289)
* [PSM interp] Set hostname in initial metdata for Python servers

* DO-NOT-MERGE: hijact psm-security-python for one test case

* Revert "DO-NOT-MERGE: hijact psm-security-python for one test case"

This reverts commit 17b8af9ab9.

* Metadata is a tuple of tuple not a tuple
2022-04-01 22:48:48 -07:00
tomerv 2953b4518a
Add Python Reflection Client (#29085)
Implement ProtoReflectionDescriptorDatabase in Python to support
client-side reflection sevices.

See gRFC L95.
2022-03-29 15:25:25 -07:00
Craig Tiller ba41407ea6
Reland max_age filter -> promises (#29127)
* TrySeq fix

* Revert "Revert "Revert "Revert "Convert max_age filter to promises (#28904)" (#28957)" (#28958)" (#29105)"

This reverts commit ff14d1d7f3.

* Single set pointer

* Update single_set_ptr.h

* fix

* fix

* build

* fix race

* fix race

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-28 13:53:04 -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
Craig Tiller 766cd6b573
Remove epollex poller (#29160)
* start delete

* remove build.gn... again

* remove more

* Automated change: Fix sanity tests

* fixes

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-21 10:27:52 -07:00
Craig Tiller 0ea1eeb4e7
Expose channel stack type to builder (#29088)
* split builder

* expose channel stack type to builder

* Automated change: Fix sanity tests

* Update channel_stack_builder_impl.h

* Update channel_init.h

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-15 21:33:32 -07:00
Craig Tiller ff14d1d7f3
Revert "Revert "Revert "Convert max_age filter to promises (#28904)" (#28957)" (#28958)" (#29105)
This reverts commit d589f4e6ca.
2022-03-15 12:21:59 -07:00
Craig Tiller d589f4e6ca
Revert "Revert "Convert max_age filter to promises (#28904)" (#28957)" (#28958)
* Revert "Revert "Convert max_age filter to promises (#28904)" (#28957)"

This reverts commit f18e6ede04.

* start watch

* fix

* Fix cancellation on async server filters

* fix

* fix
2022-03-14 22:56:44 -07:00
Mark D. Roth 0c7b37a4a3
refactor health check client to allow reuse for OOB backend metric reporting (#29024)
* refactor health check client to allow reuse for OOB backend metric reporting

* clang-format

* improve comments
2022-03-14 14:42:02 -07:00
Mark D. Roth 707aad777d
resolver: refactor common code for polling-based resolvers (#28979)
* resolver: refactor common code for polling-based resolvers

* remove now-incorrect assertion

* fix cleanup bug

* add missing include guards

* portability fix

* fix some lifetime issues

* plumb tracer into PollingResolver

* fix pollset_set propagation

* increase RPC timeout in python DNSResolverTest

* add dns_resolver tracer and fix ref leak

* code review comments

* check shutdown_ in OnNextResolutionLocked()
2022-03-10 10:45:52 -08:00
AJ Heller 99a30de9e7
Bump version to 1.46.0-dev (on master branch) (#29064)
* bump version to 1.46.0-dev

* regenerate projects
2022-03-09 16:44:12 -08:00
AJ Heller 36824bc570
Revert "Revert "Revert "Add Python Reflection Client (#28443)" (#28878)" (#28879)" (#29023)
This reverts commit cf9be3d49d.
2022-03-04 10:09:11 -08:00
Lidi Zheng cf9be3d49d
Revert "Revert "Add Python Reflection Client (#28443)" (#28878)" (#28879)
This reverts commit 1b4b3764ba.
2022-03-02 14:52:47 -08:00
Craig Tiller 87acbadba1
Third attempt: Convert client_auth_filter to promises (#28968)
* wip

* Automated change: Fix sanity tests

* fixes

* progress

* progress

* grpc compiles

* Automated change: Fix sanity tests

* fixing tests

* x

* progress

* better code

* Automated change: Fix sanity tests

* progress

* progress

* windows fix

* Make Duration metadata trivial

* better message

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* progress

* fixes

* fix

* fix

* spam

* un-disable errantly disabled tests

* gain insight

* Automated change: Fix sanity tests

* fixes

* fixes

* fix

* debug

* tweak

* fix

* fix timeout

* fix comment

* fixes

* x

* better test

* tests

* Automated change: Fix sanity tests

* missed file

* fix

* x

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* merge

* Automated change: Fix sanity tests

* Revert "Revert "Revert "Revert "Convert client_auth_filter to promises (#28767)" (#28951)" (#28952)" (#28967)"

This reverts commit 0f73576b17.

* fix potential memory leak

* Fix behavior if >1 pending request

* fix

* fix nullptr access

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-01 12:45:19 -08:00
Craig Tiller 5fc3ff8203
grpc_millis -> Timestamp/Duration (#28119)
* wip

* Automated change: Fix sanity tests

* fixes

* progress

* progress

* grpc compiles

* Automated change: Fix sanity tests

* fixing tests

* x

* progress

* better code

* Automated change: Fix sanity tests

* progress

* progress

* windows fix

* Make Duration metadata trivial

* better message

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* progress

* fixes

* fix

* fix

* spam

* un-disable errantly disabled tests

* gain insight

* Automated change: Fix sanity tests

* fixes

* fixes

* fix

* debug

* tweak

* fix

* fix timeout

* fix comment

* fixes

* x

* better test

* tests

* Automated change: Fix sanity tests

* missed file

* fix

* x

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* merge

* Automated change: Fix sanity tests

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-01 11:34:05 -08:00
Esun Kim c08eb4fc41
Attempt to upgrade upb to the latest (#28685)
* Update upb to 85e5c76cb7098d3ae35e575d652a40568013a149

* Update grpc_deps.bzl

* Run gen_upb_api.sh

* Run run_sed.sh

* Update gen_build_yaml.py

* Regen projects

* Reformat

* Update third_party/upb to 950cdab42fe4c83f06a2be46eeb46a068e486eed

* Update third_party/upb to c9c31241bc39922b092a81d192badd50cccaaa81

* Update src/upb/gen_build_yaml.py

* Generated projects

* Update third_party/upb to a02d92e0257a35f11d4a58b6a932506cbdbb2f29

* Patching in https://github.com/protocolbuffers/upb/pull/524

* Sed script went too far.

Co-authored-by: Nicolas 'Pixel' Noble <nicolas@nobis-crew.org>
2022-02-28 09:26:31 -08:00
Craig Tiller 0f73576b17
Revert "Revert "Revert "Convert client_auth_filter to promises (#28767)" (#28951)" (#28952)" (#28967)
This reverts commit 235098de22.
2022-02-24 10:07:13 -08:00
Craig Tiller 16a3ce51ff
Service config parser to core configuration (#28883)
* Service config parser to core configuration

* x

* Automated change: Fix sanity tests

* finish

* Automated change: Fix sanity tests

* oops

* fix race

* Automated change: Fix sanity tests

* back out mutex

* refactor

* optimize

* Automated change: Fix sanity tests

* fix

* fix

* split out interface

* review feedback

* x

* fixes

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-02-23 20:50:03 -08:00
Craig Tiller 235098de22
Revert "Revert "Convert client_auth_filter to promises (#28767)" (#28951)" (#28952)
* Revert "Revert "Convert client_auth_filter to promises (#28767)" (#28951)"

This reverts commit 5bfe38f10f.

* fix
2022-02-23 15:00:34 -08:00
Craig Tiller f18e6ede04
Revert "Convert max_age filter to promises (#28904)" (#28957)
This reverts commit ae4b45d75a.
2022-02-23 14:39:07 -08:00
Craig Tiller ae4b45d75a
Convert max_age filter to promises (#28904)
* start

* stuff

* build

* Automated change: Fix sanity tests

* fix

* finish him

* fix

* better

* fix

* review feedback

* Update channel_idle_filter.cc

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-02-23 14:00:45 -08:00
Craig Tiller 5bfe38f10f
Revert "Convert client_auth_filter to promises (#28767)" (#28951)
This reverts commit cadce47ebf.
2022-02-23 08:17:37 -08:00
Craig Tiller cadce47ebf
Convert client_auth_filter to promises (#28767)
* Convert client_auth_filter to promises

* outline

* x

* x

* fixes

* remove-spam

* Async sequences over iterators

* iterate

* better semantics

* fix

* clang-tidy

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fixes

* fixes

* Automated change: Fix sanity tests

* progress

* progress

* progress

* progress

* progress

* credentials_test passes

* Automated change: Fix sanity tests

* Make Activity more of an interface

Move mutex and wakeup logic into a new class between PromiseActivity<>
and Activity (so that the sharing can persist), but make Activity closer
to a pure interface, so that whilst we migrate code we can implement
better fakes without forcing allocation.

* fixes

* Automated change: Fix sanity tests

* fixes

* test the awful failure

* x

* fix typo

* fix race

* 4.9

* x

* review feedback

* review feedback

* Automated change: Fix sanity tests

* review feedback

* replace AuthMetadataContext interface with GetRequestMetadataArgs struct

* Automated change: Fix sanity tests

* fix merge

* Fixup

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Mark D. Roth <roth@google.com>
2022-02-23 07:36:19 -08:00
Craig Tiller dd76a04b8c
Move resolver to core configuration (#28881)
* Move resolver to core configuration

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* resolver: clean up and modernize registry

* fix race

* update visibility

* fix internal error

* review feedback

* resolve backref issues

* windows

* x

* fix sockaddrs on windows?

* fix sockaddrs on windows?

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Mark D. Roth <roth@google.com>
2022-02-23 00:09:04 -08:00
Craig Tiller 33ec154cee
Revert "Enable GRPC_ERROR_IS_ABSEIL_STATUS (#28898)" (#28939)
This reverts commit f00e842609.
2022-02-21 20:42:02 -08:00
Esun Kim f00e842609
Enable GRPC_ERROR_IS_ABSEIL_STATUS (#28898)
* Python support

* Fix Ruby errors

* Eanble GRPC_ERROR_IS_ABSEIL_STATUS

* Remove use_abseil_status=true build
2022-02-18 08:48:36 -08:00
Craig Tiller 0f424ae5cc
Move client-idle-filter to promises (#28838)
* Promise based sleep

* Embrace absl::Status

* Automated change: Fix sanity tests

* Add another test, fix bug

* fix

* fix

* Move client-idle-filter to promises

* better call counting

* x

* x

* x

* review feedback

* progress

* Automated change: Fix sanity tests

* progress

* Automated change: Fix sanity tests

* fix

* channel stack refcount

* remove op from lock, refcount

* compiles

* Automated change: Fix sanity tests

* nicer api

* fix

* Automated change: Fix sanity tests

* fix

* speculative fix for windows

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-02-16 18:50:29 -08:00
Esun Kim 4c0249f4d9
Removed grpc_error_handle from cython (#28896) 2022-02-16 14:05:33 -08:00
Craig Tiller c42dfe32e7
Remove chttp2 plugin (#28882)
* Remove chttp2 plugin

* Automated change: Fix sanity tests

* fix tsan

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-02-16 12:53:07 -08:00
AJ Heller 1b4b3764ba
Revert "Add Python Reflection Client (#28443)" (#28878)
This reverts commit 3e8e229308.
2022-02-14 16:00:44 -08:00
AJ Heller 84ed11459d
Delete custom iomgr (#28816)
* Squashed version of gnossen's gevent pR

* rm

* Automated change: Fix sanity tests

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-02-14 13:19:20 -08:00
Ashitha Santhosh 1fee3d72be
remove SDK term from gRPC authz (#28843) 2022-02-14 11:44:15 -08:00
tomerv 3e8e229308
Add Python Reflection Client (#28443)
* Add Python Reflection Client

Implement ProtoReflectionDescriptorDatabase in Python to support
client-side reflection sevices.

* fixup: following code review

* fixup: following code review

Mostly improve documentation.

* fixup: add test to tests.json

* fixup: formatter & linter
2022-02-14 11:22:57 -08:00
Richard Belleville 066a310df1
Revert "Revert "Reimplement Gevent Integration (#28276)" (#28862)" (#28863)
This reverts commit c02784bfa3.
2022-02-11 13:43:01 -08:00
Richard Belleville c02784bfa3
Revert "Reimplement Gevent Integration (#28276)" (#28862)
This reverts commit 27bc6fe779.
2022-02-11 13:02:28 -08:00
Richard Belleville 27bc6fe779
Reimplement Gevent Integration (#28276)
* WIP

* Add gevent test suite run under Bazel.

* Fix things up

* Yapf

* Fix up Bazel files

* Make py_grpc_test fancier

* Attempt to fix Windows RBE

* Attempt to kick GitHub

* Fix Python 2 runs

* Yet more fixes

* And the patch file too

* I am an idiot

* Mark gevent tests flaky

* Try to make rules_python more tolerant

* Typo

* Exclude reconnect test from gevent

* Remove unnecessary parts of patch

* Buildifier

* You saw nothing

* isort

* Move py_grpc_test to an internal-only file

* Review comments

* More reviewer comments

* Review

* Add initial changes for gevent

* WIP. Run completion_queue_next in a threadpool

* WIP.

* WIP

* Re-remove skip annotation

* Finally working

* Reactivate tests

* Clean up

* Move C++ threading utilities to grpc.pxi

* Unbreak sync stack

* Refix test flake

* WIP. Trying to get things working properly

* Move test stuff to test runner

* Clean up

* Can't handle exceptions if you don't compile with exceptions

* Remove debug stuff unintentionally left in

* Add greenlet switch loggging and fix threading issue

* Only run a greenlet scheduling greenlet when there are open channels

* Format

* Add threadpool modifications to old runner

* And actually import gevent
2022-02-10 18:25:12 -08:00
yihuaz b458db9246
Eliminate gRPC insecure build (#25586)
* force submit

* fix test error

* remove is_client from local tsi and its callsites

* fix too_many_pings_test

* add missing dep
2022-02-10 11:17:18 -08:00
Yousuk Seung 172120f6b4
Move XdsChannelCreds to CoreConfiguration (#28746)
* Move XdsChannelCreds to CoreConfiguration

* move xDS channel creds files to src/core/lib/security/credentials/xds

* Change back to returning a RefCountedPtr.

* make remove "xds_" from xds_channel_* files.

* Renamed to address comments.

* clang fix

* Fix another clang error
2022-02-09 15:33:17 -08:00
Vignesh Babu eb8af70ee0
Creating an event_engine_common library that contains code which all event engine implementations can depend on (#28765)
* creating an event_engine_common library that contains code which all event engine implementations can depend on

* adding event_engine_common dependency

* regenerate projects

* Automated change: Fix sanity tests

* renaming file

* regenerate projects

Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2022-02-02 12:48:47 -08:00
Tamir Duberstein 5c474b0c84
Relocate shared EventEngine APIs (#28721)
Partially collapse `event_engine_factory.cc` into `event_engine.cc`. Add a
new function `DefaultEventEngineFactory` which is used to set a default
event engine factory at link time, separate from the factory that can be
set at run time. Implemenet this function in
`default_event_engine_factory.cc`.

This allows alternative default event engine factories to be implemented
without requiring the duplication of the implementations of
`SetDefaultEventEngineFactory`, `CreateEventEngine`, and
`GetDefaultEventEngine`.
2022-01-28 10:00:54 -08:00
Esun Kim f1e79853ed
Revert "Revert "Buildify Envoy upb (#28558)" (#28648)" (#28649)
This reverts commit 01011ab259.
2022-01-25 11:19:41 -08:00
apolcyn 9f1663fb74
Upgrade c-ares to 1.17.2 (#28671)
Upgrade c-ares dependency to 1.17.2
2022-01-25 10:41:18 -08:00
Esun Kim 01011ab259
Revert "Buildify Envoy upb (#28558)" (#28648)
This reverts commit 97584d8346.
2022-01-21 08:35:13 -08:00
Esun Kim 97584d8346
Buildify Envoy upb (#28558)
* Buildigy xds

* Generate project

* Buildify envoy

* Added new upb files

* Removed unused upb targets

* Fix grpc_cel_engine

* Update envoy-api to the latest

* Regen upb

* Regen projects

* Fix bazel build on MacOS

* More fix on bazel mac

* Disable grpc_tool_test on Mac

* Regen projects
2022-01-20 22:29:58 -08:00
Craig Tiller 74a2cb6e2b
Revert "Revert "Reland slice changes (#28601)" (#28615)" (#28624)
* Revert "Revert "Reland slice changes (#28601)" (#28615)"

This reverts commit 939bbfc336.

* Change random seed back to nanoseconds
2022-01-20 12:47:33 -08:00
Jan Tattermusch 402981be8e
Bump version to 1.45.0-dev (#28553)
* bump version to 1.45.0-dev

* regenerate projects
2022-01-20 09:23:06 +01:00
Craig Tiller 939bbfc336
Revert "Reland slice changes (#28601)" (#28615)
This reverts commit b33e0d40af.
2022-01-19 09:40:19 -08:00
Vignesh Babu aeea02fab8
TLS Session Keys export for GRPC C++ (#26812)
* Adding TLS Key export logic to core and c++ wrappers

* Adding and end2end cpp tls key export test and updating broken test due to interface changes

* regenerate projects

* updating tls key export core logic with addition of APIs to grpc_security.h

* undoing changes to tls_security_connector_test

* regenerate projects

* changing the logging format enum name as per GRFC comments

* regenerate projects

* removing some commented code

* updating changes as per review comments

* adding GRPCAPI annotations to functions defined in grpc_security.h

* regenerate projects

* fixed some code styling issues

* removing grpc_security.h include from tls_credentials_options.h

* updating files as per review comments

* minor fixes

* moving some code around

* removing key log format from tls session key log config and converting it to a simple string

* regenerate projects

* fixing mistakes in recent merge with master

* regenerate projects

* regenerate projects

* fixing some distrib and snity errors

* fixing formatting errors

* fixing more sanity checks and raising supported openssl versions to 1.1.1

* updating min supported openssl version to 1.1.1

* updating min supported openssl version in tls_key_export_test

* updating test to fix incorrect vector initialization

* updating as per latest comments

* fixing sanity checks

* addressing review comments

* fixing sanity checks

* fixed c++ comment style

* Automated change: Fix sanity tests

* fixing review comments

Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2022-01-18 14:44:55 -08:00
Lidi Zheng 0f60be8e8a
Increase the Python protobuf requirement to >=3.12.0 (#28604) 2022-01-18 13:32:54 -08:00
Craig Tiller b33e0d40af
Reland slice changes (#28601)
* Revert "Revert "Eliminate slice interning (#28363)" (#28598)"

This reverts commit 03bf699600.

* fix?
2022-01-18 09:29:49 -08:00
Jan Tattermusch 03bf699600
Revert "Eliminate slice interning (#28363)" (#28598)
This reverts commit 6703186b7a.
2022-01-18 15:44:18 +01:00
Craig Tiller 6703186b7a
Eliminate slice interning (#28363)
Eliminate slice interning, and structures in slices to support it.
Reduces grpc_slice_refcount from 40 bytes (+ a required 8 bytes elsewhere) to 16 bytes.
Removes a pointer dereference for every slice ref/unref.

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-01-17 20:25:45 -08:00
Yousuk Seung c02fe64bea
Support custom xDS channel creds (#28486)
This patch introduces a factory to allow supporting custom xDS channel
creds. Three types currently supported (fake, insecure, google_default)
are registered by default for backward-compatibility.
2022-01-13 23:00:10 -08:00
Craig Tiller 4b881c5947
Remove grpc_mdelem (#28267)
* Automated change: Fix sanity tests

* content-type

* Automated change: Fix sanity tests

* clang-format

* fix

* Move colon prefixed metadata

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* try to fix windows failure

* try and scale sizes better

* ambiguity fix?

* wip metadatavalueasslice

* Fix status code for resource exhaustion

* Revert "Revert "Move a bunch of slice typed metadata to new system (#28107)" (#28208)"

This reverts commit 7717587063.

* fix test

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* slice helper

* x

* noinline

* try and scale sizes better

* Automated change: Fix sanity tests

* fixes

* fix

* fix

* fixes

* fix build

* fix overflow

* progress

* Automated change: Fix sanity tests

* fix

* initial work

* progress

* fix

* fix

* Automated change: Fix sanity tests

* progress

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* compressor for path/authority

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* legalize

* legalize

* status-enc

* fmt

* fix

* fix

* fix

* fix

* fix/opt

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* comment

* fmt

* remove arg

* Automated change: Fix sanity tests

* remove name

* Automated change: Fix sanity tests

* sketch

* Automated change: Fix sanity tests

* progress

* add specialized encoders for compression metadata

* progress

* review feedback

* fix

* missoing files

* remove crud

* xxxxx

* more

* Small improvement in memory usage and performance

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Fix caching

* Automated change: Fix sanity tests

* omg

* fix crash in alts

* default everything

* Automated change: Fix sanity tests

* review feedback

* fixes

* fixes

* fixes

* Automated change: Fix sanity tests

* speedup

* fix

* fix

* clang-format

* fixes

* progress

* fixes

* fixes

* Automated change: Fix sanity tests

* fix

* fix

* progress

* update timeout encoding algorithm

* Automated change: Fix sanity tests

* fix

* fix

* review feedback

* progress

* progress

* progress

* progress

* builds

* Automated change: Fix sanity tests

* remove debug code

* fix ub

* unname things

* coax compilers

* reduce failures

* fix

* fix

* fix

* fix

* cleanup

* compile fix

* preserve concatenation rule

* spew

* fix

* fix

* postfix operator++ for msvc

* fix

* fix

* remove unused code

* lower cost of hpack table construction

* fix refcounting

* review feedback

* fixes

* fixes

* support multivalued traits

* Automated change: Fix sanity tests

* fix

* clearer clear

* appeasing 4.9

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-01-07 09:42:27 -08:00
Craig Tiller 55b365f287
Move resolver code around a little (#27846)
* move service config

* service config should not depend on grpc_base

* move resolver, deal with fallout

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* review feedback

* review feedback

* fix

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix vis

* fix

* fixes

* Automated change: Fix sanity tests

* visibility

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-01-06 10:53:40 -08:00
Yash Tibrewal ab6d7b4f02
Reland rbac filter (#28442)
* Revert "Revert "xDS: Add support for RBAC HTTP filter (#28309)" (#28441)"

This reverts commit 7aae5c66df.

* Fix internal clang errors

* Ipv6 addresses are 128 bit
2021-12-29 11:42:58 -08:00
Craig Tiller 7aae5c66df
Revert "xDS: Add support for RBAC HTTP filter (#28309)" (#28441)
This reverts commit 6ea8214879.
2021-12-28 20:11:38 +00:00
Lidi Zheng 9a593c7126
Remove Python2 from python_configure.bzl (#28406)
* Remove Python2 from python_configure.bzl

* Replace py2and3_test with py_test with PY3

* Fix typo in the bazel script
2021-12-28 10:16:14 -08:00
Yash Tibrewal 6ea8214879
xDS: Add support for RBAC HTTP filter (#28309)
* xDS: ADD RBAC HTTP filter support

* sanity, upb regenerate files

* Revert PerChannelArg changes

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Remove unnecessary header

* Fix sanity

* Add RBAC service config parsing tests

* Don't make a copy of the metadata batch

* Revert expr_proto changes

* Some more tests

* Reviewer comments

* Reviewer comments

* No metadata changes needed

* Fix leak of DynamicXdsServerConfigSelectorProvider

* Fix deadlock issues

* Fix test compilation
2021-12-23 20:46:36 -08:00
Lidi Zheng 83e7cb24fe
Fix the setuptools distutils overriding issue (#28393)
* Fix the distutil install issue

* Try to move setuptools install forward

* Try pin the distribution tools

* Enforce local distutil

* Fix script order of definition

* Add comment

* Try to fix the setuptool monkey patch

* Clean-up imports for commands.py

* Pin 59.6.0 instead of 59.7.0 (incomplete release)
2021-12-21 12:27:01 -08:00
Craig Tiller 264c321d83
Move compression related metadata to the new system (#28223)
* Eliminate most of grpc_message metadata handling

* Eliminate most of host metadata handling

* Remove more callouts without fixing code

* fiiixes

* typo

* Automated change: Fix sanity tests

* try-shrink

* Automated change: Fix sanity tests

* size tweaks

* less tricks

* deunique

* commonize

* commonize

* Automated change: Fix sanity tests

* size tuning, fixes

* Automated change: Fix sanity tests

* fix

* size tuning, fixes

* remove constexpr

* fix

* reuse code

* fix

* tweak code

* more tweaks

* tell no lies

* fixes

* fixes

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix?

* fix binder

* fix

* fix

* fixes

* Automated change: Fix sanity tests

* fix

* initial refactoring

* optimize status encoding

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* content-type

* Automated change: Fix sanity tests

* clang-format

* fix

* Move colon prefixed metadata

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* try to fix windows failure

* try and scale sizes better

* ambiguity fix?

* wip metadatavalueasslice

* Fix status code for resource exhaustion

* Revert "Revert "Move a bunch of slice typed metadata to new system (#28107)" (#28208)"

This reverts commit 7717587063.

* fix test

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* slice helper

* x

* noinline

* try and scale sizes better

* Automated change: Fix sanity tests

* fixes

* fix

* fix

* fixes

* fix build

* fix overflow

* progress

* Automated change: Fix sanity tests

* fix

* initial work

* progress

* fix

* fix

* Automated change: Fix sanity tests

* progress

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* compressor for path/authority

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* legalize

* legalize

* status-enc

* fmt

* fix

* fix

* fix

* fix

* fix/opt

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* comment

* fmt

* remove arg

* Automated change: Fix sanity tests

* remove name

* Automated change: Fix sanity tests

* add specialized encoders for compression metadata

* review feedback

* fix

* missoing files

* Small improvement in memory usage and performance

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* Fix caching

* Automated change: Fix sanity tests

* fix crash in alts

* default everything

* Automated change: Fix sanity tests

* review feedback

* fixes

* fixes

* fixes

* Automated change: Fix sanity tests

* speedup

* fix

* fix

* fixes

* fixes

* fixes

* Automated change: Fix sanity tests

* fix

* remove debug code

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-12-15 15:47:56 -08:00
Jan Tattermusch 09e5ca15c5
fix python dns resolver tests on kokoro MacService (#28344) 2021-12-13 19:02:49 +01:00
Craig Tiller b95ed96b96
Revert "Revert "Move arena into resource quota (#28008)" (#28292)" (#28293)
This reverts commit 91edf92ce0.
2021-12-06 21:41:06 -08:00
Craig Tiller 91edf92ce0
Revert "Move arena into resource quota (#28008)" (#28292)
This reverts commit ad424a2ebf.
2021-12-06 12:59:28 -08:00
Mark D. Roth d1448872fa
XdsClient: use XdsResourceType abstraction throughout XdsClient (#28165)
* WIP

* introduce XdsResourceType API and change Listener parsing to use it

* converted RouteConfig parsing

* convert cluster and endpoint parsing

* cleanup

* clang-format

* attempt to work around compiler problems

* move XdsResourceType to its own file, and move endpoint code out of XdsApi

* move cluster parsing to its own file

* move route config parsing to its own file

* move listener parsing to its own file

* clang-format

* minor cleanup

* plumbed XdsResourceType throughout XdsClient

* a bit of cleanup

* more cleanup

* construct full resource names before calling XdsApi::CreateAdsRequest()

* remove some unneeded code

* clean up includes and have XdsResourceType initialize the upb symtab

* more cleanup of unnecessary code

* more cleanup

* update comment

* clang-format

* add missing virtual dtor

* fix build

* remove comment

* add missing virtual dtor
2021-12-06 10:14:25 -08:00
Esun Kim ba06eeb07c
Bump to v1.44.0 dev (#28248)
* Bump version to v1.44.0-dev

* Regenerate projects
2021-12-06 09:50:51 -08:00
Craig Tiller ad424a2ebf
Move arena into resource quota (#28008)
* new resource quota integration

* Automated change: Fix sanity tests

* fix

* fix

* fixes

* fixes

* fixes

* Automated change: Fix sanity tests

* fixes

* fixes

* Automated change: Fix sanity tests

* fixes

* fix

* fixes

* windows-fix

* fixes

* fixes

* fix

* fix-asan

* banned

* banned

* fixes

* clang-tidy-fix

* Automated change: Fix sanity tests

* fix-cronet

* review feedback

* review feedback

* Automated change: Fix sanity tests

* fixes

* bug fix

* fixes

* compile fix

* exclude megabyte size payloads from 1byte tests

* windows fix

* start moving ios

* keep moving windows

* Get windows compilation working.

* Automated change: Fix sanity tests

* better

* fixes

* remove slice buffer from memory_allocator.h

* Revert "remove slice buffer from memory_allocator.h"

This reverts commit 234a63b6e3.

* ugh

* #fixtests

* pthread tls fixes

* Automated change: Fix sanity tests

* fixfixfix

* xxx

* add reset

* review feedback

* fix

* fix

* fixes

* fix

* mac progress

* cpp-impl-of

* rename ptr

* Automated change: Fix sanity tests

* memory-owner-is-a-memory-allocator

* fixes

* fix

* fix from prod

* fix

* Fix issue leading to bad pointers being returned on Windows.

* Automated change: Fix sanity tests

* fix multislice bug

* argh

* hyrums law fixes

* hyrums law fixes

* clang-format

* hyrums law fixes

* Move arena into resource quota

* Remove redundant constant

* fixup the tests

* Automated change: Fix sanity tests

* fiiixes

* Automated change: Fix sanity tests

* fixes

* Automated change: Fix sanity tests

* fixes

* fix

* fix

* Automated change: Fix sanity tests

* fixes

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-12-06 08:43:56 -08:00
Mark D. Roth cbe2855866
XdsClient: move resource type parsing out of XdsApi (#28151)
* introduce XdsResourceType API and change Listener parsing to use it

* converted RouteConfig parsing

* convert cluster and endpoint parsing

* cleanup

* clang-format

* attempt to work around compiler problems

* move XdsResourceType to its own file, and move endpoint code out of XdsApi

* move cluster parsing to its own file

* move route config parsing to its own file

* move listener parsing to its own file

* clang-format

* minor cleanup

* remove comment

* add missing virtual dtor
2021-12-03 08:19:54 -08:00
Craig Tiller e21505858f
Move some integer based metadata to the new system (#28198)
* Eliminate most of grpc_message metadata handling

* Eliminate most of host metadata handling

* Remove more callouts without fixing code

* fiiixes

* typo

* Automated change: Fix sanity tests

* try-shrink

* Automated change: Fix sanity tests

* size tweaks

* less tricks

* deunique

* commonize

* commonize

* Automated change: Fix sanity tests

* size tuning, fixes

* Automated change: Fix sanity tests

* fix

* size tuning, fixes

* remove constexpr

* fix

* reuse code

* fix

* tweak code

* more tweaks

* tell no lies

* fixes

* fixes

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix?

* fix binder

* fix

* fix

* fixes

* Automated change: Fix sanity tests

* fix

* initial refactoring

* optimize status encoding

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* try to fix windows failure

* try and scale sizes better

* ambiguity fix?

* wip metadatavalueasslice

* Fix status code for resource exhaustion

* Revert "Revert "Move a bunch of slice typed metadata to new system (#28107)" (#28208)"

This reverts commit 7717587063.

* fix test

* Automated change: Fix sanity tests

* slice helper

* x

* noinline

* try and scale sizes better

* Automated change: Fix sanity tests

* fixes

* fix

* fix

* fix build

* fix overflow

* fix

* fix

* fix

* fix

* review feedback

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-12-02 22:02:56 -08:00
Esun Kim 260145c517
Updated backoff to use absl::Random (#27193)
* Replace in-house rand with absl::Random for backoff (#26463)

* Replace in-house rand with absl::Random for backoff

* Run sanity

* Added bscrypt dependency

* Removed ABSL_RANDOM_HWAES_FLAGS

* Remove GCC_WARN_64_TO_32_BIT_CONVERSION = YES

* GCC_WARN_64_TO_32_BIT_CONVERSION to podspec install
2021-12-02 15:22:44 -08:00
Lidi Zheng 45024f63a7
Correct the error_in_stream_unary test (#28229) 2021-12-01 09:14:18 -08:00
Esun Kim 779701ab76
google/api/... (#27928) 2021-11-30 21:36:34 -08:00
Craig Tiller 220cf641fa
Reland slice metadata conversion (#28210)
* Fix status code for resource exhaustion

* Revert "Revert "Move a bunch of slice typed metadata to new system (#28107)" (#28208)"

This reverts commit 7717587063.

* fix test
2021-11-29 13:38:40 -08:00
Craig Tiller 7717587063
Revert "Move a bunch of slice typed metadata to new system (#28107)" (#28208)
This reverts commit 4d432aefc1.
2021-11-24 15:41:36 -08:00
Craig Tiller 4d432aefc1
Move a bunch of slice typed metadata to new system (#28107)
* Eliminate most of grpc_message metadata handling

* Eliminate most of host metadata handling

* Remove more callouts without fixing code

* fiiixes

* typo

* Automated change: Fix sanity tests

* try-shrink

* Automated change: Fix sanity tests

* size tweaks

* less tricks

* deunique

* commonize

* commonize

* Automated change: Fix sanity tests

* size tuning, fixes

* Automated change: Fix sanity tests

* fix

* size tuning, fixes

* remove constexpr

* fix

* reuse code

* fix

* tweak code

* more tweaks

* tell no lies

* fixes

* fixes

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix?

* fix binder

* fix

* fix

* fixes

* Automated change: Fix sanity tests

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-11-24 11:42:37 -08:00
Esun Kim 5088014987
Boringssl update to 4fb1589 (#28194)
* update submodule boringssl-with-bazel with origin/main-with-bazel

* update boringssl dependency to main-with-bazel commit SHA

* regenerate files

* generate boringssl prefix headers

* Increment podspec version
2021-11-23 16:02:56 -08:00
Craig Tiller 672f31c6ac
Channel args preconditioning (#28132)
* Channel args preconditioning

* docs

* fixes

* Automated change: Fix sanity tests

* fix

* fix this again after merge error

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-11-22 15:24:39 -08:00
Esun Kim 461bb5e41f
To LTS 20211102.0 (#27916) 2021-11-18 16:24:44 -08:00
Yash Tibrewal 25446c468a
Support RDS updates on the server (#27851)
* Port changes from #27388

* Reviewer comments

* Fix resource timeout issue

* Cleanup

* Fix clang-tidy

* Revert benchmark

* Restructure

* clang-tidy

* Automated change: Fix sanity tests

* Partial commit

* Reviewer comments

* Fixes

* Reviewer comments

* Reviewer comments

* Reviewer comments

* Reviewer comments

* clang-format

* Fix FaultInjection tests

* clang-tidy

Co-authored-by: yashykt <yashykt@users.noreply.github.com>
2021-11-18 16:10:31 -08:00
Craig Tiller a629c9a03e
Reland resource quota work (#28017)
* Check if memory owner available prior to polling it

The transport may drop the memory owner during its destruction sequence

* tcp_fix

* Revert "Revert "New resource quota integration (#27643)" (#28014)"

This reverts commit 0ea2c37263.

* clang-format

* fix-path

* fix
2021-11-15 08:23:51 -08:00
Craig Tiller 1d63bb02b7
AVL implementation in C++ (#27782)
* avl

* move-code,add-fuzzer

* done

* fix

* Automated change: Fix sanity tests

* buildifier

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-11-12 22:26:09 +00:00
Craig Tiller 0ea2c37263
Revert "New resource quota integration (#27643)" (#28014)
This reverts commit 39f0877d25.
2021-11-11 14:26:19 -08:00
Lidi Zheng f7d4f8e13c
[Aio] Validate the input type for set_trailing_metadata and abort (#27958)
* [Aio] Validate the input type for set_trailing_metadata and abort

* Correct the checking of sequence type
2021-11-11 13:44:55 -08:00
Craig Tiller 39f0877d25
New resource quota integration (#27643)
* new resource quota integration

* Automated change: Fix sanity tests

* fix

* fix

* fixes

* fixes

* fixes

* Automated change: Fix sanity tests

* fixes

* fixes

* Automated change: Fix sanity tests

* fixes

* fix

* fixes

* windows-fix

* fixes

* fixes

* fix

* fix-asan

* banned

* banned

* fixes

* clang-tidy-fix

* Automated change: Fix sanity tests

* fix-cronet

* review feedback

* review feedback

* Automated change: Fix sanity tests

* fixes

* bug fix

* fixes

* compile fix

* exclude megabyte size payloads from 1byte tests

* windows fix

* start moving ios

* keep moving windows

* Get windows compilation working.

* Automated change: Fix sanity tests

* better

* fixes

* remove slice buffer from memory_allocator.h

* Revert "remove slice buffer from memory_allocator.h"

This reverts commit 234a63b6e3.

* ugh

* #fixtests

* pthread tls fixes

* Automated change: Fix sanity tests

* fixfixfix

* xxx

* add reset

* review feedback

* fix

* fix

* fixes

* fix

* mac progress

* cpp-impl-of

* rename ptr

* Automated change: Fix sanity tests

* memory-owner-is-a-memory-allocator

* fixes

* fix

* fix from prod

* fix

* Fix issue leading to bad pointers being returned on Windows.

* Automated change: Fix sanity tests

* fix multislice bug

* argh

* hyrums law fixes

* hyrums law fixes

* clang-format

* hyrums law fixes

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-11-10 22:53:04 -08:00
ZhenLian 2e14f6fa70
Support Custom Post-handshake Verification in TlsCredentials (#25631)
* custom verification refactoring - post-handshake verification
2021-11-10 13:45:52 -08:00
AJ Heller b7d4569d34
Rename the source files for ChannelArgsEndpointConfig (#27972)
* Rename the source files for ChannelArgsEndpointConfig

Previous naming was non-descript

* generate_projects

* add missing file to BUILD, and generate_projects.sh

* correct include guards
2021-11-10 09:22:03 -08:00
AJ Heller 39adc01a57
Reintroduce the EventEngine default factory (#27920)
* Reintroduce the EventEngine default factory

An application can provide an EventEngine factory function that allows
gRPC internals to create EventEngines as needed. This factory would be
used when no EventEngine is provided for some given channel or server,
and where an EventEngine otherwise could not be provided by the
application. Note that there currently is no API to provide an
EventEngine per channel or per server.

I've also deleted some previous iterations on global EventEngine and
EventEngine factory ideas. This new code lives in a public API, and
coexists with iomgr instead of being isolated to an EventEngine-specific
iomgr implementation.

* add proper namespaces, and fix description

* put factory functions in their own file (for replaceability)

* add synchronization

* generate_projects.sh

* extract event_engine_base and event_engine_factory targets

Also separate iomgr/event_engine files in the BUILD, with comments

* gpr_platform

* move all EE factory declarations to event_engine_base

Makes internal hackery easier.

* add missing deps

* reorder dep alphabetically

* comment style change
2021-11-09 10:46:51 -08:00
Mark D. Roth 13d98176b5
bump version on master to 1.43-dev (#27930)
* bump version on master to 1.43-dev

* bump core version

* update g_stands_for.md
2021-11-04 16:19:56 -07:00
Richard Belleville 468768865b
Make Buildifier Sanity Test Strict (#27807)
* Fix all lint errors in repo.

* Use strict buildifier by default

* Whoops. That file does not exist

* Attempt fix to buildifier invocation

* Add missing copyright
2021-11-03 14:57:04 -07:00
Vitaly Buka 9d0922e02d
Init grpc_completion_queue_attributes::cq_shutdown_cb (#27864) 2021-11-01 10:07:09 -07:00
Lidi Zheng b8c38d6bc2
Support generic_xds_config in GCE/GKE frameworks and Python tests (#27796)
* Support generic_xds_config in GCE/GKE frameworks and Python tests

* Correct the field name

* Address comments

* Add new CSDS support to the regular K8s testcases

* Support incomplete CSDS config dump
2021-10-25 16:41:48 -07:00
Lidi Zheng 96995801d8
[Aio] Allow sequential types for server interceptors (#27818) 2021-10-25 13:09:06 -07:00
Yash Tibrewal 6d2a641dd3
XdsChannelStackModifier class (#27744)
* ChannelStackModifier class

* Regenerate projects

* clang-tidy

* Use CoreConfiguration for inserting xDS HTTP filters

* New lines

* Move test to test/core/xds

* Add comment for placement of filter stack

* Fix sanity

* Fix memory leak - destroy builder

* Don't build xds_channel_stack_modifier_test on non-bazel build systems due to census dependency
2021-10-22 13:48:30 -07:00
Richard Belleville eab375e439
Reland #27275 (#27806)
* Revert "Revert "Add Aspects to Bazel py_proto_library and py_grpc_library Rules (#27275)" (#27805)"

This reverts commit 763e5b40f3.

* Remove unused symbol
2021-10-21 19:37:24 -07:00
Craig Tiller 763e5b40f3
Revert "Add Aspects to Bazel py_proto_library and py_grpc_library Rules (#27275)" (#27805)
This reverts commit e970b8fa03.
2021-10-21 17:05:56 -07:00
Michael Beardsworth e970b8fa03
Add Aspects to Bazel py_proto_library and py_grpc_library Rules (#27275)
* Move most py_proto_library macro contents into rule.

The _generate_pb2_src rule is modified to produce a valid PyInfo
provider that can be depended on directly by py_.* rules.

Keeping an intermediate macro in place increases complexity without
adding any real value.

* Move most py_grpc_library macro contents into rule.

The _generate_pb2_grpc_src rule is modified to produce a valid PyInfo
provider that can be depended on directly by py_.* rules.

Keeping an intermediate macro in place increase complexity without
adding any real value.

* Remove support for additional plugins.

It's easy enough for a plugin author to build their own rule-set, and it
adds extra unused (and untested) complexity to gRPC's rules.

* Rewrite py_proto_library to track dependencies correctly.

* Propagate Python dependencies of py_grpc_library rules to consumers.

* Add test coverage for aspect-based py_proto_library.
2021-10-21 15:56:37 -07:00
Ming-Chuan 34fdb542b5
Add resolver for binder transport URI scheme (#27529)
This commit is part of the effort to create binder channel with
GRPC_CLIENT_CHANNEL type.

The resolver will be used during name resolution, and the result will
later be used to identify the corresponding endpoint binder in
SubchannelConnector.

Besides the unit test, this change is tested with other changes locally
end to end on real device.
2021-10-21 14:17:19 +08:00
Richard Belleville 25d8458721
Migrate remaining tests with protobuf dep to Python 3 only (#27776)
* Migrate remaining tests with protobuf dep to Python 3 only

* Move Bazel Python repo tests off of Python 2

* Format
2021-10-20 09:13:52 -07:00
Mark D. Roth 5406048ef6
Second attempt: RLS LB policy (#27748)
* allow connectivity state watching to work on lame channels

* Revert "Revert RLS LB policy (#27738)"

This reverts commit 4567af504e.

* fix build

* fix lame_client_test
2021-10-20 07:41:07 -07:00
Lidi Zheng 09a55f26f9
[Aio] Add add_done_callback/done/cancelled methods to ServicerContext (#27767)
* WIP

* [Aio] Add add_done_callback method to aio server

* Allow >20 public methods on the ServicerContext class
2021-10-19 12:25:18 -07:00
Lidi Zheng 2bc96189b9
[Aio] Correct the typing of input Metadata (#27768) 2021-10-19 11:30:50 -07:00
Bolutife Ogunsola c1d4e96433
Address leak when using request stream interceptors (#25449) (#27571)
* Don't leave pending tasks on the asyncio queue

The results of these pending tasks are not needed, leaving them
on the queue grows the size of the queue until the call completes.

This fix slows the growth of the memory in the test example.

* Address 'leaking' Futures from cygrpc

Cancelling unneeded Tasks is not sufficient as this leaves behind
cancelled Futures in the cygrpc layer, which still occupy memory.

Instead, avoid creating unneeded tasks in the first place.

* Address review comments

1. Ignore unused return values
2. Fix formatting
2021-10-18 17:55:43 -07:00
clayg fbf9801b83
Catch InteralError in _write (#27240) 2021-10-15 14:06:07 -07:00
Mark D. Roth 4567af504e
Revert RLS LB policy (#27738)
* Revert "fix for import of RLS LB policy (#27736)"

This reverts commit cfcdbc4905.

* Revert "RLS LB policy (#27352)"

This reverts commit 84ddc3289f.
2021-10-15 12:19:57 -07:00
Mark D. Roth 84ddc3289f
RLS LB policy (#27352)
* RLS LB policy plugin implementation

* Add RLS tests

* rls proto

* generate projects

* Fix adding child policy to child policy map

* Fix issues

* Fix rotten bits

* generate projects

* revert some strange changes

* First batch of fixes

* second batch of addressing comments

* generate_projects

* 3rd batch of fixes

* generate_projects

* 4th batch of fix

* 5th batch of fix

* Empty commit to trigger github PR refresh

* Add insecure build

* generate project

* update picker in a closure

* mutex guard audit

* clang-format

* Aggregate child policy states

* Use OrphanablePtr on ChildPolicyOwner()

* More fixes on comments

* Remove include grpc_security from rls.cc

* Fix key builder test as we removed RlsFindPathFromMetadata

* Update rls proto and add multi-target capability

* code changes to fix build after merging master

* remove support for insecure builds

* WIP

* add LB policy metadata lookup API

* add API for creating errors from C++ strings

* add missing include

* finished updating JSON parsing

* use DualRefCounted<> for ChildPolicyWrapper

* use grpc_core::Mutex instead of std::recursive_mutex

* add lock annotations and fix some lifetime issues

* misc fixes and cleanups

* simplify child policy connectivity state machine

* add comment about hopping into ExecCtx

* don't use wait_for_ready for RLS call

* extraKeys and constantKeys support

* add lock annotations for child policy wrapper connectivity state

* improve logging

* simplify child policy state handling in picker

* use C++ style comments

* remove rls_config.proto, since it's not needed

* rewrote tests

* fix build

* fix copyright headers

* clang-format

* appease clang-tidy

* remove unnecessary dependendency on grpclb

* buildifier

* remove illegal term

* remove unneeded includes

* clang-format

* fix clang-tidy

* fix build

* move class declaration into .cc file

* clang-tidy again

* fix build

* reorganize code and misc cleanups

* clang-format

* fixed a bunch of asan bugs; still some left to debug

* fix asan problem

* make test work on IPv6-only machines

* move LRU list handling into Cache::Entry and add lock annotations

* use preincrement instead of postincrement

* fix deadlock

* add more FIXMEs

* clean up backoff timer logic

* fix build from merge

* clang-format

* fix include path to work on podspec builds

* clean up picker logic

* clang-format

* update rls.proto

* populate reason and stale_header_data in RLS request

* improve logging and fix some cache size type issues

* clang-format

* add some TODOs about a better way to expose channel creds to LB policies

* centralize handling of channel's default authority

* clang-format

* fix backup poller bug

* fix handling of call creds and authority on RLS channel

* remove unused params

* clang-format

* use two-phase update for child policies to avoid deadlocks

* fix portability issue

* minor cleanups

* update for change in grpc_error_get_status() API

* change test to store RLS requests and responses in proto form

* clang-format

* account for test slowdown factor in timeouts

* fix tsan failure and channelz linkage

* fix RLS authority death test

* fix test to not try to connect to target that should not work

* remove illegal term

* cacheSizeBytes is a required field

* add missing BUILD deps from merge

* add tests for connectivity state reporting and fix bugs found

* fix BUILD sanity

* buildifier

* fix BUILD package path

* fix bugs related to child policy lifetime and updates

* remove unnecessary srand() call from grpc_init()

* add test for two cache entries with the same target

* update rls.proto

* change RLS config parser test to support GRPC_ERROR_IS_ABSEIL_STATUS

* update upb codegen

* fix include path

* add env var guard

* avoid duplication of CountedService

* generate_projects

* add upper limit for cacheSizeBytes

* fix build

Co-authored-by: Muxi Yan <mxyan@google.com>
2021-10-14 12:53:46 -07:00
Craig Tiller 98cf516874
Remove old backwards compatibility cronet compression workaround code (#27701) 2021-10-14 10:36:37 -07:00
Mark D. Roth 464c1c519f
switch to new location of TypedStruct and ORCA protos (#27700)
* upgrade xDS protos

* switch to new location of TypedStruct and ORCA protos

* fix sanity
2021-10-14 10:28:24 -07:00
Mark D. Roth e20dfeccc2
upgrade xDS protos (#27698) 2021-10-13 13:27:47 -07:00
Craig Tiller 1df153f46e
Revert "Revert "Move metadata setting into HPackParser (#27545)" (#27686)" (#27688)
This reverts commit 0e6ced8800.
2021-10-13 08:44:57 -07:00
Yash Tibrewal a61bb8ed5b
Move service config code out of client_client to its own target (#27683)
* Move service config code out of client_client to its own target

* Fix BUILD

* Fix test build

* Reviewer comments

* Reviewer comments

* Automated change: Fix sanity tests

* Reviewer comments

Co-authored-by: yashykt <yashykt@users.noreply.github.com>
2021-10-12 18:30:04 -07:00
Craig Tiller 0e6ced8800
Revert "Move metadata setting into HPackParser (#27545)" (#27686)
This reverts commit f57a1f7d8c.
2021-10-12 08:37:00 -07:00
Craig Tiller f57a1f7d8c
Move metadata setting into HPackParser (#27545)
* forward work to get append, limit check into parser

* further cleanup

* Remove chttp2_incoming_metadata_buffer

* Automated change: Fix sanity tests

* test fixes

* fix cronet

* wip

* first pass mementofication of parsing - libgrpc compiles

* further progress

* fixes

* fixes

* fix leak

* Automated change: Fix sanity tests

* fix leak

* fixes

* x

* improve fuzzer

* init ordering fix

* Update hpack_parser_table.h

* Update hpack_parser.cc

* Update hpack_parser_test.cc

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* i mustache myself why

* fix use after free

* Automated change: Fix sanity tests

* fixes

* eliminate second pass metadata - this is an illegal frame and fails the new parser

* handle mementos with size > sizeof(intptr_t)

* fix

* add parsed metadata header, test

* Automated change: Fix sanity tests

* fix includes

* phase1

* phase2

* Update parsed_metadata.h

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-10-11 20:02:29 -07:00
Craig Tiller a21ad2c296
Remove UDP code - it's unused (#27595)
* Remove UDP code - its unused

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-10-11 13:34:47 -07:00
Craig Tiller 8d8d07139c
Fix client idle filter (#27611)
* trial-change

* compiles!

* added test

* Automated change: Fix sanity tests

* update test

* Fix slow idle detection

* review feedback

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-10-08 12:30:11 -07:00
Lidi Zheng 60028a82a9
[Aio] Resolve deprecated warnings from asyncio (#27635)
* [Aio] Resolve deprecated warnings from asyncio

* Use 3.6 compatible way of creating an asyncio.Task
2021-10-07 14:05:09 -07:00
Richard Belleville 7aa43b7a55
Create Bazel gevent test harness (#27507)
* WIP

* Add gevent test suite run under Bazel.

* Fix things up

* Yapf

* Fix up Bazel files

* Make py_grpc_test fancier

* Attempt to fix Windows RBE

* Attempt to kick GitHub

* Fix Python 2 runs

* Yet more fixes

* And the patch file too

* I am an idiot

* Mark gevent tests flaky

* Try to make rules_python more tolerant

* Typo

* Exclude reconnect test from gevent

* Remove unnecessary parts of patch

* Buildifier

* You saw nothing

* isort

* Move py_grpc_test to an internal-only file

* Review comments

* More reviewer comments

* Review
2021-10-07 14:04:34 -07:00
Craig Tiller 79ef60f079
Integrate new resource quota, event engine (#27522)
* Integrate new resource quota, event engine

* Automated change: Fix sanity tests

* windows fix

* Automated change: Fix sanity tests

* Update memory_allocator.h

* Automated change: Fix sanity tests

* first round review feedback

* review feedback

* Automated change: Fix sanity tests

* Update memory_quota.h

* get re-export formatted right

* Automated change: Fix sanity tests

* Update memory_allocator.cc

* Automated change: Fix sanity tests

* MemoryOwner has-a MemoryAllocator

* using fix

* review feedback

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-10-06 13:29:57 -07:00
Mark D. Roth 3d83dd3776
Revert "Revert "centralize handling of channel's default authority (#27544)" (#27616)" (#27624)
This reverts commit 0611f7c9b3.
2021-10-06 12:15:55 -07:00
Esun Kim c56b0a3818
Update boringssl to the latest (#27606)
* Change boringssl branch name

* update submodule boringssl-with-bazel with origin/main-with-bazel

* update boringssl dependency to main-with-bazel commit SHA

* regenerate files

* Increment podspec version

* generate boringssl prefix headers
2021-10-06 10:02:23 -07:00
Mark D. Roth 0611f7c9b3
Revert "centralize handling of channel's default authority (#27544)" (#27616)
This reverts commit f0a0628795.
2021-10-06 07:26:24 -07:00
Mark D. Roth f0a0628795
centralize handling of channel's default authority (#27544)
* centralize handling of channel's default authority

* clang-format

* fix backup poller bug
2021-10-05 11:57:47 -07:00
Lidi Zheng 9978223a26
Add python_requires field to grpcio-* packages (#27495)
- Update the run_tests.py and distrib tests
- Update the Dockerfiles
2021-09-28 16:01:15 -07:00
Craig Tiller 9b41852a5e
channel_init --> core configuration system (#27347)
* channel_init --> core configuration system

* Automated change: Fix sanity tests

* fixes

* Automated change: Fix sanity tests

* fixes

* fixes

* eliminate grpc_base_c

* fixes

* fix merge

* fix

* update visibility

* fixes

* feedback

* fix comment

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-27 15:51:39 -07:00
Craig Tiller c5172a134e
Fix build splitup for slices. (#27452)
* slice fix

* fix properlike

* Automated change: Fix sanity tests

* actually delete the code that should have been

* fixes

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-23 16:36:43 -07:00
Craig Tiller d4407b7e59
Revert "Remove dead code (#27445)" (#27461)
This reverts commit 693f36f91c.
2021-09-23 12:56:40 -07:00
Craig Tiller 693f36f91c
Remove dead code (#27445)
* Remove dead code

* Automated change: Fix sanity tests

* build

* remove benchmark

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-22 19:31:00 -07:00
Craig Tiller ffa4365031
Separate common slice utilities, grpc_error into their own libraries (#27441)
* make error independent

* Separate grpc_error into its own library

This is forward work to move Closure, ExecCtx into their own libraries
in order to make use of them in the activity code for resource quota
wakeups.

* Automated change: Fix sanity tests

* fixes

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-22 18:44:32 -07:00
Craig Tiller 66ae0d5c08
Separate slices from mdelems for static data (#27372)
* separate slice into internal and refcount, with refcount being the minimal base

* python3-ize

* Separate slices from mdelems for static data

Allows us to separate a small build target with just some slice basics
from the rest, which will help simplify the build system longer term.

Additionally exposed an opportunity to eliminate an init function.

Should also help in a month or so when it's time to jettison interned
metadata and slices entirely.

* fix compilation

* Automated change: Fix sanity tests

* fixes

* fixfixfix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-21 17:27:54 -07:00
Lidi Zheng 46257815d4
Disable grpc_status_test for sync stack in Python2 (#27374)
* Disable grpc_status_test for sync stack in Python2

* Correct the if condition

* Also disable this test in Bazel

* Clean the unnecessary import in BUILD
2021-09-17 10:30:09 -07:00
donnadionne b9a997be11
Bump version to v1.41.0 (#27370)
* Bump version to v1.41.x

* Regenerate projects
2021-09-16 16:32:34 -07:00
Esun Kim 91e0660638
Replace grpc_error* with grpc_error_handle (#27311)
* Replace grpc_error* with grpc_error_handle

* fix python build
2021-09-14 16:33:42 -07:00
francisco souza f97bf05169
python: fix type annotation for the _metadata field (#27251)
It's a tuple with many MetadatumType's.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
2021-09-13 16:25:53 -07:00
Richard Belleville 33dd1bd8d0
Report Python xDS Interop Client SIGINTs (#27289) 2021-09-08 14:46:48 -07:00
Craig Tiller 999e36fb31
Rebuild HPACK encoder table as C++ (#27192)
* Rebuild HPACK encoder table as C++

* move comment

* incguards

* build

* Automated change: Fix sanity tests

* c++ initialization ftw

* Automated change: Fix sanity tests

* Add missing header

* Add missing header

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-02 14:55:33 -07:00
Lidi Zheng 4729f6fdcc
Add Python 3.10 drop 3.5 (#26074)
* Add Python 3.10.0rc1 binary wheels

* Drop Python 3.5 artifacts

* Document the drop of 3.5

* Fix the wrong pip pointer

* Update manylinux2014 to a newer version, remove 3.5 distribtest

* Update manylinux aarch64 to see if the absl error go away

* Use the preferred alias

* Allow different wheel library to produce different tag order

* Remove unused shell var and log produced wheels

* Use copy instead of move

* Make bash happy about the wildcard

* Upgrade the debian image to use 3.5+ Python

* Polish the comments for the Dockerfiles
2021-09-02 14:02:53 -07:00
Richard Belleville 8fca16ac45
Add compute_engine_channel_credentials to __all__ (#27235)
* Add compute_engine_channel_credentials to __all__

* And amend api_test
2021-09-02 13:25:15 -07:00
donnadionne 022cff7d7c
update submodule boringssl-with-bazel with origin/master-with-bazel (#27208)
* update submodule boringssl-with-bazel with origin/master-with-bazel

* update boringssl dependency to master-with-bazel commit SHA

* regenerate files

* Updated sha256

* generate boringssl prefix headers

* Increment podspec version
2021-09-01 11:25:01 -07:00
AJ Heller 2d16865693
Delete libuv-iomgr implementation and GRPC_UV build option (#27188)
This has been unmaintained for years, last supported in gRPC-core v1.24.
2021-08-31 13:26:43 -07:00
Ashitha Santhosh 1ff1f8fd83
SDK authorization filter. (#26468)
* SDK authorization filter.
2021-08-25 21:00:35 -07:00
Lidi Zheng d3d5dec5b8
[Aio] Remove custom IO manager support (#27090)
* [Aio] Remove custom IO manager support

* Patch
2021-08-24 12:15:35 -07:00
Nicolas 'Pixel' Noble 69661fb82e Regenerate projects 2021-08-21 02:04:00 -07:00
Craig Tiller 4c8a0d91c6
Call into plugin registry from config code (#27041)
* Call into plugin registry from config code

* Automated change: Fix sanity tests

* Remove unused name

* Remove unused name

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-18 08:39:08 -07:00
Taner Topal da37344a8a
Fix docstring gramma in Python module (#26959) 2021-08-17 12:39:34 -07:00
Tamir Duberstein 00c03c55ff
Implement type safety for TLS (#26942)
* Implement type safety for TLS

This is mostly free when compiler support is available, but requires
careful templating when implemented using pthread.

Significantly slimmed the tls.h interface; it now only defines the "TLS
keyword" for each supported compiler, delegating enforcement of correct
usage (i.e. must be static) to the compiler itself.

Implemented implicit conversion for the pthread wrapper so it can be
used (mostly) the same as native support. Notable exception to this is
that static_cast<void*> is needed when printing a pointer stored in TLS
as %p.

* Use GPR_THREAD_LOCAL macros consistently
2021-08-11 13:24:26 -07:00
Lidi Zheng 826da6136c
Update Envoy API to the latest version (2021-07-30) (#26848)
* Bump Envoy and related submodules to latest

* Update googleapis

* Update scripts for newer submodules

* Update udpa

* Add opentelemetry

* Python changes for opentelemetry

* Update udpa in check_submodules

* Add opentelemetry to check submodules

* Regenerate upb files

* Add new proto dependency to upb-gen and Bazel

* Regenerate project
2021-08-03 09:12:42 -07:00
Nicolas Noble a325d7f77a
Pointing the protobuf submodule to the new URL (#26811)
* Pointing the protobuf submodule to the new URL

* Also changing WORKSPACE dependencies

* More references to the old URL...
2021-07-29 10:19:16 -07:00
Lidi Zheng 6134f4ed5c
Allow Python interop client to be configured for EmptyCall (#26804) 2021-07-27 16:41:36 -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
Lidi Zheng 5820e152cd
Remove Python 2.7 binary wheel generations (#26691)
* Remove Python 2.7 binary wheels

* Make sure pip won't pick-up newer versions

* Attempt to fix the distribtest

* Fallback to virtualenv==16.7.9 for 34 and 35

* Remove 34 from binary wheel distribtests
2021-07-23 08:20:39 -07:00
dpcollins-google dbec97eb0a
[Aio][fix] catch application exception in request iterators (#26706)
* fix: If client request iterators raise exceptions, _consume_request_iterator should not dump its stack to stderr

fixes: #25339

* fix: use format_exc

* fix: linter

* fix: lint round 2
2021-07-22 10:22:55 -07:00
AJ Heller a10a5bf655
Changes from feedback on gRFC L82: gRPC Core EventEngine API (#26733) 2021-07-21 13:27:04 -07:00
Lidi Zheng ab00c88a41
[Aio] Skip TestWaitForReady on Windows (#26729)
* Mark TestWaitForReady as flaky

* Skip wait for ready test on Windows

* Bazel is not currently used for testing on Windows
2021-07-19 23:41:28 -07:00
yihuaz b9a69481c2
Revert "Support user provided "scope" in JWT and GDC (#26577)" (#26645)
This reverts commit 6df967966b.
2021-07-09 15:05:34 -07:00
apolcyn 0e6c888574
Bump version to 1.40.0-dev (#26600)
* Bump version to 1.40.0

* Regenerate projects

* Tweak version.cc.template to satisfy formatter

* Regenerate projects
2021-07-02 14:33:34 -07:00
yihuaz 6df967966b
Support user provided "scope" in JWT and GDC (#26577)
* support scope overriding in jwt and gdc

* fix formatting

* fix bazel build issue

* fix clang tidy
2021-07-01 10:26:33 -07:00
Vijay Pai ea4b68e7a1
Drop experimental tags from core callback API (#26535) 2021-06-24 17:20:43 -07:00
yihuaz 932dbed49d
Revert "Allow to specify user provided audience in google default credentials and JWT credentials (#26456)" (#26531)
This reverts commit 5a91a513fd.
2021-06-22 16:30:30 -07:00
Dante Camarena a3a7e55367
Python AIO: Match continuation typing on Interceptors (#26500) 2021-06-22 09:53:14 -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
Jan Tattermusch 451127740d
Revert "Replace in-house rand with absl::Random for backoff (#26463)" (#26476)
This reverts commit b5191d0930.
2021-06-14 21:56:35 -07:00
Esun Kim b5191d0930
Replace in-house rand with absl::Random for backoff (#26463)
* Replace in-house rand with absl::Random for backoff

* Run sanity

* Added bscrypt dependency
2021-06-11 16:29:45 -07:00
ZhenLian 5a91a513fd
Allow to specify user provided audience in google default credentials and JWT credentials (#26456)
* support user provided audience in gdc and jwt
2021-06-11 09:44:46 -07:00
Lidi Zheng a3ae8e00a2
Revert "Allow to specify user provided audience in google default credentials and JWT credentials (#26392)" (#26440)
This reverts commit 304262e135.
2021-06-07 15:24:54 -07:00
Ashitha Santhosh b9a643a817
Static policy provider implementation. (#26134) 2021-06-03 23:18:08 -07:00
yihuaz 304262e135
Allow to specify user provided audience in google default credentials and JWT credentials (#26392)
* support user provided audience in gdc and jwt

* fix 1st round of comments

* fix ruby and php to use new GDC API

* fix python clang issue

* address 2nd round of comments

* fix string_view issue

* remove length param in string_view constructor
2021-06-03 16:02:19 -07:00
Lidi Zheng 66b86cec32
Disable two aio tests for aarch64 for strange platform behavior (#26409)
* Disable two aio tests for aarch64 for strange platform behavior

* Make sanity test happy
2021-06-02 14:54:07 +02:00
Richard Belleville 1ca87cd2d3
Address Synchronization Comment from #26405 (#26410)
* Fix metadata plugin for concurrent invocations

* Disable broad-except lint error

* Use WaitGroup instead of threading.Event

* Fix typo

* Use only a single channel

* Yapf
2021-06-01 17:21:53 -07:00
Richard Belleville 67f0330c10
Fix metadata plugin for concurrent invocations (#26405)
* Fix metadata plugin for concurrent invocations

* Disable broad-except lint error
2021-06-01 15:25:56 -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
Isabel Andrade aaa7f13b17
Handle gevent exception in gevent poller (#26058)
* Handle gevent exception in gevent poller

Currently the gevent poller ignores exceptions raised by
`gevent.wait()`, which causes greenlets to be unkilable while waiting.

This change handles exceptions raised while waiting in the gevent
poller, cancels the gRPC call and propagates the error back to the
application.

Co-authored-by: Kostis Lolos <klolos@arrikto.com>

* Fix imports in header files

* Lint gevent tests

* Set grpc event type to GRPC_QUEUE_SHUTDOWN upon cancel error

To prevent `grpc_completion_queue_next()` to be called indefinitely when
the queue is shut down.

* Remove unnecessary `except *`

* Improve gevent tests

* Format code

* Remove unnecessary import

Co-authored-by: Kostis Lolos <klolos@arrikto.com>
2021-05-24 15:03:29 -07:00
Richard Belleville c0f346423c
Fixes #26322 (#26340)
* Fixes #26322

* Support runtimes without contextvars

* Hoist member declaration higher
2021-05-21 17:12:36 -07:00
Richard Belleville cc22375572
Fix Python xDS k8s Interop (#26158)
* Increase core logging verbosity

* Make repo URL injectable

* Apparently that's not allowed

* Use ipv4 in interop server

* Add CSDS to Python interop client

* Revert CI script change

* Scale back logging

* Move env variable to dockerfile

* And Python too
2021-05-20 17:58:29 -07:00
Yash Tibrewal a989179ace
Bump master to v1.39.0 (#26207)
* Bump version to v1.39.0

* Regenerate projects

* Buildifier format
2021-05-11 06:49:10 -07:00
Lidi Zheng 25f5399b41
Add grpcio-admin Python package (#26166)
* Add grpcio-admin Python package

* Polish package content

* Make Linux artifact build happy

* Improve documentation
2021-05-05 13:20:50 -07:00
Lidi Zheng dc63d6a53e
Add CSDS API to Python (#26114)
* Add grpcio-csds pacakge

* Remove unused file

* Fix the proto import path issue

* Update the CSDS package and xds-protos for PY2

* Make tests happy

* Fix Bazel proto dependency

* Add Python2 tests for CSDS
2021-05-03 11:54:34 -07:00
Lidi Zheng ff79a925ed
Revert "Revert "Expose code and details from context on the server side (#25457)" (#26112)" (#26143)
This reverts commit ff9ece1588.
2021-05-03 10:36:36 -07:00
Mark D. Roth 4c40ee3f78
move parse_address and sockaddr_utils out of iomgr directory (#26077)
* move parse_address and sockaddr_utils out of iomgr directory

* clang-format

* fix python

* fix for import

* fix build file for import
2021-04-30 08:21:58 -07:00
Yash Tibrewal fe56d1a39a
Update boringssl submodule (#26101)
* update submodule boringssl-with-bazel with origin/master-with-bazel

* Update boringssl dependency to master-with-bazel commit SHA

* Generate projects

* Updated boringssl sha256

* Generate boringssl prefix headers

* Increment podspec version
2021-04-29 11:10:00 -07:00
Alisha Nanda ff9ece1588
Revert "Expose code and details from context on the server side (#25457)" (#26112)
This reverts commit 506db80475.
2021-04-28 15:11:25 -07:00
Chris St. Pierre 506db80475
Expose code and details from context on the server side (#25457)
* Expose code and details from context on the server side

This makes them accessible to server-side interceptors.

* Complete synchronous implementation

* Add experimental API notes

* Complete async implementation

* Revert bogus copyright change

* Fix metadata tests for py2.7

* Add new test to tests.json

* Check error codes in tests

* Bump autogenerated Python version
2021-04-28 10:15:11 -07:00
Yash Tibrewal 4768210ec8
s/OnServingStatusChange/OnServingStatusUpdate (#26010)
* s/OnServingStatusChange/OnServingStatusUpdate

* Update python files
2021-04-26 15:36:35 -07:00
Richard Belleville 3732ee0317
ADD Python xDS security interop test CI scripts (#26073) 2021-04-23 18:09:07 -04:00
Richard Belleville 53c72c5936
Python PSM Security Interop Client+Server (#25991)
* Add channelz to security client

* Make client changes. Some config needs to be reverted

* Add missing security field to channelz Socket

* Add test

* Fix test

* Remove whitespaces for windows

* Remove local_certificate check from PSM security tests

* Byte pack Python channelz IPs

* Move address packing to Core

* WIP

* Unbork security tests

* Python interop server

* Turn up server logging

* Clean up PR

* Clean up some more

* Yapf

* Fix up docker images

* Swap fillllllles!

* Add more robust boolean arg parsing

* Use bool_arg parsing in server as well

* Add copyright

Co-authored-by: Yash Tibrewal <yashkt@google.com>
2021-04-23 08:42:34 -07:00
Esun Kim ca945a58e9
Introduced grpc_error_handle (#25902)
- Define grpc_error_handle
- Replace grpc_error* with grpc_error_handle
2021-04-22 12:00:28 -07:00
Esun Kim 2d8936b097
Added status_helper (#25901)
Added status_util
2021-04-22 11:54:19 -07:00
Mark D. Roth feff79abc7
add test-only channel arg to set per-channel xDS bootstrap config (#25936)
* pass XdsClient to LB policies via channel args

* add channel arg for overriding bootstrap config on a per-channel basis

* change tests to use new channel arg approach -- currently failing for server-side tests

* use the same channel args approach on the server side

* clang-format

* fix CircuitBreakingMultipleChannelsShareCallCounter test

* fix XdsEnabledServerTest test

* add TODO

* clang-format

* generate_projects

* fix clang-tidy

* fix build

* attempt to fix python
2021-04-21 10:16:33 -07:00
Lidi Zheng 082da35e38
Add a list of banned macOS gevent tests (#26027) 2021-04-20 13:09:47 -07:00
Richard Belleville da2cf25592
Fix potential deadlock on the GIL (#26009) 2021-04-20 10:02:53 -07:00
AJ Heller 4c59b17d40
Remove eventmanager_libuv code (#25811)
Reintroduces this code removal after a failed import. This needed special handling via cherry pick.
2021-04-08 13:32:53 -07:00
Lidi Zheng 05ae3c5a87
Remove -std=gnu99 CFlag when compiling C++ with clang (#25778)
* Remove -std=gnu99 CFlag when compiling C++ with clang

* Use endswith instead of hard-coded slices

* Fix a typo
2021-04-06 06:50:40 -07:00
Lidi Zheng 09f17db9ca
[Aio] Gracefully handle RPCs ends pre-maturely (#25884)
* Gracefully handle RPCs ends pre-maturely

* Fix a typo
2021-04-05 16:59:23 -07:00
AJ Heller 4d4ee609c1
gRPC EventEngine Interface (#25795) 2021-04-05 09:26:16 -07:00
Mark D. Roth 3f19333ced
Move retry code into its own filter in the DynamicFilter stack (#25820)
* rename ChannelData to ClientChannel

* make ClientChannel class definition public

* move retry code to its own filter

* move LB call factory method to ClientChannel class

* move dynamic termination filter out of ClientChannel class

* update comments

* remove retry parsing from client channel service config parser

* fix clang-tidy

* fix service_config_test

* clang-format
2021-03-31 15:39:14 -07:00
Richard Belleville 9964ae875b
Bump master version to 1.38 (#25838)
* Bump version to 1.38

* Regenerate projects
2021-03-30 13:57:13 -07:00
Esun Kim 37eecd3ce3
Updated Abseil to LTS 20210324.0 (#25835)
* Updated abseil-cpp to 20210324.0
* UBSAN with -fsanitize-link-c++-runtime
2021-03-30 09:22:05 -07:00
Yash Tibrewal 5c49bf4209
Remove old grpc_string_to_sockaddr and rename grpc_string_to_sockaddr_new to grpc_string_to_sockaddr (#25831) 2021-03-29 16:04:10 -07:00
Lidi Zheng cccafaf10f
Remove async mark for set_trailing_metadata interface (#25814) 2021-03-25 11:09:24 -07:00
AJ Heller 1694984846
Revert "Remove unused eventmanager_libuv code (#25796)" (#25807)
This caused problems internally. The interface deletion needs a cherrypick, but I will do an overnight test first, before I reintroduce. CC @nicolasnoble
2021-03-24 17:17:42 -07:00
AJ Heller 077f627aef
Remove unused eventmanager_libuv code (#25796) 2021-03-24 11:21:05 -07:00
Richard Belleville 5030f28ff5
Decrease Python xDS interop client verbosity. (#25661) 2021-03-22 16:21:15 -07:00
Lidi Zheng 1040fbdb9f
Re-introduce "CSDS Implementation" (#25762)
* Revert "Revert "CSDS Implementation (#25038)" (#25745)"

This reverts commit 98fd4e1e36.

* Add xDS special Bazel build rules

* Add 2 todos to remove the added rules
2021-03-22 13:14:19 -07:00
Lidi Zheng 98fd4e1e36
Revert "CSDS Implementation (#25038)" (#25745)
This reverts commit 27de24a38e.
2021-03-17 13:38:47 -07:00
donnadionne 26fd0ce3c9
Generating hash for ring_hash policy (#25415) 2021-03-16 18:24:35 -07:00
Lidi Zheng 27de24a38e
CSDS Implementation (#25038)
* Implement the xDS Config Dump as CSDS in Core

* Revemp the logic of caching and constructing the CSDS response
* Unref created error
* Fix the clang tidy complains
* Resolve comments about symbol preload and Json ctor
* Improve readability
* Merge with new ADS logic && support latest CSDS
  * Refactor the version/client_status logic
  * Add support for error_state
  * Add support for does_not_exist
  * Add node information
* Fix the ProtoBuf segfault
* More test cases
* Refactor to use bytes as cache instead of JSON

* Apply clang_tidy's suggestion

* Resolve reviewer's requests

* Tiny stylish fixes && make sanity test happy

* WIP: still working on the matchers

* Update a bunch of matchers

* Improve readability a bit

* Resolve reviewer's suggestions

* Resolve reviewer's comments

* Make Unpack fail fast
2021-03-16 18:17:37 -07:00
Lidi Zheng 633b695af4
Mark Python interceptors as stable (#25739) 2021-03-16 16:47:43 -07:00
Yash Tibrewal 7021b72d1f
Revert Revert Xds Status Notifier (#25718)
* Revert "Revert "xDS status notifier (#25321)" (#25702)"

This reverts commit 3c9f3972e3.

* Remove connection from map when OnClose is not registered

* Reviewer comments
2021-03-15 14:29:06 -07:00
Lidi Zheng 83b19b2efe
[Aio] Add time_remaining method to ServicerContext (#25719)
* [Aio] Add time_remaining method to ServicerContext

* Fix comments

* Resolve reviewer's requests
2021-03-15 14:07:47 -07:00
Yash Tibrewal 3c9f3972e3
Revert "xDS status notifier (#25321)" (#25702)
This reverts commit 81e90432e1.
2021-03-12 08:54:34 -08:00
Lidi Zheng 3b067c9f3f
Implement xDS client-side fault injection filter (#24354)
* Refactored with dynamic filters
* Error-tolerance tuned
* Fix leak of grpc_error and data race of canceller
* Adopt the latest xDS HTTP filter framework
* Fix fault injection tests' conflict with router filter
* Test alternative setup (override, no-override) without copy
* Refactor file strcutures of fault injection filter
* Rewrite the Json parsing/assembling logic again
* Added logic for aborting streaming RPC && resolve comments
2021-03-09 13:14:21 -08:00
Yash Tibrewal 81e90432e1
xDS status notifier (#25321)
* Serving status notification for xds enabled servers
2021-03-08 21:47:13 -08:00
Richard Belleville d9903aa44e
Format Channelz Address.TcpIpAddress.address as packed bytes (#25629)
* Move address packing to Core

* Format

* Use absl::Base64Escape

* Update src/core/lib/channel/channelz.cc

Co-authored-by: Yash Tibrewal <yashkt@google.com>

Co-authored-by: Yash Tibrewal <yashkt@google.com>
2021-03-08 17:11:58 -08:00
Ashitha Santhosh bd86187f19
SDK authorization policy translator. (#25361)
* SDK authorization policy translator.
2021-03-05 09:05:11 -08:00
Jan Tattermusch fcd43e9030
Crosscompile python aarch64 wheels with dockcross (#25418)
* build aarch64 python wheels via crosscompilation

* yapf format code

* fix shellcheck complaints

* fix python37 aarch64 wheel build

* build python wheels on linux aarch64 with static libstdc++

* yapf format code
2021-03-02 07:32:28 +01:00
Mark D. Roth 49601b0334
Second attempt: xDS HTTP filter support for gRPC client (#25558)
* Revert "Revert "xDS HTTP filter support for gRPC client" (#25555)"

This reverts commit 785a128a83.

* xds_end2end_test: avoid flakes from lingering shutdown from previous test
2021-02-26 07:39:27 -08:00
donnadionne 785a128a83
Revert "xDS HTTP filter support for gRPC client" (#25555)
This reverts commit b2164837a8.
2021-02-25 07:18:43 -08:00
Richard Belleville ac34f559bb
Fix Signal Safety Issue (#25394)
* Decrease flake rate

* Spruce up comments
2021-02-20 16:12:35 -08:00
Richard Belleville ee915d8a15
Merge pull request #25410 from gnossen/unrevert_xds_creds
Reintroduce xDS Creds
2021-02-12 10:25:27 -08:00
Mark D. Roth b2164837a8 xDS HTTP filter support for gRPC client 2021-02-11 13:17:15 -08:00
Richard Belleville e76d75f520 Revert "Revert "Merge pull request #25365 from gnossen/python_xds_creds""
This reverts commit 7bbefc8365.
2021-02-10 15:53:49 -08:00
Richard Belleville 47ea5518b1 Merge remote-tracking branch 'origin/master' into unrevert_xds_creds 2021-02-10 15:53:42 -08:00
Richard Belleville b120008ea3 Fix API 2021-02-10 15:31:03 -08:00
Yash Tibrewal 7c8defd5c9
Merge pull request #25377 from yashykt/removedisrespecfulterm2
Replace disrespectful term
2021-02-10 15:20:27 -08:00
Richard Belleville 9c40041050
Merge pull request #25407 from gnossen/revert_xds_creds
Revert "Merge pull request #25365 from gnossen/python_xds_creds"
2021-02-10 11:22:38 -08:00
Richard Belleville 8d484bd49e
Merge pull request #25383 from gnossen/fix_grpc_future_docs
Clarify Guarantees about grpc.Future Interface
2021-02-10 11:12:50 -08:00
Richard Belleville 7bbefc8365 Revert "Merge pull request #25365 from gnossen/python_xds_creds"
This reverts commit b80d374b93, reversing
changes made to df062598c0.
2021-02-10 11:06:02 -08:00
Lidi Zheng a72c72f6e3
Merge pull request #25388 from lidizheng/master
Bump version of HEAD to v1.37.0-dev
2021-02-09 15:11:35 -08:00
Richard Belleville 762a29cddf Integrate additional guarantee into existing statement 2021-02-09 12:52:29 -08:00
Yash Tibrewal 15779f7b91
Merge pull request #25380 from yashykt/removedisrespecfulterm3
Replace disrespectful words
2021-02-09 12:07:25 -08:00
Lidi Zheng 51659eb06e Regenerate projects 2021-02-09 11:45:06 -08:00
Richard Belleville b80d374b93
Merge pull request #25365 from gnossen/python_xds_creds
Implement Python Client and Server xDS Creds
2021-02-09 09:57:00 -08:00
Richard Belleville 5f759fcd1f
Merge pull request #25384 from gnossen/fix_interop_typo
Fix Interop Client Typo
2021-02-08 21:46:27 -08:00
Richard Belleville 0136c65a70 Fix typo 2021-02-09 00:58:16 +00:00
Richard Belleville 8b5663fb91 Unref fallback credentials 2021-02-08 16:46:05 -08:00
Richard Belleville 459ceb026d Clarify the Future interface 2021-02-08 15:49:05 -08:00
Yash Tibrewal f4e55b85bc Replace disrespectful term 2021-02-08 15:29:53 -08:00
Yash Tibrewal 7a5288d2a0 Replace disrespectful words 2021-02-08 14:29:18 -08:00
Richard Belleville 8d805b9b43 Figure out what year it is 2021-02-08 13:50:22 -08:00