Commit Graph

53290 Commits

Author SHA1 Message Date
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
Esun Kim 16a11fadff
[Test] Explicitly cast `enum class` to `int` before passing it with a format string (#33554)
Corresponding internal cl/542804880

> Explicitly cast `enum class` to `int` before passing it with a format
string.
> 
> Next version of the crosstool will start warning about this (see:
>
[https://github.com/llvm/llvm-project/issues/38717](https://www.google.com/url?sa=D&q=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-project%2Fissues%2F38717))
2023-06-26 23:18:09 -07:00
Xuan Wang a3fd9e4742
[python O11Y] Add OpenCensus StackDriver exporter (#33384)
Add OC StackDriver exporter.

### Testing
* StackDriver requires integration with GCP thus not included in Bazel
tests, this will only be tested in integration tests.
* Tested locally, was able to publish metrics and spans to GCP:
  * Span:
* <img width="1501" alt="CloudTrace"
src="https://github.com/grpc/grpc/assets/24593237/e6574d05-a6c1-4925-89b1-f9dc1213d9bd">
  * Metric:
*
![CloudMonitoring](https://github.com/grpc/grpc/assets/24593237/2625815d-2512-46d6-b216-61d93b1ad4ed)
2023-06-26 17:26:32 -07:00
Mark D. Roth ababacd5fc
[xDS] fix fuzzer-found failure in ClusterSpecifierPlugin handling (#33552)
Fixes b/288542307.
2023-06-26 16:52:46 -07:00
Yijie Ma e3c22b944b
[Fuzzing] Fix use-after-free in resolver_fuzzer (#33553)
In FuzzingDNSResolver, capturing the engine as raw pointers in the
lambda functions instead of capturing the `this` pointer. By the time
the lambda is ran, the FuzzingDNSResolver might already be destroyed but
the engine should still be alive.


<!--

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 16:40:19 -07:00
Matthew Stevenson 4b55f22e6e
[alts] Remove ExecCtx check from alts_zero_copy_grpc_protector_create function. (#33494)
I'm fixing the ALTS/Envoy transport socket extension (which is currently
broken). Along the way, I'm trying to remove as many uses of gRPC
internals as possible (with the eventual goal of only relying on public
gRPC APIs and the alts_zero_copy_grpc_protector). To this end, I need to
remove the ExecCtx check in the alts_zero_copy_grpc_protector_create
function, so that Envoy can call into this function without needing to
create an ExecCtx.
2023-06-26 15:12:52 -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
Mark D. Roth 8393319423
[health checking] prep for outlier detection ejecting via health watch (#33340)
Currently, the outlier_detection policy reports ejection by intercepting
a subchannel's raw connectivity state watch. In the dualstack backend
design, we will instead want to report ejection via the health watch.
This PR is a first step toward that goal.

Specific changes in this PR:
- Add `type()` method to `InternalSubchannelDataWatcherInterface`, to
make it possible for LB policies to intercept data watchers.
- Use that mechanism in the outlier_detection policy to report ejection
both via raw connectivity state watches and via health watches. The hack
to prevent outlier_detection from working with pick_first from #33336
has been changed to affect only the raw connectivity watch, not the
health watch.
- Change health check client to fall back to reporting the raw
connectivity state if client-side health checking is not enabled. This
will allow pick_first to unconditionally start a health watch when it is
running under a petiole policy, which will be a no-op if neither health
checking nor outlier detection are configured.

Once we are done changing all of the petiole policies to delegate to
pick_first, we will remove the code that allows outlier_detection to
work via the raw connectivity state, so it will work only via the health
watch.
2023-06-26 14:27:33 -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
Jan Tattermusch 1002319736
[csharp] reintroduce base_namespace experimental option to C# (with a patch) (#33535)
Reintroduces patched version of https://github.com/grpc/grpc/pull/32636
(which was reverted in https://github.com/grpc/grpc/pull/32957).

Together with cl/542843305, the internal build should work fine.

Supersedes https://github.com/grpc/grpc/pull/33310 (since a patch is
also needed).

---------

Co-authored-by: tony <tony.newell@pobox.com>
2023-06-26 11:20:26 +02: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
Mike Dalessio 6076825390
[ruby] Add `-weak_framework CoreFoundation` to link line (#33538)
Add -weak_framework CoreFoundation to the ruby extension link line on
arm64-darwin, to address "undefined symbols" issues from #33483

This is a variation on #33513 in response to feedback and so I've made
sure @alto-ruby is credited as co-author.

Closes #33483

Supersedes #33513

cc @apolcyn

Co-authored-by: alto-ruby <altorubys@gmail.com>
2023-06-23 15:43:02 -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
Michael Lumish 1bf3f56c97
[examples] Replace Node example files with references to the new location (#33522)
This change is part of a migration of the Node examples from this
repository to the grpc/grpc-node repository, along with
grpc/grpc-node#2474. I replaced the files with references to the new
location instead of deleting them so that people following links in
existing external resources would find information about the new
location instead of an unhelpful 404 error. I discovered that even some
of the individual `.js` files are linked from other places, so to be
safe I performed this replacement on every file in the directory.
2023-06-22 17:48:33 -07:00
Eugene Ostroukhov fc4736c1ad
[interop] Fix crash in pick_first LB policy (#33519)
Fixes http://b/288420022
2023-06-22 16:29:15 -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
Mark D. Roth 32a46a9f9b
[grpclb] Use a separate channel arg to enable load reporting filter (#33465)
This avoids overloading the GRPC_ARG_LB_POLICY_NAME channel arg, which
is really intended for passing from the application to the client
channel.
2023-06-22 13:40:04 -07:00
Yijie Ma 6e95cebbd0
[EventEngine] Simplify `EventEngine::DNSResolver` API (#33459)
This change simplifies `EventEngine::DNSResolver`'s API based on the
proposal:
[go/event-engine-dns-resolver-api-changes](http://go/event-engine-dns-resolver-api-changes).
Note that this API change + the implementation described in
[go/event-engine-dns-resolver-implementation](http://go/event-engine-dns-resolver-implementation)
has already been tested against our main test suites and are passing
them.


<!--

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-22 12:19:20 -07:00
AJ Heller 055158b932
[iomgr][Windows] Return proper error code to client when connection is reset (#33502)
Fixes #24206 by ensuring that IOCP/socket errors in the iomgr on_read
callback are properly annotated with the gRPC Unavailable status. The
WindowsEventEngine was already doing this correctly (try running the
client with `$env:GRPC_EXPERIMENTS="event_engine_client"`).

This also adds two small cleanups:
* Cleanly prints statuses with their child statuses in a few spots
within the chttp2 transport logging (previously, child messages were
printed with garbled bits)
* Adds friendly names to a subset of WSA errors that we're likely to see
from common operations. The top-level status message will no longer just
say "WSA Error" in many cases.

CC @Hamza-Q
2023-06-22 08:44:56 -07:00
Mark D. Roth 7910554cdd
[client_channel] fix dumb bug in data watcher comparator (#33413)
This fixes a dumb bug from #33359, where I used `==` instead of `<` in
the comparator functor.

It also avoids unnecessary down-casting of the `unique_ptr<>`.
2023-06-21 16:18:01 -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
Yash Tibrewal 441ff0e757
[logging] Add tests for cases where we don't send any metadata and improve debuggability (#33486)
<!--

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 14:48:23 -07:00
Hannah Shi 12e0e60242
[ObjC] generate Package.swift from template (#33505)
This is to help simplify the grpc iOS release flow.

Package.swift was manually written and out of sync for a long time in
this repo.
They are currently being updated updated for releases in
[grpc-ios](https://github.com/grpc/grpc-ios) repo, which includes a lot
of manual work to include new files and exclude tests.

This diff generate Package.swift from a template like other languages to
avoid the tedious work. Currently only gRPC-Core is generated form the
template, gRPC-cpp remains the same for now as they don't change often.

CC @sampajano
2023-06-21 12:50:49 -07:00
Esun Kim a194f145e4
Revert "[svc-cfg] Move ServiceConfigChannelArgFilter to promises" (#33508)
Reverts grpc/grpc#33473 as it caused an internal test breakage.
2023-06-21 12:20:40 -07:00
Ben Beasley 011e1162c2
[Test] Use `ssl.SSLContext.wrap_socket`, not `ssl.wrap_socket` (#33492)
In the HTTP(S) test server in the core tests, use
`ssl.SSLContext.wrap_socket`, not `ssl.wrap_socket`. The latter emits a
`DeprecationWarning` since Python 3.10 and is [removed in Python
3.12](https://github.com/python/cpython/issues/94199).

This fixes the core tests (but not necessarily the `grpcio` tests) for
Python 3.12.

This is relevant to https://github.com/grpc/grpc/issues/33063.
2023-06-21 10:06:08 -07:00
apolcyn e9c44836bc
[fork] simplify Fork::SetResetChildPollingEngineFunc to fix nested forking (#33495)
Noticed this in a nested forking test in
https://github.com/grpc/grpc/pull/33430 (by nested fork - forked child
process forks again).

Before this change, the EventEngine and non-EventEngine pollers were
competing with each other in their calls to
`Fork::SetResetChildPollingEngineFunc`. In the first child's after-fork
handler, the EE engine would [clear
out](123da4a866/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc (L260))
the post-fork handlers of the non-EE poller, leaving the grandchild
without the right post-fork cleanup method.
2023-06-21 09:59:58 -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
Eugene Ostroukhov 7bce35ed41
Revert "Revert "[lb pick_first] Enable random shuffling of address list" (#33497)
Original: #33496 

This reverts commit d59c8eb0f5.
2023-06-20 15:53:34 -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
Eugene Ostroukhov d59c8eb0f5
Revert "[lb pick_first] Enable random shuffling of address list (#33254)" (#33496)
Original PR: 33254

This reverts commit 7e14a322a2.
2023-06-20 11:25:01 -07:00
Benjamin Kramer 834683f08d
[cleanups] Silence a -Wformat compiler warning (#33484)
New versions of Clang (and GCC) warn about this

grpc_authorization_policy_provider.cc:124:17: error: format specifies
type 'int' but the argument has type 'absl::StatusCode'
[-Werror,-Wformat]
124 | "authorization policy reload status. code=%d error_details=%s",
      |                                                           ~~
125 | status.code(), std::string(status.message()).c_str());
2023-06-20 10:58:02 -07:00
Craig Tiller 123da4a866
[rbac] Convert to promises (#33472)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-20 08:53:02 -07:00
Craig Tiller b28c4048f9
[fuzzing] Fix failures found by max_connection_idle_fuzzer (#33487)
In chttp2: a pending but not yet sent goaway should block incoming
requests just like a sent one (we will sent that data momentarily!)

In the test:
- handle the case of the connection idle timeout happening before the
  request arrives at the server
- disable retries, as these cause the request to get stuck (as we don't
  have an additional server to retry on)

Fix b/287897932

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-20 08:51:05 -07:00
Craig Tiller 223117fc85
[fuzzing] Increase deadline to accommodate fuzzing injected delays (#33480)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-20 15:49:46 +00:00
Craig Tiller 14de20bc3f
[svc-cfg] Move ServiceConfigChannelArgFilter to promises (#33473)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-20 08:48:28 -07:00
Craig Tiller a8132669f4
[flake] Raise deadline to eliminate flake in request_with_payload (#33488)
Observed on CI over the weekend (and quite reproducible)

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-20 08:46:34 -07:00
Craig Tiller 153f4e262c
[fuzzing] Increase deadline to accommodate fuzzing injected delays (#33481) 2023-06-20 08:46:16 -07:00
Eugene Ostroukhov 7e14a322a2
[lb pick_first] Enable random shuffling of address list (#33254)
Implementation of [gRFC A62](https://github.com/grpc/proposal/blob/master/A62-pick-first.md)
2023-06-20 08:41:36 -07:00
Yuriy Chernyshov 846a4e8205
[obj-c] Drop remaining usages of 'using std::string' (#31517) 2023-06-19 13:00:56 -07:00
Yash Tibrewal e35cf362a4
Revert "[logging] Handle trailers-only responses (#33461)" (#33485)
This reverts commit cb9fe64fa5.

This broke tests
https://fusion2.corp.google.com/ci/kokoro/prod:grpc-gcp%2Ftools%2Fobservability%2Fmaster%2Fcontinuous_cpp/activity/8c408662-43bd-4377-a6b9-9a89490cea83/tests

Attempting to add a test in https://github.com/grpc/grpc/pull/33486


<!--

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-19 11:59:59 -07:00
Craig Tiller 55e20c3494
[logging] Fix for ubsan error (#33475)
https://source.cloud.google.com/results/invocations/4f79493b-e776-4b6a-9d17-f0cb76e72b3a/targets/%2F%2Ftest%2Fcpp%2Fext%2Ffilters%2Flogging:logging_test@poller%3Depoll1/log
2023-06-18 23:50:19 -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