Commit Graph

13528 Commits

Author SHA1 Message Date
Craig Tiller 1bfcca66fe
Revert "[testing] Adjust port selection algorithm on RBE" (#33448)
Reverts grpc/grpc#33429
2023-06-14 14:51:23 -07:00
Mark D. Roth 76919dc699
[xDS] require EDS resource name in CDS resources with xdstp names (#33425)
Implements the change described in
https://github.com/grpc/proposal/pull/377.
2023-06-14 13:53:16 -07:00
Eugene Ostroukhov 6451beba8e
Revert "Revert "Revert "Revert "[xDS LB] Override cluster with value … (#33424)
Previous attempt: #33416

This reverts commit 19460ea82f.
2023-06-14 13:42:59 -07:00
Craig Tiller 2055cce132
[fuzzing] Fix bug on endpoint shutdown whereby we leave read requests dangling (#33406)
Fix fuzzer found bug b/286716972

Follows up on https://github.com/grpc/grpc/pull/33266 but gets the edge
case right of when there's a read queued before the peer closes - in
that case we weren't waking up the read.
2023-06-14 12:22:44 -07:00
Craig Tiller 969c228934
[testing] Adjust port selection algorithm on RBE (#33429)
I've got a hypothesis that we're losing isolation between test shards
right now for "some reason".

This is a change to reflect test sharding in the port distribution that
we use, in an attempt to alleviate that.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-14 12:21:59 -07:00
Mark D. Roth f34a39af74
[xDS e2e tests] add 1K RPCs to try to work around statistical problem (#33409) 2023-06-14 10:58:15 -07:00
Craig Tiller 51a6857fa1
[end2end] Shard some longer running tests a little more to reduce timeout risk (#33439)
<!--

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-14 09:05:04 -07:00
Craig Tiller 80dbe90c18
Revert "[resource quota] Fix bugs in iomgr and event engine endpoint interactions with resource quota" (#33417)
Reverts grpc/grpc#33375

Breaks import
2023-06-13 08:11:53 -07:00
Craig Tiller 7e6606f5a6
[windows] Add a check for too long path names (#33418)
We should probably cap this so that our customers have a chance of
cloning the repository.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-13 07:41:06 -07:00
Craig Tiller 19460ea82f
Revert "Revert "Revert "[xDS LB] Override cluster with value from cookie"" (#33379)" (#33416)
Reverts grpc/grpc#33388

Breaks import
2023-06-13 07:23:46 -07:00
Vignesh Babu e6c1b13aed
[resource quota] Fix bugs in iomgr and event engine endpoint interactions with resource quota (#33375)
The following bugs are fixed:

* Missing ExecCtx in event engine endpoints and listeners
* Ref counting issue with iomgr endpoint which causes crashes in
overloaded situations

The PR includes a test which triggers these bugs by simulating an
overloaded system.
2023-06-12 16:20:08 -07:00
Eugene Ostroukhov 57bb6fb65c
Revert "Revert "[xDS LB] Override cluster with value from cookie"" (#33388)
Reapplying #32973
2023-06-12 16:12:17 -07:00
Mark D. Roth 6a04e9c7e5
[subchannel interface] add method for cancelling data watches (#33359)
This paves the way for cases where we handle health watches in wrapped
subchannels, which we'll need as part of the dualstack backend design.
2023-06-12 15:28:48 -07:00
Craig Tiller 8e137e524a
[end2end] Reduce likelihood of two tests opening the same UDS socket (#33410) 2023-06-12 15:03: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
Craig Tiller 14c63c70af
[fuzzing] Fix recursive mutex acquisition in fuzzing event engine (#33404)
Fixes internal fuzzing bug b/286717107
2023-06-12 16:31:35 +00:00
Craig Tiller 495bcbcb74
[fuzzing] Increase timeout to accomodate slow internal callbacks (#33407)
Fixes b/286780969
2023-06-12 15:46:30 +00:00
Craig Tiller eba6cecdcb
[fuzzing] Remove ambiguity in test case, make fuzzer pass (#33405)
Here the recv message batch 103 was returning end of stream.

Per the reasoning in
https://github.com/grpc/proposal/blob/master/L104-core-ban-recv-with-send-status.md
Sending status is the final thing for a call on the server, so requiring
a recv message to complete when we've sent status is getting into at
best a gray area in out spec.

Add a strict ordering between that recv and the sending of status to
make a more deterministic test.

fixes b/286708835, b/286727273
2023-06-12 15:02:56 +00:00
Yash Tibrewal c450a9d4eb
[xds] Fix test compilation (#33373)
Fix #33308
<!--

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-09 15:44:27 -07:00
Sergii Tkachenko de6ed9ba9f
[Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
Craig Tiller 82534bab24
[end2end] Shard some longer running tests a little more to reduce timeout risk (#33387)
Also drop a few deadlines so that tests can run faster (where that's
safe)


<!--

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-09 12:17:29 -07:00
Eugene Ostroukhov 6f685274a1
Revert "[xDS LB] Override cluster with value from cookie (#32973)" (#33379)
This reverts #32973 that causes breakages in internal CI.
2023-06-08 16:50:47 -07:00
Craig Tiller d8f3dab96c
[end2end] Binary & fuzzer per test .cc (#33374)
<!--

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-08 15:38:53 -07:00
Eugene Ostroukhov 8fe3472e53
[xDS LB] Override cluster with value from cookie (#32973) 2023-06-08 13:52:13 -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
Yadong 18c42a21af
[core] Add support for vsock transport (#33309)
Revert "Revert "[core] Add support for vsock transport"
(https://github.com/grpc/grpc/pull/33276)"
This reverts commit
c5ade3011a.

And fix the issue which broke the python build.

@markdroth @drfloob please review this PR. Thank you very much.

---------

Co-authored-by: AJ Heller <hork@google.com>
2023-06-07 13:55:53 -07:00
Craig Tiller 1f85fb21f2
[metadata] Improve codegen for name lookups (#33237)
The approach of doing a recursive function call to expand the if checks
for known metadata names was tripping up an optimization clang has to
collapse that if/then tree into an optimized tree search over the set of
known strings. By unrolling that loop (with a code generator) we start
to present a pattern that clang *can* recognize, and hopefully get some
more stable and faster code generation as a benefit.

<!--

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-06-06 14:43:55 -07:00
Craig Tiller 72da46fa5c
[fuzzing] Handle closing after the final write in fuzzing-event-engine (#33266)
If an endpoint closes it should still report any pending writes.
2023-06-05 12:00:32 -07:00
Mark D. Roth 6b4a1e4243
[outlier detection] hack to prevent OD from working with pick_first (#33336)
As per discussion in #32967.
2023-06-05 10:59:40 -07:00
Craig Tiller f964961ba8
[fuzzing] Tune down max delay (#33345)
This had been intended to be 500ms for the first round, but
inadvertently got bumped up during some last minute investigations.

Tune it back down, let things settle out, and then see whether we want
to increase it or not.

<!--

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-05 17:22:53 +00:00
apolcyn 889412c416
[Rls] de-experimentalize RLS in XDS (#33290)
Integration tests are passing, so we should be ready to
de-experimentalize.

Related: internal bug b/265209578
2023-06-02 12:26:45 -07:00
AJ Heller 87afec2696
[Reland][EventEngine] Make the thread pool quiesce 10x faster, and add a small stress test" (#33316) (#33317) 2023-06-01 13:20:57 -07:00
AJ Heller 925ff588a3
Revert "[EventEngine] Make the thread pool quiesce 10x faster, and add a small stress test" (#33316)
Reverts grpc/grpc#33223. Breaks internal build.

```
work_stealing_thread_pool.cc:180:27: error: format specifies type 'double' but the argument has type 'gpr_cycle_counter' (aka 'long') [-Werror,-Wformat]
```
2023-06-01 11:28:21 -07:00
AJ Heller fbc0b38675
[EventEngine] Make the thread pool quiesce 10x faster, and add a small stress test (#33223)
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-06-01 10:35:07 -07:00
Craig Tiller 21996c3784
[end2end] Force crash on failure to receive an event (#33260)
When I converted these tests there was an intent to use gtest failures
to see past an unexpected event/no event received error - however that
doesn't work out because our tests rely on the prior events happening.

What we got instead was misattributed failures, folks chasing wild
theories on uninitialized data, dogs and cats living together, mass
hysteria.

Let's just crash and see if it makes diagnosis actually easier.

<!--

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-01 08:33:06 -07:00
Eugene Ostroukhov 0980076bb9
[interop] fix C++ server to add mutex for orca_oob test (#33278)
Following improvements were made to `orca_oob` interop test to increase
compatibility and stability:

1. Timeout was increased to 10s (see #33098)
2. Server will block clients trying to run this test concurrently.
3. Data is cleared in the beginning of the call.
2023-05-31 20:07:51 -07:00
Craig Tiller 2892b24eab
[fuzzing] Fix fuzzer found bug (#33291)
We had an infinite recursion in our tracer parsing code... probably not
a biggy, but it was blocking the fuzzers so fixing.

<!--

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-31 14:02:13 -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
AJ Heller c5ade3011a
Revert "[core] Add support for vsock transport" (#33276)
Reverts grpc/grpc#32847. Breaks the Python build.
2023-05-30 14:31:26 -07:00
Mark D. Roth b103379a43
[xDS] fix fuzzer-found bug with resource field unset in Resource wrapper (#33274) 2023-05-30 13:05:02 -07:00
Craig Tiller bc70a67e94
[fuzzer] Increase timeouts to accommodate delayed callbacks (#33271)
<!--

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-30 11:43:50 -07:00
Craig Tiller ea58add8bf
[end2end] Fix fuzzer found memory leak (#33264)
(this is a bug in the core e2e fuzzer infrastructure)
2023-05-30 10:42:19 -07:00
Yadong 9d765860ef
[core] Add support for vsock transport (#32847)
This is another attempt to add support for vsock in grpc since previous
PRs(#24551, #21745) all closed without merging.

The VSOCK address family facilitates communication between
virtual machines and the host they are running on.
This patch will introduce new scheme: [vsock:cid:port] to
support VSOCK address family.

Fixes #32738.

---------

Signed-off-by: Yadong Qi <yadong.qi@intel.com>
Co-authored-by: AJ Heller <hork@google.com>
Co-authored-by: YadongQi <YadongQi@users.noreply.github.com>
2023-05-30 09:46:49 -07:00
Craig Tiller e0ba7b720a
[fuzzing] Increase timeout to accommodate delayed callbacks (#33267)
Put enough internal delays into this test and it hits deadline
exceeded... extend the deadline to cover that.

(this is likely to become a common edit over the next few weeks...)
2023-05-30 08:43:15 -07:00
Luwei Ge d1c0dc58cc
[Audit Logging] xDS e2e test for audit logging. (#33252)
Added tests involve:
1. Checking the # of logger invocations with multiple RBACs in the
chain.
2. Verifying content in audit context with action and audit condition
permutations.
3. Confirm custom logger and built-in logger configurations are working.
4. Confirm the feature is protected by the environment variable.

---------

Co-authored-by: rockspore <rockspore@users.noreply.github.com>
2023-05-26 12:43:37 -07:00
Craig Tiller c32cbb57df
[memory_usage] Use a named target for the client (#33258)
Allows usage on machines that don't support ipv4.

<!--

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-26 10:28:18 -07:00
Mark D. Roth 77418492fd
[pick_first] add tests that show handling of multiple addresses (#33255)
This should help you get an idea of how to write the tests for #33254.
2023-05-26 09:47:37 -07:00
Mark D. Roth 52d687ad42
[xDS] second attempt: clean up cert provider factory and registry APIs (#33249)
Original was #33226, reverted in #33248.
2023-05-25 12:59:21 -07:00
Craig Tiller ea03aee5b4
[fuzzing] Allow resolver fuzzer to specify config vars (#33244)
<!--

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-25 11:44:01 -07:00
Craig Tiller c8f45f5b51
[fuzzing] Allow flow control fuzzer to fuzz across experiments (#33241)
<!--

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-25 11:13:32 -07:00