Commit Graph

772 Commits

Author SHA1 Message Date
AJ Heller 29dd271d44
[testing] Enable end2end experiments for Windows continuous integration jobs (#32567)
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-07-24 13:23:02 -07:00
Vignesh Babu f85b7c79ee
[experiments] Fix processing of platform specific test tags (#33749)
Also adds a unit test: experiments_tag_test which should fail if the
appropriate tags are not set for it.
2023-07-21 16:06:01 -07:00
Yijie Ma a7bf07e86a
[EventEngine] PosixEventEngine DNS Resolver (#32701)
This PR implements a c-ares based DNS resolver for EventEngine with the
reference from the original
[grpc_ares_wrapper.h](../blob/master/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h).
The PosixEventEngine DNSResolver is implemented on top of that. Tests
which use the client channel resolver API
([resolver.h](../blob/master/src/core/lib/resolver/resolver.h#L54)) are
ported, namely the
[resolver_component_test.cc](../blob/master/test/cpp/naming/resolver_component_test.cc)
and the
[cancel_ares_query_test.cc](../blob/master/test/cpp/naming/cancel_ares_query_test.cc).
The WindowsEventEngine DNSResolver will use the same EventEngine's
grpc_ares_wrapper and will be worked on next.

The
[resolve_address_test.cc](https://github.com/grpc/grpc/blob/master/test/core/iomgr/resolve_address_test.cc)
which uses the iomgr
[DNSResolver](../blob/master/src/core/lib/iomgr/resolve_address.h#L44)
API has been ported to EventEngine's dns_test.cc. That leaves only 2
tests which use iomgr's API, notably the
[dns_resolver_cooldown_test.cc](../blob/master/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc)
and the
[goaway_server_test.cc](../blob/master/test/core/end2end/goaway_server_test.cc)
which probably need to be restructured to use EventEngine DNSResolver
(for one thing they override the original grpc_ares_wrapper's free
functions). I will try to tackle these in the next step.
<!--

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-07-21 13:24:16 -07:00
Craig Tiller 801f106992
[promises] Add logging_test to promise_based_server_call testing (#33774) 2023-07-20 12:54:26 -07:00
Vignesh Babu 4198a37227
[experiments] Introduce a visibility class for experiments target (#33775) 2023-07-19 17:06:44 -07:00
AJ Heller 2c81c5619e
[deps] Remove libuv dependency (#33748) 2023-07-19 10:56:11 -07:00
AJ Heller 107e4dc0b6
[deps] Upgrade google/benchmark dependency (#33736)
Some command line arguments have changed, and the public docs no longer
describe how to use the 1-year-old version.
2023-07-17 15:45:57 -07:00
Yash Tibrewal d2f37b8b45
[OTel] Basic C++ OTel Stats Functionality (#33650)
Note that the plugin is still under `grpc::internal` namespace and not
under `experimental` intentionally.

<!--

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-07-17 09:30:47 -07:00
AJ Heller c81bdf7a83
[Protobuf] Upgrade third_party/protobuf to 23.4 (#33695)
This was done manually due to a problem with
`tools/distrib/python/make_grpcio_tools.py`. ~I fixed it in this PR
(depends on cl/547979185), so there is a fair chance this upgrade will
work normally for the next release.~ The fix may be problematic for
upgrading protobuf on older release branches, so the improvement will be
worked on separately. CC @jtattermusch

This also updates the UPB dep to the latest commit on the 23.x branch.
2023-07-14 12:04:40 -07:00
AJ Heller 5e3fe08f37
[BoringSSL] Update third_party/boringssl-with-bazel (#33690)
Change was created by the release automation script. See go/grpc-release
2023-07-13 15:38:12 -07:00
Craig Tiller d139c4a014
[metadata] Add an experiment to ensure a unique refcount on parsed slice strings (#33205)
The intuition here is that these strings may end up in the hpack table,
and then unnecessarily extend the lifetime of the read blocks.

Instead, take a copy of these short strings when we need to and allow
the incoming large memory object to be discarded.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-05 20:57:03 -07:00
Yash Tibrewal 98417f3bd0
Revert "Revert "[otel] Add bazel dependency"" (#33560)
Reverts grpc/grpc#33559
2023-06-27 12:28:47 -07:00
Mark D. Roth 017153a0c5
Revert "[otel] Add bazel dependency" (#33559)
Reverts grpc/grpc#33548
2023-06-27 10:34:45 -07:00
Yash Tibrewal 875b7fdcff
[otel] Add bazel dependency (#33548)
Add bazel dependency on opentelemetry-cpp.
<!--

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-06-27 00:47:01 -07:00
Eugene Ostroukhov 297db35a58
[third_party] update @envoy-api (#33539)
Updates to head, required to support xDS configuration for the
pick-first
2023-06-23 15:38:33 -07:00
Florian Ferstl fa32eb36b3
[bazel] Auto-generate .pyi files in py_proto_library rule (#32872)
With some delay, this is a PR for
https://github.com/grpc/grpc/issues/32564 (and previously
https://github.com/grpc/grpc/pull/31791).

I looked into adding a regular `py_test` for this change [as
suggested](https://github.com/grpc/grpc/pull/31791#issuecomment-1423245116)
but I am not aware of any effect that the presence of a .pyi stub file
would have at runtime and where some sort of type-checking in a .py
script would be affected. Stub files are only for use by type checkers &
IDE's. I mean, something like this would work:

```
import helloworld_pb2
py_file = helloworld_pb2.__file__ 
pyi_file = py_file + 'i’
self.assertTrue(os.path.exists(pyi_file))
```

But that seems really hacky to me. Instead I created a simple rule test
for `py_proto_library` with Bazel Skylib which tests the declared
outputs for an example `py_proto_library` target. Indirectly, this also
tests that the declared output files are actually generated. Please let
me know if this is sufficient.
2023-06-12 14:36:24 -07:00
apolcyn 017786f151
[c-ares] Upgrade c-ares dependency to 1.19.1 (#33392)
WIP
2023-06-12 13:38:20 -07:00
Craig Tiller a63849bd39
[ios] damage control (#33391)
~Something about the additional load from #33374 has caused some
entirely unrelated ios tests to fail sporadically. I'd prefer not to
roll back that however as it's discovered real bugs that had been
previously masked.~

These tests have been failing sporadically for some time.

We can track these on the daily flakiness reports, but whilst we
investigate let's just universally mark them as flaky so we don't
confuse folks trying to submit.
2023-06-09 12:37:34 -07:00
AJ Heller f974491065
[EventEngine] Return work stealing experiment to CI-only (#33389)
There is potential for a long shutdown process under load (seconds
instead of milliseconds).
2023-06-09 12:37:20 -07:00
Yousuk Seung c03cd744b2
[WRR] Prefer application_utilization to cpu_utilization (#33355)
<!--

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-06-07 17:38:29 -07:00
AJ Heller 28692fdcae
[EventEngine] Enable work stealing thread pool in debug builds (#33333) 2023-06-06 15:50:31 -07:00
Xuan Wang 629b7a14da
[python O11Y] Initial Implementation (#32974)
Testing Command: `bazel test --cache_test_results=no
--test_output=streamed --runs_per_test=1 --test_timeout=10
"//src/python/grpcio_tests/tests/observability:_observability_test"`

### TODO:
 * Better error handling.
2023-06-05 16:11:52 -07:00
Xuan Wang 0c6902e32e
[Bazel Python3.11] Update Bazel dependencies for Python 3.11 (#33318)
We just found out that our current Bazel setup does not support Python
3.11.

Thus PR updates some dependencies to allow using Bazel in Python 3.11.

Cython:
* Cython [backported Python 3.11 support change to
0.29x](https://github.com/cython/cython/issues/4500), but it appears
that the Cython version we are using in Bazel does not include the fix,
so we're using the latest stable version instead.

Gevent:
* The first version of gevent that supports [Python 3.11 is
22.08.0](https://github.com/gevent/gevent/issues/1903#issuecomment-1303227507).

#### Testing
* Tested locally using Python 3.11 virtual environment, was able to
reproduce the issue and verified that those changes were able to fix it.
2023-06-01 15:32:16 -07:00
Vignesh Babu 173d225150
[experiments] Add a grpc_generate_one_off_internal_targets hook in the BUILD file (#33307)
This allows us to define and insert internal only targets.
2023-06-01 10:23:00 -07:00
AJ Heller 3225a9f117
[EventEngine] Disable EventEngine polling in gRPC Python (#33279)
This is a hack to get around an issue on Apple devices caused by the
PosixEventEngine's `poll` poller not supporting fork. This PR disables
the EventEngine poller entirely in Python builds. It will therefore
prevent the release of the EventEngine generally, and prevent any
testing of EventEngine integration with gRPC Python, until the `poll`
poller is fixed.
2023-05-30 19:26:44 -07:00
Yijie Ma 10001d16a9
[Release] Upmerge v1.55.x branch into master (#33277)
Change was created by the release automation script. See go/grpc-release

<!--

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: Yash Tibrewal <yashkt@google.com>
Co-authored-by: Esun Kim <veblush@google.com>
Co-authored-by: Mark D. Roth <roth@google.com>
Co-authored-by: Yousuk Seung <ysseung@google.com>
Co-authored-by: Craig Tiller <ctiller@google.com>
Co-authored-by: Richard Belleville <rbellevi@google.com>
Co-authored-by: gnossen <gnossen@users.noreply.github.com>
2023-05-30 14:45:06 -07:00
Vignesh Babu d11a62e3d0
[experiments] Re-structure experiments codegen to make it more modular and re-usable (#33263) 2023-05-30 11:36:53 -07:00
Vignesh Babu 4d85f514cb
[experiments] Split experiments into two separate experiment definition and rollout definition files (#33228)
The PR does the following:

* Splits the single experiments.yaml file into two files:
experiments.yaml and rollouts.yaml.
* The experiments.yaml will now only include experiment definitions. The
default values of the experiments must now be specified in rollouts.yaml
* Removes the 'release' default value because it is not used.
* Adds an additional_constraints character string to ExperimentMetadata.
* Introduces a hook in src/core/lib/experiments/config.h to allow
registering arbitrary experiment constraint validation callbacks. These
callbacks would take an ExperimentMetadata object as input and return
the correct value to use for an experiment subject to additional
constraints.
2023-05-24 13:41:22 -07:00
Craig Tiller ad3c6273c6
[experiments] Remove flow_control_fixes experiment (#33230)
We defaulted this on 5 months ago, and it seems to be working... let's
remove the experiment bit!

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-05-24 10:20:26 -07:00
AJ Heller b225083b34
[test] Re-enable work stealing thread pool experiment (#33213)
I have not been able to reproduce the non-empty pool @ shutdown bug in
around 200k runs of various kinds. Now that experiments are marked flaky
by default, any similar failures should not block PR submission, and
this will give me good signal if the bugs reproduce more frequently in
the CI environment.

I have a fix in theory, but I don't think it should be necessary. If the
bug reproduces, I'll try the fix.
2023-05-22 16:46:38 -07:00
Esun Kim a3dae00f89
[Deps] Upgrade Protobuf to v23.1 (#33164)
Along with the required Abseil & upb upgrade.
2023-05-18 14:46:59 -07:00
Craig Tiller 0526a51734
[channel-args] Reland UnionWith optimizations (#33163)
Same as yesterday, with a fix in
695e2e24ba.
2023-05-17 17:23:58 -07:00
Yijie Ma 004ddbea90
[BoringSSL] Update third_party/boringssl-with-bazel (#33150)
Change was created by the release automation script. See go/grpc-release
2023-05-17 09:20:54 -07:00
Craig Tiller 6a742f0c2e
Revert "[channel_args] Optimize UnionWith" (#33159)
Reverts grpc/grpc#33154

breaks import
2023-05-17 09:20:33 -07:00
Craig Tiller cc3d034948
[channel_args] Optimize UnionWith (#33154)
<!--

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-05-16 19:55:55 -07:00
AJ Heller b35ea15265
[reland][fuzzing] Client channel resolver fuzzer (#33153)
This reverts commit 1624542ea4, relanding
https://github.com/grpc/grpc/pull/32956

Because of some proto dependency and build problems internally, I've
removed the ServiceConfig proto fuzzing component. These build issues
can hopefully be resolved soon, and then we can re-add the deleted
implementation from commit
[b078c9c](b078c9c015)
in this PR.
2023-05-16 17:32:29 -07:00
AJ Heller 1624542ea4
Revert "[fuzzing] Client channel resolver fuzzer" (#33152)
Reverts grpc/grpc#32956. Requires a cherrypick.
2023-05-16 13:00:06 -07:00
AJ Heller 030ecf60ec
[fuzzing] Client channel resolver fuzzer (#32956)
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-05-16 11:25:06 -07:00
Craig Tiller 8a8f1eba4b
[promises] Enable server promise calls in C++ e2e tests (#33097)
#thistimeforsure

a863532c62 adds some debug to help track
which batches get leaked by a transport
3203e75ec5 makes connected_channel respect
the high level intent of cancellation better (and fixes the last reason
we needed to turn these tests off)
aaf5fa036b re-enables testing of c++ e2e
tests with server based promise calls

<!--

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-05-15 15:01:21 -07:00
Craig Tiller a1e72482e4
[experiments] Assume enabling experiments is flaky (#33116)
This will change behavior for tests that have experiments enabled on
them to always have the flaky bit on.

In doing so, we'll get the usual failure reporting we do in the internal
chat bot, but allow PRs to pass even if an experiment isn't 100% passing
yet - reducing friction slightly for landing bigger experiments.

<!--

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-05-15 13:20:18 -07:00
Vignesh Babu b8a6b4267d
Revert "[test] Disable end2end tests for the EventEngine listener experiment" (#33100)
Reverts grpc/grpc#32968
2023-05-14 12:28:03 -07:00
AJ Heller 7b74b07885
[experiment] Disable work stealing end2end test experiments (#33081)
A known bug is being worked on. This will temporarily reduce flaky test
noise.
2023-05-11 16:46:15 +00:00
Esun Kim dc95133140
[Deps] Upgrade Protobuf v23 (#32914)
Upgrading Protobuf and Upb to v23.0
2023-05-09 12:24:21 -07:00
AJ Heller 3fb738b9b1
[EventEngine] Implement work-stealing in the EventEngine ThreadPool (#32869)
This PR implements a work-stealing thread pool for use inside
EventEngine implementations. Because of historical risks here, I've
guarded the new implementation behind an experiment flag:
`GRPC_EXPERIMENTS=work_stealing`. Current default behavior is the
original thread pool implementation.

Benchmarks look very promising:

```
bazel test \
--test_timeout=300 \
--config=opt -c opt \
--test_output=streamed \
--test_arg='--benchmark_format=csv' \
--test_arg='--benchmark_min_time=0.15' \
--test_arg='--benchmark_filter=_FanOut' \
--test_arg='--benchmark_repetitions=15' \
--test_arg='--benchmark_report_aggregates_only=true' \
test/cpp/microbenchmarks:bm_thread_pool
```

2023-05-04: `bm_thread_pool` benchmark results on my local machine (64
core ThreadRipper PRO 3995WX, 256GB memory), comparing this PR to
master:


![image](https://user-images.githubusercontent.com/295906/236315252-35ed237e-7626-486c-acfa-71a36f783d22.png)

2023-05-04: `bm_thread_pool` benchmark results in the Linux RBE
environment (unsure of machine configuration, likely small), comparing
this PR to master.


![image](https://user-images.githubusercontent.com/295906/236317164-2c5acbeb-fdac-4737-9b2d-4df9c41cb825.png)

---------

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-05-08 13:38:23 -07:00
Craig Tiller 0e7cc360eb
[promises] Disable C++ e2e tests with server_promise_based_call for now (#33008)
<!--

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-05-04 18:21:12 +00:00
Craig Tiller ad41fe96b6
[promises] Re-enable C++ end2end tests (with fixes) (#32837)
Makes some awkward fixes to compression filter, call, connected channel
to hold the semantics we have upheld now in tests.

Once the fixes described here
https://github.com/grpc/grpc/blob/master/src/core/lib/channel/connected_channel.cc#L636
are in this gets a lot less ad-hoc, but that's likely going to be
post-landing promises client & server side.

We specifically need special handling for server side cancellation in
response to reads wrt the inproc transport - which doesn't track
cancellation thoroughly enough itself.

<!--

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-05-03 20:03:16 -07:00
Yousuk Seung 8b02295e58
[xDS] Accept cpu_utilization over 100% (#32954)
<!--

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-05-02 03:25:17 +00:00
AJ Heller e5725e4730
[test] Disable end2end tests for the EventEngine listener experiment (#32968)
Sanitizer issues found

MSAN:
https://source.cloud.google.com/results/invocations/f1667575-9397-41e9-ae8f-8560ddac9187/targets/%2F%2Ftest%2Fcore%2Fend2end:core_end2end_tests@poller%3Dpoll@experiment%3Devent_engine_listener/log

ASAN:
https://source.cloud.google.com/results/invocations/651d71a5-0676-4f0d-a109-531abe5d218e/targets/%2F%2Ftest%2Fcore%2Fend2end:core_end2end_tests@poller%3Depoll1@experiment%3Devent_engine_listener/log
2023-04-28 11:20:57 -07:00
AJ Heller a9afd1cde8
[test] Re-land: Enable EventEngine experiments for Posix end2end tests (#32948)
Relands #32844.

End2end tests will now wait for the default EventEngine to shut down
between tests. This should avoid some use-after-frees and leaks.
2023-04-27 09:50:40 -07:00
Esun Kim da5dbc068d
[Deps] Updated com_google_libprotobuf_mutator (#32937)
To get https://github.com/google/libprotobuf-mutator/pull/219 which is
required by Protobuf v23.
2023-04-25 19:06:54 -07:00