Richard Belleville
6d2c4a8314
Revert "XdsClient: add unit test and fix watcher notification bugs ( #30823 )" ( #30942 )
...
This reverts commit bcd8c991e6
.
2 years ago
Vignesh Babu
d7cce32449
Forking tcp socket utils for posix event engine endpoints ( #30383 )
...
* 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
* start
* regenerate-projects
* delete some files
* 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
* cleanup
* fix
* minor fix
* fix
* update
* fix BUILD
* update
* fix sanity
* minor additions to configure global tcp user timeout values
* fix build syntax
* fix build error
* Add more unit tests
* fix msan issue
* add comment
* adding rcv lowat helper to socket wrapper
* fix sanity
* sanity
* iwyu sanity
* fix macos issue
Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2 years ago
Mark D. Roth
bcd8c991e6
XdsClient: add unit test and fix watcher notification bugs ( #30823 )
...
This adds a unit test for XdsClient and fixes several watcher-notification bugs found in the process. Specifically:
- When an ADS stream fails or an xDS channel reports a connectivity failure, report an error only to the watchers for resources being subscribed to on that particular channel, not to watchers on other channels.
- Cache the error status for the channel, so that if a new watcher is started after the channel reports the error, we can immediately report that error to the new watcher.
- If a resource is NACKed and has not been previously cached, or does not exist, report that fact to any new watcher that may be started later.
- If a resource in an ADS response is unparseable but is wrapped in a `Resource` wrapper, we do know its name, so record the validation failure in the cache and report it to the watchers.
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago
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>
2 years ago
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>
2 years ago
Craig Tiller
2b46cb40d3
[config] Move certificate provider registry into core config ( #30890 )
...
* [config] Move certificate provider registry into core config
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
AJ Heller
bf1856d2cc
A modest split of `:gpr` for mpscq support ( #30798 )
...
* A modest split of `:gpr` for mpscq support
A full split of the `gpr` target into 25 separate targets is building,
but there are some hurdles to get over with respect to ODR violations
and public API support for the gpr library.
This PR splits off a small chunk of that work.
* Automated change: Fix sanity tests
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2 years ago
Cheng-Yu Chung
3b728d78f1
Build target reorganization Part 3 ( #30797 )
...
* Clean up `grpc++_base` and `grpc++_base_unsecure`
* Clean up `grpc++`
* Clean up `grpc++_unsecure`
* Fix issues in cherry picking
2 years ago
Craig Tiller
ec27e98adc
[fork] Move init to once-only, remove shutdown ( #30839 )
...
* [fork] Move init to once-only, remove shutdown
* fix build
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
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>
2 years ago
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>
2 years ago
Craig Tiller
47a43d68c9
[chttp2] Tune initial window size/max frame size setting ( #30550 )
...
* [chttp2] Tune initial window size/max frame size setting
- Only choose frame sizes and initial window sizes that are powers of two - as a more predictable function to avoid flapping.
- If window size drops below 1kb then snap to 0 to avoid frantically changing a value that needn't be
- Allow the initial window size to drop to zero (we have fuzzing in place that says this is safe)
* copy/paste fix
* fix build
* fix
* Automated change: Fix sanity tests
* fix announce bug
* cleanup
* put this change under an experiment
* more tests
* fix build
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
e705b2e3c7
[resource_quota] Move experiments to the experiments framework ( #30830 )
...
* fix
* fix tests
* fix
* Automated change: Fix sanity tests
* better expansion
* bleh
* fix
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Michael Nosthoff
3353d61c5a
cmake: fix cross-compilation with gRPC_BUILD_GRPC_CPP_PLUGIN=OFF ( #30378 )
...
commit 99752b173c
reintroduced the cross-compilation issue which was fixed by da10b795e1
2 years ago
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>
2 years ago
Mark D. Roth
bf9304ef17
client_channel, client_auth: rewrite disallowed status codes from the control plane ( #30789 )
...
* client_channel: rewrite illegal status codes from control plane
* rewrite illegal status codes for call creds
* move fail_lb policy out of retry_lb_fail test so it can be reused
* test resolver and LB policy status rewrites
* add test for ConfigSelector status rewriting
* attempt to add client_auth filter unit test
* fix client_auth_filter test
* cleanup test
* fix build
* fix some memory leaks
* Automated change: Fix sanity tests
* Update client_auth_filter_test.cc
* fix build
* code review comments
* clang-tidy
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
Co-authored-by: Craig Tiller <ctiller@google.com>
2 years ago
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>
2 years ago
Cheng-Yu Chung
779419505f
Replace `absl::exchange()` with `std::exchange()` ( #30802 )
...
* Replace `absl::exchange()` with `std::exchange()`
* Update `core_banned_functions.py`
2 years ago
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>
2 years ago
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
2 years ago
Cheng-Yu Chung
0c46726229
Build Target Reorganization Part 2 ( #30570 )
...
* Clean up grpc_base
* Clean up grpc
* Clean up grpc_insecure
2 years ago
AJ Heller
dffc20df69
Add tests for TimerManager ( #30758 )
...
* Add tests for TimerManager
* Automated change: Fix sanity tests
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2 years ago
Craig Tiller
18da150733
[metadata] Reduce size by packing ( #30474 )
...
* [metadata] Reduce size by packing
* fix
* comment
* Automated change: Fix sanity tests
* Automated change: Fix sanity tests
* windows workaround?
* Revert "fix"
This reverts commit 925211164b
.
* iterate encodables correctly
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
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>
2 years ago
Mark D. Roth
03b6b01043
ConnectionAttemptInjector: fix tsan failures ( #30730 )
2 years ago
apolcyn
778f04dccf
Bump version on master branch to 1.50.0.dev ( #30614 )
...
* bump version to 1.50.0-dev
* regenerate projects
2 years ago
Ming-Chuan
24385b1982
Disable end2end_binder_transport_test on some platforms ( #30602 )
...
* Disable end2end_binder_transport_test on some platforms
The following test case is flaky on windows
End2EndBinderTransportTestWithDifferentDelayTimes/End2EndBinderTransportTest.UnaryCallServerTimeout/1,
where GetParam() = 10ns
Binder transport won't be run on platform other than Android so it
should be OK to disable the test on some platform.
* Regenerate projects.
2 years ago
apolcyn
0344ce4a3a
Bump core version ( #30588 )
...
* bump C-core version
* regenerate projects
2 years ago
AJ Heller
d025c1732f
Revert "Reland: Make GetDefaultEventEngine return a shared_ptr ( #30563 )" ( #30573 )
...
This reverts commit ee7c0a8e4c
.
2 years ago
Vignesh Babu
009dadbb74
Fork iomgr traced buffer list implementation for posix event engine ( #30539 )
...
* Forking iomgr internal_errqueue defines for posix event engine
* fix BUILD file
* start
* update
* sanity
* regenerate_projects
* Automated change: Fix sanity tests
* review comments
* review comments
* Automated change: Fix sanity tests
* fix BUILD
* add no_windows tag
* minor typo
* typo
* review comments
* regenerate projects
* fix BUILD issue
* iwyu fixes
Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2 years ago
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
2 years ago
Cheng-Yu Chung
543b290203
Build Target Reorganization Part 1 ( #30518 )
...
* Clean up gpr_base
* Remove `avoid_dep` for target `gpr`
* Add alias `gpr_base` for `gpr` for compatibility
* Fix tool error
* Update
* Remove temporary `gpr_base`
* Remove unused `alt_gpr_base_legacy`
2 years ago
AJ Heller
45959e7cc1
Revert "Make GetDefaultEventEngine return a shared_ptr ( #30280 )" ( #30558 )
...
This reverts commit 4df74f2b4c
.
2 years ago
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.
2 years ago
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.
2 years ago
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
2 years ago
Craig Tiller
2cb58b9565
[build] Auto-deps for test/core/resource_quota ( #30430 )
...
* [build] Auto-deps for test/core/resource_quota
* fix
* fix
* Automated change: Fix sanity tests
* fixes
* Automated change: Fix sanity tests
* fix
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
4ec5d9eb55
[resource_quota] Custom controller ( #30457 )
...
* [resource_quota] Custom controller
Instead of a PID controller use a custom binary-search inspired controller that will eventually converge to a good control value.
Experiments have shown this able to successfully hold a 95% memory pressure, optimizing for performance most of the time, and gracefully restricting memory usage under severe pressure.
There will be further changes after this one to use the new control value in various systems.
* Automated change: Fix sanity tests
* Update memory_quota.cc
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
15a81131a8
[c++] Add a non-destructed type ( #30491 )
...
* [c++] Add a non-destructed type
* Automated change: Fix sanity tests
* Automated change: Fix sanity tests
* comment
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
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>
2 years ago
AJ Heller
c752a6b25e
Reland: Windows IOCP implementation for the WindowsEventEngine ( #30480 )
...
Reverts #30466 , relanding #30389 . Requires a cherrypick.
2 years ago
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>
2 years ago
AJ Heller
9d4e0e17fe
Revert "Windows IOCP implementation for the WindowsEventEngine ( #30389 )" ( #30466 )
...
This reverts commit 52402afdd4
.
2 years ago
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.
2 years ago
AJ Heller
e18d335b0e
Add common EventEngine Closure types ( #30438 )
...
* Add common EventEngine Closure types
These have been written a few times, so let's standardize on a spot for
them.
* sanitize
* format
2 years ago
Craig Tiller
91bcb11c66
[build] Auto-deps for test/core/end2end ( #30409 )
...
* [build] Auto-deps for test/core/end2end
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
05e6bf2e4a
[build] Add test/core/util, test/core/event_engine to auto build deps ( #30364 )
...
* [build] Add test/core/util, test/core/event_engine to auto build deps
* deal with suppressions
* fix suppressions
* Automated change: Fix sanity tests
* fix
* fix
* fix
* fix
* progress
* Automated change: Fix sanity tests
* fix
* fix
* fix
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Esun Kim
7360d2ea82
gtestify test/core/iomgr: partial reland ( #30373 )
...
* Revert "Revert "gtestify test/core/iomgr (#30209 )" (#30362 )"
This reverts commit c7c0ba6f32
.
* -_-
* Regen
2 years ago
Vignesh Babu
5171aa70da
Forking the posix poll based poller for iomgr event engine ( #30230 )
...
* start
* Forking the posix epoll1 poller for event engine
* re-generate projects
* fix test
* fix sanity checks
* fix
* update fix
* more build issue fixes
* even more fixes
* add no_windows tag
* re-generate projects
* update comment
* cleanup
* Automated change: Fix sanity tests
* review comments
* fix tsan issue
* re-generate projects
* cleanup
* fix missing build dep
* fix mac build issue
* forking poll based poller for iomgr event engine
* minor fix in test
* update test to run both pollers
* re-generate projects
* simplifying build graph
* re-generate projects
* cleanup
* fix macOS build issues
* review comments
* re-generate projects
* add missing generated file
* review comments
* fix sanity checks
* rename one more build target
* fix build-dep issues
* fix sanity checks
* retry fix sanity checks
* format
* review comments
* fix
* fix
* review comments
* fix sanity checks
* max build and run issues
* fix review comments
* Automated change: Fix sanity tests
Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2 years ago
Craig Tiller
93fbacb534
[resource_quota] Flow control experiment ( #30310 )
...
* ideation
* fix periodic update behavior around initialization
* fix
* finish it up
* finish it up
* fix
* fix
* fix
* Update BUILD
* Automated change: Fix sanity tests
* tweak
* Automated change: Fix sanity tests
* pid after all
* fix
* tweak
* Automated change: Fix sanity tests
* fix
* fix
* comment
* fix
* comment
* better comment
* make set point configurable
* fix test
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago