Commit Graph

4176 Commits

Author SHA1 Message Date
AJ Heller ee7c0a8e4c
Reland: Make GetDefaultEventEngine return a shared_ptr (#30563)
* Reland: "Make GetDefaultEventEngine return a shared_ptr (#30280)"

This reverts commit 45959e7cc1.

* Attempted fix with NoDestruct

* Not a process-wide singleton for the type. Just a NonDestruct

* fix
2022-08-12 08:09:31 -07:00
AJ Heller 45959e7cc1
Revert "Make GetDefaultEventEngine return a shared_ptr (#30280)" (#30558)
This reverts commit 4df74f2b4c.
2022-08-10 18:28:30 -07:00
AJ Heller 4df74f2b4c
Make GetDefaultEventEngine return a shared_ptr (#30280)
This works around valgrind memory leaks by giving EventEngines a fixed
lifetime. We eventually want ref-counted EventEngines internally, so this is
a step in the right direction as well.
2022-08-10 11:32:09 -07:00
Vignesh Babu 0b1a8c984b
Revert "Modifying iomgr tcp code to use event engine EndpointConfig instead of channel_args (#30028)" (#30495)
This reverts commit 2c977a4d98.
2022-08-04 11:35:27 -07:00
Vignesh Babu 2c977a4d98
Modifying iomgr tcp code to use event engine EndpointConfig instead of channel_args (#30028)
* convert tcp code to use EndpointConfig and successfully compile

* regenerate projects

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

* fix minor build issues

* fix includes in tests

* fix some build and test issues

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

* minor fix

* add unreachable code check

* fix some windows build issues

* fix more build issues

* adding a grpc_tcp_generic_options struct to hold data extracted from EndpointConfig

* code formatting

* simplify

* fix sanity checks

* fix windows issues

* some posix fixes

* disabling copy constructor and copy assignment operator for endpoint config

* fix sanity checks

* fix syntax error

* fix weird formatting

* fix build issue

* fix review comments

* reverting un-necessary change

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

* remove unused headers and fix usage in endpoint_pair_windows.cc

* cleanup

* cleanup

* fix some initialization issues

* re-generate projects

* removing some files

* fix ifdef for windows

* fixing windows build issue due to improper header file include

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* review comments

* add comment

* review comments

* rename GetPointer to GetVoidPointer

* cleanup

* Automated change: Fix sanity tests

* removing EndpointConfig::Get method

* Automated change: Fix sanity tests

* minor fix

Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2022-08-03 13:41:48 -07:00
Craig Tiller f268659bf1
Revert "Revert "[filter-stack] Eliminate flags on initial metadata (#30444)" (#30475)" (#30476)
This reverts commit 4bc69cbe38.
2022-08-03 12:03:07 -07:00
Craig Tiller 4bc69cbe38
Revert "[filter-stack] Eliminate flags on initial metadata (#30444)" (#30475)
This reverts commit cd30b2dda1.
2022-08-02 22:07:54 -07:00
Craig Tiller cd30b2dda1
[filter-stack] Eliminate flags on initial metadata (#30444)
* [filterstack] Eliminate flags on initial metadata

Instead prefer to pass this data in non-encoded metadata.
Needed to fix MetadataMap::Copy to copy non-encoded metadata (not doing so was unintended).
Removed the flags from call_details because there's not been a use for them there for a very long time.

* Automated change: Fix sanity tests

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-02 20:22:35 -07:00
Craig Tiller 254bd7b6f6
[core] Remove GRPC_INITIAL_METADATA_CORKED flag (#30443)
This functionality is entirely implemented in the C++ bindings layer, and so does not need a flag passed down to core (which core already ignores silently).
2022-08-02 09:16:02 -07:00
Esun Kim b37996d50e
Removed GRPC_ERROR_IS_ABSEIL_STATUS (#30267)
* Removed GRPC_ERROR_IS_ABSEIL_STATUS

* Remove error_internal.h
2022-07-14 16:44:48 -07:00
AJ Heller 1076a7d447
Use AnyInvocable in EventEngine APIs (#30220) 2022-07-08 16:25:54 -07:00
AJ Heller 71c0eb090a
Revert "[WIP] Use AnyInvocable in EventEngine APIs (#30208)" (#30219)
This reverts commit dbbf16f07a.
2022-07-06 10:28:48 -07:00
AJ Heller dbbf16f07a
[WIP] Use AnyInvocable in EventEngine APIs (#30208)
This provides a move-only alternative to std::function.

fix oracle and engine factory

fix generate_projects for any_invocable

fix

format & iwyu

Automated change: Fix sanity tests (#30205)

Co-authored-by: drfloob <drfloob@users.noreply.github.com>

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-07-06 10:27:11 -07:00
Ming-Chuan 5202e873ff
BinderTransport: Support Intent URI (#30104)
This commit adds a new overloaded version of `CreateBinderChannel`, that accepts
an intent URI (which should be able to be parsed by
https://developer.android.com/reference/android/content/Intent#parseUri(java.lang.String,%20int) )
for specifying the component to connect to.

Later we will deprecate the old APIs that accepts `package_name`,
`class_name`, and `action_name` separately. Intent URI seems to be a
better and more flexible way to specify a component to connect to.

`grpc.binder.custom_android_intent_action_name` channel arg is deprecated now.
User should use URI to specify custom action instead.
2022-07-06 21:20:01 +08:00
AJ Heller b549e15488
Revert "Add std::shared_ptr support to ChannelArgs, and precondition ChannelArgs with a default EventEngine (#30128)" (#30170)
This reverts commit e28b70a533.
2022-07-01 12:13:39 -07:00
AJ Heller e28b70a533
Add std::shared_ptr support to ChannelArgs, and precondition ChannelArgs with a default EventEngine (#30128)
* [WIP] Precondition ChannelArgs with a default EventEngine

This is a step towards using ChannelArgs as the primary means of
accessing EventEngine instances in gRPC-core. If not explicitly provided
by the application, a default EventEngine will populated into
ChannelArgs during preconditioning.

This is not a final state, we may want to enable ref-counting here
instead of using raw pointers. And a refactoring is in order to enable
GetObject instead of the more verbose
GetPointer<EventEngine>(GRPC_ARG_EVENT_ENGINE).

* Refactor ChannelArgs::GetObject to support non-conforming classes

This allows us to not expose `ChannelArgName` in the public interface.

* Add std::shared_ptr to ChannelArgs; Add EventEngine specialization

* subchannel fix; cleanup

* replace GetSharedPtr with overloads of GetObjectRef

* Automated change: Fix sanity tests

* fix the fixer

* fix raw pointer retrieval from stored shared_ptr

* Make GetObjectRef<EventEngine> work (not general to shared_ptr)

* enable shared_ptr ChannelArg support for shared_from_this

* use new EventEngines for tests (not the default global)

* Automated change: Fix sanity tests

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-07-01 09:15:57 -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
Craig Tiller 8249bb97e2
[event_engine] Fix initialization (#30107)
* [event_engine] Fix initialization

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-24 13:37:49 -07:00
Hannah Shi 1394287517
Fix 'This function declaration is not a prototype' warning in Xcode (#29871) 2022-06-23 15:25:22 -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 d9f64437b0
[event_engine] Use durations for scheduling things (#30023)
* [event_engine] Use durations for scheduling things

* fix

* Automated change: Fix sanity tests

* run-after

* fix

* Automated change: Fix sanity tests

* rename

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-16 09:39:31 -07:00
Esun Kim 2d0d1775a9
Revert "Enable GRPC_ERROR_IS_ABSEIL_STATUS (#29869)" (#30031)
This reverts commit c6058b5e6b.
2022-06-15 21:41:55 -07:00
Esun Kim c6058b5e6b
Enable GRPC_ERROR_IS_ABSEIL_STATUS (#29869)
* Enable GRPC_ERROR_IS_ABSEIL_STATUS

* Sanitize

* Fix ServerRequestCallTest
2022-06-15 15:06:15 -07:00
Yash Tibrewal b9aec4def7
Status: Add comment about const ref parameters (#29973) 2022-06-13 15:31:03 -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
Vignesh Babu c6811f0fb7
Revert "Revert "EventEngine::RunAt - Subchannel connection retries"" (#29905)
* Revert "Revert "EventEngine::RunAt - Subchannel connection retries (#29744)" (#29899)"

This reverts commit d89d42d6a0.

* fix bugs

* add missing include

* fix formatting

* fix unused headers

* adding grpc_init/grpc_shutdown to subchannel ctor/dtor
2022-06-07 16:01:38 -07:00
Craig Tiller a5b08d7a77
[iwyu] Improve iwyu for public headers (#29834)
* [iwyu] Improve iwyu for public headers

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-06-07 10:31:15 -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
Vignesh Babu 25c76e7db6
Update asylo build config to include missing features (#29886) 2022-06-03 11:42:20 -07:00
Vignesh Babu d89d42d6a0
Revert "EventEngine::RunAt - Subchannel connection retries (#29744)" (#29899)
This reverts commit f38ef257d2.
2022-06-03 10:07:35 -07:00
Craig Tiller d53986657f
Revert "[transport] Remove ByteStream (#29637)" (#29890)
This reverts commit aacf0e252b.
2022-06-02 19:34:49 -07:00
AJ Heller f38ef257d2
EventEngine::RunAt - Subchannel connection retries (#29744)
* EventEngine::RunAt - Subchannel connection retries

* Fix refcounting on retry timer reset

* Automated change: Fix sanity tests

* fix autofixer's goof

* Squashed commit of the following:

commit d4aed9e615
Author: Craig Tiller <ctiller@google.com>
Date:   Fri May 20 12:58:47 2022 -0700

    Revert "[c++14] Remove Capture type (#29327)" (#29748)

    This reverts commit 944c0b2ce9.

commit 965feb5726
Author: apolcyn <apolcyn@google.com>
Date:   Fri May 20 12:45:33 2022 -0700

    xds: Remove aggregate and logical dns clusters env var guard (#29742)

    * Remove aggregate and logical dns clusters env var guard

commit d5c8bbce51
Author: Sergii Tkachenko <sergiitk@google.com>
Date:   Fri May 20 10:44:59 2022 -0700

    xds-k8s: Do not recommend enabling mesh certs by default (#29743)

    This should covered separately per this note:

    > For more details, and for the setup for security tests, see
    ["Setting up Traffic Director service security with proxyless gRPC"](https://cloud.google.com/traffic-director/docs/security-proxyless-setup)
     user guide.

commit 1df32ca680
Author: AJ Heller <hork@google.com>
Date:   Fri May 20 10:18:53 2022 -0700

    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.

commit 944c0b2ce9
Author: Craig Tiller <ctiller@google.com>
Date:   Fri May 20 09:56:23 2022 -0700

    [c++14] Remove Capture type (#29327)

    * Remove Capture type

    * Automated change: Fix sanity tests

    * update

    Co-authored-by: ctiller <ctiller@users.noreply.github.com>

commit fd744e081d
Author: Esun Kim <veblush@google.com>
Date:   Fri May 20 08:54:33 2022 -0700

    Removed manylinux2010 python artifacts (#29734)

    * Removed manylinux2010 python artifacts

    * Fix

    * Fix2

    * Added cp37 to presubmit test for distribtest relying on cp37 artifacts

commit 5051566b27
Author: Jan Tattermusch <jtattermusch@google.com>
Date:   Fri May 20 11:07:04 2022 +0200

    Enable remote cache for selected ObjC bazel tests. (#29731)

    * enable remote cache for ObjC bazel tests

    * add bazel RBE cache for mac ios bazel builds

* release lock before unreffing

* rm some manual WeakRef-counting

* comments

* verbiage

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
Co-authored-by: Vignesh Babu <vigneshbabu@google.com>
2022-06-02 16:12:12 -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
Mark D. Roth 65a7ce3f04
Revert "Revert "server: add method to expose authority seen by server (#29768)" (#29806)" (#29807)
This reverts commit e39e943529.
2022-05-31 14:15:45 -07:00
Mark D. Roth e39e943529
Revert "server: add method to expose authority seen by server (#29768)" (#29806)
This reverts commit 449adce98b.
2022-05-26 16:15:14 -07:00
Mark D. Roth 449adce98b
server: add method to expose authority seen by server (#29768)
* server: add method to expose authority seen by server

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-05-26 15:03:28 -07:00
Jérôme Duval 7251dd566d
Initial support for Haiku (#27793)
* Detect Haiku in core/lib/iomgr

* Detect Haiku in include/grpc/impl/codegen

* CMake: Haiku doesn't need additional libraries

* CMake: Haiku doesn't need additional libraries

* Sanitize: word wrap

Co-authored-by: AJ Heller <hork@google.com>
2022-05-23 16:40:26 -07:00
Thomas Klausner 06377249e3
Add NetBSD support (Community-supported) (#29542)
* Add NetBSD support

* Add NetBSD to platforms list as 'Community Supported'

* Add contact email for issues with the NetBSD port.
2022-05-23 13:41:52 -07:00
Nicolas Noble 667691c499
server: per-rpc backend metric reporting (#29621)
Users can now report per-rpc metrics from servers to clients.
2022-05-20 15:54:30 -07:00
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
Vignesh Babu 64c1e8a784
Fix undefined reference errors in asylo builds (#29733) 2022-05-19 11:27:23 -07:00
Craig Tiller 0f9d024fec
[iwyu] c++ (#29721)
* Revert "Revert "[iwyu] grpc++ (#29610)" (#29720)"

This reverts commit 0642bc213d.

* fixup status_code_enum import issue

* fix

* Automated change: Fix sanity tests

* import fixes

* fix import

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-05-19 07:34:48 -07:00
AJ Heller 93e6894485
Revert "Fix gRPC C++ init bug (#29689)" (#29701)
This reverts commit de613e3a9e.
2022-05-16 10:48:50 -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
Esun Kim de613e3a9e
Fix gRPC C++ init bug (#29689) 2022-05-14 13:56:08 -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
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