Commit Graph

1523 Commits

Author SHA1 Message Date
Jan Tattermusch 0f1afec5a8
[protobuf] Upgrade third_party/protobuf to 22.x (#32606)
The very non-trivial upgrade of third_party/protobuf to 22.x
This PR strives to be as small as possible and many changes that were
compatible with protobuf 21.x and didn't have to be merged atomically
with the upgrade were already merged.
Due to the complexity of the upgrade, this PR wasn't created
automatically by a tool, but manually. Subsequent upgraded of
third_party/protobuf with our OSS release script should work again once
this change is merged.

This is best reviewed commit-by-commit, I tried to group changes in
logical areas.

Notable changes:
- the upgrade of third_party/protobuf submodule, the bazel protobuf
dependency itself
- upgrade of UPB dependency to 22.x (in the past, we used to always
upgrade upb to "main", but upb now has release branch as well). UPB
needs to be upgraded atomically with protobuf since there's a de-facto
circular dependency (new protobuf depends on new upb, which depends on
new protobuf for codegen).
- some protobuf and upb bazel rules are now aliases, so `
extract_metadata_from_bazel_xml.py` and `gen_upb_api_from_bazel_xml.py`
had to be modified to be able to follow aliases and reach the actual
aliased targets.
- some protobuf public headers were renamed, so especially
`src/compiler` needed to be updated to use the new headers.
- protobuf and upb now both depend on utf8_range project, so since we
bundle upb with grpc in some languages, we now have to bundle utf8_range
as well (hence changes in build for python, PHP, objC, cmake etc).
- protoc now depends on absl and utf8_range (previously protobuf had
absl dependency, but not for the codegen part), so python's
make_grpcio_tools.py required partial rewrite to be able to handle those
dependencies in the grpcio_tools build.
- many updates and fixes required for C++ distribtests (currently they
all pass, but we'll probably need to follow up, make protobuf's and
grpc's handling of dependencies more aligned and revisit the
distribtests)
- bunch of other changes mostly due to overhaul of protobuf's and upb's
internal build layout.

TODOs:
- [DONE] make sure IWYU and clang_tidy_code pass
- create a list of followups (e.g. work to reenable the few tests I had
to disable and to remove workaround I had to use)
- [DONE in cl/523706129] figure out problem(s) with internal import

---------

Co-authored-by: Craig Tiller <ctiller@google.com>
2023-04-12 18:43:58 +02:00
Craig Tiller 7fae3dec0c
[metadata] Move hooks into grpc_base, separate build some (#32781)
When using this internally, we noticed that it's impossible to use
custom_metadata.h without creating a dependency cycle between
:custom_metadata and :grpc_base.

A full build refactoring is too large right now, so merge that header
into :grpc_base for the time being.

Also, separate `SimpleSliceBasedMetadata` into its own file, so that it
can be reused in custom_metadata.h.




<!--

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-04-03 16:18:28 -07:00
Craig Tiller b5a2e90fbf
Revert "[EventEngine] Implement the EventEngine-driven client channel resolver." (#32768)
Reverts grpc/grpc#32632

Needs to be rolled back for #32767 to land
2023-03-31 21:31:27 -07:00
AJ Heller 7dec55de5a
[EventEngine] Implement the EventEngine-driven client channel resolver. (#32632)
This PR also centralizes the client channel resolver selection. Resolver
selection is still done using the plugin system, but when the Ares and
native client channel resolvers go away, we can consider bootstrapping
this differently.
2023-03-31 13:52:06 -07:00
Mark D. Roth 36d2716d52
[JSON] move Parse() and Dump() methods out of JSON object (#32742)
More prep for making this a public API.
2023-03-30 13:30:54 -07:00
Stanley Cheung ec1d75bb0a
[Release process] Bump version to 1.55.0-dev (on master branch) (#32743)
Change was created by the release automation script. See
go/grpc-release.
2023-03-29 11:03:07 -07:00
Craig Tiller 7e341a545a
[metadata] Add a hook point for custom metadata (#32650)
Aim here is to allow adding custom metadata types to the internal build.
<!--

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-27 19:43:07 -07:00
Craig Tiller 175ccc3a90
Reland global config changes (#32661)
<!--

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-27 18:55:24 -07:00
Alisha Nanda 19d06a78ec
Add random early rejection for metadata (#32600)
(hopefully last try)

Add new channel arg GRPC_ARG_ABSOLUTE_MAX_METADATA_SIZE as hard limit
for metadata. Change GRPC_ARG_MAX_METADATA_SIZE to be a soft limit.
Behavior is as follows:

Hard limit
(1) if hard limit is explicitly set, this will be used.
(2) if hard limit is not explicitly set, maximum of default and soft
limit * 1.25 (if soft limit is set) will be used.

Soft limit
(1) if soft limit is explicitly set, this will be used.
(2) if soft limit is not explicitly set, maximum of default and hard
limit * 0.8 (if hard limit is set) will be used.

Requests between soft and hard limit will be rejected randomly, requests
above hard limit will be rejected.
2023-03-27 14:13:20 -07:00
Craig Tiller 8d2f70d53c
Reland "[promises] Convert call to a party" (#32651)" (#32653)
<!--

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-27 14:02:36 -07:00
AJ Heller 85f7aa3468
[EventEngine] Windows Listener iomgr shims (#32541)
Exercised with the `//test/core/end2end:h2_full_test@*` set of tests,
using the `event_engine_listener` experiment.
2023-03-21 13:58:26 -07:00
Jan Tattermusch 0c1797cd9f
Revert "[config] Move global config alongside core configuration" (#32659)
Reverts grpc/grpc#30788

(it breaks grpc_objc_bazel_test (see
https://github.com/grpc/grpc/pull/30788#issuecomment-1476372187) and
also seems to be breaking some other internal stuff).
2023-03-20 08:22:29 -07:00
Craig Tiller b7a83305e6
[config] Move global config alongside core configuration (#30788)
This is a big rewrite of global config.

It does a few things, all somewhat intertwined:
1. centralize the list of configuration we have to a yaml file that can
be parsed, and code generated from it
2. add an initialization and a reset stage so that config vars can be
centrally accessed very quickly without the need for caching them
3. makes the syntax more C++ like (less macros!)
4. (optionally) adds absl flags to the OSS build

This first round of changes is intended to keep the system where it is
without major changes. We pick up absl flags to match internal code and
remove one point of deviation - but importantly continue to read from
the environment variables. In doing so we don't force absl flags on our
customers - it's possible to configure grpc without the flags - but
instead allow users that do use absl flags to configure grpc using that
mechanism. Importantly this lets internal customers configure grpc the
same everywhere.

Future changes along this path will be two-fold:
1. Move documentation generation into the code generation step, so that
within the source of truth yaml file we can find all documentation and
data about a configuration knob - eliminating the chance of forgetting
to document something in all the right places.
2. Provide fuzzing over configurations. Currently most config variables
get stashed in static constants across the codebase. To fuzz over these
we'd need a way to reset those cached values between fuzzing rounds,
something that is terrifically difficult right now, but with these
changes should simply be a reset on `ConfigVars`.

<!--

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-17 16:56:45 -07:00
Yash Tibrewal 29ce6463d1
Revert "[promises] Convert call to a party" (#32651)
Reverts grpc/grpc#32359
2023-03-17 12:36:19 -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
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
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
Mark D. Roth 3faeb3af80
client channel: create a header file for internal interfaces (#32423)
This is just a bit of a code reorganization, no functional changes.
2023-02-21 13:12:29 -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
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
AJ Heller a163b983d8
[EventEngine] Remove SocketNotifier interface (#32277)
* [EventEngine] Remove SocketNotifier interface

* Automated change: Fix sanity tests

---------

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-02-03 09:18:16 -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
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
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
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
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
Vignesh Babu 5680a9b57b
Move posix event engine to new interface defined in #31816 (#31890)
* 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

* format

* update

* update

* update

* fix sanity

* regenerate projects

* update

* iwyu

* fix

* fix

* update

* fix sanity

* review comments
2023-01-12 09:41:55 -08:00
Eugene Ostroukhov 73fa138432
xds_override_host LB: move XdsOverrideHostLbConfig to `internal` namespace (#32061) 2023-01-11 10:29:38 -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
AJ Heller 2c4d55b3a1
Revert "Revert "Revert "WindowsEventEngine Client implementation (#31848)" (#… (#31974)" (#32018)
This reverts commit aa83319695.
2023-01-04 11:09:56 -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