Commit Graph

13426 Commits

Author SHA1 Message Date
Craig Tiller b5a2e90fbf
Revert "[EventEngine] Implement the EventEngine-driven client channel resolver." (#32768)
Reverts grpc/grpc#32632

Needs to be rolled back for #32767 to land
2023-03-31 21:31:27 -07:00
Eugene Ostroukhov 50fce40409
[PSM Interop] Add custom_lb test client (#32757) 2023-03-31 14:03:44 -07:00
Sergii Tkachenko 8f012ae13b
PSM interop: add retries on k8s API 504 Gateway Timeout (#32714)
ref b/258546394
2023-03-31 20:58:57 +00:00
AJ Heller 7dec55de5a
[EventEngine] Implement the EventEngine-driven client channel resolver. (#32632)
This PR also centralizes the client channel resolver selection. Resolver
selection is still done using the plugin system, but when the Ares and
native client channel resolvers go away, we can consider bootstrapping
this differently.
2023-03-31 13:52:06 -07:00
Jan Tattermusch 569d0076b3
[cmake] Workaround missing stdalign.h in windows portability test (#32764)
Tentative fix for b/275694647. Also see
https://github.com/grpc/grpc/pull/32662

Adhoc windows/grpc_portability run:
http://sponge/bb75e14c-fc77-45bb-89bd-4c4685746490

Once merged, I'll backport to 1.54.x and 1.53.x (these have switched to
VS2019)
2023-03-31 09:00:39 -07:00
Mark D. Roth 36d2716d52
[JSON] move Parse() and Dump() methods out of JSON object (#32742)
More prep for making this a public API.
2023-03-30 13:30:54 -07:00
Stanley Cheung ec1d75bb0a
[Release process] Bump version to 1.55.0-dev (on master branch) (#32743)
Change was created by the release automation script. See
go/grpc-release.
2023-03-29 11:03:07 -07:00
Craig Tiller 2cd1501ca5
[promises] Filter unit test framework (#32110)
Built atop #31448 

Offers a simple framework for testing filters.

<!--

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-03-28 21:53:14 -07:00
Craig Tiller db3daf567b
[api-fuzzer] Enable fuzzing over config vars (#32736)
Add the capability for api-fuzzer to fuzz over different config
variables, to enable us to spot incompatible configurations there
sooner.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-03-28 16:18:12 -07:00
Jan Tattermusch 785b85426c
Upgrade abseil to 20230125.2 (#32733)
To get a fix for
https://github.com/abseil/abseil-cpp/issues/1419#issuecomment-1485282854
2023-03-28 20:38:56 +02:00
Stanley Cheung 3c18ecdea1
Bump core version to 31.0.0 for upcoming release (#32739)
Change was created by the release automation script. See
go/grpc-release.
2023-03-28 11:32:35 -07:00
Mark D. Roth 71becdcf7c
interop: add core 1.53.0 release to interop matrix (#32727) 2023-03-28 09:49:14 -07:00
Jan Tattermusch b59fcc2479
Upgrading to protobuf 22.x: Adapt make_grpcio_tools.py to changes in protobuf bazel build (#32213)
Protobuf's HEAD has changed the layout of bazel targets we use for
getting the list of source files for our python grpcio.tools build.

With this patch, make_grpcio_tools.py finishes successfully and gives
reasonable results.
2023-03-28 15:05:31 +00:00
Craig Tiller 7e341a545a
[metadata] Add a hook point for custom metadata (#32650)
Aim here is to allow adding custom metadata types to the internal build.
<!--

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-03-27 19:43:07 -07:00
Craig Tiller 175ccc3a90
Reland global config changes (#32661)
<!--

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-03-27 18:55:24 -07:00
Yousuk Seung 16c03db9ac
Revert "Revert "WRR: Support EPS" (#32723)" (#32725)
This reverts commit 7bd9267f32.




<!--

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-03-27 16:49:50 -07:00
Stanley Cheung 39780ba2b5
Update third_party/boringssl-with-bazel (#32721)
Change was created by the release automation script. See
go/grpc-release.
2023-03-27 15:11:48 -07:00
Alisha Nanda 19d06a78ec
Add random early rejection for metadata (#32600)
(hopefully last try)

Add new channel arg GRPC_ARG_ABSOLUTE_MAX_METADATA_SIZE as hard limit
for metadata. Change GRPC_ARG_MAX_METADATA_SIZE to be a soft limit.
Behavior is as follows:

Hard limit
(1) if hard limit is explicitly set, this will be used.
(2) if hard limit is not explicitly set, maximum of default and soft
limit * 1.25 (if soft limit is set) will be used.

Soft limit
(1) if soft limit is explicitly set, this will be used.
(2) if soft limit is not explicitly set, maximum of default and hard
limit * 0.8 (if hard limit is set) will be used.

Requests between soft and hard limit will be rejected randomly, requests
above hard limit will be rejected.
2023-03-27 14:13:20 -07:00
Craig Tiller 8d2f70d53c
Reland "[promises] Convert call to a party" (#32651)" (#32653)
<!--

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-03-27 14:02:36 -07:00
Esun Kim 7bd9267f32
Revert "WRR: Support EPS" (#32723)
Reverts grpc/grpc#32657
2023-03-27 11:53:17 -07:00
Eric Anderson 8009a6c6af
interop_matrix: Update matrix for grpc-java 1.45.3 release (#32104) 2023-03-27 11:09:00 -07:00
Yousuk Seung 4429066516
WRR: Support EPS (#32657)
<!--

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-03-24 16:23:51 -07:00
Terry Wilson 4537dc4dc3
Add Java v1.54.0 to the client matrix (#32697) 2023-03-24 14:02:51 -07:00
Eugene Ostroukhov 312300d3c2
[Interop] Enable Orca test cases for C++ (#32684) (#32707) 2023-03-24 12:14:07 -07:00
Jan Tattermusch 4ef9844750
Invalidate RBE linux cache by setting a new cache silo key (#32706)
An attempt to fix b/275035917 (but I have no idea if this helps or not).
2023-03-24 17:35:26 +01:00
Yash Tibrewal fcff4bd1d0
Gcp Observability Logging: The Call ID should use a UUIDv4 format (#32699)
Earlier, we were simply using a 64 bit random number, but the spec
actually calls for UUIDv4.

<!--

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-03-23 19:07:13 -07:00
AJ Heller 3fe678e306
[EventEngine] Add EventEngine::*Handle equality operators (#32695)
This allows us to replace `absl::optional<TaskHandle>` with checks
against the invalid handle.

This PR also replaces the differently-named invalid handle instances
with a uniform way of accessing static invalid instances across all
handle types, which aids a bit in testing.
2023-03-23 15:31:24 -07:00
Eugene Ostroukhov 64e96c093d
Revert "[Interop] Enable Orca test cases for C++ (#32684)" (#32693)
This reverts commit e4825a5aa2.
2023-03-23 15:20:23 -07:00
Craig Tiller bca85495d4
[event_engine] Add a maximally threaded event engine wrapper (#32691)
Add an event manager that spawns threads just as much as it possibly
can... to expose TSAN to the myriad thread ordering problems in our code
base.

Next steps for this will be to add a new test mode for tsan + thready
event engine + a few other doodads to increase threads in the system
(party.cc in particular has a good place for a hook).

<!--

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-03-23 11:37:20 -07:00
Jan Tattermusch 43c3d1f932
Switch all VS2017 builds to VS2019 (#32662)
(part of removing support for VS2017)

Also see https://github.com/grpc/grpc/pull/32649
Also see https://github.com/grpc/grpc/pull/32615

The switch to grpc-win2019 windows workers has already happened:
(cl/517400022).

Once this PR lands, I'll backport to 1.53.x branch as well (since that
release removes the VS2017 support).
2023-03-23 16:44:39 +01:00
Yash Tibrewal bf1a26cde8
GcpObservability: Add client api latency (#32645)
This PR adds the view `grpc.io/client/api_latency` for GCP Observability
which aims to collect the end-to-end time taken by a call.

Changes made to support this -
1) A global interceptor factory registration is created for stats
plugins.
2) OpenCensus plugin now provides a new interceptor that's responsible
for collecting the new latency.
3) Gcp Observability registers this plugin.
4) A new OpenCensus measurement and view is created for api latency.
Note that this is internal as of now, since it's not clear if it should
be exposed as public experimental API. Leaving that decision for the
future.

<!--

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-03-22 15:31:47 -07:00
Eugene Ostroukhov e4825a5aa2
[Interop] Enable Orca test cases for C++ (#32684) 2023-03-22 12:33:51 -07:00
Esun Kim 451b230358
Removed report_atomic_races=0 option (#32675)
It appears that we can remove this `report_atomic_races=0` workaround as
abseil fixed the issue by
091842beea
2023-03-22 09:23:00 -07:00
Jan Tattermusch c1216357a3
Upgrade ccache on windows (#32668)
Try to avoid the `ccache: error: Failed to read from file stream` build
failures that started happening once we upgraded to the grpc-win2019
image.

e.g.
https://source.cloud.google.com/results/invocations/e94c2f35-6d1f-4d89-853a-be7e1e1747de/targets/github%2Fgrpc%2Ftoplevel_run_tests_invocations%2Frun_tests_c_windows_opt_native/tests

```
C:\ccache\ccache.exe C:\PROGRA~2\MICROS~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x86\cl.exe  /nologo /TP -DCARES_STATICLIB -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x600 -D_WINSOCK_DEPRECATED_NO_WARNINGS -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\third_party\re2 -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\third_party\zlib -IT:\altsrc\github\grpc\workspace_c_windows_opt_native -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\include -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\third_party\address_sorting\include -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\cmake\build\third_party\re2 -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\third_party\boringssl-with-bazel\src\include -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\src\core\ext\upb-generated -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\src\core\ext\upbdefs-generated -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\third_party\upb -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\third_party\xxhash -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\cmake\build\third_party\zlib -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\third_party\abseil-cpp -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\cmake\build\third_party\cares\cares -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\third_party\cares\cares -IT:\altsrc\github\grpc\workspace_c_windows_opt_native\third_party\cares\cares\include /DWIN32 /D_WINDOWS /W3 /GR /EHsc  /MP8 /wd4065 /wd4506 /wd4200 /wd4291 /wd4244 /wd4267 /wd4987 /wd4774 /wd4819 /wd4996 /wd4619 /wd4503 /utf-8 /MD /O2 /Ob2 /DNDEBUG /showIncludes /FoCMakeFiles\invalid_call_argument_test.dir\test\core\end2end\cq_verifier.cc.obj /FdCMakeFiles\invalid_call_argument_test.dir\ /FS -c T:\altsrc\github\grpc\workspace_c_windows_opt_native\test\core\end2end\cq_verifier.cc
ccache: error: Failed to read from file stream
```
2023-03-22 08:51:55 +01:00
Jan Tattermusch 84c091315b
increase timeout for windows C++ distribtests (#32669)
After switching to grpc-win2019 kokoro image, the windows C++
distribtest got slightly slower (from about ~1500sec to ~1650sec), which
got us too close to the 1800sec time limit and thus we've seen the
windows distribtests occasionally time out.

I'd still like to look into speeding up the distribtests, but for now we
don't want frequest test timeouts in the CI.

example failure: 

https://fusion2.corp.google.com/ci;ids=1923284992/kokoro/prod:grpc%2Fcore%2Fmaster%2Fwindows%2Fgrpc_distribtests_standalone/activity/996fd2cf-bef3-4490-85da-a52765d84127/log

```
2023-03-20 23:43:44,740 TIMEOUT: distribtest.cpp_windows_x86_cmake_as_externalproject [pid=5984, time=1800.1sec]
```
2023-03-22 08:51:26 +01:00
AJ Heller 85f7aa3468
[EventEngine] Windows Listener iomgr shims (#32541)
Exercised with the `//test/core/end2end:h2_full_test@*` set of tests,
using the `event_engine_listener` experiment.
2023-03-21 13:58:26 -07:00
Craig Tiller 2bcca66712
[fuzzing] Roll forward dep on fuzztest (#32667)
<!--

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-03-21 13:37:32 -07:00
Craig Tiller 522bed8cc6
Revert "[fuzzing] Add dep on google fuzz test" (#32666)
Reverts grpc/grpc#32578
2023-03-20 20:31:06 -07:00
Craig Tiller dbb131b193
[fuzzing] Add dep on google fuzz test (#32578)
Initial PR to establish a bazel dependency on
https://github.com/google/fuzztest, with which I'm planning on basing a
hardening program.

Casting a relatively wide net with reviewers: I'm genuinely interested
in feedback building up the docs, and general ergonomics of this change.

I've located relevant files in the `fuzztest/...` directory. The tests
only build with the `--config fuzztest` bazel argument for now (because
of needing C++17), so locating them separately keeps `bazel test
test/...` working as it does today. In a few years time, when we adopt
C++17, we'll be able to rationalize the test directories a little bit.

We'll need to add some kokoro jobs (maybe with this PR?) to execute the
relevant tests.

<!--

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-03-20 17:45:52 -07:00
Sergii Tkachenko c43d37c956
PSM Interop: handle k8s 404 on teardown (#32663)
This was missed from https://github.com/grpc/grpc/pull/32596, resulting
in k8s teardown exiting early with:

```
kubernetes.client.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: OMITTED
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"deployments.apps \"psm-grpc-client\" not found","reason":"NotFound","details":{"name":"psm-grpc-client","group":"apps","kind":"deployments"},"code":404}
```

With this change, teardown resumes with:

> `k8s_base_runner.py:282] Deployment psm-grpc-client deletion failed:
Kubernetes API returned 404 Not Found: deployments.apps
"psm-grpc-client" not found`
2023-03-20 17:43:32 -07:00
Jan Tattermusch 0c1797cd9f
Revert "[config] Move global config alongside core configuration" (#32659)
Reverts grpc/grpc#30788

(it breaks grpc_objc_bazel_test (see
https://github.com/grpc/grpc/pull/30788#issuecomment-1476372187) and
also seems to be breaking some other internal stuff).
2023-03-20 08:22:29 -07:00
Jan Tattermusch 5873ba96dc
Ensure compatibility with the new custom kokoro win2019 image (#32649)
Fix incompatibilities identified when running adhoc runs on the new
custom win2019 image.
After merging this, it should be possible to switch to the new image
without breaking any tests.

- for most fixes I added a comment that explains why they're necessary.
- the new image won't have VS2015 installed, so I'm switching the protoc
artifact build to VS2017

This PR will need to be backported to older release branches to ensure
the windows tests continue working on those branches as well (IMHO I
haven't made any changes that would be difficult to backport and I tried
to keeps the diff as small as possible to avoid issues when
backporting).

After we switch to the new image (and all the windows tests are green),
we can incrementally move the builds that are still using VS2017 to
VS2019.
2023-03-20 16:03:50 +01:00
Eugene Ostroukhov 4c5771d27c
PSM Interop: revert adding XDS protos to protoc args (#32640)
This dependency is no longer needed after #32631
2023-03-17 18:50:55 -07:00
Craig Tiller b7a83305e6
[config] Move global config alongside core configuration (#30788)
This is a big rewrite of global config.

It does a few things, all somewhat intertwined:
1. centralize the list of configuration we have to a yaml file that can
be parsed, and code generated from it
2. add an initialization and a reset stage so that config vars can be
centrally accessed very quickly without the need for caching them
3. makes the syntax more C++ like (less macros!)
4. (optionally) adds absl flags to the OSS build

This first round of changes is intended to keep the system where it is
without major changes. We pick up absl flags to match internal code and
remove one point of deviation - but importantly continue to read from
the environment variables. In doing so we don't force absl flags on our
customers - it's possible to configure grpc without the flags - but
instead allow users that do use absl flags to configure grpc using that
mechanism. Importantly this lets internal customers configure grpc the
same everywhere.

Future changes along this path will be two-fold:
1. Move documentation generation into the code generation step, so that
within the source of truth yaml file we can find all documentation and
data about a configuration knob - eliminating the chance of forgetting
to document something in all the right places.
2. Provide fuzzing over configurations. Currently most config variables
get stashed in static constants across the codebase. To fuzz over these
we'd need a way to reset those cached values between fuzzing rounds,
something that is terrifically difficult right now, but with these
changes should simply be a reset on `ConfigVars`.

<!--

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-03-17 16:56:45 -07:00
Yash Tibrewal 29ce6463d1
Revert "[promises] Convert call to a party" (#32651)
Reverts grpc/grpc#32359
2023-03-17 12:36:19 -07:00
Craig Tiller a9873e8357
[promises] Convert call to a party (#32359)
<!--

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-03-16 01:09:53 -07:00
Yash Tibrewal 5029af9578
OpenCensus: Use new CallTracer interfaces (#32618)
This change mostly aims to get OpenCensus to use the new
ServerCallTracer interface. Note that the interfaces nor the code are in
their final states. There are a bunch of moving pieces, but I thought
this might be a nice mid-step to check-in and make sure that our
internal traces can also work with these changes.

Overall changes -
1) call_tracer.h shows what the hierarchy of new call tracer interfaces
looks like. Open to renaming suggestions.
2) Moved most of the common interface between `CallAttemptTracer` and
`ServerCallTracer` into a common `CallTracerInterface`. We should be
able to eventually move `RecordReceivedTrailingMetadata` and `RecordEnd`
as well to these common interfaces, but it requires some additional
work.
3) The compression filter is now responsible for recording the recv and
send messages for both the subchannel call and the server, and adds in
ability to record compressed and decompressed messages as well.
4) The OpenCensus server filter now uses the new `ServerCallTracer`
interface, and so doesn't need to be a filter anymore.
5) A new ServerCallTracerFilter was added. Ideally, we should be able to
move it to the current connected filter, but it is in a bit of an
interesting state right now, so I would prefer making those changes in a
separate PR with Craig's eyes on it.
6) A new context element `GRPC_CONTEXT_CALL_TRACER_ANNOTATION_INTERFACE`
was created that replaces the old `GRPC_CONTEXT_CALL_TRACER`, and the
new `GRPC_CONTEXT_CALL_TRACER` is mainly to pass the `CallAttemptTracer`
down the stack. This should go away in the new promise-based world.



<!--

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.

-->

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/grpc/grpc/32618)
<!-- Reviewable:end -->
2023-03-15 22:39:41 -07:00
Eugene Ostroukhov 555f3e26a4
PSM Interop: add orca proto to the legacy test driver dependencies (#32620)
ref b/273575071
2023-03-14 19:45:02 -07:00
Sergii Tkachenko c16338581d
PSM Interop: add orca proto to the new test driver dependencies (#32619)
Now `messages.proto` requires `xds/v3/orca_load_report.proto`.
The dependency introduced in https://github.com/grpc/grpc/pull/32524.

ref b/273575071
2023-03-14 18:43:34 -07:00
Sergii Tkachenko dce2d8729c
PSM Interop: Retry on recoverable kubernetes errors (#32596)
- Increase kubernetes library default for urlib3 retries to 10
- Add custom retry logic to all API calls made by framework.k8s

Custom retry logic handles various errors we're experienced over
two years, and based on ~140 failure reports:

1. Errors returned by the k8s API server itself:
  - 401 Unauthorized
  - 409 Conflict
  - 429 Too Many Requests
  - 500 Internal Server Error
2. Connection errors that might indicate k8s API server is temporarily
   unavailable (such as a restart, upgrade, etc):
  - All `NewConnectionError`s, f.e. "Connection timed out",
    "Connection refused"
  - All "connection aborted" `ProtocolError`s, f.e. "Remote end
    closed connection  without response", "Connection reset by peer"

ref b/178378578, b/258546394
2023-03-14 17:14:07 -07:00