Commit Graph

7843 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
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
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 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
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
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
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
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
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
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
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
Craig Tiller efebae82f0
[fuzzing] Allow memory quota fuzzer to supply config (#33243)
<!--

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:12:14 -07:00
Craig Tiller 9faa39d88b
Revert "[xDS] clean up cert provider factory and registry APIs" (#33248)
Reverts grpc/grpc#33226

(looks to be creating some import problems)
2023-05-25 09:56:01 -07:00
Mark D. Roth eb2b1edd1c
[xDS] clean up cert provider factory and registry APIs (#33226)
- switch to json_object_loader for config parsing
- use `absl::string_view` instead of `const char*` for cert provider
names
- change cert provider registry to use a map instead of a vector
- remove unused mesh_ca cert provider factory
2023-05-24 15:38:39 -07:00
Craig Tiller a95e54d3d8
[memory-usage] remove testonly bit from memory_usage tests (#33231)
Allow usage in production tasks

<!--

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-24 14:49:23 -07:00
Luwei Ge de9d398e8f
[Audit Logging] End2end test for audit logging in authorization policy (#33196)
I generated a new client key and cert where a Spiffe ID is added as the
URI SAN. As such, we are able to test the audit log contains the
principal correctly.

Update: I switched to use the test logger to verify the log content and
removed stdout logger here because one the failure of [RBE Windows Debug
C/C++](https://source.cloud.google.com/results/invocations/c3187f41-bb1f-44b3-b2b1-23f38e47386d).

Update again: Refactored the test logger in a util such that the authz
engine test also uses the same logger. Subsequently, xDS e2e test will
also use it.

---------

Co-authored-by: rockspore <rockspore@users.noreply.github.com>
2023-05-24 14:09:32 -07:00
Craig Tiller 4d0611e4a9
[promises] Async wakeup for activities/parties (#33215)
Parties prefer to wakeup inline, however there are some mechanisms that
want an out-of-line wakeup (say due to a previously held mutex that may
be re-taken). To help those cases permit a guaranteed asynchronous
wakeup.

(needed now for resolver wakeups on the client call path)
2023-05-24 11:01:01 -07:00
Mark D. Roth 33d0afd316
[JSON object loader] fix null handling (#33225)
- Accept JSON null for any optional field.
- Do *not* accept JSON null for wrapper types (`absl::optional<>`,
`std::unique_ptr<>`, and `RefCountedPtr<>`) that are *not* marked as
optional fields.
2023-05-24 07:11:10 -07:00
nanahpang c684409921
[chaotic-good] New frame serialization/deserialization in chaotic-good transport. (#33067)
(This is a re-open PR for https://github.com/grpc/grpc/pull/32999, which
was closed accidentally due to the branch re-base and force-push)

Implement the frame serialization/deserialization method in chaotic-good
transport.

Previous comments from Craig:
- Since messages are not part of the framing system anymore, I think we
should remove ReceiveMessage (and therefore ReceivePadding) from this
type.
(instead we should add some helper functions to get the message lengths)
-- Resolved

- This approach will cause all frame manipulation code to know about
this serialization detail, rather than just the code that's serializing
it - I think it would be better to keep the type, flags separation (even
if we need to change the flags representation)
-- Done, changed back to type, flags separation. 

<!--

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-22 19:38:15 -07:00
Craig Tiller 4303a67e8b
[memory-usage] Propagate experiments through memory-usage test to client/server (#33206)
Will be used to evaluate experiment effects on memory usage once they're
toggled on.

<!--

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-22 11:46:00 -07:00
Hannah Shi 988c85535d
[ObjC] Upgrade podspec xx.deployment_target (#33091)
Upgrade apple platform deployment_target versions to fix the cocoapods
push of BoringSSL-GRPC about the following error:
```
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
ref: https://developer.apple.com/forums/thread/725300

This also aligns with the versions required by
[protobuf](https://github.com/protocolbuffers/protobuf/pull/10652)

```
ios.deployment_target = '10.0'
osx.deployment_target = '10.12'
tvos.deployment_target = '12.0'
watchos.deployment_target = '6.0'
```
2023-05-20 20:38:24 +00:00
Craig Tiller 338c55978b
[threading] Implement thready-tsan mode (#33193)
This test mode tries to create threads wherever it legally can to
maximize the chances of TSAN finding errors in our codebase.

<!--

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-19 17:26:11 -07:00
AJ Heller 3244ba6fb7
[fuzz] Add ChannelArgs fuzzing to the client channel resolver fuzzer (#33200) 2023-05-19 14:24:59 -07:00