CC @youyuanwu
This fixes a lock acquisition ordering problem in WindowsEventEngine's Connect behavior, between a ConnectionState's internal mutex, and a HandshakeManager's mutex. The connection state mutex should not be held when calling the on_connected callback.
This should unblock #34801Closes#35892
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35892 from drfloob:connect-callback-lock-cycle 4d56120e2f
PiperOrigin-RevId: 606752276
It could happen that we start two writes on the same endpoint simultaneously, leading to awesome results.
Closes#35900
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35900 from ctiller:write-order 1f7559d7b9
PiperOrigin-RevId: 606707912
Change was created by the release automation script. See go/grpc-release.
Closes#35889
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35889 from eugeneo:bump_core_version_202402121600 dfab90395b
PiperOrigin-RevId: 606635870
As discussed, this change adds scoping to `CsmObservability` such that when that object goes out of scope, new channels and servers don't record metrics. In the documentation, I've talked about how existing channels/servers are going to continue to record metrics but i've left room for us to change that behavior in the future.
The current way of doing this is through a global bool since there can only be one plugin right now, but we'll change this to use the global stats plugin registry in the future.
Closes#35835
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35835 from yashykt:DisableCsmObsOnScope 33a7c2f7bc
PiperOrigin-RevId: 605468117
Core team [moved resolver code](https://github.com/grpc/grpc/pull/35804) to `src/core/resolver`, our build is failing because we have a dependency on it and the resolver folder is not copied to `observability/grpc_root`:
* `call_tracer.h` -> `core_configuration.h` -> `lb_policy_registry.h` -> `lb_policy.h` -> `endpoint_addresses.h`
To fix this issue and to prevent such issues from happening again, instead of subfolders, we'll copy all files from `src/core` to `observability/grpc_root/src/core`.
<!--
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#35845
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35845 from XuanWang-Amos:fix_o11y_core_header_deps 3c9eb8c499
PiperOrigin-RevId: 605063207
Fixes#33935
The gRPC spec is not clear on how to handle headers where the "content-type" is not "application/grpc" or similar. We should be safe and not reject such headers.
Closes#35824
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35824 from yashykt:Fix33935 3d89af87ec
PiperOrigin-RevId: 604742049
<!--
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#35792
PiperOrigin-RevId: 604695910
Closes#35076. See discussion there for context.
Previously, if `getpeername` failed on a recently-accepted Unix domain socket, the server would shut down. It's unclear if there's any valid reason `getpeername` would fail here, we could be looking at system issues / data corruption, but it may be implementation-dependent. I did not find a man page that specified this behavior: getpeername on a server errors with `EBADF` when a client closes its end of a UDS connection; the server's fd should still be valid. I was not able to reproduce the failure on recent Linux/Mac systems where clients close their connection after a listener accepted (basic, non-gRPC test: listener accepts a connection and sleeps, client closes their end, then listener wakes up and calls getpeername).
If there are no valid reasons `getpeername` would fail in these spots, gRPC behavior is essentially undefined - we cannot defensively code around system failures in every place they may occur. If this _is_ a valid situation on some platforms, then this fix keeps the server alive as one would hope. There are arguments to be made for shutting down servers if the system is unstable, but I can't find an objectively correct behavior here. For those reasons, I think it may be best to keep the server running, which is what this PR does.
Closes#35823
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35823 from drfloob:abort-listen-on-failed-getpeername 29e723c5bb
PiperOrigin-RevId: 604694057
This new directory combines code from the following locations:
- src/core/ext/filters/client_channel/resolver
- src/core/lib/resolver
Closes#35804
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35804 from markdroth:client_channel_resolver_reorg2 30660e6b00
PiperOrigin-RevId: 604665835
Disabling before the 1.62 branch cut.
There is a flake in one specific interop test: cloud_to_prod_auth:c++:*:oauth2_auth_token:tls, with * being default or gateway_v4. There is also an unresolved PHP crash on test shutdown, just debug builds on Mac (not Linux or Windows).
Closes#35819
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35819 from drfloob:disable-posix-ee-client c42e8b8c20
PiperOrigin-RevId: 604474559
If we skip AnyObservable then Next can be implemented efficiently in terms of NextWhen, removing a case entirely (and making the NextWhen take one less indirection).
Closes#35817
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35817 from ctiller:opti 0ab5af602d
PiperOrigin-RevId: 604457384
This new directory combines code from the following locations:
- src/core/ext/filters/client_channel/lb_policy
- src/core/lib/load_balancing
Closes#35786
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35786 from markdroth:client_channel_resolver_reorg 98554efb98
PiperOrigin-RevId: 604351832
Changes -
* `CsmObservability` API will now use the `CsmOpenTelemetryPluginOption` internally. After this change, `CsmObservability` will enable observability for all channels and servers. (Earlier, `CsmObservability` only enabled observability for CSM-enabled channels and servers.) CSM labels will still be added just for CSM-enabled channels and servers.
* Also, we no longer need the ability to set `LabelInjector` on the `OpenTelemetryPluginBuilder` directly. Instead, we always use `PluginOption` to inject the `LabelInjector`. This simplifies the code as well.
Note that `SetTargetSelector` and `SetServerSelector` APIs on the `OpenTelemetryPluginBuilderImpl` are not being deleted yet since we might need them shortly. This is also why `OpenTelemetryPluginBuilderImpl` is not being deleted right now.
Closes#35803
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35803 from yashykt:CsmO11yApisUsePluginOption cf3d65900d
PiperOrigin-RevId: 604323898
<!--
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#35787
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35787 from yijiem:fix-fork 703b8ae039
PiperOrigin-RevId: 603492379
Change was created by the release automation script. See go/grpc-release.
On top of changes made by the script, `setup.py` had to be updated to have `/std:c11` option for MSVC to use c11 features for boringssl.
Closes#35768
PiperOrigin-RevId: 603403329
<!--
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#35754
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35754 from tanvi-jagtap:tjagtap_formatting_1027 386daf9fb5
PiperOrigin-RevId: 603234985
<!--
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#35755
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35755 from tanvi-jagtap:tjagtap_formatting_1028 022f3eb1ce
PiperOrigin-RevId: 603234961
<!--
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#35756
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35756 from tanvi-jagtap:tjagtap_formatting_1029 1330c8937b
PiperOrigin-RevId: 603234878
<!--
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#35757
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35757 from tanvi-jagtap:tjagtap_formatting_1030 931cf437b1
PiperOrigin-RevId: 603234762
Fix: https://github.com/grpc/grpc/issues/35086
<!--
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#35583
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35583 from XuanWang-Amos:fix_aio_eventloop aa0d207e99
PiperOrigin-RevId: 603188288