Craig Tiller
67d6b8ea74
[promise] Context improvements ( #35592 )
...
A few improvements to the promise context system (more coming)
Allow subclassed contexts:
If we have multiple different kinds of a base context, allow `GetContext<Derived>()` to mean `down_cast<Derived*>(GetContext<Base>())` everywhere for brevity.
Allow custom context lookup:
For a base context type, allow customization of how that context is looked up.
These two together allow:
1. normalization of activity lookup and context lookup to the same syntax (so we can write `GetContext<Activity>()` everywhere now
2. Party & Activity to share a context, so that anywhere we need to do a party specific operation we can write `GetContext<Party>()->...` and safely know that it's the current activity *and* it's a party.
Closes #35592
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35592 from ctiller:contextual-types 37ef948a36
PiperOrigin-RevId: 599651708
11 months ago
Yijie Ma
bae0c705aa
[Deps] Update to Clang-16 ( #34492 )
...
<!--
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.
-->
1 year ago
Craig Tiller
0d7b34451a
[promises] Make Poll<T> its own type, not a variant<> ( #32515 )
...
Avoids some compilation problems on older MSVC's, opens the door for
some future optimizations.
---------
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
0ecc18ef0f
[promises] Party: an activity with many participant promises ( #32308 )
...
<!--
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>
2 years ago
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>
2 years ago
Craig Tiller
dbfb888e1f
Revert "[promises] Server call ( #31448 )" ( #32260 )
...
* Revert "[promises] Server call (#31448 )"
This reverts commit bbeb15006a
.
* clang-fmt
2 years ago
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>
2 years ago
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>
2 years ago
Craig Tiller
3db2a71dbf
[fixit] Scale down large tests ( #30675 )
...
We have many tests that create 100 threads or more, and mounting evidence that
this is harmful to our CI environment.
When the original code for many of these tests was written we ran our tests
under run_tests, which had explicit handling for tracking the number of threads
each test needed and making sure that we weren't over subscribing the test
runner. Bazel has no such facility (and the facility in run_tests has since
been removed) and so we need to adjust.
This PR adjusts down a single test and is part of a series so that we can
review and roll back easily if required.
2 years ago
Craig Tiller
81ce6aaa5a
[fixit] Make activity_test lighter weight ( #30575 )
...
* [activity] Make test lighter weight
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
8d37f43bfd
[promises] Add AtomicWaker type ( #30561 )
...
* [promises] Add AtomicWaker type
* Automated change: Fix sanity tests
* review feedback
* fix
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
e2ebebadfc
[iwyu] Add test/core/promise ( #29994 )
...
* [iwyu] Add test/core/promise
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
Yash Tibrewal
f28695351e
Prevent direct usage of absl::Mutex ( #29424 )
...
* Add script to prevent absl::Mutex occurrences
* sanity and fixes
* shellcheck
3 years ago
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>
3 years ago
Craig Tiller
0f73576b17
Revert "Revert "Revert "Convert client_auth_filter to promises ( #28767 )" ( #28951 )" ( #28952 )" ( #28967 )
...
This reverts commit 235098de22
.
3 years ago
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
3 years ago
Craig Tiller
5bfe38f10f
Revert "Convert client_auth_filter to promises ( #28767 )" ( #28951 )
...
This reverts commit cadce47ebf
.
3 years ago
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>
3 years ago
Craig Tiller
65644a7bb6
Make a suite of wakeup schedulers for tests ( #27459 )
...
* Make a suite of wakeup schedulers for tests
* add missing file
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
Craig Tiller
a419687f1b
Activities wakeup logic tweak ( #27453 )
...
* wakeup tweak
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
Craig Tiller
4d7ad5271a
Handle cancellation inside polling an activity ( #27369 )
...
* allow cancellation during run
* add a test
* review feedback
3 years ago
Craig Tiller
c6a20601dc
Activities: Don't execute inline ( #27341 )
...
* Activities: Don't execute inline
* fix test
3 years ago
Craig Tiller
ac9e52181b
Activities: Add force wakeup API ( #27336 )
...
* Activities: Add force wakeup API
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
Craig Tiller
29948df4ba
Activities: allow empty wakers ( #27335 )
3 years ago
Craig Tiller
ea389c00c2
Adjust include order per style guide ( #27175 )
...
Introduce clang-format configuration to sort includes closer to our rules.
3 years ago
Craig Tiller
5cdaec9a4f
Promise Activities ( #26921 )
...
* promise sequences
* Activities for promises
* Automated change: Fix sanity tests
* review feedback
* review feedback
* review feedback
* review feedback
* review feedback
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago