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 6a1f8667dedc19947532720495b2932889236a12
PiperOrigin-RevId: 855765736
- The python code generators are deleted
- In a future PR, the sanitize script will be updated to use the C++ experiments code generator and the python script will also be deleted
Closes#40906
PiperOrigin-RevId: 825223102
Add the missing use_system_roots_over_language_callback in the config_vars.yaml file, and add support for double types in the generation script.
Closes#40766
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40766 from siddharthnohria:config_vars 1aff14e1d0781f20019181615c896e4be10c7dd7
PiperOrigin-RevId: 811847998
See `grpc_check.h`. This code redefines the abseil `CHECK*` macros using custom gRPC macros when building tests. In `bazel test ...` builds, on check failure, `PostMortemEmit()` will dump state to the log before crashing.
Caveat: to prevent circular dependencies, code that `postmortem` relies on cannot use the custom gRPC CHECK macros. This is not much code, ~50 source files. grep for the `absl/log:check` bazel dependency.
Closes#39945
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39945 from drfloob:grpc_check ca8e46718f2021e0df79aa67a3a0b0c751b3ce44
PiperOrigin-RevId: 807452496
This will allow us to run it from all docker environments, facilitating the generation of these files at build time on non-release branches.
Closes#39967
PiperOrigin-RevId: 776680199
1. Follow up on comments in #39774.
2. Fix poorly formatted multiple assignment statements in src/python/grpcio/grpc/_channel.py (from the initial black migration).
Closes#39820
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39820 from sergiitk:python-minor-syntax-improvements 0d7ac578228b7ad837f16f27b84800bb3bebfabf
PiperOrigin-RevId: 771200864
Add always inline to key methods in the Huffman decoder, and then re-run benchmarks and choose the best parameter set with the improved codegen.
Closes#39468
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39468 from ctiller:huff fa3434e6d9c5b9cfd621afe3809a935988d26dac
PiperOrigin-RevId: 765303408
Just the genesis for the moment... but we'll extend this for all combinators to get introspection of state, and then make this available for all promise combinators.
Closes#39580
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39580 from ctiller:jsonp ccd76b74375c12331b8a079c95e417a9a94b33ff
PiperOrigin-RevId: 759436377
<!--
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#39449
PiperOrigin-RevId: 754018350
Exclude `//tools/codegen/core:experiments_compiler_test` from Bazel RBE Non-Bazel Tests, which contains some bazel hackery.
The actual `//tools/codegen/core:experiments_compiler_test` is added in https://github.com/grpc/grpc/pull/39133. Since that PR hasn't merged yet, this code uses a dummy test temporarily to allow test checks to pass.
<!--
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#39369
PiperOrigin-RevId: 752349854
Exclude `//tools/codegen/core:experiments_compiler` target from bazel test, which contains some bazel hackery.
The actual `//tools/codegen/core:experiments_compiler` is added in https://github.com/grpc/grpc/pull/39133. Since that PR hasn't merged yet, this code uses a dummy target temporarily to allow test checks to pass.
<!--
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#39337
PiperOrigin-RevId: 750759908
Allow the core stats system to be used with scoped subsets of data - so we can start to collect some basic histograms/counters in the http2 stack for instance (or other transports, or channel level, etc...).
Collection of these has been optimized thoroughly already, and will be useful as a source of data for channelz and likely our other telemetry collection facilities.
Also allow scoped histograms to reduce the resolution stored -- instead of a full uint64_t, allow for instance a uint8_t - and re-scale values whenever things clip.
As a POC I've lifted a counter and associated histogram into the http2 stack.
Closes#39151
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39151 from ctiller:scopez 3caccaecb72c239956959bddf611d68e4f66fe66
PiperOrigin-RevId: 744004944
This includes the following moves from src/core/lib/security:
- certificate_provider/* → src/core/credentials/transport/tls/
- context/* → split between src/core/call/security_context* and src/core/transport/auth_context*
- credentials/
- composite/ → split between src/core/credentials/call/composite/ and src/core/credentials/transport/composite/
- alts, google_default, insecure, local, ssl, tls, xds → src/core/credentials/transport/
- fake/ → split between test/core/test_util/test_call_creds* and src/core/credentials/transport/fake
- external, iam, jwt, oauth2, plugin, token_fetcher → src/core/credentials/call/
- call_creds_utils.* → src/core/credentials/call/
- channel_creds_registry* → src/core/credentials/transport/
- credentials.* → split between src/core/credentials/call/call_credentials.* and src/core/credentials/transport/transport_credentials.*
- security_connector/
- alts, fake, insecure, local, ssl, tls → src/core/credentials/transport/
- security_connector* → src/core/credentials/transport/
- ssl_utils*, load_system_roots* → src/core/credentials/transport/tls/
- transport/ → src/core/filter/auth/
- util/* → src/core/credentials/call/
The only thing left in src/core/lib/security is the authz code, which I will move in a separate PR.
I have also moved the tests from test/core/security into a similar structure. Some specific notes:
- I have removed print_google_default_creds_token.cc, since it does not appear in any build file and appears to be completely unused.
- I moved secure_endpoint_test.cc to test/core/handshaker, to match where the implementation lives in the tree.
Closes#38825
PiperOrigin-RevId: 731487339
Switch to codegen so it's more obvious what goes on inside of a Switch function.
Closes#38755
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38755 from ctiller:switch cb2520c27f5f8360442ebd48b841fe08fe9316f2
PiperOrigin-RevId: 728712231
This reverts commit a7a650a74e.
Original PR breaks #38286 and I think the breakage is in the PR -- in a construct like:
```
TrySeq(
/*a*/ []() -> Promise<absl::Status>,
/*b*/ []() -> Promise<StatusFlag>,
/*c*/ []() -> Promise<absl::Status>)
```
the original seq_state code would try to promote the intermediate `StatusFlag` to an `absl::Status` which is great - however with the optimization, if `b` is instantaneous we try to demote the result of `a` to `StatusFlag`, losing information.
I'll need to consider how to change this optimization to preserve the final output type before rolling forward.
Closes#38748
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38748 from ctiller:rb1 743eb33bdf7af0dacd7bef50d12411c30f2198ea
PiperOrigin-RevId: 727109120
I made seqs/joins copyable a while ago in anticipation of a nice optimization -- that didn't pan out.
Having them copyable makes it more likely that `Loop` will accept them and try to turn them from promises into the promise factory that it expects, copying the insides... *which is usually wrong* and incredibly frustrating to debug.
Closes#38744
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38744 from ctiller:promising e7a0e8d0bbf084a764378a855c3e0ef8e5b66c6b
PiperOrigin-RevId: 727006243
Increasingly as we write sequences, we find ourselves writing some asynchronous parts interleaved with some synchronous parts. This PR seeks to provide a basic optimizer for sequences - it detects immediate returning promises (by the lack of a `Poll<T>` return type), and eliminates the state machinery required to evaluate them at compile time.
Closes#38445
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38445 from ctiller:optseq 81c5025d76fcfd7d286480836a948e7c5fad2ab8
PiperOrigin-RevId: 726641700
Aligned with the minimum supported Python version. Changes:
- Removed python 3.7 installed from `python_debian11_default_x64` docker image.
- Deleted `python_36.include` and `python_37.include` template files as they're no longer needed.
- Upgraded Python from 3.7 to 3.11 in `sanity` docker image.
- Some Python modules were modified to accomodate this
- Updated `buildifier` to v8.0.0 to have the same version that the CI tests use.
- Python 3.11 is the system default, but Python 3.7 remains installed for `pytype` and `pylint` that cannot be upgraded yet.
Closes#38693
PiperOrigin-RevId: 724071015
Maybe in some of these cases, `{}` would work instead of `std::pair`, but I'm just doing a simple find and replace here.
Closes#38636
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38636 from yashykt:NoMakePair d819f6a74be2fb2859083436297f79ed3139a1b7
PiperOrigin-RevId: 722772621
This lets us finally get a list of experiments in human readable form, and tracers in the same, without the fuzzer having to learn the list of string forms of these types.
Closes#38641
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38641 from ctiller:config 4bb6eca121bdb4682fcabb20fe42c85e2294d3f7
PiperOrigin-RevId: 721822909
VLOG is probably the wrong thing here (considering it's been requested explicitly via a trace)
Closes#38135
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38135 from ctiller:flake-fightas-26 52a78995d2822223c1cbc5a668dc34b178eb5ace
PiperOrigin-RevId: 697067177
The following files have been moved:
- src/core/lib/avl/*
- src/core/lib/backoff/*
- src/core/lib/debug/event_log*
- src/core/lib/iomgr/gethostname*
- src/core/lib/iomgr/grpc_if_nametoindex*
- src/core/lib/matchers/*
- src/core/lib/uri/* (renamed from uri_parser.* to uri.*)
- src/core/lib/gprpp/* (existing src/core/util/time.cc was renamed to gpr_time.cc to avoid conflict)
Closes#36792
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36792 from markdroth:reorg_util d4e8996f481c611ffbb06a8b04924ff81bc1bc2b
PiperOrigin-RevId: 676947640