Commit Graph

13608 Commits

Author SHA1 Message Date
apolcyn b32d94de05
[ruby fork support] skip new fork tests since they're flaky at introduction (#33664)
These tests have been flaky since they were added in
https://github.com/grpc/grpc/pull/33430
2023-07-12 12:02:11 -07:00
Richard Belleville eb7b72ea5b
[PSM Interop] Loosen affinity test assertions (#33648)
As part of the dualstack backend designs, subchannels will be created
lazily. Therefore, instead of asserting that there is 1 READY subchannel
and `n - 1` IDLE subchannels, we just assert that there is 1 READY
subchannel.
2023-07-12 11:26:01 -07:00
Craig Tiller b7077f4bbf
[hpack] Rollforward huffman read optimization (#33657)
Rollforward in first commit, fixes in subsequent.
2023-07-11 15:26:54 -07:00
Vignesh Babu fa95c4c439
[interop] Add absl dependency to interop server (#33647)
<!--

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-11 15:02:17 -07:00
Craig Tiller 57c697d8ae
Revert "[hpack] Huffman read optimization" (#33655)
Reverts grpc/grpc#33269
2023-07-11 12:58:49 -07:00
Craig Tiller 20dfe78d95
[promises] Change physical layout of retry filter (#33479)
In preparation for implementing the promise based version, separate out
the legacy call data from the filter.

There are two commits here, each representing one phase of this code
movement:
66676d398c moves `class RetryFilter` into
the header and the vtable name into that class, as this will be shared
code between the implementations
4c84f115ad then moves `class
RetryFilter::CallData` into `class RetryFilterLegacyCallData`, and moves
*that* into its own file

Doing so makes me less confused as to what I'm editing going forward.

No functionality should be affected.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-11 10:23:36 -07:00
Craig Tiller 4ce51fe45d
[hpack] Huffman read optimization (#33269)
In real services most of our time ends up in the `Read1()` function,
which populates one byte into the bit buffer.
Change this to read in as many as possible bytes at a time into that
buffer.

Additionally, generate all possible (to some depth) parser geometries,
and add a benchmark for them. Run that benchmark and select the best
geometry for decoding base64 strings (since this is the main use-case).

(gives about a 30% speed boost parsing base64 then huffman encoded
random binary strings)

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-11 08:41:15 -07:00
apolcyn fe11ec9bcb
[ruby] experimental client side fork support (#33430)
Adds experimental fork support to gRPC/Ruby

Works towards https://github.com/grpc/grpc/issues/8798 (see caveats for why this wasn't marked fixed yet)
Works towards https://github.com/grpc/grpc/issues/33578 (see caveats for why this wasn't marked fixed yet)

This leverages existing `pthread_atfork` based C-core support for
forking that python/php use, but there's a bit extra involved mainly
because gRPC/Ruby has additional background threads.

New tests under `src/ruby/end2end` show example usage.

Based on https://github.com/grpc/grpc/pull/33495

Caveats:
- Bidi streams are not yet supported (bidi streams spawn background
threads which are not yet fork safe)
- Servers not supported
- Only linux supported
2023-07-10 13:34:10 -07:00
Vignesh Babu 974798a427
[tracing] Fix flakiness in tcp_posix_test (#33639)
tcp_posix_test is incorrectly assuming that all endpoint_writes with
timestamps enabled will be successfully traced. Remove the timestamps
checking related tests to prevent flakes when the test is enabled
internally.
2023-07-10 12:59:57 -07:00
Eric Anderson e0b8bd9c5b
[interop_matrix] Add Java 1.50.3 (#32865) 2023-07-10 11:49:21 -07:00
Eric Anderson 4599419687
[interop_matrix] Add Java 1.55.1 (#33049) 2023-07-10 11:49:08 -07:00
Jan Tattermusch ac3b6bfd4d
[csharp] Include correct build of Grpc.Tools in nightly packages (#33595)
Tentative fix for  #32179.
2023-07-10 16:35:22 +02:00
Sergii Tkachenko d66dbdba84
[PSM Interop] Include app net test to the PSM Interop LB suite (#33620)
ref b/288578634
2023-07-07 10:02:52 -07:00
nanahpang 0cc9d16e9c
[chaotic-good] Implement a promise-based endpoint for chaotic-good transport to read & write to EventEngine::Endpoint. (#33257)
This PR is continuing the work of prototyping in
https://github.com/grpc/grpc/pull/31592, and the design doc is at
[link](https://docs.google.com/document/d/1vRy0yse-d1heLQRmLPo_0figsTPXJAnNN84tBCAne_s/edit?pli=1&resourcekey=0-JvUPdq0LaZq8gMkgT9Pzlw#heading=h.qgvc5vr55ytg).

<!--

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-06 17:18:48 -07:00
Yash Tibrewal 9984f1bd5b
Revert "Revert "Revert "Revert "[HTTP2] Fix inconsistencies in keepalive configuration ( #33428)" (#33512)"" (#33601)
Reverts grpc/grpc#33599

Needs to be cherry-picked
2023-07-06 15:13:12 -07:00
Craig Tiller 1e465cac91
[experiments] Allow deleting experiments without updating rollouts.yaml (#33628) 2023-07-06 14:22:21 -07:00
Craig Tiller 78240d42f1
[experiments] Fix some bugs for no rollout definition (#33626)
Some bugs crept in if there's no rollout defined for an experiment, fix
that up.
2023-07-06 12:11:08 -07:00
Sergii Tkachenko 8101a808ec
[PSM Interop] Set canonical server via canonical-* tag, not commit sha (#33588)
While this is less transparent, it makes it significantly easier to
deliver images with latest security patches.
2023-07-05 17:17:44 -07:00
github-actions[bot] efa96780b0
Automated fix for refs/heads/master (#33610)
PanCakes to the rescue!

We noticed that our 'sanity' test was going to fail, but we think we can
fix that automatically, so we put together this PR to do just that!

If you'd like to opt-out of these PR's, add yourself to NO_AUTOFIX_USERS
in .github/workflows/pr-auto-fix.yaml

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-05 16:51:15 -07:00
Craig Tiller c5bb43ab61
[chttp2] Eliminate grpc_chttp2_stream_map (#33503)
No need for a bespoke type anymore... and a step along the path to
C++ification.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-05 15:07:31 -07:00
Vignesh Babu 63037989ca
[experiments] Add specification of different default values for different platforms. (#33543)
It introduces the following syntax:

The following would mark the experiment as broken on ios, false on
windows and debug on posix. If a platform is un-specified, the default
for that platform will be set to false. Refer to
test/core/experiments/fixtures/test_experiments_rollout.yaml for
examples which are tested.

- name: experiment_1
   default:
      &nbsp; ios: broken
      &nbsp; windows: false
      &nbsp; posix: debug
      
It also supports the already existing syntax and interprets it as just
specifying one default for all platforms.
    
Supported platform tags: ios, windows, posix
2023-07-05 10:36:37 -07:00
Esun Kim 415f2f9ee3
[Core] Improve HPACK (#33597) 2023-07-05 13:04:31 +09:00
Yash Tibrewal 523d9a2135
Revert "Revert "Revert "[HTTP2] Fix inconsistencies in keepalive configuration ( #33428)" (#33512)" (#33599)
Reverts grpc/grpc#33586

Looks like this has to be cherry-picked
2023-07-04 19:25:17 -07:00
Sergii Tkachenko e9446ca20c
[PSM Interop] Bump URL Map canonical server from 1.40.0 to 1.56.0 (#33587)
Similar to https://github.com/grpc/grpc/pull/33542.

Note that there's a ticket to automatically use the one specified in the
--server_image_canonical flag, but for now we just hardcode.

ref b/261911148, b/282106799.
2023-06-30 17:08:59 -07:00
Yash Tibrewal 8d9164fc16
Revert "Revert "[HTTP2] Fix inconsistencies in keepalive configuration ( #33428)" (#33512) (#33586)
Along with an experiment this time

<!--

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-30 16:27:30 -07:00
Bjorn Svensson ac874c2c83
[core] Add a channel argument to set DSCP on streams (#28322)
This adds a new channel argument `GRPC_ARG_DSCP` which allows users to
create classified gRPC streams with a
Differentiated Services Code Point (DSCP) marking on the IP frames.

The channel argument is handled on both clients and servers, but
currently only on posix based systems.

Fixes #17225

**Background**:
In addition to what is already described is #17225, when gRPC is used in
telco systems there is often a need to classify streams of importance.
There can be multiple hops between two endpoints (e.g. between 2 telecom
operators) and some streams that are more important than others (e.g.
emergency call related or similar). By marking the IP packets using DSCP
the aware routers can make a sound decision of the prioritization.

This PR propose to use DSCP as the configuration value since its common
for both IPv4/IPv6, an alternative would be to use a config name that
includes TOS and Traffic Class.
There might be more needed regarding documentation and end2end testing,
but there I need some advice.

**References**
https://datatracker.ietf.org/doc/html/rfc2474
https://www.iana.org/assignments/dscp-registry/dscp-registry.xhtml

<!--

Your pull request will be routed to the following person by default for
triaging.
If you know who should review your pull request, please remove the
mentioning below.

-->

@yashykt
2023-06-30 16:10:21 -07:00
Eugene Ostroukhov e0bc8a2c85
[xDS LB] xDS pick first support (#33540) 2023-06-30 14:06:08 -07:00
github-actions[bot] 88e269dc0c
Automated fix for refs/heads/master (#33576)
PanCakes to the rescue!

We noticed that our 'sanity' test was going to fail, but we think we can
fix that automatically, so we put together this PR to do just that!

If you'd like to opt-out of these PR's, add yourself to NO_AUTOFIX_USERS
in .github/workflows/pr-auto-fix.yaml

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-06-30 07:31:17 +09:00
Vignesh Babu bf3ffcf600
[experiments] A unit test for the experiments framework (#33334)
Adds a test for the experiments codegen. It updates the codegen to parse
test_experiments.yaml and test_experiments_rollouts.yaml files and
generate test_experiments.h and test_experiments.cc files along with an
experiments_test.cc file. The experiments test verifies the returned
value of IsExperimentEnabled with the expected value.
2023-06-29 12:21:11 -07:00
Matthew Stevenson 278978d6f0
[tls] Remove use of SSL_CTX_set_client_CA_list for TLS server credentials. (#33558)
This PR does the following: for the TLS server credentials, stops
calling `SSL_CTX_set_client_CA_list` by default in
`ssl_transport_security.cc`, and gives users a knob to re-enable calling
this API.

## What does the `SSL_CTX_set_client_CA_list` API do?

When this API is called, a gRPC TLS server sends the following data in
the ServerHello: for each certificate in the server's trust bundle, the
CA name in the certificate.

This API does not change the set of certificates trusted by the server
in any way. Rather, it is just providing a hint to the client about what
client certificate should be sent to the server.

## Why are we removing the use of `SSL_CTX_set_client_CA_list` by
default for the TLS server credentials?

Removing the use of this API by default has 2 benefits:
1. Calling this API makes gRPC TLS unusable for servers with a
sufficiently large trust bundle. Indeed, if the server trust bundle is
too large, then the server will always fail to build the ServerHello.
2. Calling this API is introducing a huge amount of overhead (1000s of
bytes) to each ServerHello, so removing this feature will improve
connection establishment latency for all users of the TLS server
credentials.
2023-06-29 09:48:15 -07:00
Mark D. Roth f09357ccb4
[ring hash] delegate to pick_first instead of creating subchannels directly (#33093)
More work on the dualstack backend design:
- Change ring_hash policy to delegate to pick_first instead of creating
subchannels directly.
- Note that, as mentioned in the WIP gRFC, because we lazily create the
pick_first child policies, so there's no need to swap over to a new list
as an atomic whole. As a result, we don't use the endpoint_list library
in this policy; instead, we just update a map in-place.
- Remove now-unused subchannel_list library.
2023-06-28 06:49:53 -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
Mark D. Roth 27a778fece
[round robin] delegate to pick_first instead of creating subchannels directly (#32692)
More work on the dualstack backend design:
- Change round_robin to delegate to pick_first instead of creating
subchannels directly.
- Change pick_first such that when it is the child of a petiole policy,
it will unconditionally start a health watch.
- Change the client-side health checking code such that if client-side
health checking is not enabled, it will return the subchannel's raw
connectivity state.
- As part of this, we introduce a new endpoint_list library to be used
by petiole policies, which is intended to replace the existing
subchannel_list library. The only policy that will still directly
interact with subchannels is pick_first, so the relevant parts of the
subchannel_list functionality have been copied directly into that
policy. The subchannel_list library will be removed after all petiole
policies are updated to delegate to pick_first.
2023-06-27 09:54:12 -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
Sergii Tkachenko 2878e85ef5
[PSM Interop] Bump the canonical server from v1.48.1 to v1.56.0 (#33542)
### From:

* Closest tag: `v1.48.1`
* Branch: https://github.com/grpc/grpc-java/commits/v1.48.x
* Commit: grpc/grpc-java@d56f8fbe1d
* Image:
gcr.io/grpc-testing/xds-interop/java-server:d56f8fbe1d2822bc4f91515dd471ad49493fc385


### To:

* Closest tag: `v1.56.0`
* Branch: https://github.com/grpc/grpc-java/commits/v1.56.x
* Commit: grpc/grpc-java@558b5b0bfa
* Image:
gcr.io/grpc-testing/xds-interop/java-server:558b5b0bfac8e21755c223063274a779b3898afe
2023-06-26 14:29:58 -07:00
github-actions[bot] dde1291a97
Automated fix for refs/heads/master (#33546)
PanCakes to the rescue!

We noticed that our 'sanity' test was going to fail, but we think we can
fix that automatically, so we put together this PR to do just that!

If you'd like to opt-out of these PR's, add yourself to NO_AUTOFIX_USERS
in .github/workflows/pr-auto-fix.yaml

Co-authored-by: HannahShiSFB <HannahShiSFB@users.noreply.github.com>
2023-06-26 12:46:19 -07:00
Mark D. Roth 8427bacaea
[resolver API] remove address attribute interface (#33514)
The address attribute interface was intended to provide a mechanism to
pass attributes separately from channel args, for values that do not
affect subchannel behavior and therefore do not need to be present in
the subchannel key, which does include channel args. However, the
mechanism as currently designed is fairly clunky and is probably not the
direction we will want to go in the long term.

Eventually, we will want some mechanism for registering channel args,
which would provide a cleaner way to indicate that a given channel arg
should not be used in the subchannel key, so that we don't need a
completely different mechanism. For now, this PR is just doing an
interim step, which is to establish a special channel arg key prefix to
indicate that an arg is not needed in the subchannel key.
2023-06-26 10:02:06 -07:00
Yijie Ma 35754ac603
[Release] Add 1.56.0 to interop matric for C++, ruby, php, python (#33541)
<!--

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-26 09:32:44 -07:00
Hannah Shi c6e4a60f8f
[ObjC] run cf event engine test suit on ios (#33534)
Run cf event engine test suit on ios

CC: @sampajano  @mikefan1991
2023-06-25 20:11:56 +00:00
alto-ruby 059144abd6
[Ruby] add aarch64 linux build (#33079)
This adds pre-built library for aarch64 linux, will help improve the
install speed and avoid building environment issues at customer side.

@apolcyn @jtattermusch Can you help build and push the new rake compiler
image?
Will update the tag and hash after the image is available

Manually tested locally:
```
uname -a
Linux u20 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
```
```
time gem install /work/ruby/grpc/pkg/grpc-1.56.0.dev-aarch64-linux.gem
Successfully installed grpc-1.56.0.dev-aarch64-linux
Parsing documentation for grpc-1.56.0.dev-aarch64-linux
Installing ri documentation for grpc-1.56.0.dev-aarch64-linux
Done installing documentation for grpc after 0 seconds
1 gem installed

real	0m22.794s
user	0m17.268s
sys	0m5.156s
```
```
ruby greeter_server.rb &
[1] 319
ruby greeter_client.rb
"Greeting: Hello world"
```

Fixes:
https://github.com/grpc/grpc/issues/31855
https://github.com/grpc/grpc/issues/29489
2023-06-25 13:00:40 -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
Xuan Wang 20fbd3fb30
[PSM interop] Don't fail url_map target if sub-target already failed (#33520)
Follow up change of #33222.

We don't want file multiple bugs if any of the sub-tests of the
`url_map` test fails.
2023-06-22 15:43:11 -07:00
Yash Tibrewal ba878c804d
Revert "[HTTP2] Fix inconsistencies in keepalive configuration (#33428)" (#33512)
This reverts commit e107ff5e99.




<!--

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-21 15:49:35 -07:00
Vignesh Babu cd4ff81b3f
Revert "Revert "[resource quota] Fix bugs in iomgr and event engine endpoint interactions with resource quota"" (#33499)
Reverts grpc/grpc#33417

Deadlock
https://fusion2.corp.google.com/invocations/99834386-79ff-4707-86eb-52e604774ea9/details
fixed in the c9a1bdc3dc commit.
2023-06-21 09:36:44 -07:00
Moritz 2c336ac7fd
[tools] Switch to Dart stable (#33498)
Fixing b/288120247 together with
https://github.com/grpc/grpc-dart/pull/644.
2023-06-21 08:44:33 -07:00
Yash Tibrewal f8dd1a05dc
[http2] Rename configuration_test to ping_configuration_test (#33500)
<!--

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-20 14:19:59 -07:00
Sergii Tkachenko fb9e927322
[PSM Interop] Outlier detection: use native cpp server since v1.57.x (#33135)
Related:
- CPP implementation: be99673d06,
d55431995c.
- Feature request in go: https://github.com/grpc/grpc-go/issues/6288
- Feature request in python: https://github.com/grpc/grpc/issues/33134

FYI @eugeneo @zasweq

---------

Co-authored-by: Eugene Ostroukhov <eostroukhov@gmail.com>
2023-06-20 13:32:53 -07:00
Yash Tibrewal e107ff5e99
[HTTP2] Fix inconsistencies in keepalive configuration (#33428)
Noticed some inconsistencies in our keepalive configuration - 

* Earlier, even if keepalive pings were disabled, we would be scheduling
keepalive pings at an interval of INT_MAX ms.
* We were not using `g_default_client_keepalive_permit_without_calls` /
`g_default_server_keepalive_permit_without_calls`. They are both false
by default but they can be overridden in
`grpc_chttp2_config_default_keepalive_args`.

<!--

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-17 17:15:47 -07:00
Eugene Ostroukhov d55431995c
[interop] Implement "hostname" for RPC behavior (#33446)
This enables outlier detection test. See #33135
2023-06-16 11:14:01 -07:00