Commit Graph

4496 Commits

Author SHA1 Message Date
Yash Tibrewal 29ce6463d1
Revert "[promises] Convert call to a party" (#32651)
Reverts grpc/grpc#32359
2023-03-17 12:36:19 -07:00
Xuan Wang 0011f7090f
Fix an issue that AIO interceptors can only be called once. (#32641)
Prior to this change, we invoke aycnio interceptors by converting them
to `iterator` first, which means we can only call them once before
they're exhausted.

This PR changes the implementation to use `list`, thus the interceptors
can be called multiple times.
2023-03-16 16:33:17 -07:00
Craig Tiller a9873e8357
[promises] Convert call to a party (#32359)
<!--

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

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

-->

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-03-16 01:09:53 -07:00
Yash Tibrewal 5029af9578
OpenCensus: Use new CallTracer interfaces (#32618)
This change mostly aims to get OpenCensus to use the new
ServerCallTracer interface. Note that the interfaces nor the code are in
their final states. There are a bunch of moving pieces, but I thought
this might be a nice mid-step to check-in and make sure that our
internal traces can also work with these changes.

Overall changes -
1) call_tracer.h shows what the hierarchy of new call tracer interfaces
looks like. Open to renaming suggestions.
2) Moved most of the common interface between `CallAttemptTracer` and
`ServerCallTracer` into a common `CallTracerInterface`. We should be
able to eventually move `RecordReceivedTrailingMetadata` and `RecordEnd`
as well to these common interfaces, but it requires some additional
work.
3) The compression filter is now responsible for recording the recv and
send messages for both the subchannel call and the server, and adds in
ability to record compressed and decompressed messages as well.
4) The OpenCensus server filter now uses the new `ServerCallTracer`
interface, and so doesn't need to be a filter anymore.
5) A new ServerCallTracerFilter was added. Ideally, we should be able to
move it to the current connected filter, but it is in a bit of an
interesting state right now, so I would prefer making those changes in a
separate PR with Craig's eyes on it.
6) A new context element `GRPC_CONTEXT_CALL_TRACER_ANNOTATION_INTERFACE`
was created that replaces the old `GRPC_CONTEXT_CALL_TRACER`, and the
new `GRPC_CONTEXT_CALL_TRACER` is mainly to pass the `CallAttemptTracer`
down the stack. This should go away in the new promise-based world.



<!--

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

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

-->

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/grpc/grpc/32618)
<!-- Reviewable:end -->
2023-03-15 22:39:41 -07:00
Yash Tibrewal 9551e3ef5a
Add ServerCallTracer interfaces (#32555)
<!--

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

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

-->
2023-03-10 10:08:49 -08:00
Kim Vandry 84c084527a
Fix str vs. bytes error in Python bindings for ALTS. (#31980)
It looks like nobody ever created ALTS redentials from Python with a
list of accepted service accounts before.

Simple reproduction:

```
import grpc
grpc.alts_channel_credentials(None)  # works
grpc.alts_channel_credentials(['foo'])  # fails
```

Without this change, generates this error:

```
[...]
  File "src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi", line 414, in _cython.cygrpc.channel_credentials_alts
  File "src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi", line 403, in _cython.cygrpc.ALTSChannelCredentials.__cinit__
TypeError: expected bytes, str found
```

(And the error cannot be worked around by the caller by passing a bytes
object from the Python side: you still get the same error.)
2023-03-08 13:05:19 -08:00
Xuan Wang 95d6325768
Fix DeprecationWarning when calling asyncio.get_event_loop() (#32533)
Fix: https://github.com/grpc/grpc/issues/32526#event-8652983465

### Context:
Calling `asyncio.get_event_loop()` [without an running loop will emitted
a
DeprecationWarning](https://docs.python.org/3.10/library/asyncio-eventloop.html#asyncio.get_event_loop),
in this case, we should call
`asyncio.get_event_loop_policy().get_event_loop()` to get the loop.
2023-03-03 16:36:02 -08:00
Jan Tattermusch 9c45499dfc
Update third_party/boringssl-with-bazel (#32492)
Upgrade boringssl to the latest "master-with-bazel"
- use the `'USE_HEADERMAP' => 'NO'` fix for ObjC
- update the key for asm optimizations on mac/apple in python's setup.py

This PR depends on monterey fixes here:
https://github.com/grpc/grpc/pull/32493 and the boringssl's build
simplification
https://boringssl-review.googlesource.com/c/boringssl/+/56465.

---------

Co-authored-by: Hannah Shi <hannahshisfb@gmail.com>
2023-03-02 10:18:00 +01:00
AJ Heller 8f7cd1eeed
[EventEngine] WindowsEventEngine Listener v2 (#32488)
Continued from https://github.com/grpc/grpc/pull/32295 after landing the
cleanup and logging pieces separately.
2023-02-28 20:33:03 -08:00
Mike Kruskal 193a3f88ae
Remove references to deprecated syntax field (#32497)
This will be replaced by editions in an upcoming release, but for now
these uses are blocking migration
2023-02-28 17:05:38 -08:00
AJ Heller 151399183f
[build] Require Windows-specific code to be cherrypicked (#32457)
Internal Windows builds will catch issues that we cannot yet catch in
OSS. This will be mostly remedied once we have clang-cl in our CI (See a
rough roadmap in https://github.com/grpc/grpc/pull/32448). For now, this
PR identifies folders where most Windows-specific code is developed, and
requires cherrypicks for PRs that touch anything inside those folders.

This PR also refactors gpr and gprpp source files to better isolate all
platform-specific code ~the Windows-only code~. ~I will reorganize the
other platform-specific files using this structure if there are no
objections.~

This subset of folders covers about half of the `#ifdef GPR_WINDOWS`
usages in gRPC, but nearly all of the actively-developed Windows code
locations.
2023-02-23 11:48:59 -08:00
Richard Belleville e41e41e209
Remove protobuf 4.22.0 from testing (#32442)
This version broke backward compatibility in `plugin_pb2.py`, which is
presumably a relatively minor regression, since we have not yet heard
any complaints about it. This PR:

- Excludes `4.22.0` from installation
- _Includes_ protobuf pre-releases into testing so this can be caught
more quickly in the future.

When bad prereleases are caught, we can exclude them from testing in a
similar manner to this PR. We may eventually want to invest into a
system where we can define these bad versions centrally.
2023-02-22 09:40:48 -08:00
Mark D. Roth 50e6af14ff
Bump dev version to 1.54.0-dev (#32426) 2023-02-21 12:03:19 -08:00
Yash Tibrewal 04e3a8e73d
GCP Observability : Framework for detecting the environment (#32294)
This code is not plumbed through yet, but it provides the core
infrastructure needed to detect the proper GCP environment resources
needed to set up the labels/attributes/resources for stats, tracing and
logging.

Details on how the various environment resources are setup has been
derived by looking at java's cloud logging library and OpenTelemetry's
future plans. (Could be better explained in an offline review since some
links are internal).

Requesting @veblush for a full review and @markdroth for a structural
review.

<!--

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

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

-->
2023-02-16 16:20:20 -08:00
Lucas Abel d5fcbce4b4
grpcio: fix `AioRpcError` self recursion (#32305)
See https://github.com/google/mobly/pull/870#issuecomment-1419629154 for
more details.
2023-02-10 13:00:12 -08:00
Yousuk Seung b98f527260
Revert "Revert "Revert "Revert "server: introduce ServerMetricRecorde… (#32301)
* Revert "Revert "Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)" (#32279)" (#32293)"

This reverts commit 1f960697c5.

* Do not create CallMetricRecorder if call is null.
2023-02-06 12:00:39 -08:00
Craig Tiller 1f960697c5
Revert "Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)" (#32279)" (#32293)
This reverts commit 4475e74c6a.
2023-02-03 13:18:23 -08:00
Yousuk Seung 4475e74c6a
Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)" (#32279)
* Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)"

This reverts commit deb1e25543.

* Fix by caching call metric recording stuff in async request

PR #32106 caused msan errors in some tests while de-referencing the
server object where async calls are active after the server is
destroyed. Instead cache the ServerMetricRecorder pointer.

* copyright headers fixed

* clang fixes.
2023-02-03 11:49:32 -08:00
Richard Belleville 190d095a62
Fix Python epoll1 Fork Support (#32196)
* WIP. A seemingly properly failing test

* WIP. Pre-fork handlers now work

* Roughly working.

* Clean up

* Clean up more

* Add to CI

* Format

* Ugh. Remove swap file

* And another

* clean up

* Add copyright

* Format

* Remove another debug line

* Add stub forkable methods

* Remove use of 3.9+ function

* Remove unintentional double copyright

* drfloob review comments

* Only hold lock during Close once

* Create separate job for fork test

* Bump up gdb timeout

* Format
2023-02-02 14:46:16 -08:00
Xuan Wang 7d8a978aa0
Include .pyi file (#32268)
* Include .pyi file

* Add channelz, remove status
2023-02-02 14:39:15 -08:00
Xuan Wang deb1e25543
Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)
This reverts commit c7f641da0d.
2023-02-02 09:58:29 -08:00
AJ Heller a9e2ef199e
[EventEngine] Skip legacy fork handling for ExecCtx when in an EventEngine thread (#32229)
* [EventEngine] Implement EventEngine::IsWorkerThread()

* lighter-weight thread pool check

* add lightweight thread_local flag for EventEngine/iomgr fork

* generate_projects; add files

* fix

* back out EE implementation changes

* better description

* fix
2023-02-01 17:10:14 -08:00
Craig Tiller 0893fca089
[promises] Roll forward server promise calls with fixes (#32261)
* stuff

* spam-cleanup

* Revert "Revert "[promises] Server call (#31448)" (#32260)"

This reverts commit dbfb888e1f.

* spam-cleanup

* Automated change: Fix sanity tests

* asserts-for-sanity

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-02-01 16:07:46 -08:00
Yousuk Seung c7f641da0d
server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)
* backend metric sampling

* Comments addressed.

* More comments addressed.

* Pushing changes left behind locally.

* Removed empty lines

* Update OrcaService to use ServerMetricRecorder (no named metrics yet)

* Comments addressed.

* More comments addressed

* More comments addressed.

* Comments fixed

* Comments addressed.

* Test fixed

* make seq returned always up-to-date

* skip atomic load when not cached

* Fixed ABSL_GUARDED_BY

* Comments addressed except client_lb_end2end_test

* test updated

* Comments addressed

* BUILD fix.

* BackendMetricDataState moved to a separate header

* comments addressed

* Fixed clang and buildifier errors

* More sanity check errors fixed.

* Fixed xds tests

* Ran generate_projects.sh

* Comments addressed

* comments addressed.

* generate project

* Build fixed

* generate project

* sanity check errors fixed

* test fixed

* Backup poller period override moved to main()

* Also move cfstream override

* Clang fixes, sanitize

* generate_projects.sh

* portable print format fix

* Removed outdated comment
2023-02-01 14:54:57 -08:00
Craig Tiller dbfb888e1f
Revert "[promises] Server call (#31448)" (#32260)
* Revert "[promises] Server call (#31448)"

This reverts commit bbeb15006a.

* clang-fmt
2023-02-01 09:18:04 -08:00
Craig Tiller bbeb15006a
[promises] Server call (#31448)
* add experiment

* allow instantiation

* scratchings

* scratchings

* sniffly

* Automated change: Fix sanity tests

* fix

* fix

* fix

* Automated change: Fix sanity tests

* progress

* change pipe labels to enable server code to be written

* better api

* Automated change: Fix sanity tests

* progress

* [promises] Implementation of deadline for server-based-calls

* compression filter compiles again

* Automated change: Fix sanity tests

* fix

* server tracing fixes

* get client initial metadata

* progress

* progress

* server call surface progress

* Automated change: Fix sanity tests

* move payload

* server-progress

* recv-message-server-connchan

* logging

* fix context-gate

* recv fix@top

* Automated change: Fix sanity tests

* recv close on server

* top termination start

* [promises] Move Empty to be first class

* fixes

* fix

* flow control fix

* got to orphan!

* orphan

* call orphan

* spam cleanup

* fix

* new cancelation semantics

* progress

* large metadata fixes

* fix

* fix

* log

* better logs

* fix-chanz

* logging, necessaryness

* fix typo

* fixes

* fix

* fix

* fix-pipe

* cleanup logging

* fix

* build-fix

* fix

* Automated change: Fix sanity tests

* logging

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* better primitive

* Revert "better primitive"

This reverts commit 119b5ee244.

* fix

* fix

* trrracing

* Automated change: Fix sanity tests

* get-trailing-metadata

* cancellation

* Automated change: Fix sanity tests

* add transform pipeline to pipe

* add transform pipeline to pipe

* interceptor lists

* new server initial md api into filters

* convert connected_channel

* convert call

* initial promise based filter conversion

* convert promise based filter

* build fixes

* compile fix

* fixes

* fix ordering

* fixes

* check-metadata

* revert later: debug code

* better debug

* fix metadata ordering with messages in promise based filter

* fix ordering problem between batch completion and promise completion

* properly handle failure on receive message path on client

* more debug, fix a repoll bug in pbf

* Automated change: Fix sanity tests

* fixes

* Automated change: Fix sanity tests

* cleanup logging

* fixes

* missing file

* fixes

* logging

* Automated change: Fix sanity tests

* fixes

* convert logging filter

* fix

* Automated change: Fix sanity tests

* fix bad server response test

* Revert "Disable logging test (#32049)"

This reverts commit 5fc92eaeae.

* fix

* Automated change: Fix sanity tests

* fix memory leaks, logging

* Automated change: Fix sanity tests

* slice refcount debugging

* asan-canaries

* leak-fix

* leak-fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* remove mistaken line

* add-comment

* fix refcounting bug

* Automated change: Fix sanity tests

* rename variable

* renames

* bleh

* carry pipe close status from bottom of pipe to top to appease
recv-close-on-server

* backport cancellation

* Revert "carry pipe close status from bottom of pipe to top to appease"

This reverts commit fa33301dcd.

* fix

* Automated change: Fix sanity tests

* review-feedback

* comment-ordering

* monostate

* renames

* undo-review-feedback

* fix

* review-feedback

* review-feedback

* fix

* review-feedback

* drop debugloc constructor

* interceptor-list-rev-feedback

* interceptor-list-rev-feedback

* pipe test

* review-feedback

* undo-mistaken-change

* Automated change: Fix sanity tests

* pipe error state

* detect send/recv failures and report

* iwyu, build

* fix submodules

* fix

* warning

* cleanup

* Automated change: Fix sanity tests

* fix

* fix for windows

* fix

* null pointer fix

* iwyu

* gen projex

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-01-30 21:39:11 -08:00
Esun Kim 905df9dee6
Update Abseil to 20230125 (#32139)
* Update abseil to 1.20230125.0

* Fix IWYU
2023-01-30 16:20:24 -08:00
Xuan Wang 843cf42d6a
Catch unprintable application exception (#32208)
* Catch unprintable application exception

* fix sanity

* Remove some files

* Fix typo
2023-01-26 15:01:51 -08:00
AJ Heller d14020d4e2
[EventEngine] Add invalid handle types to the public API (#32202)
* [EventEngine] Add invalid handle types to the public API

* Automated change: Fix sanity tests

* add definition for static constexpr members

* sanitize

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-01-25 17:31:34 -08:00
Xuan Wang 16d5e412dd
De-experimentalize wait-for-ready (#32143) 2023-01-25 10:41:01 -08:00
Vignesh Babu fa5a6c42a6
[EventEngine] Modify iomgr to allow creation of posix event engine listeners and server side endpoints (#31928)
* [WIP] EventEngine iomgr endpoint shims

* [WIP] EventEngine::Endpoint iomgr shims for the PosixEventEngine

* Util functions to help with posix engine listener implementation

* sanity

* update comments in posix_engine_listener_utils.h

* review comments

* iwyu

* revert prev commit

* iwyu

* update build

* update

* regenerate projects

* regenerate projects

* minor fixes

* update BUILD

* sanity

* update build

* regenerate projects

* fix unused parameter

* sanity

* update

* sanity

* regenerate_projects

* remove unused variable

* start

* update

* regenerate_projects

* sanity

* update

* fixes

* update

* regenerate_projects

* update

* fix sanity and msan failure

* more fixes

* build failure

* update

* fix

* sanity

* fixes

* update

* regenerate projects

* fix sanity

* review comments

* An EventEngine subclass to be implemented by all posix based event engines

* sanity

* comments

* update

* review comments

* re-word

* fix

* update

* review comments

* regenerate projects

* syntax fix

* add lock free event benchmark

* releasable mutex lock

* fix build isue

* update

* start

* regenerate projects

* update

* fix

* windows build

* update

* windows portability issue

* update

* update

* update

* update

* format

* update

* update

* start

* Update tcp server interface to move on_accept_cb to create method

* update

* start

* update

* update

* update

* update

* update

* update

* update

* update

* sanity

* update

* update

* update

* windows build

* fix msan

* fix sanity

* regenerate projects

* update

* iwyu

* Fix resolved address length related bugs in tcp_socket_utils and listener_utils

* iwyu

* cleanup

* cleanup src/core/lib/event_engine/tcp_socket_utils.cc

* iwyu

* fix

* regenerate projects

* fix sanity

* re-write endpoint shim

* more re-write

* cleanup

* update

* regenerate projects

* review comments

* build issue

* more build issue fixes plus adding event_engine_trace

* even more build issue fixes

* iwyu

* add static_cast

* fix sanity

* update

* update

* sanity

* fix

* Fix

* Review comments

* fix

* iwyu

* fix build issue

Co-authored-by: AJ Heller <hork@google.com>
2023-01-24 18:22:14 -08:00
Mark D. Roth 1c4b138322
Revert "Revert "WRR: xDS LB policy support (#32067)" (#32180)" (#32182)
This reverts commit d7193a28c4.
2023-01-23 14:14:32 -08:00
Alisha Nanda d7193a28c4
Revert "WRR: xDS LB policy support (#32067)" (#32180)
This reverts commit 8a024963f5.
2023-01-23 09:16:11 -08:00
Mark D. Roth 8a024963f5
WRR: xDS LB policy support (#32067)
* WRR: port StaticStrideScheduler to OSS

* WIP

* Automated change: Fix sanity tests

* fix build

* remove unused aliases

* fix another type mismatch

* remove unnecessary include

* move benchmarks to their own file, and don't run it on windows

* Automated change: Fix sanity tests

* add OOB reporting

* generate_projects

* clang-format

* add config parser test

* clang-tidy and minimize lock contention

* add config defaults

* add oob_reporting_period config field and add basic test

* Automated change: Fix sanity tests

* fix test

* change test to use basic RR

* WIP: started exposing peer address to LB policy API

* first WRR test passing!

* small cleanup

* port RR fix to WRR

* test helper refactoring

* more test helper refactoring

* WIP: trying to fix test to have the right weights

* more WIP -- need to make pickers DualRefCounted

* fix timer ref handling and get tests working

* clang-format

* iwyu and generate_projects

* fix build

* add test for OOB reporting

* keep only READY subchannels in the picker

* add file missed in a previous commit

* fix sanity

* iwyu

* add weight expiration period

* add tests for weight update period and OOB reporting period

* Automated change: Fix sanity tests

* lower bound for timer interval

* consistently apply grpc_test_slowdown_factor()

* cache time in test

* add blackout_period tests

* avoid some unnecessary copies

* clang-format

* add field to config test

* simplify orca watcher tracking

* attempt to fix build

* iwyu

* generate_projects

* update xds proto dependency

* add xDS LB policy entry to registry

* add "_experimental" suffix to policy name

* update LB policy name and remove debug log

* add env var protection

* generate_projects

* gen_upb_api

* WRR: update tests to cover qps plumbing

* WIP

* Automated change: Fix sanity tests

* more WIP

* basic WRR e2e test working

* add OOB test

* add xDS WRR e2e test

* clang-format

* fix sanity

* ignore duplicate addresses

* Automated change: Fix sanity tests

* add new tracer to doc/environment_variables.md

* retain scheduler state across pickers

* Automated change: Fix sanity tests

* use separate mutexes for scheduler and timer

* sort addresses to avoid index churn

* remove fetch_sub for wrap around in RR case

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-01-23 08:08:52 -08:00
Vignesh Babu 8cf04e9a54
[EventEngine] Modify iomgr to allow creation of event engine clients and client side endpoints (#31661)
* [WIP] EventEngine iomgr endpoint shims

* [WIP] EventEngine::Endpoint iomgr shims for the PosixEventEngine

* Util functions to help with posix engine listener implementation

* sanity

* update comments in posix_engine_listener_utils.h

* review comments

* iwyu

* revert prev commit

* iwyu

* update build

* update

* regenerate projects

* regenerate projects

* minor fixes

* update BUILD

* sanity

* update build

* regenerate projects

* fix unused parameter

* sanity

* update

* sanity

* regenerate_projects

* remove unused variable

* start

* update

* regenerate_projects

* sanity

* update

* fixes

* update

* regenerate_projects

* update

* fix sanity and msan failure

* more fixes

* build failure

* update

* fix

* sanity

* fixes

* update

* regenerate projects

* fix sanity

* review comments

* An EventEngine subclass to be implemented by all posix based event engines

* sanity

* comments

* update

* review comments

* re-word

* fix

* update

* review comments

* regenerate projects

* syntax fix

* add lock free event benchmark

* releasable mutex lock

* fix build isue

* update

* start

* regenerate projects

* update

* fix

* windows build

* update

* windows portability issue

* update

* update

* update

* update

* format

* update

* update

* update

* update

* update

* fix sanity

* regenerate projects

* update

* iwyu

* Fix resolved address length related bugs in tcp_socket_utils and listener_utils

* iwyu

* cleanup src/core/lib/event_engine/tcp_socket_utils.cc

* iwyu

* fix

* regenerate projects

* fix sanity

* re-write endpoint shim

* more re-write

* cleanup

* update

* review comments

* build issue

* more build issue fixes plus adding event_engine_trace

* even more build issue fixes

* iwyu

* add static_cast

* update

* remove redundant code

* update

* deduplicate

* iwyu

* Fix review comments and regenerate_projects

* sanity

* review comments

* fix include guards

Co-authored-by: AJ Heller <hork@google.com>
2023-01-20 19:47:14 -08:00
Mark D. Roth 76c82265b4
WRR: implement WRR LB policy (#31904)
* WRR: port StaticStrideScheduler to OSS

* WIP

* Automated change: Fix sanity tests

* fix build

* remove unused aliases

* fix another type mismatch

* remove unnecessary include

* move benchmarks to their own file, and don't run it on windows

* Automated change: Fix sanity tests

* add OOB reporting

* generate_projects

* clang-format

* add config parser test

* clang-tidy and minimize lock contention

* add config defaults

* add oob_reporting_period config field and add basic test

* Automated change: Fix sanity tests

* fix test

* change test to use basic RR

* WIP: started exposing peer address to LB policy API

* first WRR test passing!

* small cleanup

* port RR fix to WRR

* test helper refactoring

* more test helper refactoring

* WIP: trying to fix test to have the right weights

* more WIP -- need to make pickers DualRefCounted

* fix timer ref handling and get tests working

* clang-format

* iwyu and generate_projects

* fix build

* add test for OOB reporting

* keep only READY subchannels in the picker

* add file missed in a previous commit

* fix sanity

* iwyu

* add weight expiration period

* add tests for weight update period and OOB reporting period

* Automated change: Fix sanity tests

* lower bound for timer interval

* consistently apply grpc_test_slowdown_factor()

* cache time in test

* add blackout_period tests

* avoid some unnecessary copies

* clang-format

* add field to config test

* simplify orca watcher tracking

* attempt to fix build

* iwyu

* generate_projects

* add "_experimental" suffix to policy name

* WRR: update tests to cover qps plumbing

* WIP

* more WIP

* basic WRR e2e test working

* add OOB test

* fix sanity

* ignore duplicate addresses

* Automated change: Fix sanity tests

* add new tracer to doc/environment_variables.md

* retain scheduler state across pickers

* Automated change: Fix sanity tests

* use separate mutexes for scheduler and timer

* sort addresses to avoid index churn

* remove fetch_sub for wrap around in RR case

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-01-20 12:14:37 -08:00
Richard Belleville ee1d980832
Revert "Fix test race condition on port binding (#32140)" (#32145)
This reverts commit 5426ef188b.
2023-01-18 14:27:07 -08:00
Richard Belleville 718e3d4f0e
De-experimentalize compression (#32138) 2023-01-18 11:56:44 -08:00
Richard Belleville 5426ef188b
Fix test race condition on port binding (#32140) 2023-01-18 11:56:22 -08:00
Jan Tattermusch 7fd808f6f9
Bump version to 1.53.0-dev (on master branch) (#32086)
* bump version to 1.53.0-dev

* regenerate projects
2023-01-18 09:41:33 +01:00
Xuan Wang 47871b1e48
Improve logging while calling core API (#32059)
* Improve logging while calling core API

* Use NULL for _core_error_string

* Don't raise inside Exception hanlder

* Changes based on comment

* Remove unused enum

* Decode and add qoutes for grpc_call_error_string.
2023-01-17 16:37:29 -08:00
Xuan Wang 829eb8f98a
Print exception trace for functions submitted to thread_pool (#32030)
* Print exception trace in thread_pool

* Fix sanity test

* fix format

* Change traceback.print_exception to traceback.print_exc
2023-01-17 15:31:06 -08:00
Christopher S 0528de5d74
fix typo in src/python/grpcio/grpc/__init__.py::ServicerContext (#31771) 2023-01-17 15:03:09 -08:00
AJ Heller 6778bb3501
[EventEngine] Relandx3: WindowsEventEngine client (#32031)
* Reland x3: "WindowsEventEngine Client implementation (#31848)"

This reverts commit 2c4d55b3a1.

* fixes

* fix

* fix
2023-01-12 10:26:17 -08:00
Craig Tiller 67f364e23e
[cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757)
* crash function

* progress

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fixes

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

* fix

* use cpp attr

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix

* fix

* add exclusion

* fix

* typo

* fix

* fmt

* Update tcp_socket_utils.cc

* Automated change: Fix sanity tests

* fix

* revert php changes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-01-11 08:50:32 -08:00
Mark D. Roth b0d7131ab3
WRR: plumb qps in backend metric data (#31903)
* plumb qps in backend metric data

* pull in updated orca proto

* gen_upb_api

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-01-09 10:07:58 -08:00
Andres Beltran 2904ee8fd3
Add support for systemd socket activation (#31667)
* Revert "Revert "Add support for systemd socket activation (#30485)" (#31617)"

This reverts commit 867dc6cae2.

* Add checks to unix tests

* Ran generate_projects.sh and fixed styling in test

* Fix variable in unit test

* Use reinterpret_cast in test

* Rebase and fix sanity failures
2023-01-05 14:53:33 -08:00
Richard Belleville 3a3f7ebc25
Add unit test for #31982 (#32014) 2023-01-05 12:56:36 -08:00
AJ Heller 2c4d55b3a1
Revert "Revert "Revert "WindowsEventEngine Client implementation (#31848)" (#… (#31974)" (#32018)
This reverts commit aa83319695.
2023-01-04 11:09:56 -08:00
Nick Hill 353afc2dd9
fix: Re-raise python asyncio.CancelledErrors (#31982)
This is motivated by #31227 which I also encountered recently. I'm not familiar with the call lifecycle details, but it seems clear that there is some kind of race condition between user-initiated cancellations and other completion status updates.

If a user cancels a call before being notified of its completion, I believe it should be considered cancelled unconditionally, regardless of whether the call actually completed successfully before its cancellation status could be set.

So it seems better to re-raise explicitly rather than using self._raise_for_status(), which is a no-op in this race condition and can lead to an UnboundedLocalError.
2023-01-03 17:36:07 -08:00
AJ Heller aa83319695
Revert "Revert "WindowsEventEngine Client implementation (#31848)" (#… (#31974)
* Revert "Revert "WindowsEventEngine Client implementation (#31848)" (#31965)"

This reverts commit 58ad7950a0.

* iwyu & visibility
2023-01-03 16:21:29 -08:00
Xuan Wang e1f07786a4
Change Aio abort() function return type to NoReturn (#31984) 2023-01-03 10:58:05 -08:00
AJ Heller 58ad7950a0
Revert "WindowsEventEngine Client implementation (#31848)" (#31965)
This reverts commit bc7e155e55.
2022-12-22 09:59:14 -08:00
AJ Heller bc7e155e55
WindowsEventEngine Client implementation (#31848)
* rename task-handle mutex

* rename TimerClosure

* tmp commit, building, not tested

* add test for client connection to a non-listening port

* fix posix EE tests

* re-fix windows test suite after posix compatibility

* (unfinished, backup): passing the suite's NonExistingListener client test

* remove redundant windows client test

* integrate IOCP worker loop

* initial commit of echo test tool; fixes

* move echo client to test_suite/tools; I do not yet like the setup, it's about time for a macro that generates all useful test/tool targets

* cleanup

* add --target arg to echo_client. requires URI

* Automated change: Fix sanity tests

* build fixes

* fix

* fix

* reviewer feedback

* warning fix

* delete logic on cancellation

* fix

* cancel connect deadlock; improved template code

* fix build failure with linux environments building windows targets

* fix

* fix

* no ++ for atomics

* remove the test changes, to be landed separately

* Automated change: Fix sanity tests

* remnants

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-12-20 17:04:54 -08:00
Richard Belleville 87631454fd
Switch AsyncIterable to AsyncIterator (#31906) 2022-12-19 13:27:13 -08:00
Cheng-Yu Chung b887534111
[cleanups] Remove `include/grpc/impl/codegen/propagation_bits.h` (#31870)
* Remove `include/grpc/impl/codegen/propagation_bits.h`

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
2022-12-15 11:08:02 +08:00
Mark D. Roth 5192021637
Second attempt: xDS stateful session affinity: add config plumbing (#31874)
* Revert "Revert "xDS stateful session affinity: add config plumbing (#31827)" (#31873)"

This reverts commit 4f15d3dcf9.

* fix build for compilers too dumb to recognize the full set of enum values
2022-12-13 15:47:24 -08:00
Richard Belleville 4f15d3dcf9
Revert "xDS stateful session affinity: add config plumbing (#31827)" (#31873)
This reverts commit f76948b12d.
2022-12-12 14:26:27 -08:00
Mark D. Roth f76948b12d
xDS stateful session affinity: add config plumbing (#31827)
* WIP

* sanitize

* add endpoint tests

* add plumbing through LB policies

* clang-tidy
2022-12-12 08:19:31 -08:00
Mark D. Roth 040617028c
Revert "Revert "xDS stateful session affinity: support xDS HTTP filter config (#31793)" (#31821)" (#31823)
This reverts commit 0fd59754b1.
2022-12-06 14:51:42 -08:00
Cheng-Yu Chung 0d3fcb41ea
Revert "Move google_default channel_credentials out of `include/grpc/grpc_security.h` (#31786)" (#31822)
This reverts commit 3d59abc94e.
2022-12-06 11:39:43 -08:00
AJ Heller 0fd59754b1
Revert "xDS stateful session affinity: support xDS HTTP filter config (#31793)" (#31821)
This reverts commit 7f054ffab0.
2022-12-06 11:22:13 -08:00
Mark D. Roth 7f054ffab0
xDS stateful session affinity: support xDS HTTP filter config (#31793)
* stateful session affinity: implement filter

* register filter config parser

* fix unused parameter errors

* remove some FIXMEs that are not longer needed

* clang-tidy

* iwyu

* xDS stateful session affinity: support xDS HTTP filter config

* buildifier

* iwyu

* revert iwyu changes to observability_logging_sink.cc

* generate_projects

* generate_projects

* Automated change: Fix sanity tests

* fix build

* fix xds_http_filters_test

* add tests

* clang-format

* shorten filter name

* don't use absl::optional for path

* fix build

* don't add cookie to trailing metadata unless it's Trailers-Only

* fix sanity

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-12-06 09:31:47 -08:00
Cheng-Yu Chung 3d59abc94e
Move google_default channel_credentials out of `include/grpc/grpc_security.h` (#31786) 2022-12-06 10:59:57 +08:00
Mark D. Roth 5e4d9f4bcf
xDS stateful session affinity: implement C-core filter (#31788)
* stateful session affinity: implement filter

* register filter config parser

* fix unused parameter errors

* remove some FIXMEs that are not longer needed

* clang-tidy

* iwyu

* iwyu

* revert iwyu changes to observability_logging_sink.cc

* generate_projects

* shorten filter name

* don't use absl::optional for path

* fix build

* don't add cookie to trailing metadata unless it's Trailers-Only
2022-12-05 16:32:04 -08:00
Eugene Ostroukhov 1e13612d4a
Introduce the xds_override_host policy (#31730)
Introduce the xds_override_host policy
2022-12-02 13:31:29 -08:00
Zhan Jiang ec6d6025e5
security: Refactor some utility functions in TSI for better internal use (#31736)
security: Refactor some utility functions in TSI for better internal use
2022-11-30 15:48:40 -08:00
Georgy Yakovlev 31fc452b68
respect CC variable (#26480)
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
2022-11-28 15:07:36 -08:00
AJ Heller 557e558825
[EventEngine] WindowsEndpoint (#31735)
* [EventEngine] WindowsEndpoint

Initial sketch, all tests passing

* Port fix from #28432

* GPR_WINDOWS guard

* use MemoryAllocator::MakeReservation for allocated buffers

* better logging (respect slice length)

* Automated change: Fix sanity tests

* improvements

* Automated change: Fix sanity tests

* InlinedVector<WSABUF, kMaxWSABUFCount>

* initial attempt at socket util reunification

* posix fixes + local run of sanitize.sh

* posix socket includes

* fix

* Automated change: Fix sanity tests

* remove unused include (breaks windows)

* remove stale comment

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-11-28 14:13:10 -08:00
Mark D. Roth 808347ffe8
ServerConfigSelector: clean up API (#31683)
* ServerConfigSelector: clean up API

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-11-28 13:45:50 -08:00
Xuan Wang a9e5508cdb
Add type annotations to _channel.py and _server.py (#31677)
* Add type annotation to _channel.py and _server.py

* Undo changes in init.py

* changes based on comments.

* format changes

* fix pytype errors

* Changes based on comments

* Fix circular import

* fix pytype and pylint

* Fix format issues

* Fix some cython type issues

* Change ManagedCallType to IntegratedCallFactory

* fix format

* undo some mistakes
2022-11-28 11:31:07 -08:00
Craig Tiller c545350633
Reland: [promises] Compression filter conversion (#31686)
* Revert "Revert "[promises] Compression filter conversion (#31204)" (#31682)"

This reverts commit fa31b36cb1.

* fix?

* fix
2022-11-17 14:08:43 -08:00
Yijie Ma b6f2af4682
Revert "security: Refactor some utility functions in TSI for better internal use (#29728)" (#31687)
This reverts commit 8984a264b8.
2022-11-16 21:55:55 -08:00
Craig Tiller fa31b36cb1
Revert "[promises] Compression filter conversion (#31204)" (#31682)
This reverts commit a8c983528a.
2022-11-16 17:01:11 -08:00
Vignesh Babu c5a66bb08d
Posix Event Engine listener implementation (#31513)
* Util functions to help with posix engine listener implementation

* sanity

* update comments in posix_engine_listener_utils.h

* review comments

* iwyu

* revert prev commit

* iwyu

* update build

* update

* regenerate projects

* regenerate projects

* minor fixes

* update BUILD

* sanity

* update build

* regenerate projects

* fix unused parameter

* sanity

* update

* sanity

* regenerate_projects

* remove unused variable
2022-11-16 13:52:51 -08:00
Craig Tiller a8c983528a
[promises] Compression filter conversion (#31204)
* Convert compress filter

* decompress sketch

* Automated change: Fix sanity tests

* progress

* progress

* got the new filter impls compiling

* Automated change: Fix sanity tests

* declare the bits

* allocate control types

* stub in pipe accessors

* init pipes

* send-path

* working through the state machines

* [arena] pool allocator

* add tests

* Automated change: Fix sanity tests

* better sizes

* iwyu

* Automated change: Fix sanity tests

* first pass cut fragments

* fix1

* fix

* Automated change: Fix sanity tests

* fix

* iwyu

* build-deps

* fix for windows

* fix

* fixes

* better-logs

* better-logs

* callpushpush-->tryconcurrently

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* logging improvements

* logging improvements

* fixes

* Automated change: Fix sanity tests

* respect flag

* handle eos

* cancel_after_client_done

* handle failed sends

* more error handling

* Automated change: Fix sanity tests

* more stuff

* remove unnecessary conversion

* hackity hack hack

* fixes

* progress

* Automated change: Fix sanity tests

* capture metadata from promise to recieve up

* spacing

* debug,fix

* not-used

* fix

* fix

* tune

* unify compress/decompress

* fixes

* send_message/send_trailing_metadata ordering

* cleanup loop

* remove minimal stack bits

* better error generation

* fix-build

* Automated change: Fix sanity tests

* cancellation of recv message for forwarded receives

* fix

* compile fix

* fix clobbering

* fix test, convert to gtest

* fix

* Automated change: Fix sanity tests

* cleanup

* fixes

* fix

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fixes

* add test

* Automated change: Fix sanity tests

* fix

* fix

* fix

* no need to store message per filter

* Automated change: Fix sanity tests

* danke yash

* iwyu

* clang-tidy

* Automated change: Fix sanity tests

* fix

* [promise] CallPushPull -> more general TryConcurrently

* Automated change: Fix sanity tests

* [promise] Introduce map_pipe, cleanup factories

* [promise] Promise based filter changes for messages

* [log] Longer space for filenames

* [test] Add some debugability affordances to async_end2end_test

* add comment

* Automated change: Fix sanity tests

* fix-merge

* fix-merge

* fix

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

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

* comments

* fix for ruby

* review feedback

* merge

* fix

* Automated change: Fix sanity tests

* fix bm?

* re-add dropped flag

* turn on some traces to try and debug ruby

* debug for ruby problem

* proposed chttp2 fix

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

This reverts commit 1bf3cfd552.

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-11-15 20:16:18 -08:00
Zhan Jiang 8984a264b8
security: Refactor some utility functions in TSI for better internal use (#29728) 2022-11-14 16:43:34 -08:00
Craig Tiller a116fa7e25
Revert "Revert "[chaotic-good] Reland basic frame serialization (#316… (#31637)
* Revert "Revert "[chaotic-good] Reland basic frame serialization (#31631)" (#31635)"

This reverts commit 4e2b936e88.

* windows fix?
2022-11-14 09:37:01 -08:00
Craig Tiller 4e2b936e88
Revert "[chaotic-good] Reland basic frame serialization (#31631)" (#31635)
This reverts commit 571e98f6d5.
2022-11-12 17:00:04 -08:00
Craig Tiller 571e98f6d5
[chaotic-good] Reland basic frame serialization (#31631)
* Revert "Revert "[chaotic-good] Basic frame serialization/deserialization (#31257)" (#31630)"

This reverts commit e8ac147311.

* fix build
2022-11-11 20:45:50 -08:00
Craig Tiller e8ac147311
Revert "[chaotic-good] Basic frame serialization/deserialization (#31257)" (#31630)
This reverts commit 8185a56322.
2022-11-11 16:06:36 -08:00
Craig Tiller d410f1d0aa
[surface] Ensure SEND_STATUS & RECV_MESSAGE do not inhabit the same batch (#31554)
Add a check that SEND_STATUS_FROM_SERVER and RECV_MESSAGE are not in the same batch.

This is necessary pre-work for #31204 and implements part of grpc/proposal#336.

Also eliminates fling instead of updating it:

My expectation is nobody has looked at this corner in many years
It's not a benchmark we want: concentrating on a microbenchmark that doesn't include a binding layer caused us to favor designs that emphasized a lightweight core at the expense of a expensive bindings. We should consider the whole.

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-11-11 14:18:29 -08:00
Craig Tiller 8185a56322
[chaotic-good] Basic frame serialization/deserialization (#31257)
* [chaotic-good] initial sketch of frame serialization

* Automated change: Fix sanity tests

* tinkering

* fix up

* add tests,fuzzers

* more tests

* fix

* fuzzers

* Automated change: Fix sanity tests

* fix-build

* Automated change: Fix sanity tests

* fix inf loop

* fix refcounting bug

* fixdeps

* fix

* fix continuations

* iwyu

* fix build

* fix

* build fixes

* better split

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fixes

* iwyu

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-11-11 13:28:12 -08:00
Xuan Wang 1914a39875
Revert "Revert "Add BaseEvent (#31601)" (#31623)" (#31627)
This reverts commit d061903dab.
2022-11-11 12:29:08 -08:00
Craig Tiller d061903dab
Revert "Add BaseEvent (#31601)" (#31623)
This reverts commit a437fa1ff9.
2022-11-10 21:33:39 -08:00
Craig Tiller 867dc6cae2
Revert "Add support for systemd socket activation (#30485)" (#31617)
This reverts commit a638c407bb.
2022-11-10 16:24:30 -08:00
Richard Belleville 51f296b4f8
Bump master branch to 1.52.0-dev (gribkoff) (#31618)
* bump version to 1.52.0-dev

* regenerate projects
2022-11-10 16:11:08 -08:00
Esun Kim 42c2767c19
Revert "Bump v1.51.x to 1.51.0-pre1 (#31620)" (#31621)
This reverts commit bae9dd79aa.
2022-11-10 15:21:14 -08:00
Xuan Wang a437fa1ff9
Add BaseEvent (#31601)
* Add base event

* Remove BaseEvent in .pyx file and change return type for _Tag.event
2022-11-10 15:20:11 -08:00
Richard Belleville bae9dd79aa
Bump v1.51.x to 1.51.0-pre1 (#31620)
* bump version to 1.51.0-pre1

* regenerate projects
2022-11-10 15:17:59 -08:00
Andres Beltran a638c407bb
Add support for systemd socket activation (#30485)
* Add socket-activated functionality

* Fix GRPC_ERROR_NONE in tcp_server_posix_test and sanity checks

* Fix epoll1 error, sanity checks

* Use AF_INET6 in tcp_server_posix_test

Co-authored-by: Vignesh Babu <vigneshbabu@google.com>
2022-11-10 11:05:14 -08:00
Xuan Wang e1978a4fdd
Add typing for some internal python files. (#31514)
* Add typing for some internal python files.
2022-11-08 12:43:47 -08:00
Richard Belleville e73139edc4
Actually record CPU usage in Python Benchmark worker (#31552)
* Actually record CPU usage

* Do the client path too

* Actually build the image from the PR

* Revert "Actually build the image from the PR"

This reverts commit 3afa5cf3c3.

* Support importing on Windows
2022-11-07 16:40:21 -08:00
Vignesh Babu 249645608e
Reland posix event engine tcp client (#31563)
* Revert "Revert "Posix event engine tcp client (#31074)" (#31452)"

This reverts commit d760c1fef7.

* regenerate_projects
2022-11-07 09:32:37 -08:00
Richard Belleville b8c2818c6b
Fix initialization of interrupt check period (#31550) 2022-11-04 12:42:02 -07:00
Mark D. Roth 9cb916cbd8
Third attempt: XdsClient: fix behavior for does-not-exist timer and stream termination (#31520)
* Revert "Revert "Second attempt: XdsClient: fix behavior for does-not-exist timer and stream termination (#31507)" (#31519)"

This reverts commit b810813291.

* fix python CSDS test
2022-11-01 13:03:15 -07:00
Mark D. Roth 49da06c3a1
Revert "Revert "service config: use new JSON API (#30467)" (#31485)" (#31486)
This reverts commit 008661a5d6.
2022-10-28 16:03:59 -07:00
Mark D. Roth 008661a5d6
Revert "service config: use new JSON API (#30467)" (#31485)
This reverts commit b853ccc6db.
2022-10-27 15:13:18 -07:00
Mark D. Roth b853ccc6db
service config: use new JSON API (#30467)
* Declarative JSON parser

* Automated change: Fix sanity tests

* fix

* shrinking stuff a little

* static vtables

* separate fns

* simpler?

* make maps work

* windows fixes

* Automated change: Fix sanity tests

* simplify code

* Automated change: Fix sanity tests

* vtable-test

* dont always create vec/map impls for every type

* comments

* make error consistent

* move method private

* progress

* durations!

* Automated change: Fix sanity tests

* fix

* fix

* fix

* Automated change: Fix sanity tests

* post-load

* Automated change: Fix sanity tests

* document JsonPostLoad() and add static_assert

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

* use absl::Status

* accept either string or number for numeric values

* add test for direct data member of another struct type

* remove unused method

* add support for retaining part of the JSON wirthout processing

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

* add absl::optional support

* Automated change: Fix sanity tests

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

* remove overload of LoadFromJson()

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

* rename resolver_result_parsing to client_channel_service_config

* split up service_config_test into a separate test for each component

* convert client channel service config parser to new API

* fix build

* converted retry global params

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

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

* clang-format

* Automated change: Fix sanity tests

* fix build

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

* fix msan

* Automated change: Fix sanity tests

* fix error message

* Automated change: Fix sanity tests

* fix test

* add ability to disable fields

* plumb in channel args to disable parsing

* Automated change: Fix sanity tests

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

* fix resolver_component_test

* Automated change: Fix sanity tests

* work around mac build problem

* Automated change: Fix sanity tests

* work around gcc6 problem

* Automated change: Fix sanity tests

* fix build

* fix build

* don't use alternative builder in tests

* convert message size service config parser

* convert fault injection service config parser

* rename files

* add specialization for unique_ptr

* avoid moves in client channel service config parser

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

* avoid moves in message_size service config parser

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

* convert rbac service config parser

* clang-format

* WIP

* convert top-level service config parser

* clang-format

* fix build

* fix rbac service config parser test

* fix signed-ness problem and reversed-conditional bug

* fix unused param

* fix json_string method

* fix max message length defaults

* add copy ctors to appease windows compiler

* fix RLS LB config parser test

* fix name resolution test

* fix build

* work around gmock portability bug

* fix sanity

* add missing build dep

* make RBAC principal and permissions movable, not copyable

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

This reverts commit 53315bccc9.

* attempt to simplify HeaderMatcher and StringMatcher parsing

* more bloat reduction in RBAC service config parser

* fix sanity

* add missing build dep

* attempt work-around for MSVC bug

* Revert "attempt work-around for MSVC bug"

This reverts commit e54c89e1e4.

* attempt work-around for Windows build problem

* try another work-around

* fix sanity

* appease clang-tidy

* generate_projects

* attempt to fix Windows build

* more windows fixes

* more windows fix

* yet more windows fixes

* try without noexcept

* remove unnecessary boilerplate

* code review changes

* fix breakage

Co-authored-by: Craig Tiller <craig.tiller@gmail.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Craig Tiller <ctiller@google.com>
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-10-27 11:51:05 -07:00
Craig Tiller 58c628a7ad
[promise] Introduce map_pipe, cleanup factories (#31430)
* [promise] Introduce map_pipe, cleanup factories

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-10-25 14:28:07 -07:00
Vignesh Babu d760c1fef7
Revert "Posix event engine tcp client (#31074)" (#31452)
This reverts commit 390ae5d412.
2022-10-25 11:00:14 -07:00
Vignesh Babu 390ae5d412
Posix event engine tcp client (#31074)
* removing EndpointConfig::Get method

* Automated change: Fix sanity tests

* cleanup

* fix

* fix review comments

* review comments

* cleanup

* update comments

* fix

* cleanup

* update comments

* Automated change: Fix sanity tests

* fix misleading comments

* bug fixes

* fix

* fix

* start

* revert some changes for bug fixes and allow spurious wakeups for poll based poller

* sanity

* fix

* minor fix

* review comments

* fix

* comment

* remove re-defined function

* fix review comments

* fix windows iocp build issue due to removed function

* change Milliseconds return type

* fix

* remove header

* regenerate projects

* fix sanity

* code

* fix sanity

* Automated change: Fix sanity tests

* Forking iomgr internal_errqueue defines for posix event engine

* fix BUILD file

* start

* update

* sanity

* regenerate_projects

* Automated change: Fix sanity tests

* rename

* review comments

* update

* review comments

* Automated change: Fix sanity tests

* fix BUILD

* add no_windows tag

* update

* update

* remove debug statements

* delete unused file

* update

* fix BUILD

* regenerate projects

* update

* fix BUILD

* update

* fix sanity

* minor additions to configure global tcp user timeout values

* cleanup

* fix build syntax

* start

* update

* fix

* change poller interface for posix event engine

* update event_poller_posix_test

* fix build error

* Add more unit tests

* windows ee changes

* update comment

* remove unused deps

* fix msan issue

* add comment

* adding rcv lowat helper to socket wrapper

* fix sanity

* review comments

* fix build issue

* fix sanity

* sanity

* iwyu sanity

* fix build

* merge conflict

* Automated change: Fix sanity tests

* update

* update

* fix macos issue

* fix msan and ubsan issues

* fix macos build issue

* comment

* review comments

* remove unused dep

* sanity

* merge conflict

* mac build issue

* regenerate projects

* build issue

* fix test issues

* add test

* fix typo and address review comments

* review comments

* Automated change: Fix sanity tests

* update

* merge issue

* add a test to check connect timeouts and cancellation

* regenerate projects

* sanity

* remove unnecessary code

* Add utils to create and prepare socket for tcp client

* some fixes

* fixes

* review comments

* sanity

* fix build issue

* review comments

* add thread annotations

* MacOS fix unused variable

* add some more #endif comments

* fixes

* update

* more fixes

* regenerate projects

* sanity

* some fixes

* more fixes

* rm hdr file

* macos fixes

* typo

* more build issues

* macos crashes

* windows build

* adding Poller::Work to event engine constructor

* update client_test

* iwyu

* iwyu

* regenerate projects

* cleanup

* cleanup

* regenerate projects

* regenerate projects

* fix

* fix

* merge conflict

* comments

* add experiments flag

* fix

* newline

* newline

* iwyu

* fix

* fix

* remove some ifdefs

* fix tsan issue in bm_event_engine_run

* sanity

* sanity

* Add a quiesce to threadpool

* fix

* Automated change: Fix sanity tests

* fixes

* typo

* comments

* fix build

* fixes

* macos fixes

* more macos fixes

* handle shutdown better

* updated poller kicked api contract and fix bug

* iwyu

* fix sanity

Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
Co-authored-by: Craig Tiller <ctiller@google.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-10-24 14:36:52 -07:00
Craig Tiller 0724a90fd8
Revert "Revert "[arena] pool allocator (#31298)" (#31414)" (#31415)
This reverts commit 2c11e56433.
2022-10-20 18:15:09 -07:00
Alisha Nanda 2c11e56433
Revert "[arena] pool allocator (#31298)" (#31414)
This reverts commit 5e27b2df97.
2022-10-20 12:57:49 -07:00
Craig Tiller 5e27b2df97
[arena] pool allocator (#31298)
* [arena] pool allocator

* add tests

* Automated change: Fix sanity tests

* better sizes

* iwyu

* Automated change: Fix sanity tests

* first pass cut fragments

* fix1

* fix

* Automated change: Fix sanity tests

* fix

* iwyu

* build-deps

* fix for windows

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-10-20 10:08:06 -07:00
Vignesh Babu e8c30b487f
Invoking Poller::Work in posix event engine constructor (#31128)
* adding Poller::Work to event engine constructor

* iwyu

* iwyu

* cleanup

* regenerate projects

* fix

* comments

* add experiments flag

* fix

* newline

* newline

* iwyu

* remove some ifdefs

* fix tsan issue in bm_event_engine_run

* Add a quiesce to threadpool

* fix

* Automated change: Fix sanity tests

* disable posix_event_engine_test on windows

Co-authored-by: Craig Tiller <ctiller@google.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-10-19 23:25:04 -07:00
Xuan Wang 149f5615ba
Remove enum and future (#31381)
* [Python][Remove enum34] Remove enum34

* [Python][Remove futures] Remove futures

* Remove empty deps from .bazel files
2022-10-18 14:58:30 -07:00
Mark D. Roth bd4b5d70c8
xDS: remove v2 support (#31327)
* xDS: remove v2 support

* remove unnecessary templating in fake xDS server code

* remove now-unnecessary workaround for clang bug

* clang-format

* fix unit tests

* iwyu

* remove now-unused v2 proto files

* fix from merge

* clang-format

* fix typo
2022-10-18 08:45:42 -07:00
Mark D. Roth 5d0d5fe1a7
xDS: implement xds_wrr_locality LB policy and return xDS LB config from XdsClient (#31160)
* XdsBootstrap: move two more methods out of the interface

* Automated change: Fix sanity tests

* XdsClient: add unit test

* Automated change: Fix sanity tests

* fix memory leaks

* add helper method

* add unsubscription

* add test for multiple subscriptions

* clang-format

* fix build

* fix flakiness

* add checking for other node fields

* add v2 test

* add response builder

* add test for update from server

* add test for update containing only changed resources

* clang-format

* fix build

* add test for resource not existing upon subscription

* add test for stream closed by server

* add test for multiple watchers for the same resource

* add test for connection failure

* clang-format

* add test for resources wrapped in Resource wrapper message

* add test for resource validation failure

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

* add test for validation failure for already-cached resource

* add test for server not resending resources after stream disconnect

* clang-format

* fix XdsClient to report channel errors to newly started watchers

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

* fix watcher to ensure events arrive in the expected order

* fix tests

* clang-format

* add test for multiple resource types

* fix xds_cluster_e2e_test

* Automated change: Fix sanity tests

* cleanup

* add federation tests

* clang-format

* remove now-unnecessary XdsCertificateProviderPluginMapInterface

* code review comments

* simplify XdsResourceType::Decode() API

* XdsClient: add unit tests for XdsClusterResourceType

* add XdsClient with gRPC bootstrap config

* add LB policy tests

* started adding CertificateProvider tests

* update for recent API changes

* fix merge bugs

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

* fix build

* migrate to ValidationErrors

* add xds_common_types_test

* finish TLS tests and add LRS tests

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

* add circuit breaking and outlier detection tests

* add validation to outlier detection LB policy parsing

* clang-format

* Automated change: Fix sanity tests

* fix signedness

* fix sanity

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

* fix unused parameter

* fix sanity

* fix test

* Automated change: Fix sanity tests

* fix aggregate cluster bug

* Automated change: Fix sanity tests

* absl::make_unique -> std::make_unique

* fix sanity

* fix sanity

* iwyu

* iwyu

* update code for XdsResourceTypeImpl changes

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-10-17 11:22:43 -07:00
Xuan Wang 7aca6d4007
[Remove Six] Remove dependency on six (#31340)
* [Python][Remove Six] Remove Six from requirements
2022-10-17 09:34:45 -07:00
Xuan Wang 823378dfe2
[Python][Remove Six] Remove Six dependency part II (#31309)
* [Python][Remove Six] Remove Six dependency

* Change import format
2022-10-12 13:10:11 -07:00
Xuan Wang a5ce92d8cf
[Python][Remove Six] Replace Six with_metaclass method (#31288)
* [Python][Remove Six] Replace six.with_metaclass()
2022-10-10 14:32:38 -07:00
Xuan Wang 42482060fc
[Python] Remove Six dependency (#31264)
[Python][Remove Six] Remove Six dependency Part I
2022-10-10 10:25:22 -07:00
Craig Tiller 20d1efc38a
[stats] Move core stats to C++ (#30936)
* begin c++

* Automated change: Fix sanity tests

* progress

* progress

* missing-files

* Automated change: Fix sanity tests

* moved-from-stats

* remove old benchmark cruft, get tests compiling

* iwyu

* Automated change: Fix sanity tests

* fix

* fix

* fixes

* fixes

* add needed constructor

* Automated change: Fix sanity tests

* iwyu

* fix

* fix?

* fix

* fix

* Remove ResetDefaultEventEngine

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

* forget existing engine with FactoryReset

* add visibility

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: AJ Heller <hork@google.com>
2022-10-09 21:22:08 -07:00
Craig Tiller 2d00d50c59
[event_engine] Improve scaling in threadpool (#31234)
* fixes

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fixes

* fixes

* fix

* fix-win

* fix iwyu

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-10-05 00:17:23 -07:00
AmosWang 492d3de534
Release secure channel credentials in Python AioChannel (#31236)
Release secure channel credentials in Python AioChannel
2022-10-04 14:18:53 -07:00
Craig Tiller 66c8e098ee
[slice] Remove murmur implementation (#31118)
* [slice] Remove _internal variants of APIs

* Automated change: Fix sanity tests

* fix

* reduce bloat

* fixes

* Automated change: Fix sanity tests

* murmurings

* Automated change: Fix sanity tests

* progress

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-10-01 21:26:45 -07:00
Craig Tiller db5fe72da9
[tsan] Threadsafe strerror implementation (#31167)
* fix

* spread

* fix

* Automated change: Fix sanity tests

* fix

* remove unnecessary .c_strs

* lashes

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-30 11:43:33 -07:00
Craig Tiller beb5bdca62
[promises] Promise based grpc_call (#29598)
* Automated change: Fix sanity tests

* fix

* fixes

* fixup allocator story - we should require a context

* fixes

* doodling

* context scribbles

* [arena] Add ManagedNew(), gtest-ify test

Add a ManagedNew() method to Arena that calls the relevant destructor at Arena destruction time.

There are some cases coming up in the promise based call work where this becomes super convenient, and I expect it's likely that there are other places that's true too.

* Automated change: Fix sanity tests

* progress

* lalalal

* progress

* x

* Automated change: Fix sanity tests

* fixes

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fixes

* fixes

* fixes

* Automated change: Fix sanity tests

* progress

* fix client streaming

* handle invalid flags

* Automated change: Fix sanity tests

* no logging

* progress

* progress

* channelz

* tentative fix

* fix

* lalala

* Automated change: Fix sanity tests

* more readable trace

* logging improvements, leading to bug fix in connected channel

* fix

* improve debuggability

* fix

* progress to better refcounting

* progress

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* fix

* fix

* threading

* Automated change: Fix sanity tests

* fix

* fix

* improve debuggability

* fix

* fix

* Automated change: Fix sanity tests

* fix

* make promises runtime configurable

* Automated change: Fix sanity tests

* fix

* fix build

* fix broken test

* clean up api

* deal with stats better

* peer string!

* introduce fragments

* Automated change: Fix sanity tests

* use fragments

* stuff

* [promises] Add AtomicWaker type

* Automated change: Fix sanity tests

* fix

* fix write path

* fix

* polling-entity-hell

* review feedback

* fix

* fix

* fix

* fix

* make an experiment

* [experiments] Make output more diffable/readable

* Automated change: Fix sanity tests

* buildifier sized indentations

* fix

* fix

* Automated change: Fix sanity tests

* fix?

* fix promise

* prototype

* progress

* implement new api

* Revert "fix promise"

This reverts commit ded85e7d19.

* Revert "Revert "fix promise""

This reverts commit c2acef1958.

* progress

* done

* Automated change: Fix sanity tests

* fix

* fix

* fix

* Automated change: Fix sanity tests

* updates

* review feedback

* first pass feedback

* Automated change: Fix sanity tests

* review feedback

* naming

* better-logs

* fix test

* Automated change: Fix sanity tests

* comments

* fix

* progress

* validation

* iwyu

* fix

* ugh this needs to be any

* fix flakiness in asan

* call tracing

* cleanup unused args

* fix windows

* fix build

* ugh

* fix tsan race

* threading-fix

* bloat1

* bloat2

* bloat3

* fix

* unused-args

* sanity

* iwyu

* fix

* fix

* this is ok

* iwyu, exchange

* fix

* Automated change: Fix sanity tests

* fix ee lifetime issue

* fix

* review feedback

* Automated change: Fix sanity tests

* comment

* x

* fix tsan race

* iwyu

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-29 20:03:05 -07:00
Esun Kim f11282df8d
Bump dev version v1.51-dev (#31174)
* bump version to 1.51.0-dev

* regenerate projects
2022-09-29 14:58:01 -07:00
Craig Tiller ebc4f236b6
[slice] Remove _internal variants of APIs (#30953)
* [slice] Remove _internal variants of APIs

* Automated change: Fix sanity tests

* fix

* reduce bloat

* fixes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-24 13:34:00 -07:00
Craig Tiller e8df8185e5
[debug] Fine grained event tracing (#31105)
* moved-from-stats

* [debug] Fine grained event tracing

* Automated change: Fix sanity tests

* comment

* Automated change: Fix sanity tests

* iwyu

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-22 16:32:10 -07:00
Richard Belleville 2d94537854
Re-add compiler protos to grpcio-tools (#31062)
* Re-add compiler protos to grpcio-tools

* Attempt to break

* Actually fail if protobufs don't compile. Who wrote this thing?

* Add an actual test

* yapf

* Whoops. Thought I'd reverted you

* Please the formatter gods
2022-09-20 17:15:39 -07:00
Mark D. Roth 07df5ff9c7
json_object_loader: refactor ErrorList into its own library (#31049)
* json_object_loader: refactor ErrorList into its own library

* fix observability_config_test

* generate_projects

* iwyu
2022-09-20 11:58:27 -07:00
Richard Belleville e609ad88c9
Update protobuf to v21.6 (#31015)
* Update third_party/protobuf

* run tools/distrib/python/make_grpcio_tools.py

* update build_handwritten.yaml

* regenerate projects

* Update Python version floor
2022-09-16 17:50:52 -07:00
Craig Tiller c2ab8c99bb
Revert "Revert "[c++] Move environment functions to C++ (#30937)" (#30986)" (#30988)
This reverts commit 96264e07b8.
2022-09-14 14:19:36 -07:00
Craig Tiller 96264e07b8
Revert "[c++] Move environment functions to C++ (#30937)" (#30986)
This reverts commit 74c0d6fe3f.
2022-09-14 11:53:55 -07:00
Craig Tiller 74c0d6fe3f
[c++] Move environment functions to C++ (#30937)
* [gprpp] Move env to C++

* move headers/impl

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* Update http_proxy.cc

* fix

* fix

* rename

* fix merge

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-14 10:17:15 -07:00
Craig Tiller 92f58c18a8
Revert "Revert "[chttp2] Improve huffman decode efficiency (#30479)" (#30961)" (#30962)
This reverts commit bfea47093f.
2022-09-13 13:16:55 -07:00
Craig Tiller bfea47093f
Revert "[chttp2] Improve huffman decode efficiency (#30479)" (#30961)
This reverts commit 6c7f921f5f.
2022-09-13 12:25:00 -07:00
Craig Tiller 6c7f921f5f
[chttp2] Improve huffman decode efficiency (#30479)
* first pass

* refinement #1

* fix

* opt

* 8

* 5

* 12

* 10

* 7

* 15

* 8n

* 15n

* 8a

* 16a

* 15a

* 5a

* 10a

* 7a

* 9a

* 12a

* 11a

* 11b

* 11b

* 7b

* 15b

* 14b

* 15i

* 12i

* 9i

* 10i

* finalizing

* fix

* tweak

* 10f

* 10r

* 7r

* 8r

* 9r

* more

* rething

* 8s

* 9s

* 12s

* 7s

* 10s

* 15snr

* 12snr

* 14snr

* 13snr

* 11snr

* 20snr

* 15snr

* 18snr

* 7snr

* 7snr

* 12-2stp

* 13-2stp

* 14-2stp

* 11-2stp

* 10-2stp

* 9-3stp

* 8-3stp

* 7-3stp

* 8-2stp

* auto-tune1

* max-depth-2

* max-depth-3

* max-depth-2

* abbreviate

* working version

* add benchmark

* fix

* fix

* fix

* ditch define

* better code layout

* static fns

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix build

* cleanup and comment

* fmt

* fix

* test

* tag

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* progress

* progress

* progress

* fixes

* cleanup

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fmt

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* fix

* add encode/decode fuzzer

* Automated change: Fix sanity tests

* fix

* fix

* fix

* review feedback

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-13 11:24:35 -07:00
Richard Belleville 2297249e47
Support Python 3.11 (#30818)
* Support Python 3.11

* Update build images for 3.11

* Whoopsie

* The architecture of this thing is garbage

* Silence ownership warning

* Account for change in git behavior

* Fix directory

* I am in great pain

* Update Windows and arm linux

* Agh

* Clean up
2022-09-12 11:53:44 -07:00
Craig Tiller a27073f7a8
[config] Move proxy mapper into core configuration (#30842)
* [config] Move proxy mapper into core configuration

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-09 15:09:31 -07:00
Craig Tiller 346c103a1c
[build] Remove dependency cycle for grpc_init/shutdown (#30921)
* [build] Remove dependency cycle for grpc_init/shutdown

* missing files

* Automated change: Fix sanity tests

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-09 14:58:57 -07:00
Craig Tiller 7ba58bb925
[build] Move certificate provider registry into its own build target (#30836)
* [build] Move cert registry into its own build target

* Automated change: Fix sanity tests

* fix

* forgot to save file

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-07 17:23:03 -07:00
Craig Tiller 381976dc99
[windows] Handling for tchar type in C++ (#30845)
* [windows] Handling for tchar type in C++

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* Update tchar.cc

* Update tchar.h

* Update tchar.h

* Update env_windows.cc

* Update string_util_windows.cc

* Update tmpfile_windows.cc

* Update env_windows.cc

* Update env_windows.cc

* Update subprocess_windows.cc

* Automated change: Fix sanity tests

* fix

* Update subprocess_windows.cc

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-07 14:37:37 -07:00
Craig Tiller ca8b437613
[experiments] Single experiments flag (#30822)
* single experiments flag

* add missing files

* fix

* empty-string-fix

* fix

* Automated change: Fix sanity tests

* ensure cold path is out of line

* add log for enabled/disabled experiments

* remove bad sentence

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-01 23:13:02 -07:00
Vignesh Babu 029f945504
Migrating posix event pollers to use new event poller interface (#30419)
* Migrating posix event pollers to use new event poller interface

* add inline attributes

* Automated change: Fix sanity tests

* remove ref/unref from iomgr engine closure ad add custom closure types internal to the pollers

* updating time util usage

* use unique_ptrs

* update comments

* Automated change: Fix sanity tests

* fix review comments

* review comments

* cleanup

* update comments

* fix

* cleanup

* update comments

* Automated change: Fix sanity tests

* fix misleading comments

* bug fixes

* fix

* fix

* revert some changes for bug fixes and allow spurious wakeups for poll based poller

* sanity

* fix

* review comments

* fix

* comment

* remove re-defined function

* fix review comments

* fix windows iocp build issue due to removed function

* change Milliseconds return type

* remove header

* regenerate projects

* fix sanity

* fix sanity

* Automated change: Fix sanity tests

* delete unused file

* build issue

* cleanup

Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2022-08-31 17:45:30 -07:00
Craig Tiller c580d0d9a7
[experiments] Add experiment framework (#30775)
* [experiments] Add experiment framework

* auto-ci-config

* fix

* fix

* Automated change: Fix sanity tests

* support different configs

* Automated change: Fix sanity tests

* cleaner generated code

* Automated change: Fix sanity tests

* enforce expiry

* make sure expiry isnt far in the future

* fix

* Automated change: Fix sanity tests

* remove specified testing

* cleaner

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* docstring

* clean up code

* Automated change: Fix sanity tests

* review feedback

* build fix

* Automated change: Fix sanity tests

* ownership

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-31 10:52:40 -07:00
Craig Tiller 004788af3d
[cleanup] Remove profiling timers (#30779)
* [cleanup] Remove profiling timers

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

* fix

* fixes
2022-08-30 13:40:08 -07:00
Richard Belleville 38b0c2f446
Update protobuf on ancillary packages (#30795) 2022-08-30 12:15:56 -07:00
Mark D. Roth 0e30264a5d
XdsBootstrap: split interface from implementation (#30759)
* create XdsBootstrapInterface

* move gRPC-specific bootstrap code into its own module

* move LookupAuthority() back to base class

* share constants

* clang-format

* Automated change: Fix sanity tests

* fix xds_bootstrap_test

* clang-format

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-08-26 15:10:28 -07:00
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