Regardless of whether we change server behavior to continue running after a failed `getpeername` on accept, this improves the logs for the current server behavior.
Related to #35076Closes#35611
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35611 from drfloob:louder-server-stoppage-on-bad-getpeername 2d1e69aff0
PiperOrigin-RevId: 599886474
This PR is required in order to upgrade to the `master` branch version of protobuf. To do this, we upgrade to the latest version of `rules_python` by:
- Adding in explicit dependencies on all PyPi Bazel test dependencies
- Resolving the circular dependency this creates for `xds-protos` by giving it a Bazel build
- Generating the Python code for `xds-protos` as part of `generate-projects.sh` since doing so directly in Bazel would be highly fragily, dependent on many other projects' Bazel builds
Closes#34945
PiperOrigin-RevId: 599875020
Add `gamma.csm_observability_test` test suite to `grpc/core/master/linux/psm-csm` Kokoro job.
Closes#35588
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35588 from sergiitk:psm-kokoro-csm_observability_test dc0c0f234d
PiperOrigin-RevId: 599664886
A few improvements to the promise context system (more coming)
Allow subclassed contexts:
If we have multiple different kinds of a base context, allow `GetContext<Derived>()` to mean `down_cast<Derived*>(GetContext<Base>())` everywhere for brevity.
Allow custom context lookup:
For a base context type, allow customization of how that context is looked up.
These two together allow:
1. normalization of activity lookup and context lookup to the same syntax (so we can write `GetContext<Activity>()` everywhere now
2. Party & Activity to share a context, so that anywhere we need to do a party specific operation we can write `GetContext<Party>()->...` and safely know that it's the current activity *and* it's a party.
Closes#35592
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35592 from ctiller:contextual-types 37ef948a36
PiperOrigin-RevId: 599651708
We've got a few situations coming up with promises that will want a "broadcast new value to everywhere" situation.
Closes#35552
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35552 from ctiller:obs 30fd697ae3
PiperOrigin-RevId: 599609399
Fix: https://github.com/grpc/grpc/issues/35555
<!--
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.
-->
Only call constructors when absolutely necessary (empty trivially constructible types don't need construction!!)
Similarly for destructors, if the destructor is trivial it means C++ will do no work destructing it... let's not even do the virtual function call to get there.
(also fix a bug where we weren't calling this stuff anyway, and add a test that would have caught that)
Closes#35591
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35591 from ctiller:filter-min 2933152d61
PiperOrigin-RevId: 599521371
<!--
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.
-->
Closes#35576
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35576 from tanvi-jagtap:tjagtap_maintainer_list1 2d4536b5c5
PiperOrigin-RevId: 599362298
We've been trying to upgrade Cmake to 3.13 or later as OSS policy bumped it. But we couldn't as Android has a weird linker error with Cmake 3.18 (you can see the error from https://github.com/grpc/grpc/pull/34331) This PR instead upgrades it to use 3.22 for Android test.
Closes#35572
PiperOrigin-RevId: 599317285
The `grpc_channel_args` is retained on the Ruby object and used for recreating the channel after forking in
grpc_rb_channel_maybe_recreate_channel_after_fork(). Previously, the key for each argument was taken from a Ruby string directly, which could be invalidated if the Ruby string is modified or moved by the GC. Duplicate the string for the key instead, so we own it.
Reproducer in https://github.com/grpc/grpc/issues/35489
<!--
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.
-->
Closes#35488
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35488 from Shopify:key-uaf c1813cee01
PiperOrigin-RevId: 599304551
Change was created by the release automation script. See go/grpc-release.
Closes#35580
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35580 from stanley-cheung:bump_dev_version_202401171835 b363888ca5
PiperOrigin-RevId: 599267642
A call execution environment for the V3 runtime.
The `CallFilters` class will ultimately be a (private) member of `CallSpine`, and the `StackBuilder` component will be used by a channel when all of the filters it needs are known to allow the call spine to start processing a call.
This is accompanied by a reasonably extensive test suite.
I expect to fine tune semantics, implementation, and tests over the coming weeks/months as we iterate to bring up the rest of the pieces.
Closes#35533
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35533 from ctiller:filters 689c7b527b
PiperOrigin-RevId: 599220150
<!--
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.
-->
Updates ruby-compiler-dock to 1.4.0 which brings Ruby 3.3 final support per https://github.com/rake-compiler/rake-compiler-dock/releases/tag/1.4.0 and starts cross-compiling for ruby 3.3.
I can't find obviously where the test infrastructure configuration is to run the tests under Ruby 3.3, so might need pointers or an accompanying PR for the test infra. (I note #31991 from @apolcyn so perhaps currently they are not run against newer versions)
Fixes#35396
- Backport to `1.60` is desirable since currently the Ruby gems cannot be installed with Ruby 3.3 and have to be built from source.
Closes#35399
PiperOrigin-RevId: 599200628
…#35493)"
This reverts commit d6579e32a0.
<!--
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.
-->
Closes#35570
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35570 from XuanWang-Amos:revert_aio_event_loop_change af4c6519e2
PiperOrigin-RevId: 598984869
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
Closes#35562
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35562 from grpc:create-pull-request/patch-fbd47fd 571581e637
PiperOrigin-RevId: 598913968
Fix: https://github.com/grpc/grpc/issues/35086
Starting Python 3.12, `asyncio.get_event_loop()` will [emit deprecation warning](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop) if there is no current event loop.
Since we're calling `get_event_loop()` in case there is no running loop, it make sense to use `new_event_loop()` instead.
<!--
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.
-->
Closes#35493
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35493 from XuanWang-Amos:suppress_event_loop_warnning 23b4a9b7d2
PiperOrigin-RevId: 598886480
<!--
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.
-->
<!--
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.
-->
<!--
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.
-->
Closes#35484
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35484 from dawidcha:win_shared_gs_api f8f244da99
PiperOrigin-RevId: 598863993
Add support for GCE resources in CSM Observability.
Additionally, fix a bug where we were not adding the remote workload's canonical service label for unknown resource types.
Also, if zone and region are both specified, zone takes precedence.
Closes#35371
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35371 from yashykt:GceSupportToCsm e3064d8c3c
PiperOrigin-RevId: 597989825
Part of the release process for 1.61. This PR is generated by the release process script.
Closes#35543
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35543 from stanley-cheung:bump_core_version_202401121911 b01100fd44
PiperOrigin-RevId: 597935684
<!--
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.
-->
Closes#35535
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35535 from yijiem:fix-release-note-script 97ccbc7ad2
PiperOrigin-RevId: 597925743
We were getting errors due to insane amounts of padding: enforce limits, fix b/319533934.
Closes#35537
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35537 from ctiller:fff 9f5f31ef27
PiperOrigin-RevId: 597899598
I originally made this change a couple of years ago as part of addressing b/238634105, but that bug turned out to actually be fixed by #30266, so I deprioritized this change and never got back to it. However, I'm now looking at another crash related to the LRS call in b/316407706, and while I don't know what the cause of this bug is yet, this code cleanup will make the code a lot easier to understand and reason about, so it seems useful to push forward.
Closes#30273
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/30273 from markdroth:xds_client_lrs_ref_leak 70facbddea
PiperOrigin-RevId: 597897473
As documented in [0], there are two certificate verification callbacks in the OpenSSL/BoringSSL TLS API. The one taken as a parameter to SSL_CTX_set_verify is the "verify callback". It is called multiple times during a single certificate verification is used to suppress errors and otherwise be notified about various events during verification.
Such a callback is not appropriate for accepting all certificates (you waste time processing things that will be thrown away), nor for post-verification inspection of the result (it will run multiple times). This is, however, what gRPC does with it.
Rather, gRPC should have used SSL_CTX_set_cert_verify_callback, which swaps out the verification process entirely. That is called exactly once per handshake and allows you to skip the verification, or verify and then inspect the results afterwards. Fix gRPC to heed the documentation.
In addition, this PR fixes a lifetime bug in gRPC's handling of the root certificate. RootCertExtractCallback stashes the root certificate without retaining it anywhere, but the X509_STORE_CTX will shortly be destroyed. There is no immediate guarantee the X509 object lasts as long as the SSL object. It most likely does because the object is often cached in the X509_STORE, which lives on the SSL_CTX, but this is at best, non-obvious. Instead, gRPC should have made
g_ssl_ex_verified_root_cert_index own a refcount to the X509 object by registering a free function and calling X509_up_ref when saving the value.
[0] https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_CTX_set_verify
<!--
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.
-->
Closes#35369
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35369 from davidben:wrong-verify-callback 5ccf3cf0f9
PiperOrigin-RevId: 597872521
It looks like this ended up getting deleted in https://github.com/grpc/grpc/pull/34350 probably when merging.
Also, the `Init` method in the otel test library is getting unwieldy. I'm going to send out a follow-up PR to convert this into a builder instead.
Closes#35532
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35532 from yashykt:OTelPluginBuilderFix 372bf26338
PiperOrigin-RevId: 597846622
We're having some issues internally, rolling this change back for now and wait for the affected users to figure out a solution.
This reverts: https://github.com/grpc/grpc/pull/35002, https://github.com/grpc/grpc/pull/35482 and 6872a7a473
<!--
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.
-->
Closes#35522
PiperOrigin-RevId: 597671989