The gRPC project is primarily covered by the Apache License v2.0. Over the years, several files were added to the repo carrying other licenses, Mozilla Public License Version 2.0, and BSD 3-Clause License. These additional licenses were never
intended to cover the entire repository, and were intended to be scoped to the specific files that carried in those different licenses. This change clarifies the scoping of which files are covered by either the MPL v2.0 or BSD 3-Clause License.
Closes#41476
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41476 from emil10001:license-scope b5f7fdd618
PiperOrigin-RevId: 860326676
This should be a no-op unless subchannel connection scaling is enabled, and that's controlled by a separate experiment.
See #41029 for implementation.
Closes#41475
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41475 from markdroth:pf_experiment_enable a2d316b447
PiperOrigin-RevId: 860319677
Splitting this out of #40938.
In preparation for changing how we pass configs to xDS HTTP filters, this PR changes the ConfigSelector API such that it returns the filter chain for each RPC rather than just once when the ConfigSelector is first returned to the resolver.
Currently, all ConfigSelector impls return the same filter chain for every RPC, so there is no functional change here.
In a future PR, I will change the xDS ConfigSelector to create a separate filter chain for each route and then return the corresponding filter chain when it chooses the route for each RPC.
Closes#41191
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41191 from markdroth:config_selector_returns_filters da7da1fb35
PiperOrigin-RevId: 860301573
Enable a change for RR and WRR LB policies to start connecting from a random index in the subchannel list, to avoid sending too much traffic to the first address on the list.
See #40235 for original implementation.
Closes#41472
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41472 from markdroth:rr_wrr_connect_from_random_index_enable 1000ab3794
PiperOrigin-RevId: 860273422
The plan for the `event_engine_poller_for_python` experiment is to roll it out in the next release, and then potentially remove it for the release after that. So I pushed that one out to around the 1.80 release date. Resolving the other EventEngine experiments is blocked on Python, so I moved those to April. And the fork support experiment will require some extra testing that I'm not sure of yet, so I pushed that one to May
<!--
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#41470
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41470 from murgatroid99:experiments_update 7ffba81582
PiperOrigin-RevId: 860252919
Updates expiration dates for the following experiments:
- call_tracer_in_transport: This is already enabled in OSS but is blocked internally, so the experiment will have to stick around for a while longer.
- error_flatten and rr_wrr_connect_from_random_index: These are both fully rolled out internally and have not caused any problems. It looks like I never enabled them in OSS, though, so I'll plan to do that in subsequent PRs, and I'll keep the experiments around for one more OSS release, just to be safe.
- pick_first_ready_to_connecting: This is in the process of rolling out internally, but I expect the change to be a no-op, so I will enable it in OSS in a subsequent PR. The experiment will need to stick around until the internal rollout completes.
- subchannel_wrapper_cleanup_on_orphan: This is in the process of rolling out internally. Once that completes, I'll enable it in OSS.
- subchannel_connection_scaling: This feature hasn't even fully landed yet, much less started rolling out, so it will need a while.
Closes#41468
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41468 from markdroth:experiment_expiration 918275c184
PiperOrigin-RevId: 860191357
Introduces a new layout intent `kCode` to render text with a monospace font and preserved whitespace. This is used for formatting `grpc::channelz::v2::Promise` objects in Zviz, making their structure clearer. Also, applies `white-space: pre-wrap` to the general `.zviz-data` style.
PiperOrigin-RevId: 860187243
This change removes the experiment flags `channelz_use_v2_for_v1_api` and `channelz_use_v2_for_v1_service`, making the V2-based implementation the default for both the legacy C-style channelz API and the C++ Channelz service. The old V1 rendering code paths and helper functions are removed from `legacy_api.cc` and `channelz_service.cc`.
PiperOrigin-RevId: 860142585
In the core, the default value of the `GRPC_ENABLE_FORK_SUPPORT` environment variable is determined by the value of the `GRPC_ENABLE_FORK_SUPPORT_DEFAULT` macro, which is by default derived from the value of the `GRPC_ENABLE_FORK_SUPPORT` macro. Python sets `GRPC_ENABLE_FORK_SUPPORT`, so the feature is enabled there by default. However, Python also reads the value of the `GRPC_ENABLE_FORK_SUPPORT` environment variable and sets its own default in `fork_posix.pyx.pxi`, and the feature is disabled there by default. The result is a mixed state that causes problems.
This change fixes that by disabling the feature by default in both places. In the long run we want to enable it by default everywhere, but for now we don't have confidence in its stability.
Closes#41455
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41455 from sergiitk:fix/py/fork-defaults 73be72d9e8
PiperOrigin-RevId: 859928704
This change should enable us to build most C/C++ tests with bzlmod.
`googleapis` is also updated because google_cloud_cpp 2.35.0 uses a modified version of googleapis. This requires us to copy some boilerplate code from upstream (BCR and google_cloud_cpp respectively).
Alternatively we could also use google_cloud_cpp from BCR, it takes less coding work but the lowest version available is 3.0.0 and requires a bunch of version bumps to other modules, so it might be more risky.
`rules_proto` version is increase to 7.1.0 (requested by google_cloud_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.
-->
Closes#41311
PiperOrigin-RevId: 859764899
- Removes all usages of `six`.
- Refactors the code to assume py3-style iterables.
- Other minor fixes related to getting rid of Python 2 syntax.
- Minor unrelated change: adds `repr` to `run_tests.Config`.
Note: This just removes the usages of `six` in code. I'll clean up CI dependencies in a separate PR.
Closes#41040
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41040 from sergiitk:feat/py/remove-six 1e43aceef3
PiperOrigin-RevId: 859704528
We decided that existing interop tests are sufficient for this.
<!--
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#41459
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41459 from murgatroid99:xds_sni_remove_env_var 96bd6c99ff
PiperOrigin-RevId: 859686823
This option was added to the core credentials API in #41051. Now we add the same option to the corresponding C++ API.
b/203822267
<!--
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#41460
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41460 from murgatroid99:c++_creds_sni_override 7241f2afeb
PiperOrigin-RevId: 859620187
https://github.com/grpc/grpc/pull/41309 caused timeout because a full
build is too expensive.
This PR changes the new bazel command to use the --nobuild option. This
triggers bazel's "static" dependency analysis without compiling C++
code. This test does NOT detect issues caused by module
incompatibilities (e.g. some package doesn't build with new version of
absl).
---------
Co-authored-by: Mark D. Roth <roth@google.com>
To avoid data races and use-after-free on shutdown in Python 3.13.
It seems to have worked before due to unintended guarantees of the
Python interpreter that are gone with the new version.
Uses `threading.Event` and `threading.Lock` to coordinate between the main thread handling signals and the `flush_stdout_loop` thread. The `_quit_on_signal` handler now signals the flush thread to exit, and waits for the flush thread to complete its current sleep cycle before calling `sys.exit()`. This prevents a use-after-free that shows up as a data race.
Ref b/474047558
PiperOrigin-RevId: 859182150
I added this in anticipation of wanting to use it, but that hasn't transpired... and we're seeing flaky tests. Removing for now.
Closes#40933
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40933 from ctiller:tdigest-- ba911bfe96
PiperOrigin-RevId: 858731635
Consider a scenario where the `CallInitiator` is waiting on a server-to-client message and server trailing metadata. Now, when the server pushes trailing metadata with a non-cancelled status, `server_to_client_push_state` (Idle) as well as `server_to_client_pull_state` (Reading) are not changed. `PollPullServerToClientMessageAvailable` will wake up as it waits on `server_trailing_metadata_waker` but `PollServerTrailingMetadataAvailable` does not wake up as it just waits on `server_to_client_push_state` and `server_to_client_pull_state`. This results in RecvStatus op on the client to never resolve.
PiperOrigin-RevId: 857054609
What happened:
* An upgrade of envoy_api was introduced https://github.com/grpc/grpc/pull/41242
* Bazel now pick googleapis@0.0.0-20251003-2193a2bf because envoy_api requested it.
* googleapis has gone through a refactor somewhere in between 0.0.0-20240819-fe8ba054a and googleapis@0.0.0-20251003-2193a2bf. As a result `switched_rules` became completely broken for bzlmod. The new recommended approach for bzlmod is to use `googleapis-{cc,python,grpc-cc}`
* v1.78.0-pre1 BCR release is blocked, I had to add an overlay [patch](https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/grpc/1.78.0-pre1/patches/add_deps_for_googleapis_switched_rules.patch) to unblock release.
* This PR is created to integrate the change to master.
Related discussion:
https://github.com/bazelbuild/bazel-central-registry/issues/3941
<!--
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#41363
PiperOrigin-RevId: 856792330
Pin versions for riegeli so fuzztests can properly compile with bzlmod.
Caveat: in workspace we use fuzztest from 2023-05-16 but in bzlmod we use fuzztest@20241028.0. The reason is likely that BCR doesn't have older version of fuzztest, and it might cause some behavioral difference between our workspace and bzlmod settings.
<!--
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#41309
PiperOrigin-RevId: 856401926
`tools/artifact_gen/metadata_for_wrapped_languages.cc` determines whether a header exports C API by matching file contents against regex `?:GPRAPI|GRPCAPI|CENSUSAPI)([^#;]*)`, and the headers later get included by `rb_grpc_imports.generated.h`. The C++ std utility `std::optional<>` end up breaking ruby distrib tests.
It seems like all pending PRs are affected. An example: https://btx.cloud.google.com/invocations/4caed1d7-19e0-4a59-9786-28a7ddb03051/targets
<!--
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#41407
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41407 from yuanweiz:fix_ruby 97f5c958e4
PiperOrigin-RevId: 856229588
Adding PH2 experiment to the client_interceptors_end2end_test suite.
Also adding the Channel Arg wherever we missed it in the earlier PR : https://github.com/grpc/grpc/pull/41399/files
PiperOrigin-RevId: 856102643
This includes two major changes:
1. An additional credentials option `sni_override` with the type `optional<string>`. If `nullopt`, it has no effect, and if set to the empty string it disables sending SNI entirely. Otherwise, the specified string will be sent.
2. The implementation of [gRFC A101](https://github.com/grpc/proposal/blob/master/A101-SNI-setting-and-SNI-SAN-validation.md) using that new option. This includes options to set SNI and to validate SAN values against the set SNI value.
Closes#41051
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41051 from murgatroid99:xds_sni_support 6a1f8667de
PiperOrigin-RevId: 855765736
This test is especially painfully slow in case of asan. However, we cannot disable a test or a single EXPECT just for asan. So the assert needs to be removed. It is creating too much noise.
Having time dependent tests is never a good idea.
PiperOrigin-RevId: 855129723