From f2ffbb89a2f7456b897e5556782e8639d161a6f6 Mon Sep 17 00:00:00 2001 From: Sreenithi Sridharan <19sreenithi98@gmail.com> Date: Wed, 25 Sep 2024 20:11:10 -0700 Subject: [PATCH 01/74] Add templating and support for Python 3.13 (#37643) This PR adds templating for Python versions and updates the maximum supported Python version to 3.13. The following major changes related to templating are added: - Minimum supported Python version and list of supported versions in `setup.py` are fetched using new template generated files called `python_version.py` - Dockerfiles for the different Python Linux builds are now template generated. - The "Supported Python Versions" section from READMEs of ancillary and main packages have been removed Note: All the `python_version.py` files and Linux build `Dockerfiles` except `tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile` in the PR are generated from the respective templates. Further non-templated additions to add support for Python 3.13: - install scripts and artifacts for windows, macos and linux are added manually. Later, these can be templated as well. - updated cython bounds to 3.x - updated twine version to solve [cgi module import error](https://github.com/pypa/twine/issues/1046) - the twine update introduces a dependency on cryptography>=2.0. But the cryptography package doesn't support 32-bit Linux images and hence `twine check` has been disabled for x86 manylinux and x86 musllinux artifacts. Closes #37643 PiperOrigin-RevId: 678954495 --- PYTHON-MANIFEST.in | 1 + WORKSPACE | 2 +- bazel/grpc_python_deps.bzl | 6 +- black.toml | 1 + build_handwritten.yaml | 7 +++ setup.py | 27 +++++---- src/python/grpcio/README.rst | 3 - src/python/grpcio/python_version.py | 20 +++++++ src/python/grpcio_admin/MANIFEST.in | 1 + src/python/grpcio_admin/python_version.py | 20 +++++++ src/python/grpcio_admin/setup.py | 5 +- src/python/grpcio_channelz/MANIFEST.in | 1 + src/python/grpcio_channelz/README.rst | 3 - src/python/grpcio_channelz/grpc_version.py | 2 +- src/python/grpcio_channelz/python_version.py | 20 +++++++ src/python/grpcio_channelz/setup.py | 29 ++++++---- src/python/grpcio_csds/MANIFEST.in | 1 + src/python/grpcio_csds/python_version.py | 20 +++++++ src/python/grpcio_csds/setup.py | 4 +- .../grpcio_csm_observability/MANIFEST.in | 1 + .../grpcio_csm_observability/README.rst | 3 - .../python_version.py | 20 +++++++ src/python/grpcio_csm_observability/setup.py | 4 +- src/python/grpcio_health_checking/MANIFEST.in | 1 + src/python/grpcio_health_checking/README.rst | 3 - .../grpcio_health_checking/python_version.py | 20 +++++++ src/python/grpcio_health_checking/setup.py | 27 +++++---- src/python/grpcio_observability/MANIFEST.in | 1 + src/python/grpcio_observability/README.rst | 3 - .../grpcio_observability/python_version.py | 20 +++++++ src/python/grpcio_observability/setup.py | 3 +- src/python/grpcio_reflection/MANIFEST.in | 1 + src/python/grpcio_reflection/README.rst | 3 - .../grpcio_reflection/python_version.py | 20 +++++++ src/python/grpcio_reflection/setup.py | 27 +++++---- src/python/grpcio_status/MANIFEST.in | 1 + src/python/grpcio_status/README.rst | 3 - src/python/grpcio_status/python_version.py | 20 +++++++ src/python/grpcio_status/setup.py | 27 +++++---- src/python/grpcio_testing/README.rst | 3 - .../python/grpcio/python_version.py.template | 22 +++++++ .../grpcio_admin/python_version.py.template | 22 +++++++ .../grpcio_channelz/grpc_version.py.template | 2 +- .../python_version.py.template | 22 +++++++ .../grpcio_csds/python_version.py.template | 22 +++++++ .../python_version.py.template | 22 +++++++ .../python_version.py.template | 22 +++++++ .../python_version.py.template | 22 +++++++ .../python_version.py.template | 22 +++++++ .../grpcio_status/python_version.py.template | 22 +++++++ .../distrib/python/grpc_version.py.template | 2 +- .../grpc_tools/python_version.py.template | 22 +++++++ .../grpcio_tools/python_version.py.template | 22 +++++++ .../xds_protos/grpc_version.py.template | 2 +- .../xds_protos/python_version.py.template | 22 +++++++ .../dockerfile/ccache_crosscompile.include | 14 +++++ .../dockerfile/compile_python_313.include | 21 +++++++ templates/tools/dockerfile/git_config.include | 22 +++++++ .../Dockerfile.template | 57 +++++++++++++++++++ .../Dockerfile.template | 28 +++++++++ .../Dockerfile.template | 33 +++++++++++ .../Dockerfile.template | 34 +++++++++++ .../Dockerfile.template | 27 +++++++++ .../Dockerfile.template | 25 ++++++++ .../dockerfile/python_pip_builds.include | 8 +++ .../Dockerfile.template | 1 + test/distrib/bazel/python/WORKSPACE | 2 +- .../dockerimage_current_versions.bzl | 14 ++--- tools/bazelify_tests/test/BUILD | 8 +-- ... build_artifact_python_linux_x64_cp313.sh} | 4 +- .../expand_supported_python_versions.py | 33 +++++++++++ tools/distrib/install_all_python_modules.sh | 1 - tools/distrib/python/grpc_version.py | 2 +- tools/distrib/python/grpcio_tools/MANIFEST.in | 2 + .../grpcio_tools/grpc_tools/python_version.py | 20 +++++++ .../python/grpcio_tools/python_version.py | 20 +++++++ tools/distrib/python/grpcio_tools/setup.py | 3 +- tools/distrib/python/xds_protos/MANIFEST.in | 1 + .../distrib/python/xds_protos/grpc_version.py | 2 +- .../python/xds_protos/python_version.py | 20 +++++++ tools/distrib/python/xds_protos/setup.py | 4 +- tools/dockerfile/README.md | 4 ++ ...rtifact_python_linux_armv7.current_version | 2 +- .../Dockerfile | 40 ++++++++++--- ...stall_python_for_wheel_crosscompilation.sh | 2 +- ...thon_manylinux2014_aarch64.current_version | 2 +- .../Dockerfile | 50 +++++++++++----- ...t_python_manylinux2014_x64.current_version | 2 +- .../Dockerfile | 48 +++++++++++----- ...t_python_manylinux2014_x86.current_version | 2 +- .../Dockerfile | 48 +++++++++++----- ...t_python_musllinux_1_1_x64.current_version | 2 +- .../Dockerfile | 52 ++++++++++++----- ...t_python_musllinux_1_1_x86.current_version | 2 +- .../Dockerfile | 50 +++++++++++----- ...ython_debian11_default_x64.current_version | 2 +- .../python_debian11_default_x64/Dockerfile | 22 +++++++ .../install_python_interpreters.ps1 | 17 ++++++ .../helper_scripts/prepare_build_macos_rc | 8 +++ .../helper_scripts/requirements.macos.txt | 2 +- .../macos/grpc_distribtests_python.sh | 12 ++-- tools/run_tests/artifacts/artifact_targets.py | 32 ++++++++--- .../artifacts/build_artifact_python.bat | 2 +- .../artifacts/build_artifact_python.sh | 5 +- tools/run_tests/run_tests.py | 10 ++++ 105 files changed, 1260 insertions(+), 218 deletions(-) create mode 100644 src/python/grpcio/python_version.py create mode 100644 src/python/grpcio_admin/python_version.py create mode 100644 src/python/grpcio_channelz/python_version.py create mode 100644 src/python/grpcio_csds/python_version.py create mode 100644 src/python/grpcio_csm_observability/python_version.py create mode 100644 src/python/grpcio_health_checking/python_version.py create mode 100644 src/python/grpcio_observability/python_version.py create mode 100644 src/python/grpcio_reflection/python_version.py create mode 100644 src/python/grpcio_status/python_version.py create mode 100644 templates/src/python/grpcio/python_version.py.template create mode 100644 templates/src/python/grpcio_admin/python_version.py.template create mode 100644 templates/src/python/grpcio_channelz/python_version.py.template create mode 100644 templates/src/python/grpcio_csds/python_version.py.template create mode 100644 templates/src/python/grpcio_csm_observability/python_version.py.template create mode 100644 templates/src/python/grpcio_health_checking/python_version.py.template create mode 100644 templates/src/python/grpcio_observability/python_version.py.template create mode 100644 templates/src/python/grpcio_reflection/python_version.py.template create mode 100644 templates/src/python/grpcio_status/python_version.py.template create mode 100644 templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template create mode 100644 templates/tools/distrib/python/grpcio_tools/python_version.py.template create mode 100644 templates/tools/distrib/python/xds_protos/python_version.py.template create mode 100644 templates/tools/dockerfile/ccache_crosscompile.include create mode 100644 templates/tools/dockerfile/compile_python_313.include create mode 100644 templates/tools/dockerfile/git_config.include create mode 100644 templates/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile.template create mode 100644 templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template create mode 100644 templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile.template create mode 100644 templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile.template create mode 100644 templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile.template create mode 100644 templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile.template create mode 100644 templates/tools/dockerfile/python_pip_builds.include rename tools/bazelify_tests/test/{build_artifact_python_linux_x64_cp312.sh => build_artifact_python_linux_x64_cp313.sh} (93%) create mode 100644 tools/buildgen/plugins/expand_supported_python_versions.py create mode 100644 tools/distrib/python/grpcio_tools/grpc_tools/python_version.py create mode 100644 tools/distrib/python/grpcio_tools/python_version.py create mode 100644 tools/distrib/python/xds_protos/python_version.py diff --git a/PYTHON-MANIFEST.in b/PYTHON-MANIFEST.in index dd76dbcf756..b8ab04726ed 100644 --- a/PYTHON-MANIFEST.in +++ b/PYTHON-MANIFEST.in @@ -17,6 +17,7 @@ include src/python/grpcio/_parallel_compile_patch.py include src/python/grpcio/_spawn_patch.py include src/python/grpcio/commands.py include src/python/grpcio/grpc_version.py +include src/python/grpcio/python_version.py include src/python/grpcio/grpc_core_dependencies.py include src/python/grpcio/precompiled.py include src/python/grpcio/support.py diff --git a/WORKSPACE b/WORKSPACE index f88a7790594..675233b2eb1 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -89,7 +89,7 @@ load("@com_google_protobuf//bazel:system_python.bzl", "system_python") system_python( name = "system_python", - minimum_python_version = "3.7", + minimum_python_version = "3.8", ) load("@system_python//:pip.bzl", system_pip_parse = "pip_parse") diff --git a/bazel/grpc_python_deps.bzl b/bazel/grpc_python_deps.bzl index dbfff526a11..44eca11f671 100644 --- a/bazel/grpc_python_deps.bzl +++ b/bazel/grpc_python_deps.bzl @@ -38,9 +38,9 @@ def grpc_python_deps(): http_archive( name = "cython", build_file = "@com_github_grpc_grpc//third_party:cython.BUILD", - sha256 = "a2da56cc22be823acf49741b9aa3aa116d4f07fa8e8b35a3cb08b8447b37c607", - strip_prefix = "cython-0.29.35", + sha256 = "2ec7d66d23d6da2328fb24f5c1bec6c63a59ec2e91027766ab904f417e1078aa", + strip_prefix = "cython-3.0.11", urls = [ - "https://github.com/cython/cython/archive/0.29.35.tar.gz", + "https://github.com/cython/cython/archive/3.0.11.tar.gz", ], ) diff --git a/black.toml b/black.toml index e655f7f8e7e..1a397fea579 100644 --- a/black.toml +++ b/black.toml @@ -15,6 +15,7 @@ extend-exclude = ''' | test/cpp/naming/resolver_component_tests_runner.py # AUTO-GENERATED # AUTO-GENERATED from a template: | grpc_version.py + | python_version.py | src/python/grpcio/grpc_core_dependencies.py | src/python/grpcio/grpc/_grpcio_metadata.py # AUTO-GENERATED BY make_grpcio_tools.py diff --git a/build_handwritten.yaml b/build_handwritten.yaml index 61e73166122..3c0d694d77c 100644 --- a/build_handwritten.yaml +++ b/build_handwritten.yaml @@ -16,6 +16,13 @@ settings: csharp_major_version: 2 g_stands_for: groovy protobuf_version: 3.28.1 + supported_python_versions: + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12' + - '3.13' version: 1.68.0-dev configs: asan: diff --git a/setup.py b/setup.py index b93637215ff..48bfefe4dba 100644 --- a/setup.py +++ b/setup.py @@ -88,6 +88,7 @@ sys.path.insert(0, os.path.abspath(PYTHON_STEM)) import _parallel_compile_patch import _spawn_patch import grpc_core_dependencies +import python_version import commands import grpc_version @@ -95,19 +96,21 @@ import grpc_version _parallel_compile_patch.monkeypatch_compile_maybe() _spawn_patch.monkeypatch_spawn() + LICENSE = "Apache License 2.0" -CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: Apache Software License", -] +CLASSIFIERS = ( + [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + ] + + [ + f"Programming Language :: Python :: {x}" + for x in python_version.SUPPORTED_PYTHON_VERSIONS + ] + + ["License :: OSI Approved :: Apache Software License"] +) def _env_bool_value(env_name, default): @@ -596,7 +599,7 @@ setuptools.setup( packages=list(PACKAGES), package_dir=PACKAGE_DIRECTORIES, package_data=PACKAGE_DATA, - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=INSTALL_REQUIRES, extras_require=EXTRAS_REQUIRES, setup_requires=SETUP_REQUIRES, diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index eb2e8a9aa59..cd529ad54f7 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -8,9 +8,6 @@ Package for gRPC Python. .. |compat_check_pypi| image:: https://python-compatibility-tools.appspot.com/one_badge_image?package=grpcio :target: https://python-compatibility-tools.appspot.com/one_badge_target?package=grpcio -Supported Python Versions -------------------------- -Python >= 3.8 Installation ------------ diff --git a/src/python/grpcio/python_version.py b/src/python/grpcio/python_version.py new file mode 100644 index 00000000000..4faab63465c --- /dev/null +++ b/src/python/grpcio/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_admin/MANIFEST.in b/src/python/grpcio_admin/MANIFEST.in index eb7e029a4ba..3cb62658770 100644 --- a/src/python/grpcio_admin/MANIFEST.in +++ b/src/python/grpcio_admin/MANIFEST.in @@ -1,4 +1,5 @@ include grpc_version.py +include python_version.py recursive-include grpc_admin *.py global-exclude *.pyc include LICENSE diff --git a/src/python/grpcio_admin/python_version.py b/src/python/grpcio_admin/python_version.py new file mode 100644 index 00000000000..d47284cb06f --- /dev/null +++ b/src/python/grpcio_admin/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_admin/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_admin/setup.py b/src/python/grpcio_admin/setup.py index 4e6bdbc8dd5..30d0ca62a14 100644 --- a/src/python/grpcio_admin/setup.py +++ b/src/python/grpcio_admin/setup.py @@ -25,6 +25,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst") os.chdir(os.path.dirname(os.path.abspath(__file__))) # Break import-style to ensure we can actually find our local modules. +import python_version + import grpc_version CLASSIFIERS = [ @@ -44,6 +46,7 @@ INSTALL_REQUIRES = ( ) SETUP_REQUIRES = INSTALL_REQUIRES + setuptools.setup( name="grpcio-admin", version=grpc_version.VERSION, @@ -56,7 +59,7 @@ setuptools.setup( url="https://grpc.io", package_dir=PACKAGE_DIRECTORIES, packages=setuptools.find_packages("."), - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, ) diff --git a/src/python/grpcio_channelz/MANIFEST.in b/src/python/grpcio_channelz/MANIFEST.in index 7354bef4235..14089064dce 100644 --- a/src/python/grpcio_channelz/MANIFEST.in +++ b/src/python/grpcio_channelz/MANIFEST.in @@ -1,4 +1,5 @@ include grpc_version.py +include python_version.py recursive-include grpc_channelz *.py *.pyi global-exclude *.pyc include LICENSE diff --git a/src/python/grpcio_channelz/README.rst b/src/python/grpcio_channelz/README.rst index 027c0d9e10c..26056422143 100644 --- a/src/python/grpcio_channelz/README.rst +++ b/src/python/grpcio_channelz/README.rst @@ -3,9 +3,6 @@ gRPC Python Channelz package Channelz is a live debug tool in gRPC Python. -Supported Python Versions -------------------------- -Python >= 3.8 Dependencies ------------ diff --git a/src/python/grpcio_channelz/grpc_version.py b/src/python/grpcio_channelz/grpc_version.py index de5e63dddcf..fff1849540e 100644 --- a/src/python/grpcio_channelz/grpc_version.py +++ b/src/python/grpcio_channelz/grpc_version.py @@ -12,6 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/grpc_version.py.template`!!! +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/python_version.py.template`!!! VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_channelz/python_version.py b/src/python/grpcio_channelz/python_version.py new file mode 100644 index 00000000000..74755fdb1a9 --- /dev/null +++ b/src/python/grpcio_channelz/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_channelz/setup.py b/src/python/grpcio_channelz/setup.py index 034ed814829..222a0d30ca3 100644 --- a/src/python/grpcio_channelz/setup.py +++ b/src/python/grpcio_channelz/setup.py @@ -25,6 +25,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst") os.chdir(os.path.dirname(os.path.abspath(__file__))) # Break import-style to ensure we can actually find our local modules. +import python_version + import grpc_version @@ -44,17 +46,19 @@ class _NoOpCommand(setuptools.Command): pass -CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: Apache Software License", -] +CLASSIFIERS = ( + [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + ] + + [ + f"Programming Language :: Python :: {x}" + for x in python_version.SUPPORTED_PYTHON_VERSIONS + ] + + ["License :: OSI Approved :: Apache Software License"] +) + PACKAGE_DIRECTORIES = { "": ".", @@ -85,6 +89,7 @@ except ImportError: "build_package_protos": _NoOpCommand, } + setuptools.setup( name="grpcio-channelz", version=grpc_version.VERSION, @@ -97,7 +102,7 @@ setuptools.setup( url="https://grpc.io", package_dir=PACKAGE_DIRECTORIES, packages=setuptools.find_packages("."), - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, cmdclass=COMMAND_CLASS, diff --git a/src/python/grpcio_csds/MANIFEST.in b/src/python/grpcio_csds/MANIFEST.in index 4ecdf7428ed..3df9cc3cac2 100644 --- a/src/python/grpcio_csds/MANIFEST.in +++ b/src/python/grpcio_csds/MANIFEST.in @@ -1,4 +1,5 @@ include grpc_version.py +include python_version.py recursive-include grpc_csds *.py global-exclude *.pyc include LICENSE diff --git a/src/python/grpcio_csds/python_version.py b/src/python/grpcio_csds/python_version.py new file mode 100644 index 00000000000..5d9e6b076ea --- /dev/null +++ b/src/python/grpcio_csds/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csds/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_csds/setup.py b/src/python/grpcio_csds/setup.py index 8fb4dab5341..1dc40333f03 100644 --- a/src/python/grpcio_csds/setup.py +++ b/src/python/grpcio_csds/setup.py @@ -25,6 +25,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst") os.chdir(os.path.dirname(os.path.abspath(__file__))) # Break import-style to ensure we can actually find our local modules. +import python_version + import grpc_version CLASSIFIERS = [ @@ -57,7 +59,7 @@ setuptools.setup( url="https://grpc.io", package_dir=PACKAGE_DIRECTORIES, packages=setuptools.find_packages("."), - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, ) diff --git a/src/python/grpcio_csm_observability/MANIFEST.in b/src/python/grpcio_csm_observability/MANIFEST.in index 754eb1d7e13..afaf3464883 100644 --- a/src/python/grpcio_csm_observability/MANIFEST.in +++ b/src/python/grpcio_csm_observability/MANIFEST.in @@ -1,4 +1,5 @@ graft src/python/grpcio_csm_observability/grpc_csm_observability.egg-info graft grpc_csm_observability include grpc_version.py +include python_version.py include README.rst diff --git a/src/python/grpcio_csm_observability/README.rst b/src/python/grpcio_csm_observability/README.rst index f2c549afdb1..4725f758140 100644 --- a/src/python/grpcio_csm_observability/README.rst +++ b/src/python/grpcio_csm_observability/README.rst @@ -3,9 +3,6 @@ gRPC Python CSM Observability Package for gRPC Python CSM Observability. -Supported Python Versions -------------------------- -Python >= 3.8 Installation ------------ diff --git a/src/python/grpcio_csm_observability/python_version.py b/src/python/grpcio_csm_observability/python_version.py new file mode 100644 index 00000000000..4309c6a3ce0 --- /dev/null +++ b/src/python/grpcio_csm_observability/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csm_observability/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_csm_observability/setup.py b/src/python/grpcio_csm_observability/setup.py index c9a26db1ed5..ce4ec398a1d 100644 --- a/src/python/grpcio_csm_observability/setup.py +++ b/src/python/grpcio_csm_observability/setup.py @@ -22,6 +22,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst") # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) +import python_version + import grpc_version CLASSIFIERS = [ @@ -58,6 +60,6 @@ setuptools.setup( classifiers=CLASSIFIERS, package_dir=PACKAGE_DIRECTORIES, packages=setuptools.find_packages("."), - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=INSTALL_REQUIRES, ) diff --git a/src/python/grpcio_health_checking/MANIFEST.in b/src/python/grpcio_health_checking/MANIFEST.in index 6644074dc22..f68d10ad183 100644 --- a/src/python/grpcio_health_checking/MANIFEST.in +++ b/src/python/grpcio_health_checking/MANIFEST.in @@ -1,4 +1,5 @@ include grpc_version.py +include python_version.py recursive-include grpc_health *.py *.pyi global-exclude *.pyc include LICENSE diff --git a/src/python/grpcio_health_checking/README.rst b/src/python/grpcio_health_checking/README.rst index d13e671eae4..388fe3148fe 100644 --- a/src/python/grpcio_health_checking/README.rst +++ b/src/python/grpcio_health_checking/README.rst @@ -3,9 +3,6 @@ gRPC Python Health Checking Reference package for GRPC Python health checking. -Supported Python Versions -------------------------- -Python >= 3.8 Dependencies ------------ diff --git a/src/python/grpcio_health_checking/python_version.py b/src/python/grpcio_health_checking/python_version.py new file mode 100644 index 00000000000..96e4e2f0e06 --- /dev/null +++ b/src/python/grpcio_health_checking/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py index 97a40723097..7d451e63ee6 100644 --- a/src/python/grpcio_health_checking/setup.py +++ b/src/python/grpcio_health_checking/setup.py @@ -24,6 +24,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst") os.chdir(os.path.dirname(os.path.abspath(__file__))) # Break import-style to ensure we can actually find our local modules. +import python_version + import grpc_version @@ -43,17 +45,18 @@ class _NoOpCommand(setuptools.Command): pass -CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: Apache Software License", -] +CLASSIFIERS = ( + [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + ] + + [ + f"Programming Language :: Python :: {x}" + for x in python_version.SUPPORTED_PYTHON_VERSIONS + ] + + ["License :: OSI Approved :: Apache Software License"] +) PACKAGE_DIRECTORIES = { "": ".", @@ -96,7 +99,7 @@ setuptools.setup( classifiers=CLASSIFIERS, package_dir=PACKAGE_DIRECTORIES, packages=setuptools.find_packages("."), - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, cmdclass=COMMAND_CLASS, diff --git a/src/python/grpcio_observability/MANIFEST.in b/src/python/grpcio_observability/MANIFEST.in index 8efdc8f6f21..ffd7f861231 100644 --- a/src/python/grpcio_observability/MANIFEST.in +++ b/src/python/grpcio_observability/MANIFEST.in @@ -4,5 +4,6 @@ graft grpc_root graft third_party include _parallel_compile_patch.py include grpc_version.py +include python_version.py include observability_lib_deps.py include README.rst diff --git a/src/python/grpcio_observability/README.rst b/src/python/grpcio_observability/README.rst index 11ba92f90f5..513ebe02112 100644 --- a/src/python/grpcio_observability/README.rst +++ b/src/python/grpcio_observability/README.rst @@ -17,9 +17,6 @@ Note that while this approach enhances efficiency, it will introduce a slight de time the data is collected and the time it becomes available through Python exporters. -Supported Python Versions -------------------------- -Python >= 3.8 Installation ------------ diff --git a/src/python/grpcio_observability/python_version.py b/src/python/grpcio_observability/python_version.py new file mode 100644 index 00000000000..aca7367b65c --- /dev/null +++ b/src/python/grpcio_observability/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_observability/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_observability/setup.py b/src/python/grpcio_observability/setup.py index 60be8deee92..1bf43a8170f 100644 --- a/src/python/grpcio_observability/setup.py +++ b/src/python/grpcio_observability/setup.py @@ -34,6 +34,7 @@ sys.path.insert(0, os.path.abspath(".")) import _parallel_compile_patch import observability_lib_deps +import python_version import grpc_version @@ -287,7 +288,7 @@ setuptools.setup( classifiers=CLASSIFIERS, ext_modules=extension_modules(), packages=list(PACKAGES), - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=[ "grpcio=={version}".format(version=grpc_version.VERSION), "setuptools>=59.6.0", diff --git a/src/python/grpcio_reflection/MANIFEST.in b/src/python/grpcio_reflection/MANIFEST.in index eefb53d31f8..547bdd27597 100644 --- a/src/python/grpcio_reflection/MANIFEST.in +++ b/src/python/grpcio_reflection/MANIFEST.in @@ -1,4 +1,5 @@ include grpc_version.py +include python_version.py recursive-include grpc_reflection *.py *.pyi global-exclude *.pyc include LICENSE diff --git a/src/python/grpcio_reflection/README.rst b/src/python/grpcio_reflection/README.rst index b954108cc45..abb54a57f14 100644 --- a/src/python/grpcio_reflection/README.rst +++ b/src/python/grpcio_reflection/README.rst @@ -3,9 +3,6 @@ gRPC Python Reflection package Reference package for reflection in GRPC Python. -Supported Python Versions -------------------------- -Python >= 3.8 Dependencies ------------ diff --git a/src/python/grpcio_reflection/python_version.py b/src/python/grpcio_reflection/python_version.py new file mode 100644 index 00000000000..e94e725d14d --- /dev/null +++ b/src/python/grpcio_reflection/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_reflection/setup.py b/src/python/grpcio_reflection/setup.py index fd2cd7eb872..ca7e23219fd 100644 --- a/src/python/grpcio_reflection/setup.py +++ b/src/python/grpcio_reflection/setup.py @@ -25,6 +25,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst") os.chdir(os.path.dirname(os.path.abspath(__file__))) # Break import-style to ensure we can actually find our local modules. +import python_version + import grpc_version @@ -44,17 +46,18 @@ class _NoOpCommand(setuptools.Command): pass -CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: Apache Software License", -] +CLASSIFIERS = ( + [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + ] + + [ + f"Programming Language :: Python :: {x}" + for x in python_version.SUPPORTED_PYTHON_VERSIONS + ] + + ["License :: OSI Approved :: Apache Software License"] +) PACKAGE_DIRECTORIES = { "": ".", @@ -97,7 +100,7 @@ setuptools.setup( url="https://grpc.io", package_dir=PACKAGE_DIRECTORIES, packages=setuptools.find_packages("."), - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, cmdclass=COMMAND_CLASS, diff --git a/src/python/grpcio_status/MANIFEST.in b/src/python/grpcio_status/MANIFEST.in index 3ecc88ec2dd..62439177f19 100644 --- a/src/python/grpcio_status/MANIFEST.in +++ b/src/python/grpcio_status/MANIFEST.in @@ -1,4 +1,5 @@ include grpc_version.py +include python_version.py include grpc_status/google/rpc/status.proto recursive-include grpc_status *.py global-exclude *.pyc diff --git a/src/python/grpcio_status/README.rst b/src/python/grpcio_status/README.rst index bfc753c799e..c2c8efcc0c7 100644 --- a/src/python/grpcio_status/README.rst +++ b/src/python/grpcio_status/README.rst @@ -3,9 +3,6 @@ gRPC Python Status Proto Reference package for GRPC Python status proto mapping. -Supported Python Versions -------------------------- -Python >= 3.8 Dependencies ------------ diff --git a/src/python/grpcio_status/python_version.py b/src/python/grpcio_status/python_version.py new file mode 100644 index 00000000000..02de6673e4b --- /dev/null +++ b/src/python/grpcio_status/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_status/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_status/setup.py b/src/python/grpcio_status/setup.py index f70013774c9..f98032d28b1 100644 --- a/src/python/grpcio_status/setup.py +++ b/src/python/grpcio_status/setup.py @@ -24,6 +24,8 @@ _README_PATH = os.path.join(_PACKAGE_PATH, "README.rst") os.chdir(os.path.dirname(os.path.abspath(__file__))) # Break import-style to ensure we can actually find our local modules. +import python_version + import grpc_version @@ -43,17 +45,18 @@ class _NoOpCommand(setuptools.Command): pass -CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: Apache Software License", -] +CLASSIFIERS = ( + [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + ] + + [ + f"Programming Language :: Python :: {x}" + for x in python_version.SUPPORTED_PYTHON_VERSIONS + ] + + ["License :: OSI Approved :: Apache Software License"] +) PACKAGE_DIRECTORIES = { "": ".", @@ -93,7 +96,7 @@ setuptools.setup( classifiers=CLASSIFIERS, package_dir=PACKAGE_DIRECTORIES, packages=setuptools.find_packages("."), - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=INSTALL_REQUIRES, cmdclass=COMMAND_CLASS, ) diff --git a/src/python/grpcio_testing/README.rst b/src/python/grpcio_testing/README.rst index 1b8de5dca19..34fe05be9dc 100644 --- a/src/python/grpcio_testing/README.rst +++ b/src/python/grpcio_testing/README.rst @@ -3,9 +3,6 @@ gRPC Python Testing Package Testing utilities for gRPC Python -Supported Python Versions -------------------------- -Python >= 3.8 Dependencies ------------ diff --git a/templates/src/python/grpcio/python_version.py.template b/templates/src/python/grpcio/python_version.py.template new file mode 100644 index 00000000000..8c8da439184 --- /dev/null +++ b/templates/src/python/grpcio/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/src/python/grpcio_admin/python_version.py.template b/templates/src/python/grpcio_admin/python_version.py.template new file mode 100644 index 00000000000..d904c1d7228 --- /dev/null +++ b/templates/src/python/grpcio_admin/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_admin/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/src/python/grpcio_channelz/grpc_version.py.template b/templates/src/python/grpcio_channelz/grpc_version.py.template index 75d510cd17b..999c1025257 100644 --- a/templates/src/python/grpcio_channelz/grpc_version.py.template +++ b/templates/src/python/grpcio_channelz/grpc_version.py.template @@ -14,6 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/grpc_version.py.template`!!! + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/python_version.py.template`!!! VERSION = '${settings.python_version.pep440()}' diff --git a/templates/src/python/grpcio_channelz/python_version.py.template b/templates/src/python/grpcio_channelz/python_version.py.template new file mode 100644 index 00000000000..e0630bb7aa1 --- /dev/null +++ b/templates/src/python/grpcio_channelz/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/src/python/grpcio_csds/python_version.py.template b/templates/src/python/grpcio_csds/python_version.py.template new file mode 100644 index 00000000000..a5cc8627ecb --- /dev/null +++ b/templates/src/python/grpcio_csds/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csds/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/src/python/grpcio_csm_observability/python_version.py.template b/templates/src/python/grpcio_csm_observability/python_version.py.template new file mode 100644 index 00000000000..2aa52d73111 --- /dev/null +++ b/templates/src/python/grpcio_csm_observability/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csm_observability/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/src/python/grpcio_health_checking/python_version.py.template b/templates/src/python/grpcio_health_checking/python_version.py.template new file mode 100644 index 00000000000..6646f69979a --- /dev/null +++ b/templates/src/python/grpcio_health_checking/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/src/python/grpcio_observability/python_version.py.template b/templates/src/python/grpcio_observability/python_version.py.template new file mode 100644 index 00000000000..f82b1c2d7a5 --- /dev/null +++ b/templates/src/python/grpcio_observability/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_observability/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/src/python/grpcio_reflection/python_version.py.template b/templates/src/python/grpcio_reflection/python_version.py.template new file mode 100644 index 00000000000..29d9d47cffc --- /dev/null +++ b/templates/src/python/grpcio_reflection/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/src/python/grpcio_status/python_version.py.template b/templates/src/python/grpcio_status/python_version.py.template new file mode 100644 index 00000000000..cb6aeda5a05 --- /dev/null +++ b/templates/src/python/grpcio_status/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_status/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/tools/distrib/python/grpc_version.py.template b/templates/tools/distrib/python/grpc_version.py.template index 5031353b871..0d36735631d 100644 --- a/templates/tools/distrib/python/grpc_version.py.template +++ b/templates/tools/distrib/python/grpc_version.py.template @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpc_version.py.template`!!! VERSION = '${settings.python_version.pep440()}' PROTOBUF_VERSION = '${settings.protobuf_version}' diff --git a/templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template b/templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template new file mode 100644 index 00000000000..6e06a5a4bb8 --- /dev/null +++ b/templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/tools/distrib/python/grpcio_tools/python_version.py.template b/templates/tools/distrib/python/grpcio_tools/python_version.py.template new file mode 100644 index 00000000000..a40390110d8 --- /dev/null +++ b/templates/tools/distrib/python/grpcio_tools/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/tools/distrib/python/xds_protos/grpc_version.py.template b/templates/tools/distrib/python/xds_protos/grpc_version.py.template index 7808e28e219..ba301d6b865 100644 --- a/templates/tools/distrib/python/xds_protos/grpc_version.py.template +++ b/templates/tools/distrib/python/xds_protos/grpc_version.py.template @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/xds_protos/grpc_version.py.template`!!! VERSION = '${settings.python_version.pep440()}' PROTOBUF_VERSION = '${settings.protobuf_version}' diff --git a/templates/tools/distrib/python/xds_protos/python_version.py.template b/templates/tools/distrib/python/xds_protos/python_version.py.template new file mode 100644 index 00000000000..6f9d0562f32 --- /dev/null +++ b/templates/tools/distrib/python/xds_protos/python_version.py.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + # Copyright 2024 gRPC authors. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/xds_protos/python_version.py.template`!!! + + SUPPORTED_PYTHON_VERSIONS = ${settings.supported_python_versions} + + MIN_PYTHON_VERSION = ${settings.min_python_version} + MAX_PYTHON_VERSION = ${settings.max_python_version} diff --git a/templates/tools/dockerfile/ccache_crosscompile.include b/templates/tools/dockerfile/ccache_crosscompile.include new file mode 100644 index 00000000000..04136e01b53 --- /dev/null +++ b/templates/tools/dockerfile/ccache_crosscompile.include @@ -0,0 +1,14 @@ +#================= +# Install ccache + +# Install ccache from source since ccache 3.x packaged with most linux distributions +# does not support Redis backend for caching. +RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD STRIP OBJCOPY ${'\\'} + && curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz ${'\\'} + && tar -zxf ccache.tar.gz ${'\\'} + && cd ccache-4.7.5 ${'\\'} + && mkdir build && cd build ${'\\'} + && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. ${'\\'} + && make -j4 && make install ${'\\'} + && cd ../.. ${'\\'} + && rm -rf ccache-4.7.5 ccache.tar.gz diff --git a/templates/tools/dockerfile/compile_python_313.include b/templates/tools/dockerfile/compile_python_313.include new file mode 100644 index 00000000000..e7d4bd38a9b --- /dev/null +++ b/templates/tools/dockerfile/compile_python_313.include @@ -0,0 +1,21 @@ +#================= +# Compile CPython 3.13.0rc2 from source + +RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev libsqlite3-dev && apt-get clean +RUN apt-get update && apt-get install -y jq build-essential libffi-dev && apt-get clean + +RUN cd /tmp && ${'\\'} + wget -q https://www.python.org/ftp/python/3.13.0/Python-3.13.0rc2.tgz && ${'\\'} + tar xzvf Python-3.13.0rc2.tgz && ${'\\'} + cd Python-3.13.0rc2 && ${'\\'} + ./configure && ${'\\'} + make -j4 && ${'\\'} + make install + + +RUN cd /tmp && ${'\\'} + echo "ad7f44153649e27ec385e7633e853e03 Python-3.13.0rc2.tgz" > checksum.md5 && ${'\\'} + md5sum -c checksum.md5 + +RUN python3.13 -m ensurepip && ${'\\'} + python3.13 -m pip install coverage diff --git a/templates/tools/dockerfile/git_config.include b/templates/tools/dockerfile/git_config.include new file mode 100644 index 00000000000..ad2ed5f3614 --- /dev/null +++ b/templates/tools/dockerfile/git_config.include @@ -0,0 +1,22 @@ +# TODO: simplify the list of third_party modules list +# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories +# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule +RUN git config --global --add safe.directory /var/local/jenkins/grpc +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2 +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares +RUN git config --global protocol.file.allow always \ No newline at end of file diff --git a/templates/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile.template b/templates/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile.template new file mode 100644 index 00000000000..94671a0a585 --- /dev/null +++ b/templates/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile.template @@ -0,0 +1,57 @@ +%YAML 1.2 +--- | + # Copyright 2024 The gRPC Authors + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # The aarch64 wheels are being crosscompiled to allow running the build + # on x64 machine. The dockcross/linux-armv7 image is a x86_64 + # image with crosscompilation toolchain installed + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile.template`!!! + FROM dockcross/linux-armv7 + + <%text>RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \ + libnss3-dev libssl-dev libreadline-dev libffi-dev && apt-get clean + + ADD install_python_for_wheel_crosscompilation.sh /scripts/install_python_for_wheel_crosscompilation.sh + + RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.8.8" "3.8.8" /opt/python/cp38-cp38 + RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.9.2" "3.9.2" /opt/python/cp39-cp39 + RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.10.0" "3.10.0rc1" /opt/python/cp310-cp310 + RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.11.0" "3.11.0rc1" /opt/python/cp311-cp311 + RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.12.0" "3.12.0rc2" /opt/python/cp312-cp312 + RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.13.0" "3.13.0rc2" /opt/python/cp313-cp313 + + ENV AUDITWHEEL_ARCH armv7l + ENV AUDITWHEEL_PLAT linux_armv7l + + <%include file="../ccache_crosscompile.include"/> + + # The dockcross base of this image sets CC and CXX to absolute paths, which makes it impossible to redirect their invocations + # to ccache via a symlink. Use relative paths instead. + <%text> + ENV CC ${CROSS_TRIPLE}-gcc + ENV CXX ${CROSS_TRIPLE}-g++ + + + # For historical reasons, task_runner.py the script under docker container using "bash -l" + # which loads /etc/profile on startup. dockcross/linux-armv7 is based on an image where + # /etc/profile overwrites contents of PATH (for security reasons) when run as root. + # That causes the crosscompiler binaries located under /usr/xcc/armv7-unknown-linux-gnueabi/bin + # to be removed from PATH. Since in our builds we don't need the /etc/profile for anything, we can just + # truncate it. + # TODO(jtattermusch): Remove this hack when possible. + RUN echo "# file contents removed to avoid resetting PATH set by the docker image" >/etc/profile + + <%include file="../git_config.include"/> diff --git a/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template b/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template new file mode 100644 index 00000000000..31c1be4aed5 --- /dev/null +++ b/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template @@ -0,0 +1,28 @@ +%YAML 1.2 +--- | + # Copyright 2024 The gRPC Authors + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template`!!! + + FROM dockcross/manylinux2014-aarch64:20240812-60fa1b0 + + # manylinux_2_17 is the preferred alias of manylinux2014 + ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH + + <%include file="../python_pip_builds.include"/> + + <%include file="../ccache_crosscompile.include"/> + + <%include file="../git_config.include"/> diff --git a/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile.template b/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile.template new file mode 100644 index 00000000000..cf68868594e --- /dev/null +++ b/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile.template @@ -0,0 +1,33 @@ +%YAML 1.2 +--- | + # Copyright 2024 The gRPC Authors + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # Docker file for building gRPC manylinux Python artifacts. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile.template`!!! + + FROM quay.io/pypa/manylinux2014_x86_64:2024-09-09-f386546 + + # manylinux_2_17 is the preferred alias of manylinux2014 + ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH + + # TODO(jtattermusch): revisit which of the deps are really required + RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel + + <%include file="../python_pip_builds.include"/> + + <%include file="../ccache.include"/> + + <%include file="../git_config.include"/> \ No newline at end of file diff --git a/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile.template b/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile.template new file mode 100644 index 00000000000..d681fd47354 --- /dev/null +++ b/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile.template @@ -0,0 +1,34 @@ +%YAML 1.2 +--- | + # Copyright 2024 The gRPC Authors + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # Docker file for building gRPC manylinux Python artifacts. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile.template`!!! + + FROM quay.io/pypa/manylinux2014_i686:2024-09-09-f386546 + + # manylinux_2_17 is the preferred alias of manylinux2014 + ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH + + # TODO(jtattermusch): revisit which of the deps are really required + RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel + + <%include file="../python_pip_builds.include"/> + + <%include file="../ccache.include"/> + + + <%include file="../git_config.include"/> \ No newline at end of file diff --git a/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile.template b/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile.template new file mode 100644 index 00000000000..dfb62902711 --- /dev/null +++ b/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile.template @@ -0,0 +1,27 @@ +%YAML 1.2 +--- | + # Copyright 2024 The gRPC Authors + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile.template`!!! + + FROM quay.io/pypa/musllinux_1_1_x86_64:2024-09-09-f386546 + + <%include file="../python_pip_builds.include"/> + + <%include file="../ccache.include"/> + + <%include file="../git_config.include"/> + + RUN apk add openssl openssl-dev \ No newline at end of file diff --git a/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile.template b/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile.template new file mode 100644 index 00000000000..6f7ca5a52a8 --- /dev/null +++ b/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile.template @@ -0,0 +1,25 @@ +%YAML 1.2 +--- | + # Copyright 2024 The gRPC Authors + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile.template`!!! + + FROM quay.io/pypa/musllinux_1_1_i686:2024-09-09-f386546 + + <%include file="../python_pip_builds.include"/> + + <%include file="../ccache.include"/> + + <%include file="../git_config.include"/> diff --git a/templates/tools/dockerfile/python_pip_builds.include b/templates/tools/dockerfile/python_pip_builds.include new file mode 100644 index 00000000000..e573a063338 --- /dev/null +++ b/templates/tools/dockerfile/python_pip_builds.include @@ -0,0 +1,8 @@ +#=================================== +# Install Python build requirements +RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1' \ No newline at end of file diff --git a/templates/tools/dockerfile/test/python_debian11_default_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_debian11_default_x64/Dockerfile.template index 0981763f21d..a385ec8d602 100644 --- a/templates/tools/dockerfile/test/python_debian11_default_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/python_debian11_default_x64/Dockerfile.template @@ -24,6 +24,7 @@ <%include file="../../compile_python_310.include"/> <%include file="../../compile_python_311.include"/> <%include file="../../compile_python_312.include"/> + <%include file="../../compile_python_313.include"/> # Python test coverage requires libsqlite3, and it have # to be installed before Python. diff --git a/test/distrib/bazel/python/WORKSPACE b/test/distrib/bazel/python/WORKSPACE index 3567f8a2ac0..b56055fa741 100644 --- a/test/distrib/bazel/python/WORKSPACE +++ b/test/distrib/bazel/python/WORKSPACE @@ -29,7 +29,7 @@ load("@com_google_protobuf//bazel:system_python.bzl", "system_python") system_python( name = "system_python", - minimum_python_version = "3.7", + minimum_python_version = "3.8", ) load("@system_python//:pip.bzl", "pip_parse") diff --git a/tools/bazelify_tests/dockerimage_current_versions.bzl b/tools/bazelify_tests/dockerimage_current_versions.bzl index 5a349762058..973a649dfe5 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -63,12 +63,12 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/grpc_artifact_centos6_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x64@sha256:3285047265ea2b7c5d4df4c769b2d05f56288d947c75e16d27ae2dee693f791b", "tools/dockerfile/grpc_artifact_centos6_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x86@sha256:19783239da92208f0f39cf563529cd02e889920497ef81c60d20391fa998af62", "tools/dockerfile/grpc_artifact_protoc_aarch64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_protoc_aarch64@sha256:a0f6b544c1b2fa75f73b26cb28281917153304e9df2789e93de0732494e6b651", - "tools/dockerfile/grpc_artifact_python_linux_armv7.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_linux_armv7@sha256:f109d6c22cadb053f6843a66ee827d74f34d6cbf75a32f455a9da099ed1bdc9c", - "tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_aarch64@sha256:3f0407d4db904b35a7665c2222db039994cd0c9bdb1a073a653ff8e6940081c9", - "tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x64@sha256:89329900ec7fedc57cd89690acd34d07d726f6b896f60df987867737d0a0f5a8", - "tools/dockerfile/grpc_artifact_python_manylinux2014_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x86@sha256:8fce8e094b00935dc1f2640b4c2b10216c5a8711c0f4444efbafcd8c355a75a8", - "tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x64@sha256:c8e8eb24942a2910197cf5481d61e7cbce68b57bd6f35fae878b043b1f2c38bb", - "tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x86@sha256:c288f83435186ee675d004ee52c93195a51201bf2b5fe92581584d977a2499a3", + "tools/dockerfile/grpc_artifact_python_linux_armv7.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_linux_armv7@sha256:137616275fe59bf89849f7503779f9a5d9668dbf395fcc79a8221a8c38fa5bac", + "tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_aarch64@sha256:ad3233be3c3ad9e0c4b60f0176a853713a35e5c84ec9d9703996c67fa3e811b6", + "tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x64@sha256:0e102df67f31aeb6afe68250603288c2f1c98ccf360d1c42d751b8451da94b48", + "tools/dockerfile/grpc_artifact_python_manylinux2014_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x86@sha256:527e2e9ec4db0c52a53b50abfd59907a1b7e221168dc401686f6a48d33bddc5c", + "tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x64@sha256:94b57e5ea31ebc29af734474bcaff3074770778e5d27557cdc06d755ee8bc7ed", + "tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x86@sha256:edf4a0c8333c9309e52f323aa7315bbc0e5643216613cab4ecd2bce3d1ec26c0", "tools/dockerfile/interoptest/grpc_interop_aspnetcore.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_aspnetcore@sha256:8e2e732e78724a8382c340dca72e7653c5f82c251a3110fa2874cc00ba538878", "tools/dockerfile/interoptest/grpc_interop_cxx.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_cxx@sha256:e5a474d33773d52ec6a8abbe2d61ee0c2a9c2b5f48793a5ea3b82c4445becf3f", "tools/dockerfile/interoptest/grpc_interop_dart.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_dart@sha256:4915a280788126dad029858eb384dbbef2dc18cadccb434df6450dfd7a4929f2", @@ -109,7 +109,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/test/php7_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/php7_debian11_x64@sha256:34b02fd66832ebf49601bef95632753e6710a75755401c21332d50056ccd52d2", "tools/dockerfile/test/python_alpine_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_alpine_x64@sha256:0a4e3c166fb676d85ea26d9fffec3858d59a2f243a3acc1c2f9bd293a590a98c", "tools/dockerfile/test/python_debian11_default_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_arm64@sha256:fccca33a655c7aa89dd7ebd9492cbcc1f636bd2a004cd939d1982cfce3d68326", - "tools/dockerfile/test/python_debian11_default_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64@sha256:4c539fc93d343324309939c2964204c90f4054cd9eeed093af315cb0f0ef7c26", + "tools/dockerfile/test/python_debian11_default_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64@sha256:8beca964d6bbb80a8cb4c4628c25e9702b007c97113e74e589fa50c15000738d", "tools/dockerfile/test/rbe_ubuntu2004.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rbe_ubuntu2004@sha256:b3eb1a17b7b091e3c5648a803076b2c40601242ff91c04d55997af6641305f68", "tools/dockerfile/test/ruby_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64@sha256:d2e79919b2e2d4cc36a29682ecb5170641df4fb506cfb453978ffdeb8a841bd9", "tools/dockerfile/test/ruby_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64@sha256:6e8b4696ba0661f11a31ed0992a94d2efcd889a018f57160f0e2fb62963f3593", diff --git a/tools/bazelify_tests/test/BUILD b/tools/bazelify_tests/test/BUILD index 4aefd22e325..dee1d5172aa 100644 --- a/tools/bazelify_tests/test/BUILD +++ b/tools/bazelify_tests/test/BUILD @@ -269,8 +269,8 @@ grpc_build_artifact_task( # Python artifact build tasks grpc_build_artifact_task( - name = "artifact_python_linux_x64_manylinux2014_cp312", - build_script = "build_artifact_python_linux_x64_cp312.sh", + name = "artifact_python_linux_x64_manylinux2014_cp313", + build_script = "build_artifact_python_linux_x64_cp313.sh", docker_image_version = "tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version", ) @@ -287,7 +287,7 @@ grpc_build_artifact_task( name = "package_python_linux", # TODO(jtattermusch): add more python artifacts once they are migrated from artifact_targets.py artifact_deps = [ - "artifact_python_linux_x64_manylinux2014_cp312", + "artifact_python_linux_x64_manylinux2014_cp313", "artifact_python_linux_x64_manylinux2014_cp39", ], build_script = "build_package_python_linux.sh", @@ -421,7 +421,7 @@ test_suite( ":artifact_protoc_linux_aarch64_build_test", ":artifact_protoc_linux_x64_build_test", ":artifact_protoc_linux_x86_build_test", - ":artifact_python_linux_x64_manylinux2014_cp312_build_test", + ":artifact_python_linux_x64_manylinux2014_cp313_build_test", ":artifact_python_linux_x64_manylinux2014_cp39_build_test", ":package_csharp_linux_build_test", ":package_python_linux_build_test", diff --git a/tools/bazelify_tests/test/build_artifact_python_linux_x64_cp312.sh b/tools/bazelify_tests/test/build_artifact_python_linux_x64_cp313.sh similarity index 93% rename from tools/bazelify_tests/test/build_artifact_python_linux_x64_cp312.sh rename to tools/bazelify_tests/test/build_artifact_python_linux_x64_cp313.sh index 8604176c82e..d8a0b6b2ec2 100755 --- a/tools/bazelify_tests/test/build_artifact_python_linux_x64_cp312.sh +++ b/tools/bazelify_tests/test/build_artifact_python_linux_x64_cp313.sh @@ -17,8 +17,8 @@ set -ex # env variable values extracted from PythonArtifact in tools/run_tests/artifacts/artifact_targets.py # TODO(jtattermusch): find a better way of configuring the python artifact build (the current approach mostly serves as a demonstration) -export PYTHON=/opt/python/cp312-cp312/bin/python -export PIP=/opt/python/cp312-cp312/bin/pip +export PYTHON=/opt/python/cp313-cp313/bin/python +export PIP=/opt/python/cp313-cp313/bin/pip export GRPC_SKIP_PIP_CYTHON_UPGRADE=TRUE export GRPC_RUN_AUDITWHEEL_REPAIR=TRUE export GRPC_BUILD_GRPCIO_TOOLS_DEPENDENTS=TRUE diff --git a/tools/buildgen/plugins/expand_supported_python_versions.py b/tools/buildgen/plugins/expand_supported_python_versions.py new file mode 100644 index 00000000000..8cc4e814d74 --- /dev/null +++ b/tools/buildgen/plugins/expand_supported_python_versions.py @@ -0,0 +1,33 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Buildgen python version plugin + +This parses the list of supported python versions from the yaml build file, and +creates custom strings for the minimum and maximum supported python versions. + +""" + + +def mako_plugin(dictionary): + """Expand version numbers: + - for each language, ensure there's a language_version tag in + settings (defaulting to the master version tag) + - expand version strings to major, minor, patch, and tag + """ + + settings = dictionary["settings"] + + supported_python_versions = settings["supported_python_versions"] + settings["min_python_version"] = supported_python_versions[0] + settings["max_python_version"] = supported_python_versions[-1] diff --git a/tools/distrib/install_all_python_modules.sh b/tools/distrib/install_all_python_modules.sh index b23b38cc624..ab5823b9553 100755 --- a/tools/distrib/install_all_python_modules.sh +++ b/tools/distrib/install_all_python_modules.sh @@ -59,4 +59,3 @@ pushd src/python; popd; done popd; - diff --git a/tools/distrib/python/grpc_version.py b/tools/distrib/python/grpc_version.py index 8cec1e10eca..28f793690ef 100644 --- a/tools/distrib/python/grpc_version.py +++ b/tools/distrib/python/grpc_version.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpc_version.py.template`!!! VERSION = '1.68.0.dev0' PROTOBUF_VERSION = '3.28.1' diff --git a/tools/distrib/python/grpcio_tools/MANIFEST.in b/tools/distrib/python/grpcio_tools/MANIFEST.in index 1393de652a8..e74fde44b91 100644 --- a/tools/distrib/python/grpcio_tools/MANIFEST.in +++ b/tools/distrib/python/grpcio_tools/MANIFEST.in @@ -1,10 +1,12 @@ include _parallel_compile_patch.py include _spawn_patch.py include grpc_version.py +include python_version.py include protoc_deps.py include protoc_lib_deps.py include README.rst include grpc_tools/grpc_version.py +include grpc_tools/python_version.py graft grpc_tools graft grpc_root graft third_party diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py b/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py new file mode 100644 index 00000000000..0dcc71c1fda --- /dev/null +++ b/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/tools/distrib/python/grpcio_tools/python_version.py b/tools/distrib/python/grpcio_tools/python_version.py new file mode 100644 index 00000000000..fc59f030fbb --- /dev/null +++ b/tools/distrib/python/grpcio_tools/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index d0173a61658..5e19b6314ed 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -39,6 +39,7 @@ sys.path.insert(0, os.path.abspath(".")) import _parallel_compile_patch import _spawn_patch import protoc_lib_deps +import python_version import grpc_version @@ -329,7 +330,7 @@ setuptools.setup( classifiers=CLASSIFIERS, ext_modules=extension_modules(), packages=setuptools.find_packages("."), - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=[ "protobuf>=5.26.1,<6.0dev", "grpcio>={version}".format(version=grpc_version.VERSION), diff --git a/tools/distrib/python/xds_protos/MANIFEST.in b/tools/distrib/python/xds_protos/MANIFEST.in index d83c49b9186..3fea17ba661 100644 --- a/tools/distrib/python/xds_protos/MANIFEST.in +++ b/tools/distrib/python/xds_protos/MANIFEST.in @@ -1 +1,2 @@ include grpc_version.py +include python_version.py \ No newline at end of file diff --git a/tools/distrib/python/xds_protos/grpc_version.py b/tools/distrib/python/xds_protos/grpc_version.py index 7add68a0e24..170b505959b 100644 --- a/tools/distrib/python/xds_protos/grpc_version.py +++ b/tools/distrib/python/xds_protos/grpc_version.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/xds_protos/grpc_version.py.template`!!! VERSION = '1.68.0.dev0' PROTOBUF_VERSION = '3.28.1' diff --git a/tools/distrib/python/xds_protos/python_version.py b/tools/distrib/python/xds_protos/python_version.py new file mode 100644 index 00000000000..80cce2eb4c5 --- /dev/null +++ b/tools/distrib/python/xds_protos/python_version.py @@ -0,0 +1,20 @@ +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/xds_protos/python_version.py.template`!!! + +SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + +MIN_PYTHON_VERSION = 3.8 +MAX_PYTHON_VERSION = 3.13 diff --git a/tools/distrib/python/xds_protos/setup.py b/tools/distrib/python/xds_protos/setup.py index f1c7247cc4b..53a6fbdfecb 100644 --- a/tools/distrib/python/xds_protos/setup.py +++ b/tools/distrib/python/xds_protos/setup.py @@ -19,6 +19,7 @@ import os import setuptools import grpc_version +import python_version WORK_DIR = os.path.dirname(os.path.abspath(__file__)) @@ -44,6 +45,7 @@ INSTALL_REQUIRES = [ SETUP_REQUIRES = INSTALL_REQUIRES + ["grpcio-tools>=1.49.0"] + setuptools.setup( name="xds-protos", version=grpc_version.VERSION, @@ -55,7 +57,7 @@ setuptools.setup( author_email="grpc-io@googlegroups.com", url="https://grpc.io", license="Apache License 2.0", - python_requires=">=3.8", + python_requires=f">={python_version.MIN_PYTHON_VERSION}", install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, classifiers=CLASSIFIERS, diff --git a/tools/dockerfile/README.md b/tools/dockerfile/README.md index 89c599d6079..fbdc872f70f 100644 --- a/tools/dockerfile/README.md +++ b/tools/dockerfile/README.md @@ -37,6 +37,7 @@ If you've made modifications to a dockerfile, you can upload the new version of registry as follows: If you haven't configured authentication in Docker for us-docker.pkg.dev previously, run: + ``` gcloud auth configure-docker us-docker.pkg.dev gcloud auth login @@ -45,6 +46,7 @@ gcloud auth login Rebuild the docker images that have been modified locally and upload the docker images to artifact registry (note that this won't overwrite the "old" versions of the docker image that are already in artifact registry) + ``` # Install qemu, binformat, and configure binfmt interpreters sudo apt-get install binfmt-support qemu-user-static @@ -58,6 +60,7 @@ tools/dockerfile/push_testing_images.sh Build modified docker images locally and don't push to artifact registry. This option is very useful for quick local experiments. The script is much faster if it doesn't have to interact with artifact registry: + ``` # very useful for local experiments LOCAL_ONLY_MODE=true tools/dockerfile/push_testing_images.sh @@ -69,6 +72,7 @@ In the past, our testing docker images were [hosted on dockerhub](https://hub.do but we are in the process of migrating them artifact registry now. This temporary feature might simplify the migration: + ``` # try pull existing images from dockerhub instead of building the from scratch locally. TRANSFER_FROM_DOCKERHUB=true tools/dockerfile/push_testing_images.sh diff --git a/tools/dockerfile/grpc_artifact_python_linux_armv7.current_version b/tools/dockerfile/grpc_artifact_python_linux_armv7.current_version index 2ddbcc9ba32..0a992570421 100644 --- a/tools/dockerfile/grpc_artifact_python_linux_armv7.current_version +++ b/tools/dockerfile/grpc_artifact_python_linux_armv7.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_linux_armv7:0b87638ab97b433c6818be5124dcd89d479b3a8b@sha256:f109d6c22cadb053f6843a66ee827d74f34d6cbf75a32f455a9da099ed1bdc9c \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_linux_armv7:3523bf4a67fa9100deb8f48ee4833cb5a5e97697@sha256:137616275fe59bf89849f7503779f9a5d9668dbf395fcc79a8221a8c38fa5bac \ No newline at end of file diff --git a/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile b/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile index 40a22e6fe54..03aacb23b49 100644 --- a/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2020 The gRPC Authors +# Copyright 2024 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # The aarch64 wheels are being crosscompiled to allow running the build # on x64 machine. The dockcross/linux-armv7 image is a x86_64 # image with crosscompilation toolchain installed + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile.template`!!! FROM dockcross/linux-armv7 RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \ @@ -22,37 +24,39 @@ RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libg ADD install_python_for_wheel_crosscompilation.sh /scripts/install_python_for_wheel_crosscompilation.sh -RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.6.13" "3.6.13" /opt/python/cp36-cp36m -RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.7.10" "3.7.10" /opt/python/cp37-cp37m RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.8.8" "3.8.8" /opt/python/cp38-cp38 RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.9.2" "3.9.2" /opt/python/cp39-cp39 RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.10.0" "3.10.0rc1" /opt/python/cp310-cp310 RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.11.0" "3.11.0rc1" /opt/python/cp311-cp311 RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.12.0" "3.12.0rc2" /opt/python/cp312-cp312 +RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.13.0" "3.13.0rc2" /opt/python/cp313-cp313 ENV AUDITWHEEL_ARCH armv7l ENV AUDITWHEEL_PLAT linux_armv7l #================= -# Install ccache +# Install ccache # Install ccache from source since ccache 3.x packaged with most linux distributions # does not support Redis backend for caching. -RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD \ - && curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ +RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD STRIP OBJCOPY \ + && curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \ && tar -zxf ccache.tar.gz \ - && cd ccache-4.5.1 \ + && cd ccache-4.7.5 \ && mkdir build && cd build \ && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ && make -j4 && make install \ && cd ../.. \ - && rm -rf ccache-4.5.1 ccache.tar.gz + && rm -rf ccache-4.7.5 ccache.tar.gz + # The dockcross base of this image sets CC and CXX to absolute paths, which makes it impossible to redirect their invocations # to ccache via a symlink. Use relative paths instead. + ENV CC ${CROSS_TRIPLE}-gcc ENV CXX ${CROSS_TRIPLE}-g++ + # For historical reasons, task_runner.py the script under docker container using "bash -l" # which loads /etc/profile on startup. dockcross/linux-armv7 is based on an image where # /etc/profile overwrites contents of PATH (for security reasons) when run as root. @@ -62,5 +66,25 @@ ENV CXX ${CROSS_TRIPLE}-g++ # TODO(jtattermusch): Remove this hack when possible. RUN echo "# file contents removed to avoid resetting PATH set by the docker image" >/etc/profile +# TODO: simplify the list of third_party modules list +# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories +# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule RUN git config --global --add safe.directory /var/local/jenkins/grpc +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2 +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares RUN git config --global protocol.file.allow always diff --git a/tools/dockerfile/grpc_artifact_python_linux_armv7/install_python_for_wheel_crosscompilation.sh b/tools/dockerfile/grpc_artifact_python_linux_armv7/install_python_for_wheel_crosscompilation.sh index 08c6439d36a..f1f1d39509e 100755 --- a/tools/dockerfile/grpc_artifact_python_linux_armv7/install_python_for_wheel_crosscompilation.sh +++ b/tools/dockerfile/grpc_artifact_python_linux_armv7/install_python_for_wheel_crosscompilation.sh @@ -44,4 +44,4 @@ popd rm -rf "Python-${PYTHON_VERSION}" # install cython and wheel -"${PYTHON_PREFIX}/bin/python3" -m pip install --upgrade 'cython<3.0.0rc1' wheel +"${PYTHON_PREFIX}/bin/python3" -m pip install --upgrade 'cython<4.0.0rc1' wheel diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64.current_version b/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64.current_version index cdce8e543b4..cf67b251907 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64.current_version +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_aarch64:cfc9fe0cb36bb4ec8425982fd7f07e4e14bf3941@sha256:3f0407d4db904b35a7665c2222db039994cd0c9bdb1a073a653ff8e6940081c9 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_aarch64:377f694f92dd1b56dff0b0a0f47d6e731200953c@sha256:ad3233be3c3ad9e0c4b60f0176a853713a35e5c84ec9d9703996c67fa3e811b6 \ No newline at end of file diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile index 8e1c0751a8a..e4c3f8f306c 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2020 The gRPC Authors +# Copyright 2024 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,35 +12,57 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM dockcross/manylinux2014-aarch64:20230905-7b2d74f +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile.template`!!! + +FROM dockcross/manylinux2014-aarch64:20240812-60fa1b0 # manylinux_2_17 is the preferred alias of manylinux2014 ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH -################################### +#=================================== # Install Python build requirements -RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1' +RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1' #================= -# Install ccache +# Install ccache # Install ccache from source since ccache 3.x packaged with most linux distributions # does not support Redis backend for caching. RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD STRIP OBJCOPY \ - && curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ + && curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \ && tar -zxf ccache.tar.gz \ - && cd ccache-4.5.1 \ + && cd ccache-4.7.5 \ && mkdir build && cd build \ && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ && make -j4 && make install \ && cd ../.. \ - && rm -rf ccache-4.5.1 ccache.tar.gz + && rm -rf ccache-4.7.5 ccache.tar.gz + +# TODO: simplify the list of third_party modules list +# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories +# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule RUN git config --global --add safe.directory /var/local/jenkins/grpc +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2 +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares RUN git config --global protocol.file.allow always diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version index c6f58ea8034..b99340a7285 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x64:e81af0c6d454929785e8126fc993cbd93da5c014@sha256:89329900ec7fedc57cd89690acd34d07d726f6b896f60df987867737d0a0f5a8 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x64:379c3240e9fd68b7c13a3b6cb24307a272558494@sha256:0e102df67f31aeb6afe68250603288c2f1c98ccf360d1c42d751b8451da94b48 \ No newline at end of file diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile index ae959de2db4..ea75ed3af7c 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2020 The gRPC Authors +# Copyright 2024 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,9 @@ # Docker file for building gRPC manylinux Python artifacts. -FROM quay.io/pypa/manylinux2014_x86_64:2023-09-17-ae90a16 +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile.template`!!! + +FROM quay.io/pypa/manylinux2014_x86_64:2024-09-09-f386546 # manylinux_2_17 is the preferred alias of manylinux2014 ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH @@ -22,29 +24,49 @@ ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH # TODO(jtattermusch): revisit which of the deps are really required RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel -################################### +#=================================== # Install Python build requirements -RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1' +RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1' #================= # Install ccache # Install ccache from source since ccache 3.x packaged with most linux distributions # does not support Redis backend for caching. -RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ +RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \ && tar -zxf ccache.tar.gz \ - && cd ccache-4.5.1 \ + && cd ccache-4.7.5 \ && mkdir build && cd build \ && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ && make -j4 && make install \ && cd ../.. \ - && rm -rf ccache-4.5.1 ccache.tar.gz + && rm -rf ccache-4.7.5 ccache.tar.gz + +# TODO: simplify the list of third_party modules list +# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories +# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule RUN git config --global --add safe.directory /var/local/jenkins/grpc +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2 +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares RUN git config --global protocol.file.allow always \ No newline at end of file diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86.current_version b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86.current_version index efbb3c35dbe..67a5533afbd 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86.current_version +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x86:fda00560d600eed356f8d6bef2cc8416d0a6b790@sha256:8fce8e094b00935dc1f2640b4c2b10216c5a8711c0f4444efbafcd8c355a75a8 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_manylinux2014_x86:28eec3c9e027fd42f5852f696ed3e47aec91229b@sha256:527e2e9ec4db0c52a53b50abfd59907a1b7e221168dc401686f6a48d33bddc5c \ No newline at end of file diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile index 7736403f098..3ffa2f46bbb 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2020 The gRPC Authors +# Copyright 2024 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,9 @@ # Docker file for building gRPC manylinux Python artifacts. -FROM quay.io/pypa/manylinux2014_i686:2023-09-17-ae90a16 +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile.template`!!! + +FROM quay.io/pypa/manylinux2014_i686:2024-09-09-f386546 # manylinux_2_17 is the preferred alias of manylinux2014 ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH @@ -22,30 +24,50 @@ ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH # TODO(jtattermusch): revisit which of the deps are really required RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel -################################### +#=================================== # Install Python build requirements -RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1' +RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1' #================= # Install ccache # Install ccache from source since ccache 3.x packaged with most linux distributions # does not support Redis backend for caching. -RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ +RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \ && tar -zxf ccache.tar.gz \ - && cd ccache-4.5.1 \ + && cd ccache-4.7.5 \ && mkdir build && cd build \ && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ && make -j4 && make install \ && cd ../.. \ - && rm -rf ccache-4.5.1 ccache.tar.gz + && rm -rf ccache-4.7.5 ccache.tar.gz + +# TODO: simplify the list of third_party modules list +# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories +# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule RUN git config --global --add safe.directory /var/local/jenkins/grpc +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2 +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares RUN git config --global protocol.file.allow always \ No newline at end of file diff --git a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64.current_version b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64.current_version index 5365ea4a4be..af23ed31a5c 100644 --- a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64.current_version +++ b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x64:2f56fcee2e4964359dddcd57bb9b066ceb8331ec@sha256:c8e8eb24942a2910197cf5481d61e7cbce68b57bd6f35fae878b043b1f2c38bb \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x64:1bc8405880fdad2b22f8a6422cd6198b0b54838a@sha256:94b57e5ea31ebc29af734474bcaff3074770778e5d27557cdc06d755ee8bc7ed \ No newline at end of file diff --git a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile index a6eff9bbe71..dc16c9133b7 100644 --- a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2021 The gRPC Authors +# Copyright 2024 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,31 +12,55 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM quay.io/pypa/musllinux_1_1_x86_64:2023-09-17-ae90a16 +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile.template`!!! -################################### +FROM quay.io/pypa/musllinux_1_1_x86_64:2024-09-09-f386546 + +#=================================== # Install Python build requirements -RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1' +RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1' #================= # Install ccache # Install ccache from source since ccache 3.x packaged with most linux distributions # does not support Redis backend for caching. -RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ +RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \ && tar -zxf ccache.tar.gz \ - && cd ccache-4.5.1 \ + && cd ccache-4.7.5 \ && mkdir build && cd build \ && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ && make -j4 && make install \ && cd ../.. \ - && rm -rf ccache-4.5.1 ccache.tar.gz + && rm -rf ccache-4.7.5 ccache.tar.gz + +# TODO: simplify the list of third_party modules list +# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories +# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule RUN git config --global --add safe.directory /var/local/jenkins/grpc -RUN git config --global protocol.file.allow always \ No newline at end of file +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2 +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares +RUN git config --global protocol.file.allow always + +RUN apk add openssl openssl-dev \ No newline at end of file diff --git a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86.current_version b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86.current_version index c30b39b356a..ba2e0cac19a 100644 --- a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86.current_version +++ b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x86:9308dccacd76fb1782a43d97e6f5062b5b58576d@sha256:c288f83435186ee675d004ee52c93195a51201bf2b5fe92581584d977a2499a3 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_python_musllinux_1_1_x86:358044420e0991fe284f49848145d5145cff42ac@sha256:edf4a0c8333c9309e52f323aa7315bbc0e5643216613cab4ecd2bce3d1ec26c0 \ No newline at end of file diff --git a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile index c7ac549e98f..6509ab15003 100644 --- a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2021 The gRPC Authors +# Copyright 2024 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,31 +12,53 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM quay.io/pypa/musllinux_1_1_i686:2023-09-17-ae90a16 +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile.template`!!! -################################### +FROM quay.io/pypa/musllinux_1_1_i686:2024-09-09-f386546 + +#=================================== # Install Python build requirements -RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1' -RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1' +RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1' +RUN /opt/python/cp313-cp313/bin/pip install --upgrade 'cython<4.0.0rc1' #================= # Install ccache # Install ccache from source since ccache 3.x packaged with most linux distributions # does not support Redis backend for caching. -RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ +RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.7.5/ccache-4.7.5.tar.gz \ && tar -zxf ccache.tar.gz \ - && cd ccache-4.5.1 \ + && cd ccache-4.7.5 \ && mkdir build && cd build \ && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ && make -j4 && make install \ && cd ../.. \ - && rm -rf ccache-4.5.1 ccache.tar.gz + && rm -rf ccache-4.7.5 ccache.tar.gz + +# TODO: simplify the list of third_party modules list +# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories +# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule RUN git config --global --add safe.directory /var/local/jenkins/grpc -RUN git config --global protocol.file.allow always \ No newline at end of file +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/bloaty +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/xds +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googleapis +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/googletest +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opencensus-proto +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/boringssl-with-bazel +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/envoy-api +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protobuf +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/zlib +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/benchmark +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/re2 +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/abseil-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/opentelemetry-cpp +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/protoc-gen-validate +RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git/modules/third_party/cares/cares +RUN git config --global protocol.file.allow always diff --git a/tools/dockerfile/test/python_debian11_default_x64.current_version b/tools/dockerfile/test/python_debian11_default_x64.current_version index 70b0383e90a..8b82524dba6 100644 --- a/tools/dockerfile/test/python_debian11_default_x64.current_version +++ b/tools/dockerfile/test/python_debian11_default_x64.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64:05951fbd0e77e8ba072d270ad08f0d4b6ac00841@sha256:4c539fc93d343324309939c2964204c90f4054cd9eeed093af315cb0f0ef7c26 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64:224d8dc6c8287ee247378888ac93b9fe9e36ec8c@sha256:8beca964d6bbb80a8cb4c4628c25e9702b007c97113e74e589fa50c15000738d \ No newline at end of file diff --git a/tools/dockerfile/test/python_debian11_default_x64/Dockerfile b/tools/dockerfile/test/python_debian11_default_x64/Dockerfile index 2ba17722bce..e7c2c9a658d 100644 --- a/tools/dockerfile/test/python_debian11_default_x64/Dockerfile +++ b/tools/dockerfile/test/python_debian11_default_x64/Dockerfile @@ -173,6 +173,28 @@ RUN cd /tmp && \ RUN python3.12 -m ensurepip && \ python3.12 -m pip install coverage +#================= +# Compile CPython 3.13.0rc2 from source + +RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev libsqlite3-dev && apt-get clean +RUN apt-get update && apt-get install -y jq build-essential libffi-dev && apt-get clean + +RUN cd /tmp && \ + wget -q https://www.python.org/ftp/python/3.13.0/Python-3.13.0rc2.tgz && \ + tar xzvf Python-3.13.0rc2.tgz && \ + cd Python-3.13.0rc2 && \ + ./configure && \ + make -j4 && \ + make install + + +RUN cd /tmp && \ + echo "ad7f44153649e27ec385e7633e853e03 Python-3.13.0rc2.tgz" > checksum.md5 && \ + md5sum -c checksum.md5 + +RUN python3.13 -m ensurepip && \ + python3.13 -m pip install coverage + # Python test coverage requires libsqlite3, and it have # to be installed before Python. diff --git a/tools/internal_ci/helper_scripts/install_python_interpreters.ps1 b/tools/internal_ci/helper_scripts/install_python_interpreters.ps1 index 902fa3b0965..ddeaad711f8 100644 --- a/tools/internal_ci/helper_scripts/install_python_interpreters.ps1 +++ b/tools/internal_ci/helper_scripts/install_python_interpreters.ps1 @@ -149,3 +149,20 @@ $Python312x64Config = @{ PythonInstallerHash = "ea1993b5227fa4c8f45a06f5fbdd23b3" } Install-Python @Python312x64Config + +# Python 3.13 +$Python313x86Config = @{ + PythonVersion = "3.13.0" + PythonInstaller = "python-3.13.0rc2" + PythonInstallPath = "C:\Python313_32bit" + PythonInstallerHash = "647f429b5584d9ee2dd02fdc9c61a38e" +} +Install-Python @Python313x86Config + +$Python313x64Config = @{ + PythonVersion = "3.13.0" + PythonInstaller = "python-3.13.0rc2-amd64" + PythonInstallPath = "C:\Python313" + PythonInstallerHash = "0af5ad8734962267323ef45f384de3aa" +} +Install-Python @Python313x64Config \ No newline at end of file diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 8b3de1ab8ff..1cfd4cba7ce 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -176,6 +176,14 @@ then shasum -c /tmp/python_installer_checksum.sha256 time sudo installer -pkg ./python-3.12.0rc2-macos11.pkg -target / fi + + # Install Python 3.13 if it doesn't exist + if [ ! -f "/usr/local/bin/python3.13" ]; then + time curl -O https://www.python.org/ftp/python/3.13.0/python-3.13.0rc2-macos11.pkg + echo "75579065f9ee5c25207353fbe0f79275123ff556 python-3.13.0rc2-macos11.pkg" > /tmp/python_installer_checksum.sha256 + shasum -c /tmp/python_installer_checksum.sha256 + time sudo installer -pkg ./python-3.13.0rc2-macos11.pkg -target / + fi fi if [ "${PREPARE_BUILD_INSTALL_DEPS_CSHARP}" == "true" ] diff --git a/tools/internal_ci/helper_scripts/requirements.macos.txt b/tools/internal_ci/helper_scripts/requirements.macos.txt index 59a759b0ce2..57c4fb7abf5 100644 --- a/tools/internal_ci/helper_scripts/requirements.macos.txt +++ b/tools/internal_ci/helper_scripts/requirements.macos.txt @@ -1,4 +1,4 @@ -cython<3.0.0rc1 +cython<4.0.0rc1 cryptography==3.4.6 PyJWT==2.0.1 pyOpenSSL==20.0.1 diff --git a/tools/internal_ci/macos/grpc_distribtests_python.sh b/tools/internal_ci/macos/grpc_distribtests_python.sh index 8bd18de2e1d..fa651af4e8a 100644 --- a/tools/internal_ci/macos/grpc_distribtests_python.sh +++ b/tools/internal_ci/macos/grpc_distribtests_python.sh @@ -26,12 +26,12 @@ source tools/internal_ci/helper_scripts/prepare_build_macos_rc # TODO(jtattermusch): cleanup this prepare build step (needed for python artifact build) # install cython for all python versions -python3.7 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user -python3.8 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user -python3.9 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user -python3.10 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user -python3.11 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user -python3.12 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user +python3.8 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user +python3.9 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user +python3.10 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user +python3.11 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user +python3.12 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user +python3.13 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user # Build all python macos artifacts (this step actually builds all the binary wheels and source archives) tools/run_tests/task_runner.py -f artifact macos python ${TASK_RUNNER_EXTRA_FILTERS} -j 2 -x build_artifacts/sponge_log.xml || FAILED="true" diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index 3146af9266a..6f00c17fa03 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -165,6 +165,7 @@ class PythonArtifact: elif "manylinux" in self.platform: if self.arch == "x86": environ["SETARCH_CMD"] = "linux32" + environ["GRPC_SKIP_TWINE_CHECK"] = "TRUE" # Inside the manylinux container, the python installations are located in # special places... environ["PYTHON"] = "/opt/python/{}/bin/python".format( @@ -201,6 +202,10 @@ class PythonArtifact: environ["GRPC_SKIP_PIP_CYTHON_UPGRADE"] = "TRUE" environ["GRPC_RUN_AUDITWHEEL_REPAIR"] = "TRUE" environ["GRPC_PYTHON_BUILD_WITH_STATIC_LIBSTDCXX"] = "TRUE" + + if self.arch == "x86": + environ["GRPC_SKIP_TWINE_CHECK"] = "TRUE" + return create_docker_jobspec( self.name, "tools/dockerfile/grpc_artifact_python_%s_%s" @@ -401,15 +406,17 @@ def targets(): PythonArtifact("manylinux2014", "x64", "cp39-cp39", presubmit=True), PythonArtifact("manylinux2014", "x64", "cp310-cp310"), PythonArtifact("manylinux2014", "x64", "cp311-cp311"), + PythonArtifact("manylinux2014", "x64", "cp312-cp312"), PythonArtifact( - "manylinux2014", "x64", "cp312-cp312", presubmit=True + "manylinux2014", "x64", "cp313-cp313", presubmit=True ), PythonArtifact("manylinux2014", "x86", "cp38-cp38", presubmit=True), PythonArtifact("manylinux2014", "x86", "cp39-cp39", presubmit=True), PythonArtifact("manylinux2014", "x86", "cp310-cp310"), PythonArtifact("manylinux2014", "x86", "cp311-cp311"), + PythonArtifact("manylinux2014", "x86", "cp312-cp312"), PythonArtifact( - "manylinux2014", "x86", "cp312-cp312", presubmit=True + "manylinux2014", "x86", "cp313-cp313", presubmit=True ), PythonArtifact( "manylinux2014", "aarch64", "cp38-cp38", presubmit=True @@ -417,45 +424,52 @@ def targets(): PythonArtifact("manylinux2014", "aarch64", "cp39-cp39"), PythonArtifact("manylinux2014", "aarch64", "cp310-cp310"), PythonArtifact("manylinux2014", "aarch64", "cp311-cp311"), + PythonArtifact("manylinux2014", "aarch64", "cp312-cp312"), PythonArtifact( - "manylinux2014", "aarch64", "cp312-cp312", presubmit=True + "manylinux2014", "aarch64", "cp313-cp313", presubmit=True ), PythonArtifact("linux_extra", "armv7", "cp38-cp38", presubmit=True), PythonArtifact("linux_extra", "armv7", "cp39-cp39"), PythonArtifact("linux_extra", "armv7", "cp310-cp310"), PythonArtifact("linux_extra", "armv7", "cp311-cp311"), + PythonArtifact("linux_extra", "armv7", "cp312-cp312"), PythonArtifact( - "linux_extra", "armv7", "cp312-cp312", presubmit=True + "linux_extra", "armv7", "cp313-cp313", presubmit=True ), PythonArtifact("musllinux_1_1", "x64", "cp38-cp38", presubmit=True), PythonArtifact("musllinux_1_1", "x64", "cp39-cp39"), PythonArtifact("musllinux_1_1", "x64", "cp310-cp310"), PythonArtifact("musllinux_1_1", "x64", "cp311-cp311"), + PythonArtifact("musllinux_1_1", "x64", "cp312-cp312"), PythonArtifact( - "musllinux_1_1", "x64", "cp312-cp312", presubmit=True + "musllinux_1_1", "x64", "cp313-cp313", presubmit=True ), PythonArtifact("musllinux_1_1", "x86", "cp38-cp38", presubmit=True), PythonArtifact("musllinux_1_1", "x86", "cp39-cp39"), PythonArtifact("musllinux_1_1", "x86", "cp310-cp310"), PythonArtifact("musllinux_1_1", "x86", "cp311-cp311"), + PythonArtifact("musllinux_1_1", "x86", "cp312-cp312"), PythonArtifact( - "musllinux_1_1", "x86", "cp312-cp312", presubmit=True + "musllinux_1_1", "x86", "cp313-cp313", presubmit=True ), PythonArtifact("macos", "x64", "python3.8", presubmit=True), PythonArtifact("macos", "x64", "python3.9"), PythonArtifact("macos", "x64", "python3.10"), PythonArtifact("macos", "x64", "python3.11"), - PythonArtifact("macos", "x64", "python3.12", presubmit=True), + PythonArtifact("macos", "x64", "python3.12"), + PythonArtifact("macos", "x64", "python3.13", presubmit=True), PythonArtifact("windows", "x86", "Python38_32bit", presubmit=True), PythonArtifact("windows", "x86", "Python39_32bit"), PythonArtifact("windows", "x86", "Python310_32bit"), PythonArtifact("windows", "x86", "Python311_32bit"), - PythonArtifact("windows", "x86", "Python312_32bit", presubmit=True), + PythonArtifact("windows", "x86", "Python312_32bit"), + PythonArtifact("windows", "x86", "Python313_32bit", presubmit=True), PythonArtifact("windows", "x64", "Python38", presubmit=True), PythonArtifact("windows", "x64", "Python39"), PythonArtifact("windows", "x64", "Python310"), PythonArtifact("windows", "x64", "Python311"), - PythonArtifact("windows", "x64", "Python312", presubmit=True), + PythonArtifact("windows", "x64", "Python312"), + PythonArtifact("windows", "x64", "Python313", presubmit=True), RubyArtifact("linux", "x86-mingw32", presubmit=True), RubyArtifact("linux", "x64-mingw32", presubmit=True), RubyArtifact("linux", "x64-mingw-ucrt", presubmit=True), diff --git a/tools/run_tests/artifacts/build_artifact_python.bat b/tools/run_tests/artifacts/build_artifact_python.bat index ee17381bc1b..4ac49183af4 100644 --- a/tools/run_tests/artifacts/build_artifact_python.bat +++ b/tools/run_tests/artifacts/build_artifact_python.bat @@ -56,7 +56,7 @@ python setup.py bdist_wheel || goto :error popd @rem Ensure the generate artifacts are valid. -python -m pip install packaging==21.3 twine==3.8.0 +python -m pip install packaging==21.3 twine==5.0.0 python -m twine check dist\* tools\distrib\python\grpcio_tools\dist\* || goto :error xcopy /Y /I /S dist\* %ARTIFACT_DIR% || goto :error diff --git a/tools/run_tests/artifacts/build_artifact_python.sh b/tools/run_tests/artifacts/build_artifact_python.sh index 1598d2edc18..b00ae1e372c 100755 --- a/tools/run_tests/artifacts/build_artifact_python.sh +++ b/tools/run_tests/artifacts/build_artifact_python.sh @@ -39,7 +39,7 @@ then # Any installation step is a potential source of breakages, # so we are trying to perform as few download-and-install operations # as possible. - "${PYTHON}" -m pip install --upgrade 'cython<3.0.0rc1' + "${PYTHON}" -m pip install --upgrade 'cython<4.0.0rc1' fi # Allow build_ext to build C/C++ files in parallel @@ -167,7 +167,8 @@ then "${PYTHON}" -m pip install virtualenv "${PYTHON}" -m virtualenv venv || { "${PYTHON}" -m pip install virtualenv==20.0.23 && "${PYTHON}" -m virtualenv venv; } # Ensure the generated artifacts are valid using "twine check" - venv/bin/python -m pip install "twine<=2.0" "readme_renderer<40.0" + # pinning twine's dependency package `cryptography` version to 3.3.2 (last version without Rust dependency) + venv/bin/python -m pip install "cryptography==3.3.2" "twine==5.0.0" "readme_renderer<40.0" venv/bin/python -m twine check dist/* tools/distrib/python/grpcio_tools/dist/* if [ "$GRPC_BUILD_MAC" == "" ]; then venv/bin/python -m twine check src/python/grpcio_observability/dist/* diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 16f05533882..90073bb8e2c 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -844,6 +844,13 @@ class PythonLanguage(object): bits=bits, config_vars=config_vars, ) + python313_config = _python_config_generator( + name="py313", + major="3", + minor="13", + bits=bits, + config_vars=config_vars, + ) pypy27_config = _pypy_config_generator( name="pypy", major="2", config_vars=config_vars ) @@ -880,6 +887,8 @@ class PythonLanguage(object): return (python311_config,) elif args.compiler == "python3.12": return (python312_config,) + elif args.compiler == "python3.13": + return (python313_config,) elif args.compiler == "pypy": return (pypy27_config,) elif args.compiler == "pypy3": @@ -893,6 +902,7 @@ class PythonLanguage(object): python310_config, python311_config, python312_config, + python313_config, ) else: raise Exception("Compiler %s not supported." % args.compiler) From f6f13ccaec188339a69d96b91186c15b217d3e0c Mon Sep 17 00:00:00 2001 From: Tanvi Jagtap <139093547+tanvi-jagtap@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:37:01 -0700 Subject: [PATCH 02/74] [PH2][Refactor][internal.h] Split file. Add stream_lists.h (#37775) Moving out related code into a separate file. `internal.h -> stream_lists.h` Closes #37775 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37775 from tanvi-jagtap:ph2_stream_lists_h 13b6030cebcf00abecf1f010e21773490c6d08d2 PiperOrigin-RevId: 679205824 --- BUILD | 1 + Package.swift | 1 + build_autogenerated.yaml | 2 + gRPC-C++.podspec | 2 + gRPC-Core.podspec | 2 + grpc.gemspec | 1 + package.xml | 1 + .../chttp2/transport/chttp2_transport.cc | 1 + .../chttp2/transport/frame_window_update.cc | 1 + .../ext/transport/chttp2/transport/internal.h | 41 ------------ .../chttp2/transport/stream_lists.cc | 2 + .../transport/chttp2/transport/stream_lists.h | 65 +++++++++++++++++++ .../ext/transport/chttp2/transport/writing.cc | 1 + tools/doxygen/Doxyfile.c++.internal | 1 + tools/doxygen/Doxyfile.core.internal | 1 + 15 files changed, 82 insertions(+), 41 deletions(-) create mode 100644 src/core/ext/transport/chttp2/transport/stream_lists.h diff --git a/BUILD b/BUILD index 093cddb95af..36c3c47497f 100644 --- a/BUILD +++ b/BUILD @@ -4779,6 +4779,7 @@ grpc_cc_library( "//src/core:ext/transport/chttp2/transport/frame_settings.h", "//src/core:ext/transport/chttp2/transport/frame_window_update.h", "//src/core:ext/transport/chttp2/transport/internal.h", + "//src/core:ext/transport/chttp2/transport/stream_lists.h", ], external_deps = [ "absl/base:core_headers", diff --git a/Package.swift b/Package.swift index d9411aed0ec..988f1e7abe7 100644 --- a/Package.swift +++ b/Package.swift @@ -256,6 +256,7 @@ let package = Package( "src/core/ext/transport/chttp2/transport/ping_rate_policy.cc", "src/core/ext/transport/chttp2/transport/ping_rate_policy.h", "src/core/ext/transport/chttp2/transport/stream_lists.cc", + "src/core/ext/transport/chttp2/transport/stream_lists.h", "src/core/ext/transport/chttp2/transport/varint.cc", "src/core/ext/transport/chttp2/transport/varint.h", "src/core/ext/transport/chttp2/transport/write_size_policy.cc", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index bc395b7e0e4..e7c5b7684c3 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -291,6 +291,7 @@ libs: - src/core/ext/transport/chttp2/transport/ping_abuse_policy.h - src/core/ext/transport/chttp2/transport/ping_callbacks.h - src/core/ext/transport/chttp2/transport/ping_rate_policy.h + - src/core/ext/transport/chttp2/transport/stream_lists.h - src/core/ext/transport/chttp2/transport/varint.h - src/core/ext/transport/chttp2/transport/write_size_policy.h - src/core/ext/transport/inproc/inproc_transport.h @@ -2313,6 +2314,7 @@ libs: - src/core/ext/transport/chttp2/transport/ping_abuse_policy.h - src/core/ext/transport/chttp2/transport/ping_callbacks.h - src/core/ext/transport/chttp2/transport/ping_rate_policy.h + - src/core/ext/transport/chttp2/transport/stream_lists.h - src/core/ext/transport/chttp2/transport/varint.h - src/core/ext/transport/chttp2/transport/write_size_policy.h - src/core/ext/transport/inproc/inproc_transport.h diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 4862b8ee10e..9d37c6cbe39 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -380,6 +380,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/ping_abuse_policy.h', 'src/core/ext/transport/chttp2/transport/ping_callbacks.h', 'src/core/ext/transport/chttp2/transport/ping_rate_policy.h', + 'src/core/ext/transport/chttp2/transport/stream_lists.h', 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/transport/write_size_policy.h', 'src/core/ext/transport/inproc/inproc_transport.h', @@ -1681,6 +1682,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/ping_abuse_policy.h', 'src/core/ext/transport/chttp2/transport/ping_callbacks.h', 'src/core/ext/transport/chttp2/transport/ping_rate_policy.h', + 'src/core/ext/transport/chttp2/transport/stream_lists.h', 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/transport/write_size_policy.h', 'src/core/ext/transport/inproc/inproc_transport.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index f953ca34e73..15080faf737 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -376,6 +376,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/ping_rate_policy.cc', 'src/core/ext/transport/chttp2/transport/ping_rate_policy.h', 'src/core/ext/transport/chttp2/transport/stream_lists.cc', + 'src/core/ext/transport/chttp2/transport/stream_lists.h', 'src/core/ext/transport/chttp2/transport/varint.cc', 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/transport/write_size_policy.cc', @@ -2467,6 +2468,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/ping_abuse_policy.h', 'src/core/ext/transport/chttp2/transport/ping_callbacks.h', 'src/core/ext/transport/chttp2/transport/ping_rate_policy.h', + 'src/core/ext/transport/chttp2/transport/stream_lists.h', 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/transport/write_size_policy.h', 'src/core/ext/transport/inproc/inproc_transport.h', diff --git a/grpc.gemspec b/grpc.gemspec index 83b134b50fe..f7829369b0e 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -262,6 +262,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/transport/chttp2/transport/ping_rate_policy.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/ping_rate_policy.h ) s.files += %w( src/core/ext/transport/chttp2/transport/stream_lists.cc ) + s.files += %w( src/core/ext/transport/chttp2/transport/stream_lists.h ) s.files += %w( src/core/ext/transport/chttp2/transport/varint.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/varint.h ) s.files += %w( src/core/ext/transport/chttp2/transport/write_size_policy.cc ) diff --git a/package.xml b/package.xml index 67c1e56e75a..4bd5a7a2f8c 100644 --- a/package.xml +++ b/package.xml @@ -244,6 +244,7 @@ + diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 02fffbf41ca..fef7fb92d0b 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -68,6 +68,7 @@ #include "src/core/ext/transport/chttp2/transport/ping_abuse_policy.h" #include "src/core/ext/transport/chttp2/transport/ping_callbacks.h" #include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h" +#include "src/core/ext/transport/chttp2/transport/stream_lists.h" #include "src/core/ext/transport/chttp2/transport/varint.h" #include "src/core/ext/transport/chttp2/transport/write_size_policy.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.cc b/src/core/ext/transport/chttp2/transport/frame_window_update.cc index 6dafd5318b2..20cddebd5ca 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.cc +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.cc @@ -29,6 +29,7 @@ #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/internal.h" +#include "src/core/ext/transport/chttp2/transport/stream_lists.h" grpc_slice grpc_chttp2_window_update_create( uint32_t id, uint32_t window_delta, diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 80e214ca1f2..bdbbd6890c7 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -769,47 +769,6 @@ absl::variant grpc_chttp2_perform_read( grpc_chttp2_transport* t, const grpc_slice& slice, size_t& requests_started); -bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); -/// Get a writable stream -/// returns non-zero if there was a stream available -bool grpc_chttp2_list_pop_writable_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream** s); -bool grpc_chttp2_list_remove_writable_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); - -bool grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); -bool grpc_chttp2_list_have_writing_streams(grpc_chttp2_transport* t); -bool grpc_chttp2_list_pop_writing_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream** s); - -void grpc_chttp2_list_add_written_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); -bool grpc_chttp2_list_pop_written_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream** s); - -void grpc_chttp2_list_add_waiting_for_concurrency(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); -bool grpc_chttp2_list_pop_waiting_for_concurrency(grpc_chttp2_transport* t, - grpc_chttp2_stream** s); -void grpc_chttp2_list_remove_waiting_for_concurrency(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); - -void grpc_chttp2_list_add_stalled_by_transport(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); -bool grpc_chttp2_list_pop_stalled_by_transport(grpc_chttp2_transport* t, - grpc_chttp2_stream** s); -void grpc_chttp2_list_remove_stalled_by_transport(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); - -void grpc_chttp2_list_add_stalled_by_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); -bool grpc_chttp2_list_pop_stalled_by_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream** s); -bool grpc_chttp2_list_remove_stalled_by_stream(grpc_chttp2_transport* t, - grpc_chttp2_stream* s); - //******** Flow Control ************** // Takes in a flow control action and performs all the needed operations. diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.cc b/src/core/ext/transport/chttp2/transport/stream_lists.cc index f4ee3e58eb8..14039a614b7 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.cc +++ b/src/core/ext/transport/chttp2/transport/stream_lists.cc @@ -16,6 +16,8 @@ // // +#include "src/core/ext/transport/chttp2/transport/stream_lists.h" + #include "absl/log/check.h" #include "absl/log/log.h" diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.h b/src/core/ext/transport/chttp2/transport/stream_lists.h new file mode 100644 index 00000000000..f415fe73704 --- /dev/null +++ b/src/core/ext/transport/chttp2/transport/stream_lists.h @@ -0,0 +1,65 @@ +// +// +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// + +#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_LISTS_H +#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_LISTS_H + +#include "src/core/ext/transport/chttp2/transport/internal.h" + +bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); +/// Get a writable stream +/// returns non-zero if there was a stream available +bool grpc_chttp2_list_pop_writable_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream** s); +bool grpc_chttp2_list_remove_writable_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); + +bool grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); +bool grpc_chttp2_list_have_writing_streams(grpc_chttp2_transport* t); +bool grpc_chttp2_list_pop_writing_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream** s); + +void grpc_chttp2_list_add_written_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); +bool grpc_chttp2_list_pop_written_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream** s); + +void grpc_chttp2_list_add_waiting_for_concurrency(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); +bool grpc_chttp2_list_pop_waiting_for_concurrency(grpc_chttp2_transport* t, + grpc_chttp2_stream** s); +void grpc_chttp2_list_remove_waiting_for_concurrency(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); + +void grpc_chttp2_list_add_stalled_by_transport(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); +bool grpc_chttp2_list_pop_stalled_by_transport(grpc_chttp2_transport* t, + grpc_chttp2_stream** s); +void grpc_chttp2_list_remove_stalled_by_transport(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); + +void grpc_chttp2_list_add_stalled_by_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); +bool grpc_chttp2_list_pop_stalled_by_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream** s); +bool grpc_chttp2_list_remove_stalled_by_stream(grpc_chttp2_transport* t, + grpc_chttp2_stream* s); + +#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_LISTS_H diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc index 13797c1f1b5..d5678956f51 100644 --- a/src/core/ext/transport/chttp2/transport/writing.cc +++ b/src/core/ext/transport/chttp2/transport/writing.cc @@ -51,6 +51,7 @@ #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/ext/transport/chttp2/transport/ping_callbacks.h" #include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h" +#include "src/core/ext/transport/chttp2/transport/stream_lists.h" #include "src/core/ext/transport/chttp2/transport/write_size_policy.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 3688a568841..994e038c983 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1267,6 +1267,7 @@ src/core/ext/transport/chttp2/transport/ping_callbacks.h \ src/core/ext/transport/chttp2/transport/ping_rate_policy.cc \ src/core/ext/transport/chttp2/transport/ping_rate_policy.h \ src/core/ext/transport/chttp2/transport/stream_lists.cc \ +src/core/ext/transport/chttp2/transport/stream_lists.h \ src/core/ext/transport/chttp2/transport/varint.cc \ src/core/ext/transport/chttp2/transport/varint.h \ src/core/ext/transport/chttp2/transport/write_size_policy.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 9b118d61fd8..3725bd86978 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1034,6 +1034,7 @@ src/core/ext/transport/chttp2/transport/ping_callbacks.h \ src/core/ext/transport/chttp2/transport/ping_rate_policy.cc \ src/core/ext/transport/chttp2/transport/ping_rate_policy.h \ src/core/ext/transport/chttp2/transport/stream_lists.cc \ +src/core/ext/transport/chttp2/transport/stream_lists.h \ src/core/ext/transport/chttp2/transport/varint.cc \ src/core/ext/transport/chttp2/transport/varint.h \ src/core/ext/transport/chttp2/transport/write_size_policy.cc \ From 2030231e3227c1c5b6b11ae1013a2374e6be6b7d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 26 Sep 2024 12:06:32 -0700 Subject: [PATCH 03/74] [gcc7] Build fix (#37796) Closes #37796 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37796 from ctiller:buildy 363eca118abf339899a8114019027d579747385e PiperOrigin-RevId: 679243010 --- src/core/call/request_buffer.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/call/request_buffer.cc b/src/core/call/request_buffer.cc index 257743cbb90..ee0878603c0 100644 --- a/src/core/call/request_buffer.cc +++ b/src/core/call/request_buffer.cc @@ -117,7 +117,7 @@ RequestBuffer::Reader::PollPullClientInitialMetadata() { pulled_client_initial_metadata_ = true; auto result = ClaimObject(buffering->initial_metadata); buffer_->MaybeSwitchToStreaming(); - return result; + return std::move(result); } if (auto* buffered = absl::get_if(&buffer_->state_)) { pulled_client_initial_metadata_ = true; @@ -142,7 +142,7 @@ RequestBuffer::Reader::PollPullMessage() { auto result = ClaimObject(buffering->messages[idx]); ++message_index_; buffer_->MaybeSwitchToStreaming(); - return result; + return std::move(result); } if (auto* buffered = absl::get_if(&buffer_->state_)) { if (message_index_ == buffered->messages.size()) return absl::nullopt; @@ -159,7 +159,7 @@ RequestBuffer::Reader::PollPullMessage() { auto waker = std::move(buffer_->push_waker_); lock.Release(); waker.Wakeup(); - return msg; + return std::move(msg); } error_ = absl::get(buffer_->state_).error; return Failure{}; From 992b3aea8aaaa1285ed74f0ff3e3843765d1e197 Mon Sep 17 00:00:00 2001 From: Sourabh Singh Date: Fri, 27 Sep 2024 08:41:13 -0700 Subject: [PATCH 04/74] remove logging_threshold tests (#37806) Closes #37806 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37806 from sourabhsinghs:unittest/logging-threshold d501d38dc0c487fe2019fd4b0db6b61d831df45f PiperOrigin-RevId: 679604228 --- bazel/internal_python_rules.bzl | 3 --- 1 file changed, 3 deletions(-) diff --git a/bazel/internal_python_rules.bzl b/bazel/internal_python_rules.bzl index a6c4e18ef81..b2a506c6ae4 100644 --- a/bazel/internal_python_rules.bzl +++ b/bazel/internal_python_rules.bzl @@ -14,7 +14,6 @@ """Python-related rules intended only for use internal to the repo.""" load("//bazel:gevent_test.bzl", "py_grpc_gevent_test") -load("//bazel:logging_threshold_test.bzl", "py_grpc_logging_threshold_test") def internal_py_grpc_test(name, **kwargs): """Runs a test under all supported environments. @@ -29,7 +28,6 @@ def internal_py_grpc_test(name, **kwargs): **kwargs ) py_grpc_gevent_test(name, **kwargs) - py_grpc_logging_threshold_test(name, **kwargs) suite_kwargs = {} if "visibility" in kwargs: @@ -40,7 +38,6 @@ def internal_py_grpc_test(name, **kwargs): tests = [ name + ".native", name + ".gevent", - name + ".logging_threshold", ], **suite_kwargs ) From f2e3636303a66408cc67b61e8660cc51e9c1fbb3 Mon Sep 17 00:00:00 2001 From: Sreenithi Sridharan <19sreenithi98@gmail.com> Date: Fri, 27 Sep 2024 08:53:41 -0700 Subject: [PATCH 05/74] increased timeout for armv7 artifact build to 2 hours (#37807) Building armv7 artifacts after adding Python 3.13 is failing with a timeout. Hence increasing timeout to 2 hours. Closes #37807 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37807 from sreenithi:increase_armv7_artifact_build_timeout 60034378f585e7a7af5de8879fe32a04c9a3ccaa PiperOrigin-RevId: 679608393 --- tools/run_tests/artifacts/artifact_targets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index 6f00c17fa03..2695500eae8 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -160,7 +160,7 @@ class PythonArtifact: ), "tools/run_tests/artifacts/build_artifact_python.sh", environ=environ, - timeout_seconds=60 * 60, + timeout_seconds=60 * 60 * 2, ) elif "manylinux" in self.platform: if self.arch == "x86": From 6ba3b4a71764c4a837cbfff3072b60d5e8d32f76 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 27 Sep 2024 10:39:05 -0700 Subject: [PATCH 06/74] [xDS] ORCA to LRS propagation changes (#37467) Implements gRFC A85 (https://github.com/grpc/proposal/pull/454). Closes #37467 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37467 from markdroth:orca_lrs_propagation_changes 0c1e889bb70b422899bda04166524c678d628c70 PiperOrigin-RevId: 679646192 --- BUILD | 2 + CMakeLists.txt | 1 + Makefile | 1 + Package.swift | 2 + build_autogenerated.yaml | 2 + config.m4 | 1 + config.w32 | 1 + gRPC-C++.podspec | 2 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/BUILD | 24 ++ .../load_balancing/xds/xds_cluster_impl.cc | 13 +- src/core/xds/grpc/xds_cluster.cc | 5 + src/core/xds/grpc/xds_cluster.h | 15 + src/core/xds/grpc/xds_cluster_parser.cc | 27 ++ src/core/xds/xds_client/lrs_client.cc | 145 ++++++-- src/core/xds/xds_client/lrs_client.h | 63 +++- .../xds_backend_metric_propagation.cc | 64 ++++ .../xds_backend_metric_propagation.h | 60 ++++ src/proto/grpc/testing/xds/v3/cluster.proto | 15 + .../grpc/testing/xds/v3/load_report.proto | 25 +- src/python/grpcio/grpc_core_dependencies.py | 1 + .../xds/xds_cluster_resource_type_test.cc | 88 ++++- .../end2end/xds/xds_cluster_end2end_test.cc | 319 ++++++++++++++++++ test/cpp/end2end/xds/xds_end2end_test_lib.h | 12 + test/cpp/end2end/xds/xds_server.h | 30 +- tools/doxygen/Doxyfile.c++.internal | 2 + tools/doxygen/Doxyfile.core.internal | 2 + 29 files changed, 872 insertions(+), 57 deletions(-) create mode 100644 src/core/xds/xds_client/xds_backend_metric_propagation.cc create mode 100644 src/core/xds/xds_client/xds_backend_metric_propagation.h diff --git a/BUILD b/BUILD index 36c3c47497f..17b278b61e6 100644 --- a/BUILD +++ b/BUILD @@ -4462,6 +4462,7 @@ grpc_cc_library( "//src/core:default_event_engine", "//src/core:dual_ref_counted", "//src/core:env", + "//src/core:grpc_backend_metric_data", "//src/core:json", "//src/core:per_cpu", "//src/core:ref_counted", @@ -4469,6 +4470,7 @@ grpc_cc_library( "//src/core:time", "//src/core:upb_utils", "//src/core:useful", + "//src/core:xds_backend_metric_propagation", ], ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14bceea8d0b..3836f7beac9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2665,6 +2665,7 @@ add_library(grpc src/core/xds/grpc/xds_transport_grpc.cc src/core/xds/xds_client/lrs_client.cc src/core/xds/xds_client/xds_api.cc + src/core/xds/xds_client/xds_backend_metric_propagation.cc src/core/xds/xds_client/xds_bootstrap.cc src/core/xds/xds_client/xds_client.cc ) diff --git a/Makefile b/Makefile index 08ae5d181c1..70828125ba2 100644 --- a/Makefile +++ b/Makefile @@ -1517,6 +1517,7 @@ LIBGRPC_SRC = \ src/core/xds/grpc/xds_transport_grpc.cc \ src/core/xds/xds_client/lrs_client.cc \ src/core/xds/xds_client/xds_api.cc \ + src/core/xds/xds_client/xds_backend_metric_propagation.cc \ src/core/xds/xds_client/xds_bootstrap.cc \ src/core/xds/xds_client/xds_client.cc \ third_party/abseil-cpp/absl/base/internal/cycleclock.cc \ diff --git a/Package.swift b/Package.swift index 988f1e7abe7..8b1ae1392cc 100644 --- a/Package.swift +++ b/Package.swift @@ -2036,6 +2036,8 @@ let package = Package( "src/core/xds/xds_client/lrs_client.h", "src/core/xds/xds_client/xds_api.cc", "src/core/xds/xds_client/xds_api.h", + "src/core/xds/xds_client/xds_backend_metric_propagation.cc", + "src/core/xds/xds_client/xds_backend_metric_propagation.h", "src/core/xds/xds_client/xds_bootstrap.cc", "src/core/xds/xds_client/xds_bootstrap.h", "src/core/xds/xds_client/xds_channel_args.h", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index e7c5b7684c3..33b9da00c33 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -1259,6 +1259,7 @@ libs: - src/core/xds/grpc/xds_transport_grpc.h - src/core/xds/xds_client/lrs_client.h - src/core/xds/xds_client/xds_api.h + - src/core/xds/xds_client/xds_backend_metric_propagation.h - src/core/xds/xds_client/xds_bootstrap.h - src/core/xds/xds_client/xds_channel_args.h - src/core/xds/xds_client/xds_client.h @@ -2080,6 +2081,7 @@ libs: - src/core/xds/grpc/xds_transport_grpc.cc - src/core/xds/xds_client/lrs_client.cc - src/core/xds/xds_client/xds_api.cc + - src/core/xds/xds_client/xds_backend_metric_propagation.cc - src/core/xds/xds_client/xds_bootstrap.cc - src/core/xds/xds_client/xds_client.cc deps: diff --git a/config.m4 b/config.m4 index 6a870a7d474..a5d57181f70 100644 --- a/config.m4 +++ b/config.m4 @@ -892,6 +892,7 @@ if test "$PHP_GRPC" != "no"; then src/core/xds/grpc/xds_transport_grpc.cc \ src/core/xds/xds_client/lrs_client.cc \ src/core/xds/xds_client/xds_api.cc \ + src/core/xds/xds_client/xds_backend_metric_propagation.cc \ src/core/xds/xds_client/xds_bootstrap.cc \ src/core/xds/xds_client/xds_client.cc \ src/php/ext/grpc/byte_buffer.c \ diff --git a/config.w32 b/config.w32 index 05a181a2cb1..c0acf9bfb23 100644 --- a/config.w32 +++ b/config.w32 @@ -857,6 +857,7 @@ if (PHP_GRPC != "no") { "src\\core\\xds\\grpc\\xds_transport_grpc.cc " + "src\\core\\xds\\xds_client\\lrs_client.cc " + "src\\core\\xds\\xds_client\\xds_api.cc " + + "src\\core\\xds\\xds_client\\xds_backend_metric_propagation.cc " + "src\\core\\xds\\xds_client\\xds_bootstrap.cc " + "src\\core\\xds\\xds_client\\xds_client.cc " + "src\\php\\ext\\grpc\\byte_buffer.c " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 9d37c6cbe39..481f51c2ea4 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -1373,6 +1373,7 @@ Pod::Spec.new do |s| 'src/core/xds/grpc/xds_transport_grpc.h', 'src/core/xds/xds_client/lrs_client.h', 'src/core/xds/xds_client/xds_api.h', + 'src/core/xds/xds_client/xds_backend_metric_propagation.h', 'src/core/xds/xds_client/xds_bootstrap.h', 'src/core/xds/xds_client/xds_channel_args.h', 'src/core/xds/xds_client/xds_client.h', @@ -2675,6 +2676,7 @@ Pod::Spec.new do |s| 'src/core/xds/grpc/xds_transport_grpc.h', 'src/core/xds/xds_client/lrs_client.h', 'src/core/xds/xds_client/xds_api.h', + 'src/core/xds/xds_client/xds_backend_metric_propagation.h', 'src/core/xds/xds_client/xds_bootstrap.h', 'src/core/xds/xds_client/xds_channel_args.h', 'src/core/xds/xds_client/xds_client.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 15080faf737..2867cb57323 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -2152,6 +2152,8 @@ Pod::Spec.new do |s| 'src/core/xds/xds_client/lrs_client.h', 'src/core/xds/xds_client/xds_api.cc', 'src/core/xds/xds_client/xds_api.h', + 'src/core/xds/xds_client/xds_backend_metric_propagation.cc', + 'src/core/xds/xds_client/xds_backend_metric_propagation.h', 'src/core/xds/xds_client/xds_bootstrap.cc', 'src/core/xds/xds_client/xds_bootstrap.h', 'src/core/xds/xds_client/xds_channel_args.h', @@ -3460,6 +3462,7 @@ Pod::Spec.new do |s| 'src/core/xds/grpc/xds_transport_grpc.h', 'src/core/xds/xds_client/lrs_client.h', 'src/core/xds/xds_client/xds_api.h', + 'src/core/xds/xds_client/xds_backend_metric_propagation.h', 'src/core/xds/xds_client/xds_bootstrap.h', 'src/core/xds/xds_client/xds_channel_args.h', 'src/core/xds/xds_client/xds_client.h', diff --git a/grpc.gemspec b/grpc.gemspec index f7829369b0e..bd39eda2bda 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -2038,6 +2038,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/xds/xds_client/lrs_client.h ) s.files += %w( src/core/xds/xds_client/xds_api.cc ) s.files += %w( src/core/xds/xds_client/xds_api.h ) + s.files += %w( src/core/xds/xds_client/xds_backend_metric_propagation.cc ) + s.files += %w( src/core/xds/xds_client/xds_backend_metric_propagation.h ) s.files += %w( src/core/xds/xds_client/xds_bootstrap.cc ) s.files += %w( src/core/xds/xds_client/xds_bootstrap.h ) s.files += %w( src/core/xds/xds_client/xds_channel_args.h ) diff --git a/package.xml b/package.xml index 4bd5a7a2f8c..befa4e97aa3 100644 --- a/package.xml +++ b/package.xml @@ -2020,6 +2020,8 @@ + + diff --git a/src/core/BUILD b/src/core/BUILD index dccdf45962d..13091d6bd38 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -5619,6 +5619,7 @@ grpc_cc_library( "json_writer", "match", "time", + "xds_backend_metric_propagation", "xds_common_types", "xds_health_status", "xds_metadata", @@ -5651,6 +5652,28 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "xds_backend_metric_propagation", + srcs = [ + "xds/xds_client/xds_backend_metric_propagation.cc", + ], + hdrs = [ + "xds/xds_client/xds_backend_metric_propagation.h", + ], + external_deps = [ + "absl/container:flat_hash_set", + "absl/strings", + ], + language = "c++", + tags = ["nofixdeps"], + visibility = ["@grpc:xds_client_core"], + deps = [ + "ref_counted", + "useful", + "//:ref_counted_ptr", + ], +) + # TODO(roth): Split this up into individual targets. grpc_cc_library( name = "grpc_xds_client", @@ -5827,6 +5850,7 @@ grpc_cc_library( "upb_utils", "useful", "validation_errors", + "xds_backend_metric_propagation", "xds_certificate_provider", "xds_certificate_provider_store", "xds_cluster", diff --git a/src/core/load_balancing/xds/xds_cluster_impl.cc b/src/core/load_balancing/xds/xds_cluster_impl.cc index eb1a4b3259a..380ed7b108a 100644 --- a/src/core/load_balancing/xds/xds_cluster_impl.cc +++ b/src/core/load_balancing/xds/xds_cluster_impl.cc @@ -362,13 +362,9 @@ class XdsClusterImplLb::Picker::SubchannelCallTracker final } // Record call completion for load reporting. if (locality_stats_ != nullptr) { - auto* backend_metric_data = - args.backend_metric_accessor->GetBackendMetricData(); - const std::map* named_metrics = nullptr; - if (backend_metric_data != nullptr) { - named_metrics = &backend_metric_data->named_metrics; - } - locality_stats_->AddCallFinished(named_metrics, !args.status.ok()); + locality_stats_->AddCallFinished( + args.backend_metric_accessor->GetBackendMetricData(), + !args.status.ok()); } // Decrement number of calls in flight. call_counter_->Decrement(); @@ -826,7 +822,8 @@ RefCountedPtr XdsClusterImplLb::Helper::CreateSubchannel( parent()->xds_client_->lrs_client().AddClusterLocalityStats( parent()->cluster_resource_->lrs_load_reporting_server, parent()->config_->cluster_name(), - GetEdsResourceName(*parent()->cluster_resource_), locality_name); + GetEdsResourceName(*parent()->cluster_resource_), locality_name, + parent()->cluster_resource_->lrs_backend_metric_propagation); if (locality_stats == nullptr) { LOG(ERROR) << "[xds_cluster_impl_lb " << parent() diff --git a/src/core/xds/grpc/xds_cluster.cc b/src/core/xds/grpc/xds_cluster.cc index 2d4c2834ff0..09a7454d80f 100644 --- a/src/core/xds/grpc/xds_cluster.cc +++ b/src/core/xds/grpc/xds_cluster.cc @@ -53,6 +53,11 @@ std::string XdsClusterResource::ToString() const { contents.push_back(absl::StrCat("lrs_load_reporting_server_name=", lrs_load_reporting_server->server_uri())); } + if (lrs_backend_metric_propagation != nullptr) { + contents.push_back( + absl::StrCat("lrs_backend_metric_propagation=", + lrs_backend_metric_propagation->AsString())); + } if (!common_tls_context.Empty()) { contents.push_back( absl::StrCat("common_tls_context=", common_tls_context.ToString())); diff --git a/src/core/xds/grpc/xds_cluster.h b/src/core/xds/grpc/xds_cluster.h index f733a9328f8..7eea5d0b0fd 100644 --- a/src/core/xds/grpc/xds_cluster.h +++ b/src/core/xds/grpc/xds_cluster.h @@ -30,6 +30,7 @@ #include "src/core/xds/grpc/xds_health_status.h" #include "src/core/xds/grpc/xds_metadata.h" #include "src/core/xds/grpc/xds_server_grpc.h" +#include "src/core/xds/xds_client/xds_backend_metric_propagation.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_resource_type_impl.h" @@ -44,6 +45,15 @@ inline bool LrsServersEqual( return *lrs_server1 == *lrs_server2; } +inline bool LrsBackendMetricPropagationEqual( + const RefCountedPtr& p1, + const RefCountedPtr& p2) { + if (p1 == nullptr) return p2 == nullptr; + if (p2 == nullptr) return false; + // Neither one is null, so compare them. + return *p1 == *p2; +} + struct XdsClusterResource : public XdsResourceType::ResourceData { struct Eds { // If empty, defaults to the cluster name. @@ -82,6 +92,8 @@ struct XdsClusterResource : public XdsResourceType::ResourceData { // The LRS server to use for load reporting. // If null, load reporting will be disabled. std::shared_ptr lrs_load_reporting_server; + // The set of metrics to propagate from ORCA to LRS. + RefCountedPtr lrs_backend_metric_propagation; // Tls Context used by clients CommonTlsContext common_tls_context; @@ -103,6 +115,9 @@ struct XdsClusterResource : public XdsResourceType::ResourceData { return type == other.type && lb_policy_config == other.lb_policy_config && LrsServersEqual(lrs_load_reporting_server, other.lrs_load_reporting_server) && + LrsBackendMetricPropagationEqual( + lrs_backend_metric_propagation, + other.lrs_backend_metric_propagation) && common_tls_context == other.common_tls_context && connection_idle_timeout == other.connection_idle_timeout && max_concurrent_requests == other.max_concurrent_requests && diff --git a/src/core/xds/grpc/xds_cluster_parser.cc b/src/core/xds/grpc/xds_cluster_parser.cc index 4b0f2683f10..1a6bbc2e2b6 100644 --- a/src/core/xds/grpc/xds_cluster_parser.cc +++ b/src/core/xds/grpc/xds_cluster_parser.cc @@ -59,6 +59,8 @@ #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/grpc/xds_lb_policy_registry.h" #include "src/core/xds/grpc/xds_metadata_parser.h" +#include "src/core/xds/xds_client/lrs_client.h" +#include "src/core/xds/xds_client/xds_backend_metric_propagation.h" namespace grpc_core { @@ -457,6 +459,31 @@ absl::StatusOr> CdsResourceParse( cds_update->lrs_load_reporting_server = std::make_shared( static_cast(context.server)); } + // Record LRS metric propagation. + auto propagation = MakeRefCounted(); + if (XdsOrcaLrsPropagationChangesEnabled()) { + size_t size; + upb_StringView const* metrics = + envoy_config_cluster_v3_Cluster_lrs_report_endpoint_metrics(cluster, + &size); + for (size_t i = 0; i < size; ++i) { + absl::string_view metric_name = UpbStringToAbsl(metrics[i]); + if (metric_name == "cpu_utilization") { + propagation->propagation_bits |= propagation->kCpuUtilization; + } else if (metric_name == "mem_utilization") { + propagation->propagation_bits |= propagation->kMemUtilization; + } else if (metric_name == "application_utilization") { + propagation->propagation_bits |= propagation->kApplicationUtilization; + } else if (absl::ConsumePrefix(&metric_name, "named_metrics.")) { + if (metric_name == "*") { + propagation->propagation_bits |= propagation->kNamedMetricsAll; + } else { + propagation->named_metric_keys.emplace(metric_name); + } + } + } + } + cds_update->lrs_backend_metric_propagation = std::move(propagation); // Protocol options. auto* upstream_config = envoy_config_cluster_v3_Cluster_upstream_config(cluster); diff --git a/src/core/xds/xds_client/lrs_client.cc b/src/core/xds/xds_client/lrs_client.cc index b1767a0e037..d8059321d9e 100644 --- a/src/core/xds/xds_client/lrs_client.cc +++ b/src/core/xds/xds_client/lrs_client.cc @@ -42,8 +42,10 @@ #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/backoff.h" #include "src/core/util/debug_location.h" +#include "src/core/util/env.h" #include "src/core/util/orphanable.h" #include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/string.h" #include "src/core/util/sync.h" #include "src/core/util/upb_utils.h" #include "src/core/util/uri.h" @@ -61,6 +63,15 @@ namespace grpc_core { using ::grpc_event_engine::experimental::EventEngine; +// TODO(roth): Remove this once the feature passes interop tests. +bool XdsOrcaLrsPropagationChangesEnabled() { + auto value = GetEnv("GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION"); + if (!value.has_value()) return false; + bool parsed_value; + bool parse_succeeded = gpr_parse_bool_value(value->c_str(), &parsed_value); + return parse_succeeded && parsed_value; +} + namespace { uint64_t GetAndResetCounter(std::atomic* from) { @@ -124,7 +135,8 @@ void LrsClient::ClusterDropStats::AddCallDropped(const std::string& category) { LrsClient::ClusterLocalityStats::ClusterLocalityStats( RefCountedPtr lrs_client, absl::string_view lrs_server, absl::string_view cluster_name, absl::string_view eds_service_name, - RefCountedPtr name) + RefCountedPtr name, + RefCountedPtr backend_metric_propagation) : RefCounted(GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) ? "ClusterLocalityStats" : nullptr), @@ -132,13 +144,14 @@ LrsClient::ClusterLocalityStats::ClusterLocalityStats( lrs_server_(lrs_server), cluster_name_(cluster_name), eds_service_name_(eds_service_name), - name_(std::move(name)) { + name_(std::move(name)), + backend_metric_propagation_(std::move(backend_metric_propagation)) { GRPC_TRACE_LOG(xds_client, INFO) << "[lrs_client " << lrs_client_.get() << "] created locality stats " << this << " for {" << lrs_server_ << ", " << cluster_name_ << ", " << eds_service_name_ << ", " << (name_ == nullptr ? "" : name_->human_readable_string().c_str()) - << "}"; + << ", propagation=" << backend_metric_propagation_->AsString() << "}"; } LrsClient::ClusterLocalityStats::~ClusterLocalityStats() { @@ -147,9 +160,10 @@ LrsClient::ClusterLocalityStats::~ClusterLocalityStats() { << this << " for {" << lrs_server_ << ", " << cluster_name_ << ", " << eds_service_name_ << ", " << (name_ == nullptr ? "" : name_->human_readable_string().c_str()) - << "}"; + << ", propagation=" << backend_metric_propagation_->AsString() << "}"; lrs_client_->RemoveClusterLocalityStats(lrs_server_, cluster_name_, - eds_service_name_, name_, this); + eds_service_name_, name_, + backend_metric_propagation_, this); lrs_client_.reset(DEBUG_LOCATION, "ClusterLocalityStats"); } @@ -164,9 +178,16 @@ LrsClient::ClusterLocalityStats::GetSnapshotAndReset() { percpu_stats.total_requests_in_progress.load(std::memory_order_relaxed), GetAndResetCounter(&percpu_stats.total_error_requests), GetAndResetCounter(&percpu_stats.total_issued_requests), + {}, + {}, + {}, {}}; { MutexLock lock(&percpu_stats.backend_metrics_mu); + percpu_snapshot.cpu_utilization = std::move(percpu_stats.cpu_utilization); + percpu_snapshot.mem_utilization = std::move(percpu_stats.mem_utilization); + percpu_snapshot.application_utilization = + std::move(percpu_stats.application_utilization); percpu_snapshot.backend_metrics = std::move(percpu_stats.backend_metrics); } snapshot += percpu_snapshot; @@ -181,16 +202,44 @@ void LrsClient::ClusterLocalityStats::AddCallStarted() { } void LrsClient::ClusterLocalityStats::AddCallFinished( - const std::map* named_metrics, bool fail) { + const BackendMetricData* backend_metrics, bool fail) { Stats& stats = stats_.this_cpu(); std::atomic& to_increment = fail ? stats.total_error_requests : stats.total_successful_requests; to_increment.fetch_add(1, std::memory_order_relaxed); stats.total_requests_in_progress.fetch_add(-1, std::memory_order_acq_rel); - if (named_metrics == nullptr) return; + if (backend_metrics == nullptr) return; MutexLock lock(&stats.backend_metrics_mu); - for (const auto& m : *named_metrics) { - stats.backend_metrics[std::string(m.first)] += BackendMetric{1, m.second}; + if (!XdsOrcaLrsPropagationChangesEnabled()) { + for (const auto& m : backend_metrics->named_metrics) { + stats.backend_metrics[std::string(m.first)] += BackendMetric(1, m.second); + } + return; + } + if (backend_metric_propagation_->propagation_bits & + BackendMetricPropagation::kCpuUtilization) { + stats.cpu_utilization += BackendMetric(1, backend_metrics->cpu_utilization); + } + if (backend_metric_propagation_->propagation_bits & + BackendMetricPropagation::kMemUtilization) { + stats.mem_utilization += BackendMetric(1, backend_metrics->mem_utilization); + } + if (backend_metric_propagation_->propagation_bits & + BackendMetricPropagation::kApplicationUtilization) { + stats.application_utilization += + BackendMetric(1, backend_metrics->application_utilization); + } + if (backend_metric_propagation_->propagation_bits & + BackendMetricPropagation::kNamedMetricsAll || + !backend_metric_propagation_->named_metric_keys.empty()) { + for (const auto& m : backend_metrics->named_metrics) { + if (backend_metric_propagation_->propagation_bits & + BackendMetricPropagation::kNamedMetricsAll || + backend_metric_propagation_->named_metric_keys.contains(m.first)) { + stats.backend_metrics[absl::StrCat("named_metrics.", m.first)] += + BackendMetric(1, m.second); + } + } } } @@ -825,7 +874,8 @@ RefCountedPtr LrsClient::AddClusterLocalityStats( std::shared_ptr lrs_server, absl::string_view cluster_name, absl::string_view eds_service_name, - RefCountedPtr locality) { + RefCountedPtr locality, + RefCountedPtr backend_metric_propagation) { auto key = std::make_pair(std::string(cluster_name), std::string(eds_service_name)); RefCountedPtr cluster_locality_stats; @@ -847,20 +897,22 @@ LrsClient::AddClusterLocalityStats( LoadReportState& load_report_state = load_report_it->second; LoadReportState::LocalityState& locality_state = load_report_state.locality_stats[locality]; - if (locality_state.locality_stats != nullptr) { - cluster_locality_stats = locality_state.locality_stats->RefIfNonZero(); + ClusterLocalityStats*& locality_stats = + locality_state.propagation_stats[backend_metric_propagation]; + if (locality_stats != nullptr) { + cluster_locality_stats = locality_stats->RefIfNonZero(); } if (cluster_locality_stats == nullptr) { - if (locality_state.locality_stats != nullptr) { + if (locality_stats != nullptr) { locality_state.deleted_locality_stats += - locality_state.locality_stats->GetSnapshotAndReset(); + locality_stats->GetSnapshotAndReset(); } cluster_locality_stats = MakeRefCounted( Ref(DEBUG_LOCATION, "LocalityStats"), server_it->first /*lrs_server*/, load_report_it->first.first /*cluster_name*/, load_report_it->first.second /*eds_service_name*/, - std::move(locality)); - locality_state.locality_stats = cluster_locality_stats.get(); + std::move(locality), std::move(backend_metric_propagation)); + locality_stats = cluster_locality_stats.get(); } server_it->second.lrs_channel->MaybeStartLrsCall(); } @@ -871,6 +923,8 @@ void LrsClient::RemoveClusterLocalityStats( absl::string_view lrs_server_key, absl::string_view cluster_name, absl::string_view eds_service_name, const RefCountedPtr& locality, + const RefCountedPtr& + backend_metric_propagation, ClusterLocalityStats* cluster_locality_stats) { MutexLock lock(&mu_); auto server_it = load_report_map_.find(lrs_server_key); @@ -882,12 +936,16 @@ void LrsClient::RemoveClusterLocalityStats( auto locality_it = load_report_state.locality_stats.find(locality); if (locality_it == load_report_state.locality_stats.end()) return; LoadReportState::LocalityState& locality_state = locality_it->second; - if (locality_state.locality_stats == cluster_locality_stats) { + auto propagation_it = + locality_state.propagation_stats.find(backend_metric_propagation); + if (propagation_it == locality_state.propagation_stats.end()) return; + ClusterLocalityStats* locality_stats = propagation_it->second; + if (locality_stats == cluster_locality_stats) { // Record final snapshot in deleted_locality_stats, which will be // added to the next load report. locality_state.deleted_locality_stats += - locality_state.locality_stats->GetSnapshotAndReset(); - locality_state.locality_stats = nullptr; + locality_stats->GetSnapshotAndReset(); + locality_state.propagation_stats.erase(propagation_it); } } @@ -940,19 +998,22 @@ LrsClient::ClusterLoadReportMap LrsClient::BuildLoadReportSnapshotLocked( ClusterLocalityStats::Snapshot& locality_snapshot = snapshot.locality_stats[locality_name]; locality_snapshot = std::move(locality_state.deleted_locality_stats); - if (locality_state.locality_stats != nullptr) { - locality_snapshot += - locality_state.locality_stats->GetSnapshotAndReset(); - GRPC_TRACE_LOG(xds_client, INFO) - << "[lrs_client " << this - << "] cluster=" << cluster_key.first.c_str() - << " eds_service_name=" << cluster_key.second.c_str() - << " locality=" << locality_name->human_readable_string().c_str() - << " locality_stats=" << locality_state.locality_stats; + for (const auto& p : locality_state.propagation_stats) { + ClusterLocalityStats* locality_stats = p.second; + if (locality_stats != nullptr) { + locality_snapshot += locality_stats->GetSnapshotAndReset(); + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << this + << "] cluster=" << cluster_key.first.c_str() + << " eds_service_name=" << cluster_key.second.c_str() + << " locality=" << locality_name->human_readable_string().c_str() + << " propagation=" << p.first->AsString() + << " locality_stats=" << locality_stats; + } } // If the only thing left in this entry was final snapshots from // deleted locality stats objects, remove the entry. - if (locality_state.locality_stats == nullptr) { + if (locality_state.propagation_stats.empty()) { it = load_report.locality_stats.erase(it); } else { ++it; @@ -1034,6 +1095,20 @@ std::string LrsClient::CreateLrsInitialRequest() { namespace { +void MaybeAddUnnamedMetric( + const LrsApiContext& context, + const LrsClient::ClusterLocalityStats::BackendMetric& backend_metric, + envoy_config_endpoint_v3_UnnamedEndpointLoadMetricStats* (*add_field)( + envoy_config_endpoint_v3_UpstreamLocalityStats*, upb_Arena*), + envoy_config_endpoint_v3_UpstreamLocalityStats* output) { + if (backend_metric.IsZero()) return; + auto* metric_proto = add_field(output, context.arena); + envoy_config_endpoint_v3_UnnamedEndpointLoadMetricStats_set_num_requests_finished_with_metric( + metric_proto, backend_metric.num_requests_finished_with_metric); + envoy_config_endpoint_v3_UnnamedEndpointLoadMetricStats_set_total_metric_value( + metric_proto, backend_metric.total_metric_value); +} + void LocalityStatsPopulate( const LrsApiContext& context, envoy_config_endpoint_v3_UpstreamLocalityStats* output, @@ -1065,6 +1140,18 @@ void LocalityStatsPopulate( envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_issued_requests( output, snapshot.total_issued_requests); // Add backend metrics. + MaybeAddUnnamedMetric( + context, snapshot.cpu_utilization, + envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_cpu_utilization, + output); + MaybeAddUnnamedMetric( + context, snapshot.mem_utilization, + envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_mem_utilization, + output); + MaybeAddUnnamedMetric( + context, snapshot.application_utilization, + envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_application_utilization, + output); for (const auto& p : snapshot.backend_metrics) { const std::string& metric_name = p.first; const LrsClient::ClusterLocalityStats::BackendMetric& metric_value = diff --git a/src/core/xds/xds_client/lrs_client.h b/src/core/xds/xds_client/lrs_client.h index 7bda6f68799..36fabc56fe3 100644 --- a/src/core/xds/xds_client/lrs_client.h +++ b/src/core/xds/xds_client/lrs_client.h @@ -33,6 +33,7 @@ #include #include "src/core/lib/debug/trace.h" +#include "src/core/load_balancing/backend_metric_data.h" #include "src/core/util/dual_ref_counted.h" #include "src/core/util/orphanable.h" #include "src/core/util/per_cpu.h" @@ -43,6 +44,7 @@ #include "src/core/util/uri.h" #include "src/core/util/work_serializer.h" #include "src/core/xds/xds_client/xds_api.h" +#include "src/core/xds/xds_client/xds_backend_metric_propagation.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_locality.h" #include "src/core/xds/xds_client/xds_metrics.h" @@ -51,6 +53,8 @@ namespace grpc_core { +bool XdsOrcaLrsPropagationChangesEnabled(); + class LrsClient : public DualRefCounted { public: // Drop stats for an xds cluster. @@ -114,6 +118,24 @@ class LrsClient : public DualRefCounted { uint64_t num_requests_finished_with_metric = 0; double total_metric_value = 0; + BackendMetric() = default; + + BackendMetric(uint64_t num_requests_finished, double value) + : num_requests_finished_with_metric(num_requests_finished), + total_metric_value(value) {} + + BackendMetric(BackendMetric&& other) noexcept + : num_requests_finished_with_metric( + std::exchange(other.num_requests_finished_with_metric, 0)), + total_metric_value(std::exchange(other.total_metric_value, 0)) {} + + BackendMetric& operator=(BackendMetric&& other) noexcept { + num_requests_finished_with_metric = + std::exchange(other.num_requests_finished_with_metric, 0); + total_metric_value = std::exchange(other.total_metric_value, 0); + return *this; + } + BackendMetric& operator+=(const BackendMetric& other) { num_requests_finished_with_metric += other.num_requests_finished_with_metric; @@ -132,6 +154,9 @@ class LrsClient : public DualRefCounted { uint64_t total_requests_in_progress = 0; uint64_t total_error_requests = 0; uint64_t total_issued_requests = 0; + BackendMetric cpu_utilization; + BackendMetric mem_utilization; + BackendMetric application_utilization; std::map backend_metrics; Snapshot& operator+=(const Snapshot& other) { @@ -139,6 +164,9 @@ class LrsClient : public DualRefCounted { total_requests_in_progress += other.total_requests_in_progress; total_error_requests += other.total_error_requests; total_issued_requests += other.total_issued_requests; + cpu_utilization += other.cpu_utilization; + mem_utilization += other.mem_utilization; + application_utilization += other.application_utilization; for (const auto& p : other.backend_metrics) { backend_metrics[p.first] += p.second; } @@ -147,7 +175,9 @@ class LrsClient : public DualRefCounted { bool IsZero() const { if (total_successful_requests != 0 || total_requests_in_progress != 0 || - total_error_requests != 0 || total_issued_requests != 0) { + total_error_requests != 0 || total_issued_requests != 0 || + !cpu_utilization.IsZero() || !mem_utilization.IsZero() || + !application_utilization.IsZero()) { return false; } for (const auto& p : backend_metrics) { @@ -161,16 +191,17 @@ class LrsClient : public DualRefCounted { absl::string_view lrs_server, absl::string_view cluster_name, absl::string_view eds_service_name, - RefCountedPtr name); + RefCountedPtr name, + RefCountedPtr + backend_metric_propagation); ~ClusterLocalityStats() override; // Returns a snapshot of this instance and resets all the counters. Snapshot GetSnapshotAndReset(); void AddCallStarted(); - void AddCallFinished( - const std::map* named_metrics, - bool fail = false); + void AddCallFinished(const BackendMetricData* backend_metrics, + bool fail = false); XdsLocalityName* locality_name() const { return name_.get(); } @@ -181,10 +212,10 @@ class LrsClient : public DualRefCounted { std::atomic total_error_requests{0}; std::atomic total_issued_requests{0}; - // Protects backend_metrics. A mutex is necessary because the length of - // backend_metrics_ can be accessed by both the callback intercepting the - // call's recv_trailing_metadata and the load reporting thread. Mutex backend_metrics_mu; + BackendMetric cpu_utilization ABSL_GUARDED_BY(backend_metrics_mu); + BackendMetric mem_utilization ABSL_GUARDED_BY(backend_metrics_mu); + BackendMetric application_utilization ABSL_GUARDED_BY(backend_metrics_mu); std::map backend_metrics ABSL_GUARDED_BY(backend_metrics_mu); }; @@ -194,6 +225,7 @@ class LrsClient : public DualRefCounted { absl::string_view cluster_name_; absl::string_view eds_service_name_; RefCountedPtr name_; + RefCountedPtr backend_metric_propagation_; PerCpu stats_{PerCpuOptions().SetMaxShards(32).SetCpusPerShard(4)}; }; @@ -204,17 +236,18 @@ class LrsClient : public DualRefCounted { std::shared_ptr engine); ~LrsClient() override; - // Adds and removes drop stats for cluster_name and eds_service_name. + // Adds drop stats for cluster_name and eds_service_name. RefCountedPtr AddClusterDropStats( std::shared_ptr lrs_server, absl::string_view cluster_name, absl::string_view eds_service_name); - // Adds and removes locality stats for cluster_name and eds_service_name - // for the specified locality. + // Adds locality stats for cluster_name and eds_service_name for the + // specified locality with the specified backend metric propagation. RefCountedPtr AddClusterLocalityStats( std::shared_ptr lrs_server, absl::string_view cluster_name, absl::string_view eds_service_name, - RefCountedPtr locality); + RefCountedPtr locality, + RefCountedPtr backend_metric_propagation); // Resets connection backoff state. void ResetBackoff(); @@ -267,7 +300,9 @@ class LrsClient : public DualRefCounted { struct LoadReportState { struct LocalityState { - ClusterLocalityStats* locality_stats = nullptr; + std::map, + ClusterLocalityStats*, BackendMetricPropagation::Less> + propagation_stats; ClusterLocalityStats::Snapshot deleted_locality_stats; }; @@ -321,6 +356,8 @@ class LrsClient : public DualRefCounted { absl::string_view lrs_server, absl::string_view cluster_name, absl::string_view eds_service_name, const RefCountedPtr& locality, + const RefCountedPtr& + backend_metric_propagation, ClusterLocalityStats* cluster_locality_stats); // Creates an initial LRS request. diff --git a/src/core/xds/xds_client/xds_backend_metric_propagation.cc b/src/core/xds/xds_client/xds_backend_metric_propagation.cc new file mode 100644 index 00000000000..1d514a0f25c --- /dev/null +++ b/src/core/xds/xds_client/xds_backend_metric_propagation.cc @@ -0,0 +1,64 @@ +// +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include "src/core/xds/xds_client/xds_backend_metric_propagation.h" + +#include + +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" + +#include "src/core/util/useful.h" + +namespace grpc_core { + +std::string BackendMetricPropagation::AsString() const { + std::vector parts; + if (propagation_bits & kCpuUtilization) parts.push_back("cpu_utilization"); + if (propagation_bits & kMemUtilization) parts.push_back("mem_utilization"); + if (propagation_bits & kApplicationUtilization) { + parts.push_back("application_utilization"); + } + if (propagation_bits & kNamedMetricsAll) { + parts.push_back("named_metrics.*"); + } else { + // Output keys in sorted order for consistency. + std::vector keys(named_metric_keys.begin(), + named_metric_keys.end()); + std::sort(keys.begin(), keys.end()); + for (const auto& key : keys) { + parts.push_back(absl::StrCat("named_metrics.", key)); + } + } + return absl::StrCat("{", absl::StrJoin(parts, ","), "}"); +} + +bool BackendMetricPropagation::operator<( + const BackendMetricPropagation& other) const { + int c = QsortCompare(propagation_bits, other.propagation_bits); + if (c != 0) return c == -1; + auto other_it = other.named_metric_keys.begin(); + for (auto it = named_metric_keys.begin(); it != named_metric_keys.end(); + ++it) { + if (other_it == other.named_metric_keys.end()) return false; + c = QsortCompare(*it, *other_it); + if (c != 0) return c == -1; + ++other_it; + } + return false; +} + +} // namespace grpc_core diff --git a/src/core/xds/xds_client/xds_backend_metric_propagation.h b/src/core/xds/xds_client/xds_backend_metric_propagation.h new file mode 100644 index 00000000000..4216c0ac47e --- /dev/null +++ b/src/core/xds/xds_client/xds_backend_metric_propagation.h @@ -0,0 +1,60 @@ +// +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_BACKEND_METRIC_PROPAGATION_H +#define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_BACKEND_METRIC_PROPAGATION_H + +#include + +#include "absl/container/flat_hash_set.h" + +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" + +namespace grpc_core { + +struct BackendMetricPropagation : public RefCounted { + static constexpr uint8_t kCpuUtilization = 1; + static constexpr uint8_t kMemUtilization = 2; + static constexpr uint8_t kApplicationUtilization = 4; + static constexpr uint8_t kNamedMetricsAll = 8; + + uint8_t propagation_bits = 0; + absl::flat_hash_set named_metric_keys; + + std::string AsString() const; + + bool operator==(const BackendMetricPropagation& other) const { + return propagation_bits == other.propagation_bits && + named_metric_keys == other.named_metric_keys; + } + + bool operator<(const BackendMetricPropagation& other) const; + + // Sorting functor for RefCountedPtr. + struct Less { + bool operator()( + const RefCountedPtr& p1, + const RefCountedPtr& p2) const { + if (p1 == nullptr || p2 == nullptr) return p1.get() < p2.get(); + return *p1 < *p2; + } + }; +}; + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_BACKEND_METRIC_PROPAGATION_H diff --git a/src/proto/grpc/testing/xds/v3/cluster.proto b/src/proto/grpc/testing/xds/v3/cluster.proto index a7c438399a4..bc4325e378a 100644 --- a/src/proto/grpc/testing/xds/v3/cluster.proto +++ b/src/proto/grpc/testing/xds/v3/cluster.proto @@ -252,6 +252,21 @@ message Cluster { // from the LRS stream here.] core.v3.ConfigSource lrs_server = 42; + // A list of metric names from ORCA load reports to propagate to LRS. + // + // For map fields in the ORCA proto, the string will be of the form ``.``. + // For example, the string ``named_metrics.foo`` will mean to look for the key ``foo`` in the ORCA + // ``named_metrics`` field. + // + // The special map key ``*`` means to report all entries in the map (e.g., ``named_metrics.*`` means to + // report all entries in the ORCA named_metrics field). Note that this should be used only with trusted + // backends. + // + // The metric names in LRS will follow the same semantics as this field. In other words, if this field + // contains ``named_metrics.foo``, then the LRS load report will include the data with that same string + // as the key. + repeated string lrs_report_endpoint_metrics = 57; + // The Metadata field can be used to provide additional information about the // cluster. It can be used for stats, logging, and varying filter behavior. // Fields should use reverse DNS notation to denote which entity within Envoy diff --git a/src/proto/grpc/testing/xds/v3/load_report.proto b/src/proto/grpc/testing/xds/v3/load_report.proto index b8ee86fb485..a62e7835050 100644 --- a/src/proto/grpc/testing/xds/v3/load_report.proto +++ b/src/proto/grpc/testing/xds/v3/load_report.proto @@ -51,7 +51,20 @@ message UpstreamLocalityStats { // upstream endpoints in the locality. uint64 total_issued_requests = 8; - // Stats for multi-dimensional load balancing. + // CPU utilization stats for multi-dimensional load balancing. + // This typically comes from endpoint metrics reported via ORCA. + UnnamedEndpointLoadMetricStats cpu_utilization = 12; + + // Memory utilization for multi-dimensional load balancing. + // This typically comes from endpoint metrics reported via ORCA. + UnnamedEndpointLoadMetricStats mem_utilization = 13; + + // Blended application-defined utilization for multi-dimensional load balancing. + // This typically comes from endpoint metrics reported via ORCA. + UnnamedEndpointLoadMetricStats application_utilization = 14; + + // Named stats for multi-dimensional load balancing. + // These typically come from endpoint metrics reported via ORCA. repeated EndpointLoadMetricStats load_metric_stats = 5; // Endpoint granularity stats information for this locality. This information @@ -117,6 +130,16 @@ message EndpointLoadMetricStats { double total_metric_value = 3; } +// Same as EndpointLoadMetricStats, except without the metric_name field. +message UnnamedEndpointLoadMetricStats { + // Number of calls that finished and included this metric. + uint64 num_requests_finished_with_metric = 1; + + // Sum of metric values across all calls that finished with this metric for + // load_reporting_interval. + double total_metric_value = 2; +} + // Per cluster load stats. Envoy reports these stats a management server in a // :ref:`LoadStatsRequest` // [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index f5b68900662..c7e8f2b4c9f 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -866,6 +866,7 @@ CORE_SOURCE_FILES = [ 'src/core/xds/grpc/xds_transport_grpc.cc', 'src/core/xds/xds_client/lrs_client.cc', 'src/core/xds/xds_client/xds_api.cc', + 'src/core/xds/xds_client/xds_backend_metric_propagation.cc', 'src/core/xds/xds_client/xds_bootstrap.cc', 'src/core/xds/xds_client/xds_client.cc', 'third_party/abseil-cpp/absl/base/internal/cycleclock.cc', diff --git a/test/core/xds/xds_cluster_resource_type_test.cc b/test/core/xds/xds_cluster_resource_type_test.cc index fed2848dc65..804241913e8 100644 --- a/test/core/xds/xds_cluster_resource_type_test.cc +++ b/test/core/xds/xds_cluster_resource_type_test.cc @@ -1113,7 +1113,7 @@ TEST_F(TlsConfigTest, CaCertProviderUnset) { } // -// LRS server tests +// LRS tests // using LrsTest = XdsClusterTest; @@ -1160,6 +1160,92 @@ TEST_F(LrsTest, NotSelfConfigSource) { << decode_result.resource.status(); } +TEST_F(LrsTest, IgnoresPropagationWithoutEnvVar) { + Cluster cluster; + cluster.set_name("foo"); + cluster.set_type(cluster.EDS); + cluster.mutable_eds_cluster_config()->mutable_eds_config()->mutable_self(); + cluster.mutable_lrs_server()->mutable_self(); + cluster.add_lrs_report_endpoint_metrics("named_metrics.foo"); + cluster.add_lrs_report_endpoint_metrics("cpu_utilization"); + std::string serialized_resource; + ASSERT_TRUE(cluster.SerializeToString(&serialized_resource)); + auto* resource_type = XdsClusterResourceType::Get(); + auto decode_result = + resource_type->Decode(decode_context_, serialized_resource); + ASSERT_TRUE(decode_result.resource.ok()) << decode_result.resource.status(); + ASSERT_TRUE(decode_result.name.has_value()); + EXPECT_EQ(*decode_result.name, "foo"); + auto& resource = + static_cast(**decode_result.resource); + ASSERT_NE(resource.lrs_load_reporting_server, nullptr); + EXPECT_EQ(*resource.lrs_load_reporting_server, + *xds_client_->bootstrap().servers().front()); + ASSERT_NE(resource.lrs_backend_metric_propagation, nullptr); + EXPECT_EQ(resource.lrs_backend_metric_propagation->AsString(), "{}"); +} + +TEST_F(LrsTest, Propagation) { + ScopedExperimentalEnvVar env_var( + "GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION"); + Cluster cluster; + cluster.set_name("foo"); + cluster.set_type(cluster.EDS); + cluster.mutable_eds_cluster_config()->mutable_eds_config()->mutable_self(); + cluster.mutable_lrs_server()->mutable_self(); + cluster.add_lrs_report_endpoint_metrics("named_metrics.foo"); + cluster.add_lrs_report_endpoint_metrics("named_metrics.bar"); + cluster.add_lrs_report_endpoint_metrics("cpu_utilization"); + cluster.add_lrs_report_endpoint_metrics("mem_utilization"); + cluster.add_lrs_report_endpoint_metrics("application_utilization"); + cluster.add_lrs_report_endpoint_metrics("unknown_field"); + std::string serialized_resource; + ASSERT_TRUE(cluster.SerializeToString(&serialized_resource)); + auto* resource_type = XdsClusterResourceType::Get(); + auto decode_result = + resource_type->Decode(decode_context_, serialized_resource); + ASSERT_TRUE(decode_result.resource.ok()) << decode_result.resource.status(); + ASSERT_TRUE(decode_result.name.has_value()); + EXPECT_EQ(*decode_result.name, "foo"); + auto& resource = + static_cast(**decode_result.resource); + ASSERT_NE(resource.lrs_load_reporting_server, nullptr); + EXPECT_EQ(*resource.lrs_load_reporting_server, + *xds_client_->bootstrap().servers().front()); + ASSERT_NE(resource.lrs_backend_metric_propagation, nullptr); + EXPECT_EQ(resource.lrs_backend_metric_propagation->AsString(), + "{cpu_utilization,mem_utilization,application_utilization," + "named_metrics.bar,named_metrics.foo}"); +} + +TEST_F(LrsTest, PropagationNamedMetricsAll) { + ScopedExperimentalEnvVar env_var( + "GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION"); + Cluster cluster; + cluster.set_name("foo"); + cluster.set_type(cluster.EDS); + cluster.mutable_eds_cluster_config()->mutable_eds_config()->mutable_self(); + cluster.mutable_lrs_server()->mutable_self(); + cluster.add_lrs_report_endpoint_metrics("named_metrics.*"); + cluster.add_lrs_report_endpoint_metrics("cpu_utilization"); + std::string serialized_resource; + ASSERT_TRUE(cluster.SerializeToString(&serialized_resource)); + auto* resource_type = XdsClusterResourceType::Get(); + auto decode_result = + resource_type->Decode(decode_context_, serialized_resource); + ASSERT_TRUE(decode_result.resource.ok()) << decode_result.resource.status(); + ASSERT_TRUE(decode_result.name.has_value()); + EXPECT_EQ(*decode_result.name, "foo"); + auto& resource = + static_cast(**decode_result.resource); + ASSERT_NE(resource.lrs_load_reporting_server, nullptr); + EXPECT_EQ(*resource.lrs_load_reporting_server, + *xds_client_->bootstrap().servers().front()); + ASSERT_NE(resource.lrs_backend_metric_propagation, nullptr); + EXPECT_EQ(resource.lrs_backend_metric_propagation->AsString(), + "{cpu_utilization,named_metrics.*}"); +} + // // upstream config tests // diff --git a/test/cpp/end2end/xds/xds_cluster_end2end_test.cc b/test/cpp/end2end/xds/xds_cluster_end2end_test.cc index 24398adf7f3..c10f22d4851 100644 --- a/test/cpp/end2end/xds/xds_cluster_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_cluster_end2end_test.cc @@ -1724,6 +1724,325 @@ TEST_P(ClientLoadReportingTest, Vanilla) { EXPECT_EQ(1U, balancer_->lrs_service()->response_count()); } +// Tests ORCA to LRS propagation. +TEST_P(ClientLoadReportingTest, OrcaPropagation) { + grpc_core::testing::ScopedExperimentalEnvVar env( + "GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION"); + CreateAndStartBackends(4); + const size_t kNumRpcsPerAddress = 10; + const size_t kNumFailuresPerAddress = 3; + Cluster cluster = default_cluster_; + cluster.add_lrs_report_endpoint_metrics("named_metrics.foo"); + cluster.add_lrs_report_endpoint_metrics("cpu_utilization"); + cluster.add_lrs_report_endpoint_metrics("mem_utilization"); + cluster.add_lrs_report_endpoint_metrics("application_utilization"); + cluster.add_lrs_report_endpoint_metrics("unknown_field"); + balancer_->ads_service()->SetCdsResource(cluster); + EdsResourceArgs args({ + {"locality0", CreateEndpointsForBackends(0, 2)}, + {"locality1", CreateEndpointsForBackends(2, 4)}, + }); + balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); + // Wait until all backends are ready. + size_t num_warmup_rpcs = + WaitForAllBackends(DEBUG_LOCATION, 0, 4, /*check_status=*/nullptr, + WaitForBackendOptions().set_reset_counters(false)); + // Send kNumRpcsPerAddress RPCs per server with named metrics. + xds::data::orca::v3::OrcaLoadReport backend_metrics; + backend_metrics.set_cpu_utilization(0.8); + backend_metrics.set_mem_utilization(0.6); + backend_metrics.set_application_utilization(0.4); + auto& named_metrics = (*backend_metrics.mutable_named_metrics()); + named_metrics["foo"] = 1.0; + named_metrics["bar"] = 2.0; // Not propagated. + CheckRpcSendOk(DEBUG_LOCATION, kNumRpcsPerAddress * backends_.size(), + RpcOptions().set_backend_metrics(backend_metrics)); + backend_metrics.set_cpu_utilization(0.4); + backend_metrics.set_mem_utilization(0.3); + backend_metrics.set_application_utilization(0.2); + named_metrics["foo"] = 0.3; + named_metrics["bar"] = 0.4; // Not propagated. + for (size_t i = 0; i < kNumFailuresPerAddress * backends_.size(); ++i) { + CheckRpcSendFailure(DEBUG_LOCATION, StatusCode::FAILED_PRECONDITION, "", + RpcOptions().set_server_fail(true).set_backend_metrics( + backend_metrics)); + } + const size_t total_successful_rpcs_sent = + (kNumRpcsPerAddress * backends_.size()) + num_warmup_rpcs; + const size_t total_failed_rpcs_sent = + kNumFailuresPerAddress * backends_.size(); + // Check that the backends got the right number of requests. + size_t total_rpcs_sent = 0; + for (const auto& backend : backends_) { + total_rpcs_sent += backend->backend_service()->request_count(); + } + EXPECT_EQ(total_rpcs_sent, + total_successful_rpcs_sent + total_failed_rpcs_sent); + // The load report received at the balancer should be correct. + std::vector load_report = + balancer_->lrs_service()->WaitForLoadReport(); + ASSERT_EQ(load_report.size(), 1UL); + ClientStats& client_stats = load_report.front(); + EXPECT_EQ(client_stats.cluster_name(), kDefaultClusterName); + EXPECT_EQ(client_stats.eds_service_name(), kDefaultEdsServiceName); + EXPECT_EQ(total_successful_rpcs_sent, + client_stats.total_successful_requests()); + EXPECT_EQ(0U, client_stats.total_requests_in_progress()); + EXPECT_EQ(total_rpcs_sent, client_stats.total_issued_requests()); + EXPECT_EQ(total_failed_rpcs_sent, client_stats.total_error_requests()); + EXPECT_EQ(0U, client_stats.total_dropped_requests()); + ASSERT_THAT( + client_stats.locality_stats(), + ::testing::ElementsAre(::testing::Pair("locality0", ::testing::_), + ::testing::Pair("locality1", ::testing::_))); + size_t num_successful_rpcs = 0; + size_t num_failed_rpcs = 0; + ClientStats::LocalityStats::LoadMetric cpu_utilization; + ClientStats::LocalityStats::LoadMetric mem_utilization; + ClientStats::LocalityStats::LoadMetric application_utilization; + std::map + named_metrics_total; + for (const auto& p : client_stats.locality_stats()) { + EXPECT_EQ(p.second.total_requests_in_progress, 0U); + EXPECT_EQ( + p.second.total_issued_requests, + p.second.total_successful_requests + p.second.total_error_requests); + num_successful_rpcs += p.second.total_successful_requests; + num_failed_rpcs += p.second.total_error_requests; + cpu_utilization += p.second.cpu_utilization; + mem_utilization += p.second.mem_utilization; + application_utilization += p.second.application_utilization; + for (const auto& s : p.second.load_metrics) { + named_metrics_total[s.first] += s.second; + } + } + EXPECT_EQ(num_successful_rpcs, total_successful_rpcs_sent); + EXPECT_EQ(num_failed_rpcs, total_failed_rpcs_sent); + EXPECT_EQ(num_successful_rpcs + num_failed_rpcs, total_rpcs_sent); + EXPECT_THAT( + cpu_utilization, + LoadMetricEq( + (kNumRpcsPerAddress + kNumFailuresPerAddress) * backends_.size(), + (kNumRpcsPerAddress * backends_.size()) * 0.8 + + (kNumFailuresPerAddress * backends_.size()) * 0.4)); + EXPECT_THAT( + mem_utilization, + LoadMetricEq( + (kNumRpcsPerAddress + kNumFailuresPerAddress) * backends_.size(), + (kNumRpcsPerAddress * backends_.size()) * 0.6 + + (kNumFailuresPerAddress * backends_.size()) * 0.3)); + EXPECT_THAT( + application_utilization, + LoadMetricEq( + (kNumRpcsPerAddress + kNumFailuresPerAddress) * backends_.size(), + (kNumRpcsPerAddress * backends_.size()) * 0.4 + + (kNumFailuresPerAddress * backends_.size()) * 0.2)); + EXPECT_THAT( + named_metrics_total, + ::testing::UnorderedElementsAre(::testing::Pair( + "named_metrics.foo", + LoadMetricEq( + (kNumRpcsPerAddress + kNumFailuresPerAddress) * backends_.size(), + (kNumRpcsPerAddress * backends_.size()) * 1.0 + + (kNumFailuresPerAddress * backends_.size()) * 0.3)))); + // The LRS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancer_->lrs_service()->request_count()); + EXPECT_EQ(1U, balancer_->lrs_service()->response_count()); +} + +TEST_P(ClientLoadReportingTest, OrcaPropagationNamedMetricsAll) { + grpc_core::testing::ScopedExperimentalEnvVar env( + "GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION"); + CreateAndStartBackends(4); + const size_t kNumRpcsPerAddress = 10; + const size_t kNumFailuresPerAddress = 3; + Cluster cluster = default_cluster_; + cluster.add_lrs_report_endpoint_metrics("named_metrics.*"); + balancer_->ads_service()->SetCdsResource(cluster); + EdsResourceArgs args({ + {"locality0", CreateEndpointsForBackends(0, 2)}, + {"locality1", CreateEndpointsForBackends(2, 4)}, + }); + balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); + // Wait until all backends are ready. + size_t num_warmup_rpcs = + WaitForAllBackends(DEBUG_LOCATION, 0, 4, /*check_status=*/nullptr, + WaitForBackendOptions().set_reset_counters(false)); + // Send kNumRpcsPerAddress RPCs per server with named metrics. + xds::data::orca::v3::OrcaLoadReport backend_metrics; + backend_metrics.set_cpu_utilization(0.8); + backend_metrics.set_mem_utilization(0.6); + backend_metrics.set_application_utilization(0.4); + auto& named_metrics = (*backend_metrics.mutable_named_metrics()); + named_metrics["foo"] = 1.0; + named_metrics["bar"] = 2.0; + CheckRpcSendOk(DEBUG_LOCATION, kNumRpcsPerAddress * backends_.size(), + RpcOptions().set_backend_metrics(backend_metrics)); + backend_metrics.set_cpu_utilization(0.4); + backend_metrics.set_mem_utilization(0.3); + backend_metrics.set_application_utilization(0.2); + named_metrics["foo"] = 0.3; + named_metrics["bar"] = 0.4; + for (size_t i = 0; i < kNumFailuresPerAddress * backends_.size(); ++i) { + CheckRpcSendFailure(DEBUG_LOCATION, StatusCode::FAILED_PRECONDITION, "", + RpcOptions().set_server_fail(true).set_backend_metrics( + backend_metrics)); + } + const size_t total_successful_rpcs_sent = + (kNumRpcsPerAddress * backends_.size()) + num_warmup_rpcs; + const size_t total_failed_rpcs_sent = + kNumFailuresPerAddress * backends_.size(); + // Check that the backends got the right number of requests. + size_t total_rpcs_sent = 0; + for (const auto& backend : backends_) { + total_rpcs_sent += backend->backend_service()->request_count(); + } + EXPECT_EQ(total_rpcs_sent, + total_successful_rpcs_sent + total_failed_rpcs_sent); + // The load report received at the balancer should be correct. + std::vector load_report = + balancer_->lrs_service()->WaitForLoadReport(); + ASSERT_EQ(load_report.size(), 1UL); + ClientStats& client_stats = load_report.front(); + EXPECT_EQ(client_stats.cluster_name(), kDefaultClusterName); + EXPECT_EQ(client_stats.eds_service_name(), kDefaultEdsServiceName); + EXPECT_EQ(total_successful_rpcs_sent, + client_stats.total_successful_requests()); + EXPECT_EQ(0U, client_stats.total_requests_in_progress()); + EXPECT_EQ(total_rpcs_sent, client_stats.total_issued_requests()); + EXPECT_EQ(total_failed_rpcs_sent, client_stats.total_error_requests()); + EXPECT_EQ(0U, client_stats.total_dropped_requests()); + ASSERT_THAT( + client_stats.locality_stats(), + ::testing::ElementsAre(::testing::Pair("locality0", ::testing::_), + ::testing::Pair("locality1", ::testing::_))); + size_t num_successful_rpcs = 0; + size_t num_failed_rpcs = 0; + std::map + named_metrics_total; + for (const auto& p : client_stats.locality_stats()) { + EXPECT_EQ(p.second.total_requests_in_progress, 0U); + EXPECT_EQ( + p.second.total_issued_requests, + p.second.total_successful_requests + p.second.total_error_requests); + num_successful_rpcs += p.second.total_successful_requests; + num_failed_rpcs += p.second.total_error_requests; + for (const auto& s : p.second.load_metrics) { + named_metrics_total[s.first] += s.second; + } + } + EXPECT_EQ(num_successful_rpcs, total_successful_rpcs_sent); + EXPECT_EQ(num_failed_rpcs, total_failed_rpcs_sent); + EXPECT_EQ(num_successful_rpcs + num_failed_rpcs, total_rpcs_sent); + EXPECT_THAT( + named_metrics_total, + ::testing::UnorderedElementsAre( + ::testing::Pair( + "named_metrics.foo", + LoadMetricEq( + (kNumRpcsPerAddress + kNumFailuresPerAddress) * + backends_.size(), + (kNumRpcsPerAddress * backends_.size()) * 1.0 + + (kNumFailuresPerAddress * backends_.size()) * 0.3)), + ::testing::Pair( + "named_metrics.bar", + LoadMetricEq( + (kNumRpcsPerAddress + kNumFailuresPerAddress) * + backends_.size(), + (kNumRpcsPerAddress * backends_.size()) * 2.0 + + (kNumFailuresPerAddress * backends_.size()) * 0.4)))); + // The LRS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancer_->lrs_service()->request_count()); + EXPECT_EQ(1U, balancer_->lrs_service()->response_count()); +} + +TEST_P(ClientLoadReportingTest, OrcaPropagationNotConfigured) { + grpc_core::testing::ScopedExperimentalEnvVar env( + "GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION"); + CreateAndStartBackends(4); + const size_t kNumRpcsPerAddress = 10; + const size_t kNumFailuresPerAddress = 3; + EdsResourceArgs args({ + {"locality0", CreateEndpointsForBackends(0, 2)}, + {"locality1", CreateEndpointsForBackends(2, 4)}, + }); + balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); + // Wait until all backends are ready. + size_t num_warmup_rpcs = + WaitForAllBackends(DEBUG_LOCATION, 0, 4, /*check_status=*/nullptr, + WaitForBackendOptions().set_reset_counters(false)); + // Send kNumRpcsPerAddress RPCs per server with named metrics. + xds::data::orca::v3::OrcaLoadReport backend_metrics; + backend_metrics.set_cpu_utilization(0.8); + backend_metrics.set_mem_utilization(0.6); + backend_metrics.set_application_utilization(0.4); + auto& named_metrics = (*backend_metrics.mutable_named_metrics()); + named_metrics["foo"] = 1.0; + named_metrics["bar"] = 2.0; + CheckRpcSendOk(DEBUG_LOCATION, kNumRpcsPerAddress * backends_.size(), + RpcOptions().set_backend_metrics(backend_metrics)); + backend_metrics.set_cpu_utilization(0.4); + backend_metrics.set_mem_utilization(0.3); + backend_metrics.set_application_utilization(0.2); + named_metrics["foo"] = 0.3; + named_metrics["bar"] = 0.4; + for (size_t i = 0; i < kNumFailuresPerAddress * backends_.size(); ++i) { + CheckRpcSendFailure(DEBUG_LOCATION, StatusCode::FAILED_PRECONDITION, "", + RpcOptions().set_server_fail(true).set_backend_metrics( + backend_metrics)); + } + const size_t total_successful_rpcs_sent = + (kNumRpcsPerAddress * backends_.size()) + num_warmup_rpcs; + const size_t total_failed_rpcs_sent = + kNumFailuresPerAddress * backends_.size(); + // Check that the backends got the right number of requests. + size_t total_rpcs_sent = 0; + for (const auto& backend : backends_) { + total_rpcs_sent += backend->backend_service()->request_count(); + } + EXPECT_EQ(total_rpcs_sent, + total_successful_rpcs_sent + total_failed_rpcs_sent); + // The load report received at the balancer should be correct. + std::vector load_report = + balancer_->lrs_service()->WaitForLoadReport(); + ASSERT_EQ(load_report.size(), 1UL); + ClientStats& client_stats = load_report.front(); + EXPECT_EQ(client_stats.cluster_name(), kDefaultClusterName); + EXPECT_EQ(client_stats.eds_service_name(), kDefaultEdsServiceName); + EXPECT_EQ(total_successful_rpcs_sent, + client_stats.total_successful_requests()); + EXPECT_EQ(0U, client_stats.total_requests_in_progress()); + EXPECT_EQ(total_rpcs_sent, client_stats.total_issued_requests()); + EXPECT_EQ(total_failed_rpcs_sent, client_stats.total_error_requests()); + EXPECT_EQ(0U, client_stats.total_dropped_requests()); + ASSERT_THAT( + client_stats.locality_stats(), + ::testing::ElementsAre(::testing::Pair("locality0", ::testing::_), + ::testing::Pair("locality1", ::testing::_))); + size_t num_successful_rpcs = 0; + size_t num_failed_rpcs = 0; + std::map + named_metrics_total; + for (const auto& p : client_stats.locality_stats()) { + EXPECT_EQ(p.second.total_requests_in_progress, 0U); + EXPECT_EQ( + p.second.total_issued_requests, + p.second.total_successful_requests + p.second.total_error_requests); + num_successful_rpcs += p.second.total_successful_requests; + num_failed_rpcs += p.second.total_error_requests; + for (const auto& s : p.second.load_metrics) { + named_metrics_total[s.first] += s.second; + } + } + EXPECT_EQ(num_successful_rpcs, total_successful_rpcs_sent); + EXPECT_EQ(num_failed_rpcs, total_failed_rpcs_sent); + EXPECT_EQ(num_successful_rpcs + num_failed_rpcs, total_rpcs_sent); + EXPECT_THAT(named_metrics_total, ::testing::UnorderedElementsAre()); + // The LRS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancer_->lrs_service()->request_count()); + EXPECT_EQ(1U, balancer_->lrs_service()->response_count()); +} + // Tests send_all_clusters. TEST_P(ClientLoadReportingTest, SendAllClusters) { CreateAndStartBackends(2); diff --git a/test/cpp/end2end/xds/xds_end2end_test_lib.h b/test/cpp/end2end/xds/xds_end2end_test_lib.h index 5183e9cd562..02e3fcbe50d 100644 --- a/test/cpp/end2end/xds/xds_end2end_test_lib.h +++ b/test/cpp/end2end/xds/xds_end2end_test_lib.h @@ -304,6 +304,18 @@ class XdsEnd2endTest : public ::testing::TestWithParam, if (request->has_param() && request->param().has_backend_metrics()) { const auto& request_metrics = request->param().backend_metrics(); auto* recorder = context->ExperimentalGetCallMetricRecorder(); + if (request_metrics.cpu_utilization() != 0) { + recorder->RecordCpuUtilizationMetric( + request_metrics.cpu_utilization()); + } + if (request_metrics.mem_utilization() != 0) { + recorder->RecordMemoryUtilizationMetric( + request_metrics.mem_utilization()); + } + if (request_metrics.application_utilization() != 0) { + recorder->RecordApplicationUtilizationMetric( + request_metrics.application_utilization()); + } for (const auto& p : request_metrics.named_metrics()) { char* key = static_cast( grpc_call_arena_alloc(context->c_call(), p.first.size() + 1)); diff --git a/test/cpp/end2end/xds/xds_server.h b/test/cpp/end2end/xds/xds_server.h index 4131362f7b0..2b6c508faf7 100644 --- a/test/cpp/end2end/xds/xds_server.h +++ b/test/cpp/end2end/xds/xds_server.h @@ -617,8 +617,19 @@ class LrsServiceImpl // Stats for a given locality. struct LocalityStats { struct LoadMetric { - uint64_t num_requests_finished_with_metric; - double total_metric_value; + uint64_t num_requests_finished_with_metric = 0; + double total_metric_value = 0; + + LoadMetric() = default; + + // Works for both EndpointLoadMetricStats and + // UnnamedEndpointLoadMetricStats. + template + explicit LoadMetric(const T& stats) + : num_requests_finished_with_metric( + stats.num_requests_finished_with_metric()), + total_metric_value(stats.total_metric_value()) {} + LoadMetric& operator+=(const LoadMetric& other) { num_requests_finished_with_metric += other.num_requests_finished_with_metric; @@ -640,10 +651,13 @@ class LrsServiceImpl total_error_requests( upstream_locality_stats.total_error_requests()), total_issued_requests( - upstream_locality_stats.total_issued_requests()) { + upstream_locality_stats.total_issued_requests()), + cpu_utilization(upstream_locality_stats.cpu_utilization()), + mem_utilization(upstream_locality_stats.mem_utilization()), + application_utilization( + upstream_locality_stats.application_utilization()) { for (const auto& s : upstream_locality_stats.load_metric_stats()) { - load_metrics[s.metric_name()] += LoadMetric{ - s.num_requests_finished_with_metric(), s.total_metric_value()}; + load_metrics[s.metric_name()] += LoadMetric(s); } } @@ -652,6 +666,9 @@ class LrsServiceImpl total_requests_in_progress += other.total_requests_in_progress; total_error_requests += other.total_error_requests; total_issued_requests += other.total_issued_requests; + cpu_utilization += other.cpu_utilization; + mem_utilization += other.mem_utilization; + application_utilization += other.application_utilization; for (const auto& p : other.load_metrics) { load_metrics[p.first] += p.second; } @@ -662,6 +679,9 @@ class LrsServiceImpl uint64_t total_requests_in_progress = 0; uint64_t total_error_requests = 0; uint64_t total_issued_requests = 0; + LoadMetric cpu_utilization; + LoadMetric mem_utilization; + LoadMetric application_utilization; std::map load_metrics; }; diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 994e038c983..4220bb664a0 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -3044,6 +3044,8 @@ src/core/xds/xds_client/lrs_client.cc \ src/core/xds/xds_client/lrs_client.h \ src/core/xds/xds_client/xds_api.cc \ src/core/xds/xds_client/xds_api.h \ +src/core/xds/xds_client/xds_backend_metric_propagation.cc \ +src/core/xds/xds_client/xds_backend_metric_propagation.h \ src/core/xds/xds_client/xds_bootstrap.cc \ src/core/xds/xds_client/xds_bootstrap.h \ src/core/xds/xds_client/xds_channel_args.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 3725bd86978..eae9a2e2ea4 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -2821,6 +2821,8 @@ src/core/xds/xds_client/lrs_client.cc \ src/core/xds/xds_client/lrs_client.h \ src/core/xds/xds_client/xds_api.cc \ src/core/xds/xds_client/xds_api.h \ +src/core/xds/xds_client/xds_backend_metric_propagation.cc \ +src/core/xds/xds_client/xds_backend_metric_propagation.h \ src/core/xds/xds_client/xds_bootstrap.cc \ src/core/xds/xds_client/xds_bootstrap.h \ src/core/xds/xds_client/xds_channel_args.h \ From 40ff7aa6178d243ae9431a875fb4050c4b2534a9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Sep 2024 11:31:31 -0700 Subject: [PATCH 07/74] [call-v3] Inline OperationExecutor methods (#37006) These methods are very short and very inlinable. Further more the specializations are very infrequently repeated. (I'm essentially hoisting code out of the .cc file and landing it in the .h file with the appropriate inlining annotations here) Before: ``` ---------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations ---------------------------------------------------------------------------------------------------- grpc_core::BM_UnaryWithSpawnPerEnd 1053 ns 1053 ns 2674404 grpc_core::BM_UnaryWithSpawnPerOp 1191 ns 1191 ns 2337068 grpc_core::BM_ClientToServerStreaming 243 ns 243 ns 11511112 grpc_core::BM_UnaryWithSpawnPerEnd 2723 ns 2724 ns 1033990 grpc_core::BM_UnaryWithSpawnPerOp 2930 ns 2931 ns 942815 grpc_core::BM_ClientToServerStreaming 455 ns 455 ns 6213422 ``` After: ``` ---------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations ---------------------------------------------------------------------------------------------------- grpc_core::BM_UnaryWithSpawnPerEnd 986 ns 986 ns 2867870 grpc_core::BM_UnaryWithSpawnPerOp 1101 ns 1101 ns 2472611 grpc_core::BM_ClientToServerStreaming 220 ns 220 ns 12774397 grpc_core::BM_UnaryWithSpawnPerEnd 2512 ns 2512 ns 1111667 grpc_core::BM_UnaryWithSpawnPerOp 2743 ns 2744 ns 1008676 grpc_core::BM_ClientToServerStreaming 420 ns 420 ns 6820805 ``` Closes #37006 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37006 from ctiller:inline-filters 24903bd524ae5f4c97fe75318a3fcf73436ff6ea PiperOrigin-RevId: 679666043 --- src/core/lib/transport/call_filters.cc | 115 +------------------------ src/core/lib/transport/call_filters.h | 108 +++++++++++++++++++++-- 2 files changed, 104 insertions(+), 119 deletions(-) diff --git a/src/core/lib/transport/call_filters.cc b/src/core/lib/transport/call_filters.cc index f15579db603..822c266b0b3 100644 --- a/src/core/lib/transport/call_filters.cc +++ b/src/core/lib/transport/call_filters.cc @@ -23,124 +23,13 @@ #include "src/core/util/crash.h" namespace grpc_core { - -namespace filters_detail { - -void RunHalfClose(absl::Span ops, void* call_data) { - for (const auto& op : ops) { - op.half_close(Offset(call_data, op.call_offset), op.channel_data); - } -} - -ServerMetadataHandle RunServerTrailingMetadata( - absl::Span ops, void* call_data, - ServerMetadataHandle md) { - for (auto& op : ops) { - md = op.server_trailing_metadata(Offset(call_data, op.call_offset), - op.channel_data, std::move(md)); - } - return md; -} - -template -OperationExecutor::~OperationExecutor() { - if (promise_data_ != nullptr) { - ops_->early_destroy(promise_data_); - gpr_free_aligned(promise_data_); - } -} - -template -Poll> OperationExecutor::Start(const Layout* layout, T input, - void* call_data) { - ops_ = layout->ops.data(); - end_ops_ = ops_ + layout->ops.size(); - if (layout->promise_size == 0) { - // No call state ==> instantaneously ready - auto r = InitStep(std::move(input), call_data); - CHECK(r.ready()); - return r; - } - promise_data_ = - gpr_malloc_aligned(layout->promise_size, layout->promise_alignment); - return InitStep(std::move(input), call_data); -} - -template -Poll> OperationExecutor::InitStep(T input, void* call_data) { - CHECK(input != nullptr); - while (true) { - if (ops_ == end_ops_) { - return ResultOr{std::move(input), nullptr}; - } - auto p = - ops_->promise_init(promise_data_, Offset(call_data, ops_->call_offset), - ops_->channel_data, std::move(input)); - if (auto* r = p.value_if_ready()) { - if (r->ok == nullptr) return std::move(*r); - input = std::move(r->ok); - ++ops_; - continue; - } - return Pending{}; - } -} - -template -Poll> OperationExecutor::Step(void* call_data) { - DCHECK_NE(promise_data_, nullptr); - auto p = ContinueStep(call_data); - if (p.ready()) { - gpr_free_aligned(promise_data_); - promise_data_ = nullptr; - } - return p; -} - -template -Poll> OperationExecutor::ContinueStep(void* call_data) { - auto p = ops_->poll(promise_data_); - if (auto* r = p.value_if_ready()) { - if (r->ok == nullptr) return std::move(*r); - ++ops_; - return InitStep(std::move(r->ok), call_data); - } - return Pending{}; -} - -// Explicit instantiations of some types used in filters.h -// We'll need to add ServerMetadataHandle to this when it becomes different -// to ClientMetadataHandle -template class OperationExecutor; -template class OperationExecutor; - -} // namespace filters_detail - -namespace { // Call data for those calls that don't have any call data // (we form pointers to this that aren't allowed to be nullptr) -char g_empty_call_data; -} // namespace +char CallFilters::g_empty_call_data_; /////////////////////////////////////////////////////////////////////////////// // CallFilters -CallFilters::CallFilters(ClientMetadataHandle client_initial_metadata) - : call_data_(nullptr), - push_client_initial_metadata_(std::move(client_initial_metadata)) {} - -CallFilters::~CallFilters() { - if (call_data_ != nullptr && call_data_ != &g_empty_call_data) { - for (const auto& stack : stacks_) { - for (const auto& destructor : stack.stack->data_.filter_destructor) { - destructor.call_destroy(filters_detail::Offset( - call_data_, stack.call_data_offset + destructor.call_offset)); - } - } - gpr_free_aligned(call_data_); - } -} - void CallFilters::Start() { CHECK_EQ(call_data_, nullptr); size_t call_data_alignment = 1; @@ -161,7 +50,7 @@ void CallFilters::Start() { if (call_data_size != 0) { call_data_ = gpr_malloc_aligned(call_data_size, call_data_alignment); } else { - call_data_ = &g_empty_call_data; + call_data_ = &g_empty_call_data_; } for (const auto& stack : stacks_) { for (const auto& constructor : stack.stack->data_.filter_constructor) { diff --git a/src/core/lib/transport/call_filters.h b/src/core/lib/transport/call_filters.h index fb64eb95eca..b1a54f5dfec 100644 --- a/src/core/lib/transport/call_filters.h +++ b/src/core/lib/transport/call_filters.h @@ -220,10 +220,22 @@ struct ServerTrailingMetadataOperator { void* call_data, void* channel_data, ServerMetadataHandle metadata); }; -void RunHalfClose(absl::Span ops, void* call_data); -ServerMetadataHandle RunServerTrailingMetadata( - absl::Span ops, void* call_data, - ServerMetadataHandle md); +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void RunHalfClose( + absl::Span ops, void* call_data) { + for (const auto& op : ops) { + op.half_close(Offset(call_data, op.call_offset), op.channel_data); + } +} + +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline ServerMetadataHandle +RunServerTrailingMetadata(absl::Span ops, + void* call_data, ServerMetadataHandle md) { + for (auto& op : ops) { + md = op.server_trailing_metadata(Offset(call_data, op.call_offset), + op.channel_data, std::move(md)); + } + return md; +} // One call finalizer struct Finalizer { @@ -1116,6 +1128,76 @@ class OperationExecutor { const Operator* end_ops_; }; +template +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline OperationExecutor< + T>::~OperationExecutor() { + if (promise_data_ != nullptr) { + ops_->early_destroy(promise_data_); + gpr_free_aligned(promise_data_); + } +} + +template +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline Poll> +OperationExecutor::Start(const Layout* layout, T input, void* call_data) { + ops_ = layout->ops.data(); + end_ops_ = ops_ + layout->ops.size(); + if (layout->promise_size == 0) { + // No call state ==> instantaneously ready + auto r = InitStep(std::move(input), call_data); + CHECK(r.ready()); + return r; + } + promise_data_ = + gpr_malloc_aligned(layout->promise_size, layout->promise_alignment); + return InitStep(std::move(input), call_data); +} + +template +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline Poll> +OperationExecutor::InitStep(T input, void* call_data) { + CHECK(input != nullptr); + while (true) { + if (ops_ == end_ops_) { + return ResultOr{std::move(input), nullptr}; + } + auto p = + ops_->promise_init(promise_data_, Offset(call_data, ops_->call_offset), + ops_->channel_data, std::move(input)); + if (auto* r = p.value_if_ready()) { + if (r->ok == nullptr) return std::move(*r); + input = std::move(r->ok); + ++ops_; + continue; + } + return Pending{}; + } +} + +template +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline Poll> +OperationExecutor::Step(void* call_data) { + DCHECK_NE(promise_data_, nullptr); + auto p = ContinueStep(call_data); + if (p.ready()) { + gpr_free_aligned(promise_data_); + promise_data_ = nullptr; + } + return p; +} + +template +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline Poll> +OperationExecutor::ContinueStep(void* call_data) { + auto p = ops_->poll(promise_data_); + if (auto* r = p.value_if_ready()) { + if (r->ok == nullptr) return std::move(*r); + ++ops_; + return InitStep(std::move(r->ok), call_data); + } + return Pending{}; +} + template class ServerTrailingMetadataInterceptor { public: @@ -1276,8 +1358,20 @@ class CallFilters { filters_detail::StackData data_; }; - explicit CallFilters(ClientMetadataHandle client_initial_metadata); - ~CallFilters(); + explicit CallFilters(ClientMetadataHandle client_initial_metadata) + : call_data_(nullptr), + push_client_initial_metadata_(std::move(client_initial_metadata)) {} + ~CallFilters() { + if (call_data_ != nullptr && call_data_ != &g_empty_call_data_) { + for (const auto& stack : stacks_) { + for (const auto& destructor : stack.stack->data_.filter_destructor) { + destructor.call_destroy(filters_detail::Offset( + call_data_, stack.call_data_offset + destructor.call_offset)); + } + } + gpr_free_aligned(call_data_); + } + }; CallFilters(const CallFilters&) = delete; CallFilters& operator=(const CallFilters&) = delete; @@ -1528,6 +1622,8 @@ class CallFilters { MessageHandle push_client_to_server_message_; MessageHandle push_server_to_client_message_; ServerMetadataHandle push_server_trailing_metadata_; + + static char g_empty_call_data_; }; } // namespace grpc_core From 6dbc0bdb106b3b2c319198194ca7b6f18d88f8ff Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Sep 2024 12:20:36 -0700 Subject: [PATCH 08/74] [chaotic-good] Use a party for internal activities (#37078) Allows use of the party <-> party wakeup batching stuff, which reduces threadhops drastically for this transport. Closes #37078 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37078 from ctiller:chaotic-party-3 75c32e6a6467f41e24d3786980a4aed3e8c93a4c PiperOrigin-RevId: 679685211 --- src/core/BUILD | 7 +-- .../chaotic_good/client_transport.cc | 45 ++++++------------- .../transport/chaotic_good/client_transport.h | 6 +-- .../chaotic_good/server_transport.cc | 33 +++++++------- .../transport/chaotic_good/server_transport.h | 3 +- src/core/lib/promise/party.cc | 21 ++++++--- src/core/lib/promise/party.h | 2 + .../chaotic_good/client_transport_test.cc | 12 ++--- .../chaotic_good/mock_promise_endpoint.h | 15 +++++++ .../chaotic_good/server_transport_test.cc | 4 +- 10 files changed, 76 insertions(+), 72 deletions(-) diff --git a/src/core/BUILD b/src/core/BUILD index 13091d6bd38..a7ae31fe639 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -7946,7 +7946,7 @@ grpc_cc_library( "absl/base:core_headers", "absl/container:flat_hash_map", "absl/log:check", - "absl/log:log", + "absl/log", "absl/random", "absl/random:bit_gen_ref", "absl/status", @@ -7957,20 +7957,18 @@ grpc_cc_library( language = "c++", deps = [ "activity", - "all_ok", "arena", "chaotic_good_frame", "chaotic_good_frame_header", "chaotic_good_transport", "context", - "event_engine_wakeup_scheduler", + "event_engine_context", "for_each", "grpc_promise_endpoint", "if", "inter_activity_pipe", "loop", "map", - "match", "memory_quota", "metadata_batch", "mpsc", @@ -7987,7 +7985,6 @@ grpc_cc_library( "//:grpc_base", "//:hpack_encoder", "//:hpack_parser", - "//:promise", "//:ref_counted_ptr", ], ) diff --git a/src/core/ext/transport/chaotic_good/client_transport.cc b/src/core/ext/transport/chaotic_good/client_transport.cc index 17aff601d45..28af0d5ba98 100644 --- a/src/core/ext/transport/chaotic_good/client_transport.cc +++ b/src/core/ext/transport/chaotic_good/client_transport.cc @@ -36,22 +36,15 @@ #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" +#include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/promise/activity.h" -#include "src/core/lib/promise/all_ok.h" -#include "src/core/lib/promise/event_engine_wakeup_scheduler.h" #include "src/core/lib/promise/loop.h" #include "src/core/lib/promise/map.h" -#include "src/core/lib/promise/promise.h" -#include "src/core/lib/promise/try_join.h" #include "src/core/lib/promise/try_seq.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/resource_quota.h" -#include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" -#include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/promise_endpoint.h" -#include "src/core/util/match.h" #include "src/core/util/ref_counted_ptr.h" namespace grpc_core { @@ -59,15 +52,12 @@ namespace chaotic_good { void ChaoticGoodClientTransport::Orphan() { AbortWithError(); - ActivityPtr writer; - ActivityPtr reader; + RefCountedPtr party; { MutexLock lock(&mu_); - writer = std::move(writer_); - reader = std::move(reader_); + party = std::move(party_); } - writer.reset(); - reader.reset(); + party.reset(); Unref(); } @@ -211,25 +201,18 @@ ChaoticGoodClientTransport::ChaoticGoodClientTransport( auto transport = MakeRefCounted( std::move(control_endpoint), std::move(data_endpoint), std::move(hpack_parser), std::move(hpack_encoder)); - writer_ = MakeActivity( - // Continuously write next outgoing frames to promise endpoints. - TransportWriteLoop(transport), EventEngineWakeupScheduler(event_engine), - OnTransportActivityDone("write_loop")); - reader_ = MakeActivity( - // Continuously read next incoming frames from promise endpoints. - TransportReadLoop(std::move(transport)), - EventEngineWakeupScheduler(event_engine), - OnTransportActivityDone("read_loop")); + auto party_arena = SimpleArenaAllocator(0)->MakeArena(); + party_arena->SetContext( + event_engine.get()); + party_ = Party::Make(std::move(party_arena)); + party_->Spawn("client-chaotic-writer", TransportWriteLoop(transport), + OnTransportActivityDone("write_loop")); + party_->Spawn("client-chaotic-reader", + TransportReadLoop(std::move(transport)), + OnTransportActivityDone("read_loop")); } -ChaoticGoodClientTransport::~ChaoticGoodClientTransport() { - if (writer_ != nullptr) { - writer_.reset(); - } - if (reader_ != nullptr) { - reader_.reset(); - } -} +ChaoticGoodClientTransport::~ChaoticGoodClientTransport() { party_.reset(); } void ChaoticGoodClientTransport::AbortWithError() { // Mark transport as unavailable when the endpoint write/read failed. diff --git a/src/core/ext/transport/chaotic_good/client_transport.h b/src/core/ext/transport/chaotic_good/client_transport.h index 8f2941947d3..f223c551002 100644 --- a/src/core/ext/transport/chaotic_good/client_transport.h +++ b/src/core/ext/transport/chaotic_good/client_transport.h @@ -88,9 +88,6 @@ class ChaoticGoodClientTransport final : public ClientTransport { void AbortWithError(); private: - // Queue size of each stream pipe is set to 2, so that for each stream read it - // will queue at most 2 frames. - static const size_t kServerFrameQueueSize = 2; using StreamMap = absl::flat_hash_map; uint32_t MakeStream(CallHandler call_handler); @@ -112,8 +109,7 @@ class ChaoticGoodClientTransport final : public ClientTransport { uint32_t next_stream_id_ ABSL_GUARDED_BY(mu_) = 1; // Map of stream incoming server frames, key is stream_id. StreamMap stream_map_ ABSL_GUARDED_BY(mu_); - ActivityPtr writer_; - ActivityPtr reader_; + RefCountedPtr party_; ConnectivityStateTracker state_tracker_ ABSL_GUARDED_BY(mu_){ "chaotic_good_client", GRPC_CHANNEL_READY}; }; diff --git a/src/core/ext/transport/chaotic_good/server_transport.cc b/src/core/ext/transport/chaotic_good/server_transport.cc index 4110af2fbcc..6588227a264 100644 --- a/src/core/ext/transport/chaotic_good/server_transport.cc +++ b/src/core/ext/transport/chaotic_good/server_transport.cc @@ -356,12 +356,14 @@ ChaoticGoodServerTransport::ChaoticGoodServerTransport( auto transport = MakeRefCounted( std::move(control_endpoint), std::move(data_endpoint), std::move(hpack_parser), std::move(hpack_encoder)); - writer_ = MakeActivity(TransportWriteLoop(transport), - EventEngineWakeupScheduler(event_engine), - OnTransportActivityDone("writer")); - reader_ = MakeActivity(TransportReadLoop(std::move(transport)), - EventEngineWakeupScheduler(event_engine), - OnTransportActivityDone("reader")); + auto party_arena = SimpleArenaAllocator(0)->MakeArena(); + party_arena->SetContext( + event_engine.get()); + party_ = Party::Make(std::move(party_arena)); + party_->Spawn("server-chaotic-writer", TransportWriteLoop(transport), + OnTransportActivityDone("writer")); + party_->Spawn("server-chaotic-reader", TransportReadLoop(transport), + OnTransportActivityDone("reader")); } void ChaoticGoodServerTransport::SetCallDestination( @@ -373,15 +375,13 @@ void ChaoticGoodServerTransport::SetCallDestination( } void ChaoticGoodServerTransport::Orphan() { - ActivityPtr writer; - ActivityPtr reader; + AbortWithError(); + RefCountedPtr party; { MutexLock lock(&mu_); - writer = std::move(writer_); - reader = std::move(reader_); + party = std::move(party_); } - writer.reset(); - reader.reset(); + party.reset(); Unref(); } @@ -461,7 +461,7 @@ absl::Status ChaoticGoodServerTransport::NewStream( } void ChaoticGoodServerTransport::PerformOp(grpc_transport_op* op) { - std::vector cancelled; + RefCountedPtr cancelled_party; MutexLock lock(&mu_); bool did_stuff = false; if (op->start_connectivity_watch != nullptr) { @@ -482,8 +482,11 @@ void ChaoticGoodServerTransport::PerformOp(grpc_transport_op* op) { did_stuff = true; } if (!op->goaway_error.ok() || !op->disconnect_with_error.ok()) { - cancelled.push_back(std::move(writer_)); - cancelled.push_back(std::move(reader_)); + cancelled_party = std::move(party_); + outgoing_frames_.MarkClosed(); + state_tracker_.SetState(GRPC_CHANNEL_SHUTDOWN, + absl::UnavailableError("transport closed"), + "transport closed"); did_stuff = true; } if (!did_stuff) { diff --git a/src/core/ext/transport/chaotic_good/server_transport.h b/src/core/ext/transport/chaotic_good/server_transport.h index 23909768b68..d8244ab32fe 100644 --- a/src/core/ext/transport/chaotic_good/server_transport.h +++ b/src/core/ext/transport/chaotic_good/server_transport.h @@ -146,8 +146,7 @@ class ChaoticGoodServerTransport final : public ServerTransport { // Map of stream incoming server frames, key is stream_id. StreamMap stream_map_ ABSL_GUARDED_BY(mu_); uint32_t last_seen_new_stream_id_ = 0; - ActivityPtr writer_ ABSL_GUARDED_BY(mu_); - ActivityPtr reader_ ABSL_GUARDED_BY(mu_); + RefCountedPtr party_; ConnectivityStateTracker state_tracker_ ABSL_GUARDED_BY(mu_){ "chaotic_good_server", GRPC_CHANNEL_READY}; }; diff --git a/src/core/lib/promise/party.cc b/src/core/lib/promise/party.cc index cfc34ebedee..79c310c9806 100644 --- a/src/core/lib/promise/party.cc +++ b/src/core/lib/promise/party.cc @@ -149,15 +149,24 @@ Party::Participant::~Participant() { Party::~Party() {} void Party::CancelRemainingParticipants() { - if ((state_.load(std::memory_order_relaxed) & kAllocatedMask) == 0) return; + uint64_t prev_state = state_.load(std::memory_order_relaxed); + if ((prev_state & kAllocatedMask) == 0) return; ScopedActivity activity(this); promise_detail::Context arena_ctx(arena_.get()); - for (size_t i = 0; i < party_detail::kMaxParticipants; i++) { - if (auto* p = - participants_[i].exchange(nullptr, std::memory_order_acquire)) { - p->Destroy(); + uint64_t clear_state = 0; + do { + for (size_t i = 0; i < party_detail::kMaxParticipants; i++) { + if (auto* p = + participants_[i].exchange(nullptr, std::memory_order_acquire)) { + clear_state |= 1ull << i << kAllocatedShift; + p->Destroy(); + } } - } + if (clear_state == 0) return; + } while (!state_.compare_exchange_weak(prev_state, prev_state & ~clear_state, + std::memory_order_acq_rel)); + LogStateChange("CancelRemainingParticipants", prev_state, + prev_state & ~clear_state); } std::string Party::ActivityDebugTag(WakeupMask wakeup_mask) const { diff --git a/src/core/lib/promise/party.h b/src/core/lib/promise/party.h index a38467a924b..d2051aa6083 100644 --- a/src/core/lib/promise/party.h +++ b/src/core/lib/promise/party.h @@ -430,12 +430,14 @@ void Party::BulkSpawner::Spawn(absl::string_view name, Factory promise_factory, template void Party::Spawn(absl::string_view name, Factory promise_factory, OnComplete on_complete) { + GRPC_TRACE_LOG(party_state, INFO) << "PARTY[" << this << "]: spawn " << name; AddParticipant(new ParticipantImpl( name, std::move(promise_factory), std::move(on_complete))); } template auto Party::SpawnWaitable(absl::string_view name, Factory promise_factory) { + GRPC_TRACE_LOG(party_state, INFO) << "PARTY[" << this << "]: spawn " << name; auto participant = MakeRefCounted>( name, std::move(promise_factory)); Participant* p = participant->Ref().release(); diff --git a/test/core/transport/chaotic_good/client_transport_test.cc b/test/core/transport/chaotic_good/client_transport_test.cc index d4f7037b733..aad18ee1601 100644 --- a/test/core/transport/chaotic_good/client_transport_test.cc +++ b/test/core/transport/chaotic_good/client_transport_test.cc @@ -102,8 +102,8 @@ ChannelArgs MakeChannelArgs() { } TEST_F(TransportTest, AddOneStream) { - MockPromiseEndpoint control_endpoint; - MockPromiseEndpoint data_endpoint; + MockPromiseEndpoint control_endpoint(1000); + MockPromiseEndpoint data_endpoint(1001); control_endpoint.ExpectRead( {SerializedFrameHeader(FrameType::kFragment, 7, 1, 26, 8, 56, 15), EventEngineSlice::FromCopiedBuffer(kPathDemoServiceStep, @@ -120,7 +120,6 @@ TEST_F(TransportTest, AddOneStream) { std::move(data_endpoint.promise_endpoint), MakeChannelArgs(), event_engine(), HPackParser(), HPackCompressor()); auto call = MakeCall(TestInitialMetadata()); - transport->StartCall(call.handler.StartCall()); StrictMock> on_done; EXPECT_CALL(on_done, Call()); control_endpoint.ExpectWrite( @@ -136,6 +135,7 @@ TEST_F(TransportTest, AddOneStream) { {EventEngineSlice::FromCopiedString("0"), Zeros(63)}, nullptr); control_endpoint.ExpectWrite( {SerializedFrameHeader(FrameType::kFragment, 4, 1, 0, 0, 0, 0)}, nullptr); + transport->StartCall(call.handler.StartCall()); call.initiator.SpawnGuarded("test-send", [initiator = call.initiator]() mutable { return SendClientToServerMessages(initiator, 1); @@ -183,8 +183,8 @@ TEST_F(TransportTest, AddOneStream) { } TEST_F(TransportTest, AddOneStreamMultipleMessages) { - MockPromiseEndpoint control_endpoint; - MockPromiseEndpoint data_endpoint; + MockPromiseEndpoint control_endpoint(1000); + MockPromiseEndpoint data_endpoint(1001); control_endpoint.ExpectRead( {SerializedFrameHeader(FrameType::kFragment, 3, 1, 26, 8, 56, 0), EventEngineSlice::FromCopiedBuffer(kPathDemoServiceStep, @@ -206,7 +206,6 @@ TEST_F(TransportTest, AddOneStreamMultipleMessages) { std::move(data_endpoint.promise_endpoint), MakeChannelArgs(), event_engine(), HPackParser(), HPackCompressor()); auto call = MakeCall(TestInitialMetadata()); - transport->StartCall(call.handler.StartCall()); StrictMock> on_done; EXPECT_CALL(on_done, Call()); control_endpoint.ExpectWrite( @@ -227,6 +226,7 @@ TEST_F(TransportTest, AddOneStreamMultipleMessages) { {EventEngineSlice::FromCopiedString("1"), Zeros(63)}, nullptr); control_endpoint.ExpectWrite( {SerializedFrameHeader(FrameType::kFragment, 4, 1, 0, 0, 0, 0)}, nullptr); + transport->StartCall(call.handler.StartCall()); call.initiator.SpawnGuarded("test-send", [initiator = call.initiator]() mutable { return SendClientToServerMessages(initiator, 2); diff --git a/test/core/transport/chaotic_good/mock_promise_endpoint.h b/test/core/transport/chaotic_good/mock_promise_endpoint.h index d90133feb9d..bf073e4644f 100644 --- a/test/core/transport/chaotic_good/mock_promise_endpoint.h +++ b/test/core/transport/chaotic_good/mock_promise_endpoint.h @@ -20,6 +20,7 @@ #include +#include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/transport/promise_endpoint.h" namespace grpc_core { @@ -54,6 +55,20 @@ class MockEndpoint }; struct MockPromiseEndpoint { + explicit MockPromiseEndpoint(int port) { + if (GRPC_TRACE_FLAG_ENABLED(chaotic_good)) { + EXPECT_CALL(*endpoint, GetPeerAddress) + .WillRepeatedly( + [peer_address = + std::make_shared( + grpc_event_engine::experimental::URIToResolvedAddress( + absl::StrCat("ipv4:127.0.0.1:", port)) + .value())]() + -> const grpc_event_engine::experimental::EventEngine:: + ResolvedAddress& { return *peer_address; }); + } + } ::testing::StrictMock* endpoint = new ::testing::StrictMock(); PromiseEndpoint promise_endpoint = PromiseEndpoint( diff --git a/test/core/transport/chaotic_good/server_transport_test.cc b/test/core/transport/chaotic_good/server_transport_test.cc index af5b223c2fb..f3ab7f3a350 100644 --- a/test/core/transport/chaotic_good/server_transport_test.cc +++ b/test/core/transport/chaotic_good/server_transport_test.cc @@ -91,8 +91,8 @@ class MockCallDestination : public UnstartedCallDestination { }; TEST_F(TransportTest, ReadAndWriteOneMessage) { - MockPromiseEndpoint control_endpoint; - MockPromiseEndpoint data_endpoint; + MockPromiseEndpoint control_endpoint(1); + MockPromiseEndpoint data_endpoint(2); auto call_destination = MakeRefCounted>(); EXPECT_CALL(*call_destination, Orphaned()).Times(1); auto transport = MakeOrphanable( From e56d766a45a61e6b476958ad0bb68e2d022dcfbb Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 27 Sep 2024 13:23:29 -0700 Subject: [PATCH 09/74] [GCP auth filter] add "blackboard" mechanism for retaining global state, and use it for cache in GCP auth filter (#37646) This is the last piece of gRFC A83 (https://github.com/grpc/proposal/pull/438). Note that although this is the first use-case for this "blackboard" mechanism, we will also use it in the future for the xDS rate-limiting filter on the gRPC server side. Closes #37646 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37646 from markdroth:gcp_auth_filter_state 72d0d96c79f1576a0085f1887829ffcab93fe5ff PiperOrigin-RevId: 679707134 --- BUILD | 2 + CMakeLists.txt | 62 ++++++++++++++++ Makefile | 1 + Package.swift | 2 + build_autogenerated.yaml | 57 +++++++++++++++ config.m4 | 2 + config.w32 | 2 + gRPC-C++.podspec | 2 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/BUILD | 24 +++++++ src/core/client_channel/client_channel.cc | 7 +- src/core/client_channel/client_channel.h | 3 + .../client_channel/client_channel_filter.cc | 7 +- .../client_channel/client_channel_filter.h | 3 + src/core/client_channel/dynamic_filters.cc | 12 ++-- src/core/client_channel/dynamic_filters.h | 4 +- .../gcp_authentication_filter.cc | 62 ++++++++++++---- .../gcp_authentication_filter.h | 32 ++++++--- src/core/filter/blackboard.cc | 33 +++++++++ src/core/filter/blackboard.h | 71 +++++++++++++++++++ src/core/lib/channel/channel_stack.cc | 5 +- src/core/lib/channel/channel_stack.h | 17 ++--- .../lib/channel/channel_stack_builder_impl.cc | 2 +- .../lib/channel/channel_stack_builder_impl.h | 13 ++++ src/core/lib/channel/promise_based_filter.h | 39 ++++++++-- src/core/lib/transport/interception_chain.h | 17 +++-- src/core/util/lru_cache.h | 36 +++++++--- src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/filters/BUILD | 13 ++++ test/core/filters/blackboard_test.cc | 66 +++++++++++++++++ test/core/util/lru_cache_test.cc | 33 +++++++++ .../end2end/xds/xds_gcp_authn_end2end_test.cc | 69 ++++++++++++++++++ tools/doxygen/Doxyfile.c++.internal | 2 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/generated/tests.json | 24 +++++++ 37 files changed, 675 insertions(+), 59 deletions(-) create mode 100644 src/core/filter/blackboard.cc create mode 100644 src/core/filter/blackboard.h create mode 100644 test/core/filters/blackboard_test.cc diff --git a/BUILD b/BUILD index 17b278b61e6..c2d1c88a7d6 100644 --- a/BUILD +++ b/BUILD @@ -2043,6 +2043,7 @@ grpc_cc_library( "//src/core:arena_promise", "//src/core:atomic_utils", "//src/core:bitset", + "//src/core:blackboard", "//src/core:call_destination", "//src/core:call_filters", "//src/core:call_final_info", @@ -3780,6 +3781,7 @@ grpc_cc_library( "//src/core:arena", "//src/core:arena_promise", "//src/core:backend_metric_parser", + "//src/core:blackboard", "//src/core:call_destination", "//src/core:call_filters", "//src/core:call_spine", diff --git a/CMakeLists.txt b/CMakeLists.txt index 3836f7beac9..ec604861f22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -960,6 +960,7 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx binder_server_test) add_dependencies(buildtests_cxx binder_transport_test) add_dependencies(buildtests_cxx bitset_test) + add_dependencies(buildtests_cxx blackboard_test) add_dependencies(buildtests_cxx buffer_list_test) add_dependencies(buildtests_cxx byte_buffer_test) add_dependencies(buildtests_cxx c_slice_buffer_test) @@ -2246,6 +2247,7 @@ add_library(grpc src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c + src/core/filter/blackboard.cc src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc src/core/handshaker/handshaker.cc src/core/handshaker/handshaker_registry.cc @@ -3053,6 +3055,7 @@ add_library(grpc_unsecure src/core/ext/upb-gen/validate/validate.upb_minitable.c src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb_minitable.c src/core/ext/upb-gen/xds/service/orca/v3/orca.upb_minitable.c + src/core/filter/blackboard.cc src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc src/core/handshaker/handshaker.cc src/core/handshaker/handshaker_registry.cc @@ -5280,6 +5283,7 @@ add_library(grpc_authorization_provider src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c + src/core/filter/blackboard.cc src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc src/core/handshaker/handshaker.cc src/core/handshaker/handshaker_registry.cc @@ -8406,6 +8410,63 @@ target_link_libraries(bitset_test ) +endif() +if(gRPC_BUILD_TESTS) + +add_executable(blackboard_test + src/core/filter/blackboard.cc + src/core/lib/address_utils/sockaddr_utils.cc + src/core/lib/channel/channel_args.cc + src/core/lib/iomgr/sockaddr_utils_posix.cc + src/core/lib/iomgr/socket_utils_windows.cc + src/core/lib/surface/channel_stack_type.cc + src/core/resolver/endpoint_addresses.cc + src/core/util/ref_counted_string.cc + src/core/util/time.cc + src/core/util/uri.cc + test/core/filters/blackboard_test.cc +) +if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(blackboard_test + PRIVATE + "GPR_DLL_IMPORTS" + ) + endif() +endif() +target_compile_features(blackboard_test PUBLIC cxx_std_14) +target_include_directories(blackboard_test + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + third_party/googletest/googletest/include + third_party/googletest/googletest + third_party/googletest/googlemock/include + third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(blackboard_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gtest + absl::config + absl::flat_hash_map + absl::function_ref + absl::hash + absl::type_traits + absl::statusor + gpr +) + + endif() if(gRPC_BUILD_TESTS) @@ -9012,6 +9073,7 @@ add_executable(call_utils_test src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c + src/core/filter/blackboard.cc src/core/handshaker/handshaker_registry.cc src/core/handshaker/proxy_mapper_registry.cc src/core/lib/address_utils/parse_address.cc diff --git a/Makefile b/Makefile index 70828125ba2..078484c1fd6 100644 --- a/Makefile +++ b/Makefile @@ -1057,6 +1057,7 @@ LIBGRPC_SRC = \ src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c \ src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c \ src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c \ + src/core/filter/blackboard.cc \ src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \ src/core/handshaker/handshaker.cc \ src/core/handshaker/handshaker_registry.cc \ diff --git a/Package.swift b/Package.swift index 8b1ae1392cc..c21dedc5f8b 100644 --- a/Package.swift +++ b/Package.swift @@ -1070,6 +1070,8 @@ let package = Package( "src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h", "src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c", "src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h", + "src/core/filter/blackboard.cc", + "src/core/filter/blackboard.h", "src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc", "src/core/handshaker/endpoint_info/endpoint_info_handshaker.h", "src/core/handshaker/handshaker.cc", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 33b9da00c33..b45eb26192f 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -781,6 +781,7 @@ libs: - src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.h - src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h - src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h + - src/core/filter/blackboard.h - src/core/handshaker/endpoint_info/endpoint_info_handshaker.h - src/core/handshaker/handshaker.h - src/core/handshaker/handshaker_factory.h @@ -1662,6 +1663,7 @@ libs: - src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c - src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c - src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c + - src/core/filter/blackboard.cc - src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc - src/core/handshaker/handshaker.cc - src/core/handshaker/handshaker_registry.cc @@ -2359,6 +2361,7 @@ libs: - src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb_minitable.h - src/core/ext/upb-gen/xds/service/orca/v3/orca.upb.h - src/core/ext/upb-gen/xds/service/orca/v3/orca.upb_minitable.h + - src/core/filter/blackboard.h - src/core/handshaker/endpoint_info/endpoint_info_handshaker.h - src/core/handshaker/handshaker.h - src/core/handshaker/handshaker_factory.h @@ -2819,6 +2822,7 @@ libs: - src/core/ext/upb-gen/validate/validate.upb_minitable.c - src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb_minitable.c - src/core/ext/upb-gen/xds/service/orca/v3/orca.upb_minitable.c + - src/core/filter/blackboard.cc - src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc - src/core/handshaker/handshaker.cc - src/core/handshaker/handshaker_registry.cc @@ -4467,6 +4471,7 @@ libs: - src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.h - src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb.h - src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.h + - src/core/filter/blackboard.h - src/core/handshaker/endpoint_info/endpoint_info_handshaker.h - src/core/handshaker/handshaker.h - src/core/handshaker/handshaker_factory.h @@ -4803,6 +4808,7 @@ libs: - src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c - src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c - src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c + - src/core/filter/blackboard.cc - src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc - src/core/handshaker/handshaker.cc - src/core/handshaker/handshaker_registry.cc @@ -6278,6 +6284,55 @@ targets: - absl/log:check - absl/numeric:bits uses_polling: false +- name: blackboard_test + gtest: true + build: test + language: c++ + headers: + - src/core/filter/blackboard.h + - src/core/lib/address_utils/sockaddr_utils.h + - src/core/lib/channel/channel_args.h + - src/core/lib/iomgr/port.h + - src/core/lib/iomgr/resolved_address.h + - src/core/lib/iomgr/sockaddr.h + - src/core/lib/iomgr/sockaddr_posix.h + - src/core/lib/iomgr/sockaddr_windows.h + - src/core/lib/iomgr/socket_utils.h + - src/core/lib/surface/channel_stack_type.h + - src/core/resolver/endpoint_addresses.h + - src/core/util/atomic_utils.h + - src/core/util/avl.h + - src/core/util/down_cast.h + - src/core/util/dual_ref_counted.h + - src/core/util/orphanable.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h + - src/core/util/ref_counted_string.h + - src/core/util/time.h + - src/core/util/unique_type_name.h + - src/core/util/uri.h + src: + - src/core/filter/blackboard.cc + - src/core/lib/address_utils/sockaddr_utils.cc + - src/core/lib/channel/channel_args.cc + - src/core/lib/iomgr/sockaddr_utils_posix.cc + - src/core/lib/iomgr/socket_utils_windows.cc + - src/core/lib/surface/channel_stack_type.cc + - src/core/resolver/endpoint_addresses.cc + - src/core/util/ref_counted_string.cc + - src/core/util/time.cc + - src/core/util/uri.cc + - test/core/filters/blackboard_test.cc + deps: + - gtest + - absl/base:config + - absl/container:flat_hash_map + - absl/functional:function_ref + - absl/hash:hash + - absl/meta:type_traits + - absl/status:statusor + - gpr + uses_polling: false - name: buffer_list_test gtest: true build: test @@ -6738,6 +6793,7 @@ targets: - src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.h - src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb.h - src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.h + - src/core/filter/blackboard.h - src/core/handshaker/handshaker_factory.h - src/core/handshaker/handshaker_registry.h - src/core/handshaker/proxy_mapper.h @@ -7043,6 +7099,7 @@ targets: - src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c - src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c - src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c + - src/core/filter/blackboard.cc - src/core/handshaker/handshaker_registry.cc - src/core/handshaker/proxy_mapper_registry.cc - src/core/lib/address_utils/parse_address.cc diff --git a/config.m4 b/config.m4 index a5d57181f70..ae67f344840 100644 --- a/config.m4 +++ b/config.m4 @@ -432,6 +432,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c \ src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c \ src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c \ + src/core/filter/blackboard.cc \ src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \ src/core/handshaker/handshaker.cc \ src/core/handshaker/handshaker_registry.cc \ @@ -1528,6 +1529,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-gen/xds/core/v3) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-gen/xds/type/matcher/v3) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-gen/xds/type/v3) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/filter) PHP_ADD_BUILD_DIR($ext_builddir/src/core/handshaker) PHP_ADD_BUILD_DIR($ext_builddir/src/core/handshaker/endpoint_info) PHP_ADD_BUILD_DIR($ext_builddir/src/core/handshaker/http_connect) diff --git a/config.w32 b/config.w32 index c0acf9bfb23..94e02c3e172 100644 --- a/config.w32 +++ b/config.w32 @@ -397,6 +397,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\upbdefs-gen\\xds\\type\\v3\\cel.upbdefs.c " + "src\\core\\ext\\upbdefs-gen\\xds\\type\\v3\\range.upbdefs.c " + "src\\core\\ext\\upbdefs-gen\\xds\\type\\v3\\typed_struct.upbdefs.c " + + "src\\core\\filter\\blackboard.cc " + "src\\core\\handshaker\\endpoint_info\\endpoint_info_handshaker.cc " + "src\\core\\handshaker\\handshaker.cc " + "src\\core\\handshaker\\handshaker_registry.cc " + @@ -1666,6 +1667,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-gen\\xds\\type\\matcher"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-gen\\xds\\type\\matcher\\v3"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-gen\\xds\\type\\v3"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\filter"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\handshaker"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\handshaker\\endpoint_info"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\handshaker\\http_connect"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 481f51c2ea4..a63753dd7d1 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -870,6 +870,7 @@ Pod::Spec.new do |s| 'src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.h', 'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h', 'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h', + 'src/core/filter/blackboard.h', 'src/core/handshaker/endpoint_info/endpoint_info_handshaker.h', 'src/core/handshaker/handshaker.h', 'src/core/handshaker/handshaker_factory.h', @@ -2173,6 +2174,7 @@ Pod::Spec.new do |s| 'src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.h', 'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h', 'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h', + 'src/core/filter/blackboard.h', 'src/core/handshaker/endpoint_info/endpoint_info_handshaker.h', 'src/core/handshaker/handshaker.h', 'src/core/handshaker/handshaker_factory.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 2867cb57323..5eda92de512 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1190,6 +1190,8 @@ Pod::Spec.new do |s| 'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h', 'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c', 'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h', + 'src/core/filter/blackboard.cc', + 'src/core/filter/blackboard.h', 'src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc', 'src/core/handshaker/endpoint_info/endpoint_info_handshaker.h', 'src/core/handshaker/handshaker.cc', @@ -2960,6 +2962,7 @@ Pod::Spec.new do |s| 'src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.h', 'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h', 'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h', + 'src/core/filter/blackboard.h', 'src/core/handshaker/endpoint_info/endpoint_info_handshaker.h', 'src/core/handshaker/handshaker.h', 'src/core/handshaker/handshaker_factory.h', diff --git a/grpc.gemspec b/grpc.gemspec index bd39eda2bda..3ba44548b25 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1076,6 +1076,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h ) s.files += %w( src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c ) s.files += %w( src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h ) + s.files += %w( src/core/filter/blackboard.cc ) + s.files += %w( src/core/filter/blackboard.h ) s.files += %w( src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc ) s.files += %w( src/core/handshaker/endpoint_info/endpoint_info_handshaker.h ) s.files += %w( src/core/handshaker/handshaker.cc ) diff --git a/package.xml b/package.xml index befa4e97aa3..76be79fd6b5 100644 --- a/package.xml +++ b/package.xml @@ -1058,6 +1058,8 @@ + + diff --git a/src/core/BUILD b/src/core/BUILD index a7ae31fe639..0de80c1f68a 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -3309,6 +3309,29 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "blackboard", + srcs = [ + "filter/blackboard.cc", + ], + hdrs = [ + "filter/blackboard.h", + ], + external_deps = [ + "absl/container:flat_hash_map", + "absl/strings", + ], + language = "c++", + deps = [ + "ref_counted", + "unique_type_name", + "useful", + "//:debug_location", + "//:endpoint_addresses", + "//:ref_counted_ptr", + ], +) + grpc_cc_library( name = "subchannel_connector", hdrs = [ @@ -5034,6 +5057,7 @@ grpc_cc_library( language = "c++", deps = [ "arena", + "blackboard", "channel_args", "channel_fwd", "context", diff --git a/src/core/client_channel/client_channel.cc b/src/core/client_channel/client_channel.cc index bf87078b474..0d12c4b292a 100644 --- a/src/core/client_channel/client_channel.cc +++ b/src/core/client_channel/client_channel.cc @@ -1279,8 +1279,12 @@ void ClientChannel::UpdateServiceConfigInDataPlaneLocked( config_selector = MakeRefCounted(saved_service_config_); } + // Modify channel args. + ChannelArgs new_args = args.SetObject(this).SetObject(saved_service_config_); // Construct filter stack. - InterceptionChainBuilder builder(args.SetObject(this)); + auto new_blackboard = MakeRefCounted(); + InterceptionChainBuilder builder(new_args, blackboard_.get(), + new_blackboard.get()); if (idle_timeout_ != Duration::Zero()) { builder.AddOnServerTrailingMetadata([this](ServerMetadata&) { if (idle_state_.DecreaseCallCount()) StartIdleTimer(); @@ -1300,6 +1304,7 @@ void ClientChannel::UpdateServiceConfigInDataPlaneLocked( } // Create call destination. auto top_of_stack_call_destination = builder.Build(call_destination_); + blackboard_ = std::move(new_blackboard); // Send result to data plane. if (!top_of_stack_call_destination.ok()) { resolver_data_for_calls_.Set(MaybeRewriteIllegalStatusCode( diff --git a/src/core/client_channel/client_channel.h b/src/core/client_channel/client_channel.h index f268f6bfcb7..a7f7d75c705 100644 --- a/src/core/client_channel/client_channel.h +++ b/src/core/client_channel/client_channel.h @@ -27,6 +27,7 @@ #include "src/core/client_channel/config_selector.h" #include "src/core/client_channel/subchannel.h" #include "src/core/ext/filters/channel_idle/idle_filter_state.h" +#include "src/core/filter/blackboard.h" #include "src/core/lib/promise/observable.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/metadata.h" @@ -215,6 +216,8 @@ class ClientChannel : public Channel { ABSL_GUARDED_BY(*work_serializer_); RefCountedPtr saved_config_selector_ ABSL_GUARDED_BY(*work_serializer_); + RefCountedPtr blackboard_ + ABSL_GUARDED_BY(*work_serializer_); OrphanablePtr lb_policy_ ABSL_GUARDED_BY(*work_serializer_); RefCountedPtr subchannel_pool_ diff --git a/src/core/client_channel/client_channel_filter.cc b/src/core/client_channel/client_channel_filter.cc index 8bedc588914..82caeb27ffc 100644 --- a/src/core/client_channel/client_channel_filter.cc +++ b/src/core/client_channel/client_channel_filter.cc @@ -1498,6 +1498,7 @@ void ClientChannelFilter::UpdateServiceConfigInDataPlaneLocked( config_selector = MakeRefCounted(saved_service_config_); } + // Modify channel args. ChannelArgs new_args = args.SetObject(this).SetObject(service_config); bool enable_retries = !new_args.WantMinimalStack() && @@ -1510,9 +1511,11 @@ void ClientChannelFilter::UpdateServiceConfigInDataPlaneLocked( } else { filters.push_back(&DynamicTerminationFilter::kFilterVtable); } - RefCountedPtr dynamic_filters = - DynamicFilters::Create(new_args, std::move(filters)); + auto new_blackboard = MakeRefCounted(); + RefCountedPtr dynamic_filters = DynamicFilters::Create( + new_args, std::move(filters), blackboard_.get(), new_blackboard.get()); CHECK(dynamic_filters != nullptr); + blackboard_ = std::move(new_blackboard); // Grab data plane lock to update service config. // // We defer unreffing the old values (and deallocating memory) until diff --git a/src/core/client_channel/client_channel_filter.h b/src/core/client_channel/client_channel_filter.h index 2741006a38a..0ca401df455 100644 --- a/src/core/client_channel/client_channel_filter.h +++ b/src/core/client_channel/client_channel_filter.h @@ -43,6 +43,7 @@ #include "src/core/client_channel/dynamic_filters.h" #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_pool_interface.h" +#include "src/core/filter/blackboard.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" @@ -316,6 +317,8 @@ class ClientChannelFilter final { ABSL_GUARDED_BY(*work_serializer_); RefCountedPtr saved_config_selector_ ABSL_GUARDED_BY(*work_serializer_); + RefCountedPtr blackboard_ + ABSL_GUARDED_BY(*work_serializer_); OrphanablePtr lb_policy_ ABSL_GUARDED_BY(*work_serializer_); RefCountedPtr subchannel_pool_ diff --git a/src/core/client_channel/dynamic_filters.cc b/src/core/client_channel/dynamic_filters.cc index 45e7d4ffcbc..c2825925fa4 100644 --- a/src/core/client_channel/dynamic_filters.cc +++ b/src/core/client_channel/dynamic_filters.cc @@ -139,8 +139,10 @@ void DynamicFilters::Call::IncrementRefCount(const DebugLocation& /*location*/, namespace { absl::StatusOr> CreateChannelStack( - const ChannelArgs& args, std::vector filters) { + const ChannelArgs& args, std::vector filters, + const Blackboard* old_blackboard, Blackboard* new_blackboard) { ChannelStackBuilderImpl builder("DynamicFilters", GRPC_CLIENT_DYNAMIC, args); + builder.SetBlackboards(old_blackboard, new_blackboard); for (auto filter : filters) { builder.AppendFilter(filter); } @@ -150,15 +152,17 @@ absl::StatusOr> CreateChannelStack( } // namespace RefCountedPtr DynamicFilters::Create( - const ChannelArgs& args, std::vector filters) { + const ChannelArgs& args, std::vector filters, + const Blackboard* old_blackboard, Blackboard* new_blackboard) { // Attempt to create channel stack from requested filters. - auto p = CreateChannelStack(args, std::move(filters)); + auto p = CreateChannelStack(args, std::move(filters), old_blackboard, + new_blackboard); if (!p.ok()) { // Channel stack creation failed with requested filters. // Create with lame filter instead. auto error = p.status(); p = CreateChannelStack(args.Set(MakeLameClientErrorArg(&error)), - {&LameClientFilter::kFilter}); + {&LameClientFilter::kFilter}, nullptr, nullptr); } return MakeRefCounted(std::move(p.value())); } diff --git a/src/core/client_channel/dynamic_filters.h b/src/core/client_channel/dynamic_filters.h index 142217d72d3..30a5354f935 100644 --- a/src/core/client_channel/dynamic_filters.h +++ b/src/core/client_channel/dynamic_filters.h @@ -24,6 +24,7 @@ #include +#include "src/core/filter/blackboard.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" @@ -90,7 +91,8 @@ class DynamicFilters final : public RefCounted { }; static RefCountedPtr Create( - const ChannelArgs& args, std::vector filters); + const ChannelArgs& args, std::vector filters, + const Blackboard* old_blackboard, Blackboard* new_blackboard); explicit DynamicFilters(RefCountedPtr channel_stack) : channel_stack_(std::move(channel_stack)) {} diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc index c3a6ab3e71b..7e51b20dca3 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc @@ -37,6 +37,10 @@ namespace grpc_core { +// +// GcpAuthenticationFilter::Call +// + const NoInterceptor GcpAuthenticationFilter::Call::OnClientToServerMessage; const NoInterceptor GcpAuthenticationFilter::Call::OnClientToServerHalfClose; const NoInterceptor GcpAuthenticationFilter::Call::OnServerInitialMetadata; @@ -98,7 +102,7 @@ absl::Status GcpAuthenticationFilter::Call::OnClientInitialMetadata( cluster_name)); } // Get the call creds instance. - auto creds = filter->GetCallCredentials( + auto creds = filter->cache_->Get( DownCast(metadata_value)->url()); // Add the call creds instance to the call. auto* arena = GetContext(); @@ -113,6 +117,34 @@ absl::Status GcpAuthenticationFilter::Call::OnClientInitialMetadata( return absl::OkStatus(); } +// +// GcpAuthenticationFilter::CallCredentialsCache +// + +UniqueTypeName GcpAuthenticationFilter::CallCredentialsCache::Type() { + static UniqueTypeName::Factory factory("gcp_auth_call_creds_cache"); + return factory.Create(); +} + +void GcpAuthenticationFilter::CallCredentialsCache::SetMaxSize( + size_t max_size) { + MutexLock lock(&mu_); + cache_.SetMaxSize(max_size); +} + +RefCountedPtr +GcpAuthenticationFilter::CallCredentialsCache::Get( + const std::string& audience) { + MutexLock lock(&mu_); + return cache_.GetOrInsert(audience, [](const std::string& audience) { + return MakeRefCounted(audience); + }); +} + +// +// GcpAuthenticationFilter +// + const grpc_channel_filter GcpAuthenticationFilter::kFilter = MakePromiseBasedFilter(); @@ -120,6 +152,7 @@ const grpc_channel_filter GcpAuthenticationFilter::kFilter = absl::StatusOr> GcpAuthenticationFilter::Create(const ChannelArgs& args, ChannelFilter::Args filter_args) { + // Get filter config. auto* service_config = args.GetObject(); if (service_config == nullptr) { return absl::InvalidArgumentError( @@ -136,29 +169,32 @@ GcpAuthenticationFilter::Create(const ChannelArgs& args, return absl::InvalidArgumentError( "gcp_auth: filter instance ID not found in filter config"); } + // Get XdsConfig so that we can look up CDS resources. auto xds_config = args.GetObjectRef(); if (xds_config == nullptr) { return absl::InvalidArgumentError( "gcp_auth: xds config not found in channel args"); } - return std::make_unique(filter_config, - std::move(xds_config)); + // Get existing cache or create new one. + auto cache = filter_args.GetOrCreateState( + filter_config->filter_instance_name, [&]() { + return MakeRefCounted(filter_config->cache_size); + }); + // Make sure size is updated, in case we're reusing a pre-existing + // cache but it has the wrong size. + cache->SetMaxSize(filter_config->cache_size); + // Instantiate filter. + return std::unique_ptr(new GcpAuthenticationFilter( + filter_config, std::move(xds_config), std::move(cache))); } GcpAuthenticationFilter::GcpAuthenticationFilter( const GcpAuthenticationParsedConfig::Config* filter_config, - RefCountedPtr xds_config) + RefCountedPtr xds_config, + RefCountedPtr cache) : filter_config_(filter_config), xds_config_(std::move(xds_config)), - cache_(filter_config->cache_size) {} - -RefCountedPtr -GcpAuthenticationFilter::GetCallCredentials(const std::string& audience) { - MutexLock lock(&mu_); - return cache_.GetOrInsert(audience, [](const std::string& audience) { - return MakeRefCounted(audience); - }); -} + cache_(std::move(cache)) {} void GcpAuthenticationFilterRegister(CoreConfiguration::Builder* builder) { GcpAuthenticationServiceConfigParser::Register(builder); diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h index 18109c70c1b..f8fc704c9e8 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h @@ -25,6 +25,7 @@ #include "absl/strings/string_view.h" #include "src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h" +#include "src/core/filter/blackboard.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" @@ -49,10 +50,6 @@ class GcpAuthenticationFilter static absl::StatusOr> Create( const ChannelArgs& args, ChannelFilter::Args filter_args); - GcpAuthenticationFilter( - const GcpAuthenticationParsedConfig::Config* filter_config, - RefCountedPtr xds_config); - class Call { public: absl::Status OnClientInitialMetadata(ClientMetadata& /*md*/, @@ -66,15 +63,30 @@ class GcpAuthenticationFilter }; private: - RefCountedPtr GetCallCredentials( - const std::string& audience); + class CallCredentialsCache : public Blackboard::Entry { + public: + explicit CallCredentialsCache(size_t max_size) : cache_(max_size) {} + + static UniqueTypeName Type(); + + void SetMaxSize(size_t max_size); + + RefCountedPtr Get(const std::string& audience); + + private: + Mutex mu_; + LruCache> + cache_ ABSL_GUARDED_BY(&mu_); + }; + + GcpAuthenticationFilter( + const GcpAuthenticationParsedConfig::Config* filter_config, + RefCountedPtr xds_config, + RefCountedPtr cache); const GcpAuthenticationParsedConfig::Config* filter_config_; const RefCountedPtr xds_config_; - - Mutex mu_; - LruCache> - cache_ ABSL_GUARDED_BY(&mu_); + const RefCountedPtr cache_; }; } // namespace grpc_core diff --git a/src/core/filter/blackboard.cc b/src/core/filter/blackboard.cc new file mode 100644 index 00000000000..b916bf77d8f --- /dev/null +++ b/src/core/filter/blackboard.cc @@ -0,0 +1,33 @@ +// +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include "src/core/filter/blackboard.h" + +namespace grpc_core { + +RefCountedPtr Blackboard::Get(UniqueTypeName type, + const std::string& key) const { + auto it = map_.find(std::make_pair(type, key)); + if (it == map_.end()) return nullptr; + return it->second; +} + +void Blackboard::Set(UniqueTypeName type, const std::string& key, + RefCountedPtr entry) { + map_[std::make_pair(type, key)] = std::move(entry); +} + +} // namespace grpc_core diff --git a/src/core/filter/blackboard.h b/src/core/filter/blackboard.h new file mode 100644 index 00000000000..972758162f0 --- /dev/null +++ b/src/core/filter/blackboard.h @@ -0,0 +1,71 @@ +// +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef GRPC_SRC_CORE_FILTER_BLACKBOARD_H +#define GRPC_SRC_CORE_FILTER_BLACKBOARD_H + +#include +#include + +#include "absl/container/flat_hash_map.h" +#include "absl/strings/string_view.h" + +#include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/useful.h" + +namespace grpc_core { + +// A blackboard is a place where dynamic filters can stash global state +// that they may want to retain across resolver updates. Entries are +// identified by by the unique type and a name that identifies the instance, +// which means that it's possible for two filter instances to use the same +// type (e.g., if there are two instantiations of the same filter). +class Blackboard : public RefCounted { + public: + // All entries must derive from this type. + // They must also have a static method with the following signature: + // static UniqueTypeName Type(); + class Entry : public RefCounted {}; + + // Returns an entry for a particular type and name, or null if not present. + template + RefCountedPtr Get(const std::string& key) const { + return Get(T::Type(), key).template TakeAsSubclass(); + } + + // Sets an entry for a particular type and name. + template + void Set(const std::string& key, RefCountedPtr entry) { + Set(T::Type(), key, std::move(entry)); + } + + private: + RefCountedPtr Get(UniqueTypeName type, const std::string& key) const; + void Set(UniqueTypeName type, const std::string& key, + RefCountedPtr entry); + + absl::flat_hash_map, + RefCountedPtr> + map_; +}; + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_FILTER_BLACKBOARD_H diff --git a/src/core/lib/channel/channel_stack.cc b/src/core/lib/channel/channel_stack.cc index 2590ab4590d..14e618a7fd8 100644 --- a/src/core/lib/channel/channel_stack.cc +++ b/src/core/lib/channel/channel_stack.cc @@ -116,7 +116,8 @@ grpc_error_handle grpc_channel_stack_init( int initial_refs, grpc_iomgr_cb_func destroy, void* destroy_arg, const grpc_channel_filter** filters, size_t filter_count, const grpc_core::ChannelArgs& channel_args, const char* name, - grpc_channel_stack* stack) { + grpc_channel_stack* stack, const grpc_core::Blackboard* old_blackboard, + grpc_core::Blackboard* new_blackboard) { if (GRPC_TRACE_FLAG_ENABLED(channel_stack)) { LOG(INFO) << "CHANNEL_STACK: init " << name; for (size_t i = 0; i < filter_count; i++) { @@ -145,6 +146,8 @@ grpc_error_handle grpc_channel_stack_init( sizeof(grpc_channel_element)); // init per-filter data + args.old_blackboard = old_blackboard; + args.new_blackboard = new_blackboard; grpc_error_handle first_error; for (i = 0; i < filter_count; i++) { args.channel_stack = stack; diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 8ed7b4eafe1..56bcb62f900 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -19,13 +19,6 @@ #ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_STACK_H #define GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_STACK_H -////////////////////////////////////////////////////////////////////////////// -// IMPORTANT NOTE: -// -// When you update this API, please make the corresponding changes to -// the C++ API in src/cpp/common/channel_filter.{h,cc} -////////////////////////////////////////////////////////////////////////////// - // A channel filter defines how operations on a channel are implemented. // Channel filters are chained together to create full channels, and if those // chains are linear, then channel stacks provide a mechanism to minimize @@ -74,11 +67,17 @@ #include "src/core/util/time_precise.h" #include "src/core/util/unique_type_name.h" +namespace grpc_core { +class Blackboard; +} // namespace grpc_core + struct grpc_channel_element_args { grpc_channel_stack* channel_stack; grpc_core::ChannelArgs channel_args; int is_first; int is_last; + const grpc_core::Blackboard* old_blackboard; + grpc_core::Blackboard* new_blackboard; }; struct grpc_call_element_args { grpc_call_stack* call_stack; @@ -262,7 +261,9 @@ grpc_error_handle grpc_channel_stack_init( int initial_refs, grpc_iomgr_cb_func destroy, void* destroy_arg, const grpc_channel_filter** filters, size_t filter_count, const grpc_core::ChannelArgs& args, const char* name, - grpc_channel_stack* stack); + grpc_channel_stack* stack, + const grpc_core::Blackboard* old_blackboard = nullptr, + grpc_core::Blackboard* new_blackboard = nullptr); // Destroy a channel stack void grpc_channel_stack_destroy(grpc_channel_stack* stack); diff --git a/src/core/lib/channel/channel_stack_builder_impl.cc b/src/core/lib/channel/channel_stack_builder_impl.cc index 953a60a9232..360cd7aa7db 100644 --- a/src/core/lib/channel/channel_stack_builder_impl.cc +++ b/src/core/lib/channel/channel_stack_builder_impl.cc @@ -77,7 +77,7 @@ ChannelStackBuilderImpl::Build() { gpr_free(stk); }, channel_stack, stack.data(), stack.size(), channel_args(), name(), - channel_stack); + channel_stack, old_blackboard_, new_blackboard_); if (!error.ok()) { grpc_channel_stack_destroy(channel_stack); diff --git a/src/core/lib/channel/channel_stack_builder_impl.h b/src/core/lib/channel/channel_stack_builder_impl.h index 3bce0f5db3f..78df9809c90 100644 --- a/src/core/lib/channel/channel_stack_builder_impl.h +++ b/src/core/lib/channel/channel_stack_builder_impl.h @@ -25,6 +25,8 @@ namespace grpc_core { +class Blackboard; + // Build a channel stack. // Allows interested parties to add filters to the stack, and to query an // in-progress build. @@ -34,13 +36,24 @@ class ChannelStackBuilderImpl final : public ChannelStackBuilder { public: using ChannelStackBuilder::ChannelStackBuilder; + void SetBlackboards(const Blackboard* old_blackboard, + Blackboard* new_blackboard) { + old_blackboard_ = old_blackboard; + new_blackboard_ = new_blackboard; + } + // Build the channel stack. // After success, *result holds the new channel stack, // prefix_bytes are allocated before the channel stack, // initial_refs, destroy, destroy_arg are as per grpc_channel_stack_init // On failure, *result is nullptr. absl::StatusOr> Build() override; + + private: + const Blackboard* old_blackboard_ = nullptr; + Blackboard* new_blackboard_ = nullptr; }; + } // namespace grpc_core #endif // GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_IMPL_H diff --git a/src/core/lib/channel/promise_based_filter.h b/src/core/lib/channel/promise_based_filter.h index 0ac59932e0f..6b2ba31ce6b 100644 --- a/src/core/lib/channel/promise_based_filter.h +++ b/src/core/lib/channel/promise_based_filter.h @@ -42,6 +42,7 @@ #include #include +#include "src/core/filter/blackboard.h" #include "src/core/lib/channel/call_finalization.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" @@ -81,15 +82,23 @@ class ChannelFilter { public: Args() : Args(nullptr, nullptr) {} Args(grpc_channel_stack* channel_stack, - grpc_channel_element* channel_element) - : impl_(ChannelStackBased{channel_stack, channel_element}) {} + grpc_channel_element* channel_element, + const Blackboard* old_blackboard = nullptr, + Blackboard* new_blackboard = nullptr) + : impl_(ChannelStackBased{channel_stack, channel_element}), + old_blackboard_(old_blackboard), + new_blackboard_(new_blackboard) {} // While we're moving to call-v3 we need to have access to // grpc_channel_stack & friends here. That means that we can't rely on this // type signature from interception_chain.h, which means that we need a way // of constructing this object without naming it ===> implicit construction. // TODO(ctiller): remove this once we're fully on call-v3 // NOLINTNEXTLINE(google-explicit-constructor) - Args(size_t instance_id) : impl_(V3Based{instance_id}) {} + Args(size_t instance_id, const Blackboard* old_blackboard = nullptr, + Blackboard* new_blackboard = nullptr) + : impl_(V3Based{instance_id}), + old_blackboard_(old_blackboard), + new_blackboard_(new_blackboard) {} ABSL_DEPRECATED("Direct access to channel stack is deprecated") grpc_channel_stack* channel_stack() const { @@ -113,6 +122,21 @@ class ChannelFilter { [](const V3Based& v3) { return v3.instance_id; }); } + // If a filter state object of type T exists for key from a previous + // filter stack, retains it for the new filter stack we're constructing. + // Otherwise, invokes create_func() to create a new filter state + // object for the new filter stack. Returns the new filter state object. + template + RefCountedPtr GetOrCreateState( + const std::string& key, + absl::FunctionRef()> create_func) { + RefCountedPtr state; + if (old_blackboard_ != nullptr) state = old_blackboard_->Get(key); + if (state == nullptr) state = create_func(); + if (new_blackboard_ != nullptr) new_blackboard_->Set(key, state); + return state; + } + private: friend class ChannelFilter; @@ -127,6 +151,9 @@ class ChannelFilter { using Impl = absl::variant; Impl impl_; + + const Blackboard* old_blackboard_ = nullptr; + Blackboard* new_blackboard_ = nullptr; }; // Perform post-initialization step (if any). @@ -1620,8 +1647,10 @@ struct ChannelFilterWithFlagsMethods { static absl::Status InitChannelElem(grpc_channel_element* elem, grpc_channel_element_args* args) { CHECK(args->is_last == ((kFlags & kFilterIsLast) != 0)); - auto status = F::Create(args->channel_args, - ChannelFilter::Args(args->channel_stack, elem)); + auto status = F::Create( + args->channel_args, + ChannelFilter::Args(args->channel_stack, elem, args->old_blackboard, + args->new_blackboard)); if (!status.ok()) { new (elem->channel_data) F*(nullptr); return absl_status_to_grpc_error(status.status()); diff --git a/src/core/lib/transport/interception_chain.h b/src/core/lib/transport/interception_chain.h index 82608e3a005..a204985afc0 100644 --- a/src/core/lib/transport/interception_chain.h +++ b/src/core/lib/transport/interception_chain.h @@ -28,6 +28,7 @@ namespace grpc_core { +class Blackboard; class InterceptionChainBuilder; // One hijacked call. Using this we can get access to the CallHandler for the @@ -153,8 +154,12 @@ class InterceptionChainBuilder final { absl::variant, RefCountedPtr>; - explicit InterceptionChainBuilder(ChannelArgs args) - : args_(std::move(args)) {} + explicit InterceptionChainBuilder(ChannelArgs args, + const Blackboard* old_blackboard = nullptr, + Blackboard* new_blackboard = nullptr) + : args_(std::move(args)), + old_blackboard_(old_blackboard), + new_blackboard_(new_blackboard) {} // Add a filter with a `Call` class as an inner member. // Call class must be one compatible with the filters described in @@ -163,7 +168,8 @@ class InterceptionChainBuilder final { absl::enable_if_t Add() { if (!status_.ok()) return *this; - auto filter = T::Create(args_, {FilterInstanceId(FilterTypeId())}); + auto filter = T::Create(args_, {FilterInstanceId(FilterTypeId()), + old_blackboard_, new_blackboard_}); if (!filter.ok()) { status_ = filter.status(); return *this; @@ -179,7 +185,8 @@ class InterceptionChainBuilder final { absl::enable_if_t::value, InterceptionChainBuilder&> Add() { - AddInterceptor(T::Create(args_, {FilterInstanceId(FilterTypeId())})); + AddInterceptor(T::Create(args_, {FilterInstanceId(FilterTypeId()), + old_blackboard_, new_blackboard_})); return *this; }; @@ -237,6 +244,8 @@ class InterceptionChainBuilder final { absl::Status status_; std::map filter_type_counts_; static std::atomic next_filter_id_; + const Blackboard* old_blackboard_ = nullptr; + Blackboard* new_blackboard_ = nullptr; }; } // namespace grpc_core diff --git a/src/core/util/lru_cache.h b/src/core/util/lru_cache.h index d0bf5934f4b..6c9f045af7c 100644 --- a/src/core/util/lru_cache.h +++ b/src/core/util/lru_cache.h @@ -47,6 +47,11 @@ class LruCache { // to be too large, removes the least recently used entry. Value GetOrInsert(Key key, absl::AnyInvocable create); + // Changes the max size of the cache. If there are currently more than + // max_size entries, deletes least-recently-used entries to enforce + // the new max size. + void SetMaxSize(size_t max_size); + private: struct CacheEntry { Value value; @@ -55,7 +60,9 @@ class LruCache { explicit CacheEntry(Value v) : value(std::move(v)) {} }; - const size_t max_size_; + void RemoveOldestEntry(); + + size_t max_size_; absl::flat_hash_map cache_; std::list lru_list_; }; @@ -82,14 +89,7 @@ Value LruCache::GetOrInsert( if (value.has_value()) return std::move(*value); // Entry not found. We'll need to insert a new entry. // If the cache is at max size, remove the least recently used entry. - if (cache_.size() == max_size_) { - auto lru_it = lru_list_.begin(); - CHECK(lru_it != lru_list_.end()); - auto cache_it = cache_.find(*lru_it); - CHECK(cache_it != cache_.end()); - cache_.erase(cache_it); - lru_list_.pop_front(); - } + if (cache_.size() == max_size_) RemoveOldestEntry(); // Create a new entry, insert it, and return it. auto it = cache_ .emplace(std::piecewise_construct, std::forward_as_tuple(key), @@ -99,6 +99,24 @@ Value LruCache::GetOrInsert( return it->second.value; } +template +void LruCache::SetMaxSize(size_t max_size) { + max_size_ = max_size; + while (cache_.size() > max_size_) { + RemoveOldestEntry(); + } +} + +template +void LruCache::RemoveOldestEntry() { + auto lru_it = lru_list_.begin(); + CHECK(lru_it != lru_list_.end()); + auto cache_it = cache_.find(*lru_it); + CHECK(cache_it != cache_.end()); + cache_.erase(cache_it); + lru_list_.pop_front(); +} + } // namespace grpc_core #endif // GRPC_SRC_CORE_UTIL_LRU_CACHE_H diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index c7e8f2b4c9f..7c9601a6fe8 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -406,6 +406,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c', 'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c', 'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c', + 'src/core/filter/blackboard.cc', 'src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc', 'src/core/handshaker/handshaker.cc', 'src/core/handshaker/handshaker_registry.cc', diff --git a/test/core/filters/BUILD b/test/core/filters/BUILD index c14d98de853..1674eefb08a 100644 --- a/test/core/filters/BUILD +++ b/test/core/filters/BUILD @@ -150,3 +150,16 @@ grpc_cc_benchmark( "//test/core/transport:call_spine_benchmarks", ], ) + +grpc_cc_test( + name = "blackboard_test", + srcs = ["blackboard_test.cc"], + external_deps = [ + "gtest", + ], + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:blackboard", + ], +) diff --git a/test/core/filters/blackboard_test.cc b/test/core/filters/blackboard_test.cc new file mode 100644 index 00000000000..863aa3fbb36 --- /dev/null +++ b/test/core/filters/blackboard_test.cc @@ -0,0 +1,66 @@ +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "src/core/filter/blackboard.h" + +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +namespace grpc_core { +namespace { + +class FooEntry : public Blackboard::Entry { + public: + static UniqueTypeName Type() { + static UniqueTypeName::Factory kFactory("FooEntry"); + return kFactory.Create(); + } +}; + +class BarEntry : public Blackboard::Entry { + public: + static UniqueTypeName Type() { + static UniqueTypeName::Factory kFactory("BarEntry"); + return kFactory.Create(); + } +}; + +TEST(Blackboard, Basic) { + Blackboard blackboard; + // No entry for type FooEntry key "foo". + EXPECT_EQ(blackboard.Get("a"), nullptr); + // Set entry for type FooEntry key "foo". + auto foo_entry = MakeRefCounted(); + blackboard.Set("a", foo_entry); + // Get the entry we just added. + EXPECT_EQ(blackboard.Get("a"), foo_entry); + // A different key for the same type is still unset. + EXPECT_EQ(blackboard.Get("b"), nullptr); + // The same key for a different type is still unset. + EXPECT_EQ(blackboard.Get("a"), nullptr); + // Set entry for type BarEntry key "foo". + auto bar_entry = MakeRefCounted(); + blackboard.Set("a", bar_entry); + EXPECT_EQ(blackboard.Get("a"), bar_entry); + // This should not have replaced the same key for FooEntry. + EXPECT_EQ(blackboard.Get("a"), foo_entry); +} + +} // namespace +} // namespace grpc_core + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test/core/util/lru_cache_test.cc b/test/core/util/lru_cache_test.cc index fbb9ce1f37f..63745e073ce 100644 --- a/test/core/util/lru_cache_test.cc +++ b/test/core/util/lru_cache_test.cc @@ -66,6 +66,39 @@ TEST(LruCache, Basic) { EXPECT_THAT(created_list, ::testing::ElementsAreArray(kOrder2)); } +TEST(LruCache, SetMaxSize) { + auto create = [&](const std::string& key) { + int value; + CHECK(absl::SimpleAtoi(key, &value)); + return value; + }; + // Create a cache with max size 10. + LruCache cache(10); + // Insert 10 values. + for (int i = 1; i <= 10; ++i) { + std::string key = absl::StrCat(i); + EXPECT_EQ(absl::nullopt, cache.Get(key)); + EXPECT_EQ(i, cache.GetOrInsert(key, create)); + EXPECT_EQ(i, cache.Get(key)); + } + // Set max size to 15. All elements should still be present. + cache.SetMaxSize(15); + for (int i = 1; i <= 10; ++i) { + std::string key = absl::StrCat(i); + EXPECT_EQ(i, cache.Get(key)); + } + // Set max size to 6. This should remove the first 4 elements. + cache.SetMaxSize(6); + for (int i = 1; i <= 4; ++i) { + std::string key = absl::StrCat(i); + EXPECT_EQ(absl::nullopt, cache.Get(key)) << i; + } + for (int i = 5; i <= 10; ++i) { + std::string key = absl::StrCat(i); + EXPECT_EQ(i, cache.Get(key)); + } +} + } // namespace grpc_core int main(int argc, char** argv) { diff --git a/test/cpp/end2end/xds/xds_gcp_authn_end2end_test.cc b/test/cpp/end2end/xds/xds_gcp_authn_end2end_test.cc index d30c22e7605..775eb60e6fc 100644 --- a/test/cpp/end2end/xds/xds_gcp_authn_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_gcp_authn_end2end_test.cc @@ -50,6 +50,7 @@ class XdsGcpAuthnEnd2endTest : public XdsEnd2endTest { void SetUp() override { g_audience = ""; g_token = nullptr; + g_num_token_fetches = 0; grpc_core::HttpRequest::SetOverride(HttpGetOverride, nullptr, nullptr); InitClient(MakeBootstrapBuilder(), /*lb_expected_authority=*/"", /*xds_resource_does_not_exist_timeout_ms=*/0, @@ -83,6 +84,7 @@ class XdsGcpAuthnEnd2endTest : public XdsEnd2endTest { "/computeMetadata/v1/instance/service-accounts/default/identity") { return 0; } + g_num_token_fetches.fetch_add(1); // Validate request. ValidateHttpRequest(request, uri); // Generate response. @@ -126,10 +128,12 @@ class XdsGcpAuthnEnd2endTest : public XdsEnd2endTest { static absl::string_view g_audience; static const char* g_token; + static std::atomic g_num_token_fetches; }; absl::string_view XdsGcpAuthnEnd2endTest::g_audience; const char* XdsGcpAuthnEnd2endTest::g_token; +std::atomic XdsGcpAuthnEnd2endTest::g_num_token_fetches; INSTANTIATE_TEST_SUITE_P(XdsTest, XdsGcpAuthnEnd2endTest, ::testing::Values(XdsTestType()), &XdsTestType::Name); @@ -159,6 +163,7 @@ TEST_P(XdsGcpAuthnEnd2endTest, Basic) { EXPECT_THAT(server_initial_metadata, ::testing::Contains(::testing::Pair( "authorization", absl::StrCat("Bearer ", g_token)))); + EXPECT_EQ(g_num_token_fetches.load(), 1); } TEST_P(XdsGcpAuthnEnd2endTest, NoOpWhenClusterHasNoAudience) { @@ -183,6 +188,70 @@ TEST_P(XdsGcpAuthnEnd2endTest, NoOpWhenClusterHasNoAudience) { ::testing::Not(::testing::Contains(::testing::Key("authorization")))); } +TEST_P(XdsGcpAuthnEnd2endTest, CacheRetainedAcrossXdsUpdates) { + grpc_core::testing::ScopedExperimentalEnvVar env( + "GRPC_EXPERIMENTAL_XDS_GCP_AUTHENTICATION_FILTER"); + // Construct auth token. + g_audience = kAudience; + std::string token = MakeToken(grpc_core::Timestamp::InfFuture()); + g_token = token.c_str(); + // Set xDS resources. + CreateAndStartBackends(1, /*xds_enabled=*/false, + CreateTlsServerCredentials()); + SetListenerAndRouteConfiguration(balancer_.get(), + BuildListenerWithGcpAuthnFilter(), + default_route_config_); + balancer_->ads_service()->SetCdsResource(BuildClusterWithAudience(kAudience)); + EdsResourceArgs args({{"locality0", {CreateEndpoint(0)}}}); + balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); + // Send an RPC and check that it arrives with the right auth token. + std::multimap server_initial_metadata; + Status status = SendRpc(RpcOptions().set_echo_metadata_initially(true), + /*response=*/nullptr, &server_initial_metadata); + EXPECT_TRUE(status.ok()) << "code=" << status.error_code() + << " message=" << status.error_message(); + EXPECT_THAT(server_initial_metadata, + ::testing::Contains(::testing::Pair( + "authorization", absl::StrCat("Bearer ", g_token)))); + EXPECT_EQ(g_num_token_fetches.load(), 1); + // Trigger update that changes the route config, thus causing the + // dynamic filters to be recreated. + // We insert a route that matches requests with the header "foo" and + // has a non-forwarding action, which will cause the client to fail RPCs + // that hit this route. + RouteConfiguration route_config = default_route_config_; + *route_config.mutable_virtual_hosts(0)->add_routes() = + route_config.virtual_hosts(0).routes(0); + auto* header_matcher = route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_match() + ->add_headers(); + header_matcher->set_name("foo"); + header_matcher->set_present_match(true); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_non_forwarding_action(); + SetListenerAndRouteConfiguration( + balancer_.get(), BuildListenerWithGcpAuthnFilter(), route_config); + // Send RPCs with the header "foo" and wait for them to start failing. + // When they do, we know that the client has seen the update. + SendRpcsUntil( + DEBUG_LOCATION, + [&](const RpcResult& result) { + if (result.status.ok()) return true; + EXPECT_EQ(StatusCode::UNAVAILABLE, result.status.error_code()); + EXPECT_EQ("Matching route has inappropriate action", + result.status.error_message()); + return false; + }, + /*timeout_ms=*/15000, RpcOptions().set_metadata({{"foo", "bar"}})); + // Now send an RPC without the header, which will go through the new + // instance of the GCP auth filter. + CheckRpcSendOk(DEBUG_LOCATION); + // Make sure we didn't re-fetch the token. + EXPECT_EQ(g_num_token_fetches.load(), 1); +} + TEST_P(XdsGcpAuthnEnd2endTest, FilterIgnoredWhenEnvVarNotSet) { // Construct auth token. g_audience = kAudience; diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 4220bb664a0..efef382f359 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -2081,6 +2081,8 @@ src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c \ src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h \ src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c \ src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h \ +src/core/filter/blackboard.cc \ +src/core/filter/blackboard.h \ src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \ src/core/handshaker/endpoint_info/endpoint_info_handshaker.h \ src/core/handshaker/handshaker.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index eae9a2e2ea4..0471de0c886 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1848,6 +1848,8 @@ src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c \ src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.h \ src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c \ src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.h \ +src/core/filter/blackboard.cc \ +src/core/filter/blackboard.h \ src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \ src/core/handshaker/endpoint_info/endpoint_info_handshaker.h \ src/core/handshaker/handshaker.cc \ diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 98ffb7f4c19..991313c58b5 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -1161,6 +1161,30 @@ ], "uses_polling": false }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "blackboard_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": false + }, { "args": [], "benchmark": false, From f1df0f2b5f4d4b6073a81fe697fbeb986d4a3b6d Mon Sep 17 00:00:00 2001 From: Yousuk Seung Date: Fri, 27 Sep 2024 13:29:31 -0700 Subject: [PATCH 10/74] [doc] Clarify client callback API comments (#37805) Comments say users "should not" call Start* methods after notification callbacks are called with false, but users may still call so it's close to 'not recommended'. But it's less confusing to remove it altogether. Closes #37805 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37805 from yousukseung:client_callback_doc_clarify 38b9371f79d9763a84bbfb6972c21d23b4f36613 PiperOrigin-RevId: 679709417 --- include/grpcpp/support/client_callback.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/grpcpp/support/client_callback.h b/include/grpcpp/support/client_callback.h index 692dff6b8d1..82a404e2c87 100644 --- a/include/grpcpp/support/client_callback.h +++ b/include/grpcpp/support/client_callback.h @@ -325,21 +325,20 @@ class ClientBidiReactor : public internal::ClientReactor { /// call of OnReadDone or OnDone. /// /// \param[in] ok Was the initial metadata read successfully? If false, no - /// new read/write operation will succeed, and any further - /// Start* operations should not be called. + /// new read/write operation will succeed. virtual void OnReadInitialMetadataDone(bool /*ok*/) {} /// Notifies the application that a StartRead operation completed. /// /// \param[in] ok Was it successful? If false, no new read/write operation - /// will succeed, and any further Start* should not be called. + /// will succeed. virtual void OnReadDone(bool /*ok*/) {} /// Notifies the application that a StartWrite or StartWriteLast operation /// completed. /// /// \param[in] ok Was it successful? If false, no new read/write operation - /// will succeed, and any further Start* should not be called. + /// will succeed. virtual void OnWriteDone(bool /*ok*/) {} /// Notifies the application that a StartWritesDone operation completed. Note From 1b11b9218252e23f4e7fe8fdadae29c6abd86596 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Fri, 27 Sep 2024 14:54:52 -0700 Subject: [PATCH 11/74] [Deps] Updated Abseil to 1.20240722.0 (#37543) Closes #37543 PiperOrigin-RevId: 679738302 --- CMakeLists.txt | 6 + Makefile | 3 + bazel/grpc_deps.bzl | 8 +- config.m4 | 3 + config.w32 | 3 + gRPC-C++.podspec | 2 +- gRPC-Core.podspec | 2 +- grpc.gemspec | 10 +- package.xml | 10 +- src/abseil-cpp/preprocessed_builds.yaml | 107 ++++++++++++++++-- src/python/grpcio/grpc_core_dependencies.py | 3 + .../observability_lib_deps.py | 3 + templates/gRPC-C++.podspec.template | 2 +- templates/gRPC-Core.podspec.template | 2 +- third_party/abseil-cpp | 2 +- .../python/grpcio_tools/protoc_lib_deps.py | 3 + tools/run_tests/sanity/check_submodules.sh | 2 +- 17 files changed, 148 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec604861f22..da1e9c4ae87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,6 +110,7 @@ set(gRPC_ABSL_USED_TARGETS absl_base_internal absl_bind_front absl_bits + absl_bounded_utf8_length_sequence absl_charset absl_check absl_city @@ -117,6 +118,7 @@ set(gRPC_ABSL_USED_TARGETS absl_cleanup absl_cleanup_internal absl_common_policy_traits + absl_compare absl_compressed_tuple absl_config absl_container_common @@ -135,7 +137,9 @@ set(gRPC_ABSL_USED_TARGETS absl_crc_cpu_detect absl_crc_internal absl_debugging_internal + absl_decode_rust_punycode absl_demangle_internal + absl_demangle_rust absl_dynamic_annotations absl_endian absl_errno_saver @@ -159,6 +163,7 @@ set(gRPC_ABSL_USED_TARGETS absl_graphcycles_internal absl_has_ostream_operator absl_hash + absl_hash_container_defaults absl_hash_function_defaults absl_hash_policy_traits absl_hashtable_debug_hooks @@ -245,6 +250,7 @@ set(gRPC_ABSL_USED_TARGETS absl_time absl_time_zone absl_type_traits + absl_utf8_for_code_point absl_utility absl_variant absl_vlog_config_internal diff --git a/Makefile b/Makefile index 078484c1fd6..028c9f90090 100644 --- a/Makefile +++ b/Makefile @@ -1544,9 +1544,12 @@ LIBGRPC_SRC = \ third_party/abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc \ third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc \ third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc \ + third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc \ third_party/abseil-cpp/absl/debugging/internal/demangle.cc \ + third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc \ third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc \ third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc \ + third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc \ third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc \ third_party/abseil-cpp/absl/debugging/stacktrace.cc \ third_party/abseil-cpp/absl/debugging/symbolize.cc \ diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 138ef9ed8af..b3d416aae9d 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -143,11 +143,11 @@ def grpc_deps(): if "com_google_absl" not in native.existing_rules(): http_archive( name = "com_google_absl", - sha256 = "338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440", - strip_prefix = "abseil-cpp-20240116.0", + sha256 = "f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3", + strip_prefix = "abseil-cpp-20240722.0", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/20240116.0.tar.gz", - "https://github.com/abseil/abseil-cpp/archive/20240116.0.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/20240722.0.tar.gz", + "https://github.com/abseil/abseil-cpp/archive/20240722.0.tar.gz", ], ) diff --git a/config.m4 b/config.m4 index ae67f344840..9bc1a068f3f 100644 --- a/config.m4 +++ b/config.m4 @@ -929,9 +929,12 @@ if test "$PHP_GRPC" != "no"; then third_party/abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc \ third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc \ third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc \ + third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc \ third_party/abseil-cpp/absl/debugging/internal/demangle.cc \ + third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc \ third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc \ third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc \ + third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc \ third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc \ third_party/abseil-cpp/absl/debugging/stacktrace.cc \ third_party/abseil-cpp/absl/debugging/symbolize.cc \ diff --git a/config.w32 b/config.w32 index 94e02c3e172..f1f0df73b81 100644 --- a/config.w32 +++ b/config.w32 @@ -894,9 +894,12 @@ if (PHP_GRPC != "no") { "third_party\\abseil-cpp\\absl\\crc\\internal\\crc_non_temporal_memcpy.cc " + "third_party\\abseil-cpp\\absl\\crc\\internal\\crc_x86_arm_combined.cc " + "third_party\\abseil-cpp\\absl\\debugging\\internal\\address_is_readable.cc " + + "third_party\\abseil-cpp\\absl\\debugging\\internal\\decode_rust_punycode.cc " + "third_party\\abseil-cpp\\absl\\debugging\\internal\\demangle.cc " + + "third_party\\abseil-cpp\\absl\\debugging\\internal\\demangle_rust.cc " + "third_party\\abseil-cpp\\absl\\debugging\\internal\\elf_mem_image.cc " + "third_party\\abseil-cpp\\absl\\debugging\\internal\\examine_stack.cc " + + "third_party\\abseil-cpp\\absl\\debugging\\internal\\utf8_for_code_point.cc " + "third_party\\abseil-cpp\\absl\\debugging\\internal\\vdso_support.cc " + "third_party\\abseil-cpp\\absl\\debugging\\stacktrace.cc " + "third_party\\abseil-cpp\\absl\\debugging\\symbolize.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index a63753dd7d1..abca293e113 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -231,7 +231,7 @@ Pod::Spec.new do |s| ss.dependency "#{s.name}/Privacy", version ss.dependency "#{s.name}/Interface", version ss.dependency 'gRPC-Core', version - abseil_version = '~> 1.20240116.2' + abseil_version = '~> 1.20240722.0' ss.dependency 'abseil/algorithm/container', abseil_version ss.dependency 'abseil/base/base', abseil_version ss.dependency 'abseil/base/config', abseil_version diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 5eda92de512..48543720dee 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -47,7 +47,7 @@ Pod::Spec.new do |s| s.requires_arc = false name = 'grpc' - abseil_version = '~> 1.20240116.2' + abseil_version = '~> 1.20240722.0' # When creating a dynamic framework, name it grpc.framework instead of gRPC-Core.framework. # This lets users write their includes like `#include ` as opposed to `#include diff --git a/grpc.gemspec b/grpc.gemspec index 3ba44548b25..7c4645fc5d2 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -2118,6 +2118,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/abseil-cpp/absl/container/fixed_array.h ) s.files += %w( third_party/abseil-cpp/absl/container/flat_hash_map.h ) s.files += %w( third_party/abseil-cpp/absl/container/flat_hash_set.h ) + s.files += %w( third_party/abseil-cpp/absl/container/hash_container_defaults.h ) s.files += %w( third_party/abseil-cpp/absl/container/inlined_vector.h ) s.files += %w( third_party/abseil-cpp/absl/container/internal/common.h ) s.files += %w( third_party/abseil-cpp/absl/container/internal/common_policy_traits.h ) @@ -2155,8 +2156,13 @@ Gem::Specification.new do |s| s.files += %w( third_party/abseil-cpp/absl/crc/internal/non_temporal_memcpy.h ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h ) + s.files += %w( third_party/abseil-cpp/absl/debugging/internal/bounded_utf8_length_sequence.h ) + s.files += %w( third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc ) + s.files += %w( third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/demangle.cc ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/demangle.h ) + s.files += %w( third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc ) + s.files += %w( third_party/abseil-cpp/absl/debugging/internal/demangle_rust.h ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc ) @@ -2172,6 +2178,8 @@ Gem::Specification.new do |s| s.files += %w( third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/symbolize.h ) + s.files += %w( third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc ) + s.files += %w( third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.h ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc ) s.files += %w( third_party/abseil-cpp/absl/debugging/internal/vdso_support.h ) s.files += %w( third_party/abseil-cpp/absl/debugging/stacktrace.cc ) @@ -2369,7 +2377,6 @@ Gem::Specification.new do |s| s.files += %w( third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h ) s.files += %w( third_party/abseil-cpp/absl/strings/internal/escaping.cc ) s.files += %w( third_party/abseil-cpp/absl/strings/internal/escaping.h ) - s.files += %w( third_party/abseil-cpp/absl/strings/internal/has_absl_stringify.h ) s.files += %w( third_party/abseil-cpp/absl/strings/internal/memutil.cc ) s.files += %w( third_party/abseil-cpp/absl/strings/internal/memutil.h ) s.files += %w( third_party/abseil-cpp/absl/strings/internal/ostringstream.cc ) @@ -2479,6 +2486,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/abseil-cpp/absl/types/bad_optional_access.h ) s.files += %w( third_party/abseil-cpp/absl/types/bad_variant_access.cc ) s.files += %w( third_party/abseil-cpp/absl/types/bad_variant_access.h ) + s.files += %w( third_party/abseil-cpp/absl/types/compare.h ) s.files += %w( third_party/abseil-cpp/absl/types/internal/optional.h ) s.files += %w( third_party/abseil-cpp/absl/types/internal/span.h ) s.files += %w( third_party/abseil-cpp/absl/types/internal/variant.h ) diff --git a/package.xml b/package.xml index 76be79fd6b5..69833761539 100644 --- a/package.xml +++ b/package.xml @@ -2122,6 +2122,7 @@ + @@ -2159,8 +2160,13 @@ + + + + + @@ -2176,6 +2182,8 @@ + + @@ -2373,7 +2381,6 @@ - @@ -2483,6 +2490,7 @@ + diff --git a/src/abseil-cpp/preprocessed_builds.yaml b/src/abseil-cpp/preprocessed_builds.yaml index 6250c0fa12d..5d82f5149bc 100644 --- a/src/abseil-cpp/preprocessed_builds.yaml +++ b/src/abseil-cpp/preprocessed_builds.yaml @@ -8,6 +8,7 @@ - cmake_target: absl::algorithm_container deps: - absl/algorithm:algorithm + - absl/base:config - absl/base:core_headers - absl/base:nullability - absl/meta:type_traits @@ -155,12 +156,14 @@ - cmake_target: absl::no_destructor deps: - absl/base:config + - absl/base:nullability headers: - third_party/abseil-cpp/absl/base/no_destructor.h name: absl/base:no_destructor src: [] - cmake_target: absl::nullability deps: + - absl/base:config - absl/base:core_headers - absl/meta:type_traits headers: @@ -168,6 +171,16 @@ - third_party/abseil-cpp/absl/base/nullability.h name: absl/base:nullability src: [] +- cmake_target: absl::poison + deps: + - absl/base:config + - absl/base:core_headers + - absl/base:malloc_internal + headers: + - third_party/abseil-cpp/absl/base/internal/poison.h + name: absl/base:poison + src: + - third_party/abseil-cpp/absl/base/internal/poison.cc - cmake_target: absl::prefetch deps: - absl/base:config @@ -247,6 +260,7 @@ src: [] - cmake_target: absl::btree deps: + - absl/base:config - absl/base:core_headers - absl/base:raw_logging_internal - absl/base:throw_delegate @@ -260,7 +274,6 @@ - absl/strings:cord - absl/strings:strings - absl/types:compare - - absl/utility:utility headers: - third_party/abseil-cpp/absl/container/btree_map.h - third_party/abseil-cpp/absl/container/btree_set.h @@ -318,9 +331,9 @@ - absl/algorithm:container - absl/base:core_headers - absl/container:container_memory - - absl/container:hash_function_defaults + - absl/container:hash_container_defaults - absl/container:raw_hash_map - - absl/memory:memory + - absl/meta:type_traits headers: - third_party/abseil-cpp/absl/container/flat_hash_map.h name: absl/container:flat_hash_map @@ -330,17 +343,28 @@ - absl/algorithm:container - absl/base:core_headers - absl/container:container_memory - - absl/container:hash_function_defaults + - absl/container:hash_container_defaults - absl/container:raw_hash_set - absl/memory:memory + - absl/meta:type_traits headers: - third_party/abseil-cpp/absl/container/flat_hash_set.h name: absl/container:flat_hash_set src: [] +- cmake_target: absl::hash_container_defaults + deps: + - absl/base:config + - absl/container:hash_function_defaults + headers: + - third_party/abseil-cpp/absl/container/hash_container_defaults.h + name: absl/container:hash_container_defaults + src: [] - cmake_target: absl::hash_function_defaults deps: - absl/base:config + - absl/container:common - absl/hash:hash + - absl/meta:type_traits - absl/strings:cord - absl/strings:strings headers: @@ -374,6 +398,7 @@ - absl/base:base - absl/base:config - absl/base:core_headers + - absl/base:no_destructor - absl/base:raw_logging_internal - absl/debugging:stacktrace - absl/memory:memory @@ -402,6 +427,7 @@ src: [] - cmake_target: absl::inlined_vector_internal deps: + - absl/base:base_internal - absl/base:config - absl/base:core_headers - absl/container:compressed_tuple @@ -430,10 +456,11 @@ - absl/algorithm:container - absl/base:core_headers - absl/container:container_memory - - absl/container:hash_function_defaults + - absl/container:hash_container_defaults - absl/container:node_slot_policy - absl/container:raw_hash_map - absl/memory:memory + - absl/meta:type_traits headers: - third_party/abseil-cpp/absl/container/node_hash_map.h name: absl/container:node_hash_map @@ -442,10 +469,12 @@ deps: - absl/algorithm:container - absl/base:core_headers - - absl/container:hash_function_defaults + - absl/container:container_memory + - absl/container:hash_container_defaults - absl/container:node_slot_policy - absl/container:raw_hash_set - absl/memory:memory + - absl/meta:type_traits headers: - third_party/abseil-cpp/absl/container/node_hash_set.h name: absl/container:node_hash_set @@ -526,9 +555,9 @@ - cmake_target: absl::crc_cord_state deps: - absl/base:config + - absl/base:no_destructor - absl/crc:crc32c - absl/numeric:bits - - absl/strings:strings headers: - third_party/abseil-cpp/absl/crc/internal/crc_cord_state.h name: absl/crc:crc_cord_state @@ -568,6 +597,14 @@ - third_party/abseil-cpp/absl/crc/internal/non_temporal_memcpy.h name: absl/crc:non_temporal_memcpy src: [] +- cmake_target: absl::bounded_utf8_length_sequence + deps: + - absl/base:config + - absl/numeric:bits + headers: + - third_party/abseil-cpp/absl/debugging/internal/bounded_utf8_length_sequence.h + name: absl/debugging:bounded_utf8_length_sequence + src: [] - cmake_target: absl::debugging_internal deps: - absl/base:config @@ -584,16 +621,40 @@ - third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc - third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc - third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +- cmake_target: absl::decode_rust_punycode + deps: + - absl/base:config + - absl/base:nullability + - absl/debugging:bounded_utf8_length_sequence + - absl/debugging:utf8_for_code_point + headers: + - third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h + name: absl/debugging:decode_rust_punycode + src: + - third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc - cmake_target: absl::demangle_internal deps: - absl/base:base - absl/base:config - absl/base:core_headers + - absl/base:nullability + - absl/debugging:demangle_rust + - absl/numeric:bits headers: - third_party/abseil-cpp/absl/debugging/internal/demangle.h name: absl/debugging:demangle_internal src: - third_party/abseil-cpp/absl/debugging/internal/demangle.cc +- cmake_target: absl::demangle_rust + deps: + - absl/base:config + - absl/base:core_headers + - absl/debugging:decode_rust_punycode + headers: + - third_party/abseil-cpp/absl/debugging/internal/demangle_rust.h + name: absl/debugging:demangle_rust + src: + - third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc - cmake_target: absl::examine_stack deps: - absl/base:config @@ -672,6 +733,14 @@ name: absl/debugging:symbolize src: - third_party/abseil-cpp/absl/debugging/symbolize.cc +- cmake_target: absl::utf8_for_code_point + deps: + - absl/base:config + headers: + - third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.h + name: absl/debugging:utf8_for_code_point + src: + - third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc - cmake_target: absl::flags_commandlineflag deps: - absl/base:config @@ -709,9 +778,9 @@ - third_party/abseil-cpp/absl/flags/usage_config.cc - cmake_target: absl::flags deps: - - absl/base:base - absl/base:config - absl/base:core_headers + - absl/flags:commandlineflag - absl/flags:config - absl/flags:flag_internal - absl/flags:reflection @@ -1139,6 +1208,7 @@ - third_party/abseil-cpp/absl/log/internal/proto.cc - cmake_target: absl::log_internal_strip deps: + - absl/base:core_headers - absl/base:log_severity - absl/log/internal:log_message - absl/log/internal:nullstream @@ -1366,6 +1436,7 @@ - absl/base:config - absl/base:core_headers - absl/numeric:bits + - absl/types:compare headers: - third_party/abseil-cpp/absl/numeric/int128.h - third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc @@ -1453,12 +1524,25 @@ src: [] - cmake_target: absl::random_internal_mock_helpers deps: + - absl/base:config - absl/base:fast_type_id - absl/types:optional headers: - third_party/abseil-cpp/absl/random/internal/mock_helpers.h name: absl/random/internal:mock_helpers src: [] +- cmake_target: '' + deps: + - absl/base:config + - absl/base:raw_logging_internal + - absl/random/internal:iostream_state_saver + - absl/random/internal:uniform_helper + - absl/strings:string_view + - absl/strings:strings + headers: + - third_party/abseil-cpp/absl/random/internal/mock_validators.h + name: absl/random/internal:mock_validators + src: [] - cmake_target: '' deps: - absl/base:config @@ -1615,7 +1699,6 @@ deps: - absl/base:config - absl/meta:type_traits - - absl/numeric:int128 - absl/random/internal:traits headers: - third_party/abseil-cpp/absl/random/internal/uniform_helper.h @@ -1698,10 +1781,12 @@ - cmake_target: absl::random_seed_sequences deps: - absl/base:config + - absl/base:nullability - absl/random/internal:pool_urbg - absl/random/internal:salted_seed_seq - absl/random/internal:seed_material - absl/random:seed_gen_exception + - absl/strings:string_view - absl/types:span headers: - third_party/abseil-cpp/absl/random/seed_sequences.h @@ -1786,6 +1871,7 @@ - absl/strings:cordz_update_tracker - absl/strings:internal - absl/strings:strings + - absl/types:compare - absl/types:optional - absl/types:span headers: @@ -1844,8 +1930,8 @@ - third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc - cmake_target: absl::cordz_handle deps: - - absl/base:base - absl/base:config + - absl/base:no_destructor - absl/base:raw_logging_internal - absl/synchronization:synchronization headers: @@ -2014,7 +2100,6 @@ - third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h - third_party/abseil-cpp/absl/strings/internal/charconv_parse.h - third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h - - third_party/abseil-cpp/absl/strings/internal/has_absl_stringify.h - third_party/abseil-cpp/absl/strings/internal/memutil.h - third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h - third_party/abseil-cpp/absl/strings/internal/str_join_internal.h diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 7c9601a6fe8..fde998c3af6 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -893,9 +893,12 @@ CORE_SOURCE_FILES = [ 'third_party/abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc', 'third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc', 'third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc', + 'third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc', 'third_party/abseil-cpp/absl/debugging/internal/demangle.cc', + 'third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc', 'third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc', 'third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc', + 'third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc', 'third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc', 'third_party/abseil-cpp/absl/debugging/stacktrace.cc', 'third_party/abseil-cpp/absl/debugging/symbolize.cc', diff --git a/src/python/grpcio_observability/observability_lib_deps.py b/src/python/grpcio_observability/observability_lib_deps.py index 471b6603806..9896cd7368b 100644 --- a/src/python/grpcio_observability/observability_lib_deps.py +++ b/src/python/grpcio_observability/observability_lib_deps.py @@ -87,9 +87,12 @@ CC_FILES=[ 'third_party/abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc', 'third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc', 'third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc', + 'third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc', 'third_party/abseil-cpp/absl/debugging/internal/demangle.cc', + 'third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc', 'third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc', 'third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc', + 'third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc', 'third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc', 'third_party/abseil-cpp/absl/debugging/stacktrace.cc', 'third_party/abseil-cpp/absl/debugging/symbolize.cc', diff --git a/templates/gRPC-C++.podspec.template b/templates/gRPC-C++.podspec.template index ffc8b75d415..a78254b12b6 100644 --- a/templates/gRPC-C++.podspec.template +++ b/templates/gRPC-C++.podspec.template @@ -184,7 +184,7 @@ ss.dependency "#{s.name}/Privacy", version ss.dependency "#{s.name}/Interface", version ss.dependency 'gRPC-Core', version - abseil_version = '~> 1.20240116.2' + abseil_version = '~> 1.20240722.0' % for abseil_spec in grpcpp_abseil_specs: ss.dependency '${abseil_spec}', abseil_version % endfor diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index b6ffab39cdf..2de614df573 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -123,7 +123,7 @@ s.requires_arc = false name = 'grpc' - abseil_version = '~> 1.20240116.2' + abseil_version = '~> 1.20240722.0' # When creating a dynamic framework, name it grpc.framework instead of gRPC-Core.framework. # This lets users write their includes like `#include ` as opposed to `#include diff --git a/third_party/abseil-cpp b/third_party/abseil-cpp index 4a2c63365ef..4447c7562e3 160000 --- a/third_party/abseil-cpp +++ b/third_party/abseil-cpp @@ -1 +1 @@ -Subproject commit 4a2c63365eff8823a5221db86ef490e828306f9d +Subproject commit 4447c7562e3bc702ade25105912dce503f0c4010 diff --git a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py index 2caad754ab6..00696e3486d 100644 --- a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py @@ -38,9 +38,12 @@ CC_FILES=[ 'third_party/abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc', 'third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc', 'third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc', + 'third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc', 'third_party/abseil-cpp/absl/debugging/internal/demangle.cc', + 'third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc', 'third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc', 'third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc', + 'third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc', 'third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc', 'third_party/abseil-cpp/absl/debugging/stacktrace.cc', 'third_party/abseil-cpp/absl/debugging/symbolize.cc', diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index c2d0e3c4194..ab9c7c1cd6a 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -25,7 +25,7 @@ want_submodules=$(mktemp /tmp/submXXXXXX) git submodule | sed 's/+//g' | awk '{ print $2 " " $1 }' | sort >"$submodules" cat <"$want_submodules" -third_party/abseil-cpp 4a2c63365eff8823a5221db86ef490e828306f9d +third_party/abseil-cpp 4447c7562e3bc702ade25105912dce503f0c4010 third_party/benchmark 344117638c8ff7e239044fd0fa7085839fc03021 third_party/bloaty 60209eb1ccc34d5deefb002d1b7f37545204f7f2 third_party/boringssl-with-bazel b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6 From 05d214ee86c62741b719569509ba7d0a066d7755 Mon Sep 17 00:00:00 2001 From: Vignesh Babu Date: Fri, 27 Sep 2024 14:57:51 -0700 Subject: [PATCH 12/74] [tracing] Add latent see annotations to the filter stack. This would allow us to better attribute time spent in different filters. PiperOrigin-RevId: 679739129 --- BUILD | 1 + src/core/BUILD | 12 +++++++ .../backend_metrics/backend_metric_filter.cc | 3 ++ .../filters/http/client/http_client_filter.cc | 7 ++++ .../filters/http/client_authority_filter.cc | 3 ++ .../message_compress/compression_filter.cc | 17 +++++++++ .../filters/http/server/http_server_filter.cc | 7 ++++ .../server_load_reporting_filter.cc | 6 ++++ .../ext/filters/logging/logging_filter.cc | 25 +++++++++++++ .../message_size/message_size_filter.cc | 9 +++++ src/core/ext/filters/rbac/rbac_filter.cc | 2 ++ .../stateful_session_filter.cc | 7 ++++ src/core/lib/channel/promise_based_filter.cc | 35 ++++++++++--------- src/core/lib/channel/promise_based_filter.h | 3 +- .../authorization/grpc_server_authz_filter.cc | 3 ++ .../grpclb/client_load_reporting_filter.cc | 7 ++++ src/core/server/server_call_tracer_filter.cc | 8 +++++ .../server/server_config_selector_filter.cc | 3 ++ .../service_config_channel_arg_filter.cc | 3 ++ src/core/util/latent_see.cc | 22 ++++++++---- src/core/util/latent_see.h | 7 ++++ 21 files changed, 167 insertions(+), 23 deletions(-) diff --git a/BUILD b/BUILD index c2d1c88a7d6..0a0a13ee091 100644 --- a/BUILD +++ b/BUILD @@ -4362,6 +4362,7 @@ grpc_cc_library( "//src/core:experiments", "//src/core:grpc_message_size_filter", "//src/core:latch", + "//src/core:latent_see", "//src/core:map", "//src/core:metadata_batch", "//src/core:percent_encoding", diff --git a/src/core/BUILD b/src/core/BUILD index 0de80c1f68a..5f6adbeb898 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -199,6 +199,7 @@ grpc_cc_library( "channel_fwd", "channel_stack_type", "context", + "latent_see", "map", "pipe", "//:call_tracer", @@ -3539,6 +3540,7 @@ grpc_cc_library( "context", "grpc_message_size_filter", "grpc_service_config", + "latent_see", "metadata_batch", "service_config_parser", "//:channel_arg_names", @@ -3814,6 +3816,7 @@ grpc_cc_library( "event_engine_context", "grpc_server_config_selector", "grpc_service_config", + "latent_see", "metadata_batch", "status_helper", "//:gpr", @@ -3941,6 +3944,7 @@ grpc_cc_library( "channel_fwd", "dual_ref_counted", "endpoint_info_handshaker", + "latent_see", "load_file", "metadata_batch", "ref_counted", @@ -4853,6 +4857,7 @@ grpc_cc_library( "channel_args", "channel_fwd", "channel_stack_type", + "latent_see", "metadata_batch", "slice", "//:channel_arg_names", @@ -4892,6 +4897,7 @@ grpc_cc_library( "json_args", "json_object_loader", "latch", + "latent_see", "metadata_batch", "race", "service_config_parser", @@ -4982,6 +4988,7 @@ grpc_cc_library( "json", "json_args", "json_object_loader", + "latent_see", "metadata_batch", "service_config_parser", "validation_errors", @@ -5021,6 +5028,7 @@ grpc_cc_library( "json", "json_args", "json_object_loader", + "latent_see", "map", "metadata_batch", "pipe", @@ -5128,6 +5136,7 @@ grpc_cc_library( "json", "json_args", "json_object_loader", + "latent_see", "lb_policy", "lb_policy_factory", "lb_policy_registry", @@ -6893,6 +6902,7 @@ grpc_cc_library( "channel_stack_type", "context", "grpc_sockaddr", + "latent_see", "metadata_batch", "resolved_address", "seq", @@ -6937,6 +6947,7 @@ grpc_cc_library( "experiments", "grpc_backend_metric_data", "grpc_backend_metric_provider", + "latent_see", "map", "metadata_batch", "slice", @@ -7880,6 +7891,7 @@ grpc_cc_library( "channel_fwd", "channel_stack_type", "context", + "latent_see", "logging_sink", "map", "metadata_batch", diff --git a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc index 647ff45c30e..da589a303b7 100644 --- a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +++ b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc @@ -43,6 +43,7 @@ #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/load_balancing/backend_metric_data.h" +#include "src/core/util/latent_see.h" namespace grpc_core { @@ -125,6 +126,8 @@ BackendMetricFilter::Create(const ChannelArgs&, ChannelFilter::Args) { } void BackendMetricFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "BackendMetricFilter::Call::OnServerTrailingMetadata"); if (md.get(GrpcCallWasCancelled()).value_or(false)) return; auto* ctx = MaybeGetContext(); if (ctx == nullptr) { diff --git a/src/core/ext/filters/http/client/http_client_filter.cc b/src/core/ext/filters/http/client/http_client_filter.cc index 7fd04a371e4..f46b3641b61 100644 --- a/src/core/ext/filters/http/client/http_client_filter.cc +++ b/src/core/ext/filters/http/client/http_client_filter.cc @@ -49,6 +49,7 @@ #include "src/core/lib/slice/percent_encoding.h" #include "src/core/lib/transport/status_conversion.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/latent_see.h" namespace grpc_core { @@ -113,6 +114,8 @@ Slice UserAgentFromArgs(const ChannelArgs& args, void HttpClientFilter::Call::OnClientInitialMetadata(ClientMetadata& md, HttpClientFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "HttpClientFilter::Call::OnClientInitialMetadata"); if (filter->test_only_use_put_requests_) { md.Set(HttpMethodMetadata(), HttpMethodMetadata::kPut); } else { @@ -126,11 +129,15 @@ void HttpClientFilter::Call::OnClientInitialMetadata(ClientMetadata& md, absl::Status HttpClientFilter::Call::OnServerInitialMetadata( ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "HttpClientFilter::Call::OnServerInitialMetadata"); return CheckServerMetadata(&md); } absl::Status HttpClientFilter::Call::OnServerTrailingMetadata( ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "HttpClientFilter::Call::OnServerTrailingMetadata"); return CheckServerMetadata(&md); } diff --git a/src/core/ext/filters/http/client_authority_filter.cc b/src/core/ext/filters/http/client_authority_filter.cc index 6dd44234151..b43e6a65b2b 100644 --- a/src/core/ext/filters/http/client_authority_filter.cc +++ b/src/core/ext/filters/http/client_authority_filter.cc @@ -34,6 +34,7 @@ #include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/latent_see.h" namespace grpc_core { @@ -59,6 +60,8 @@ ClientAuthorityFilter::Create(const ChannelArgs& args, ChannelFilter::Args) { void ClientAuthorityFilter::Call::OnClientInitialMetadata( ClientMetadata& md, ClientAuthorityFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientAuthorityFilter::Call::OnClientInitialMetadata"); // If no authority is set, set the default authority. if (md.get_pointer(HttpAuthorityMetadata()) == nullptr) { md.Set(HttpAuthorityMetadata(), filter->default_authority_.Ref()); diff --git a/src/core/ext/filters/http/message_compress/compression_filter.cc b/src/core/ext/filters/http/message_compress/compression_filter.cc index dead10bbe15..85a67690206 100644 --- a/src/core/ext/filters/http/message_compress/compression_filter.cc +++ b/src/core/ext/filters/http/message_compress/compression_filter.cc @@ -51,6 +51,7 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/latent_see.h" namespace grpc_core { @@ -238,48 +239,64 @@ ChannelCompression::DecompressArgs ChannelCompression::HandleIncomingMetadata( void ClientCompressionFilter::Call::OnClientInitialMetadata( ClientMetadata& md, ClientCompressionFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientCompressionFilter::Call::OnClientInitialMetadata"); compression_algorithm_ = filter->compression_engine_.HandleOutgoingMetadata(md); } MessageHandle ClientCompressionFilter::Call::OnClientToServerMessage( MessageHandle message, ClientCompressionFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientCompressionFilter::Call::OnClientToServerMessage"); return filter->compression_engine_.CompressMessage(std::move(message), compression_algorithm_); } void ClientCompressionFilter::Call::OnServerInitialMetadata( ServerMetadata& md, ClientCompressionFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientCompressionFilter::Call::OnServerInitialMetadata"); decompress_args_ = filter->compression_engine_.HandleIncomingMetadata(md); } absl::StatusOr ClientCompressionFilter::Call::OnServerToClientMessage( MessageHandle message, ClientCompressionFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientCompressionFilter::Call::OnServerToClientMessage"); return filter->compression_engine_.DecompressMessage( /*is_client=*/true, std::move(message), decompress_args_); } void ServerCompressionFilter::Call::OnClientInitialMetadata( ClientMetadata& md, ServerCompressionFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerCompressionFilter::Call::OnClientInitialMetadata"); decompress_args_ = filter->compression_engine_.HandleIncomingMetadata(md); } absl::StatusOr ServerCompressionFilter::Call::OnClientToServerMessage( MessageHandle message, ServerCompressionFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerCompressionFilter::Call::OnClientToServerMessage"); return filter->compression_engine_.DecompressMessage( /*is_client=*/false, std::move(message), decompress_args_); } void ServerCompressionFilter::Call::OnServerInitialMetadata( ServerMetadata& md, ServerCompressionFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerCompressionFilter::Call::OnServerInitialMetadata"); compression_algorithm_ = filter->compression_engine_.HandleOutgoingMetadata(md); } MessageHandle ServerCompressionFilter::Call::OnServerToClientMessage( MessageHandle message, ServerCompressionFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerCompressionFilter::Call::OnServerToClientMessage"); return filter->compression_engine_.CompressMessage(std::move(message), compression_algorithm_); } diff --git a/src/core/ext/filters/http/server/http_server_filter.cc b/src/core/ext/filters/http/server/http_server_filter.cc index fa6a38ddcc0..92e541775e5 100644 --- a/src/core/ext/filters/http/server/http_server_filter.cc +++ b/src/core/ext/filters/http/server/http_server_filter.cc @@ -45,6 +45,7 @@ #include "src/core/lib/slice/percent_encoding.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/latent_see.h" namespace grpc_core { @@ -77,6 +78,8 @@ ServerMetadataHandle MalformedRequest(absl::string_view explanation) { ServerMetadataHandle HttpServerFilter::Call::OnClientInitialMetadata( ClientMetadata& md, HttpServerFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "HttpServerFilter::Call::OnClientInitialMetadata"); auto method = md.get(HttpMethodMetadata()); if (method.has_value()) { switch (*method) { @@ -139,6 +142,8 @@ ServerMetadataHandle HttpServerFilter::Call::OnClientInitialMetadata( } void HttpServerFilter::Call::OnServerInitialMetadata(ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "HttpServerFilter::Call::OnServerInitialMetadata"); GRPC_TRACE_LOG(call, INFO) << GetContext()->DebugTag() << "[http-server] Write metadata"; FilterOutgoingMetadata(&md); @@ -147,6 +152,8 @@ void HttpServerFilter::Call::OnServerInitialMetadata(ServerMetadata& md) { } void HttpServerFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "HttpServerFilter::Call::OnServerTrailingMetadata"); FilterOutgoingMetadata(&md); } diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc index 928a50867e3..48cb742e505 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc @@ -61,6 +61,7 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/latent_see.h" #include "src/core/util/uri.h" #include "src/cpp/server/load_reporter/constants.h" @@ -181,6 +182,8 @@ const char* GetStatusTagForStatus(grpc_status_code status) { void ServerLoadReportingFilter::Call::OnClientInitialMetadata( ClientMetadata& md, ServerLoadReportingFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerLoadReportingFilter::Call::OnClientInitialMetadata"); // Gather up basic facts about the request Slice service_method; if (const Slice* path = md.get_pointer(HttpPathMetadata())) { @@ -205,6 +208,8 @@ void ServerLoadReportingFilter::Call::OnClientInitialMetadata( void ServerLoadReportingFilter::Call::OnServerTrailingMetadata( ServerMetadata& md, ServerLoadReportingFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerLoadReportingFilter::Call::OnServerTrailingMetadata"); const auto& costs = md.Take(LbCostBinMetadata()); for (const auto& cost : costs) { opencensus::stats::Record( @@ -222,6 +227,7 @@ void ServerLoadReportingFilter::Call::OnServerTrailingMetadata( void ServerLoadReportingFilter::Call::OnFinalize( const grpc_call_final_info* final_info, ServerLoadReportingFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE("ServerLoadReportingFilter::Call::OnFinalize"); if (final_info == nullptr) return; // After the last bytes have been placed on the wire we record // final measurements diff --git a/src/core/ext/filters/logging/logging_filter.cc b/src/core/ext/filters/logging/logging_filter.cc index 1963f823665..cf12d8bb6ac 100644 --- a/src/core/ext/filters/logging/logging_filter.cc +++ b/src/core/ext/filters/logging/logging_filter.cc @@ -67,6 +67,7 @@ #include "src/core/resolver/resolver_registry.h" #include "src/core/telemetry/call_tracer.h" #include "src/core/util/host_port.h" +#include "src/core/util/latent_see.h" #include "src/core/util/time.h" #include "src/core/util/uri.h" @@ -359,6 +360,8 @@ ClientLoggingFilter::Create(const ChannelArgs& args, void ClientLoggingFilter::Call::OnClientInitialMetadata( ClientMetadata& md, ClientLoggingFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientLoggingFilter::Call::OnClientInitialMetadata"); call_data_.emplace(true, md, filter->default_authority_); if (!call_data_->ShouldLog()) { call_data_.reset(); @@ -369,6 +372,8 @@ void ClientLoggingFilter::Call::OnClientInitialMetadata( } void ClientLoggingFilter::Call::OnServerInitialMetadata(ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientLoggingFilter::Call::OnServerInitialMetadata"); if (!call_data_.has_value()) return; call_data_->LogServerHeader( /*is_client=*/true, MaybeGetContext(), @@ -376,6 +381,8 @@ void ClientLoggingFilter::Call::OnServerInitialMetadata(ServerMetadata& md) { } void ClientLoggingFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientLoggingFilter::Call::OnServerTrailingMetadata"); if (!call_data_.has_value()) return; if (md.get(GrpcCallWasCancelled()).value_or(false) && md.get(GrpcStatusMetadata()) == GRPC_STATUS_CANCELLED) { @@ -390,6 +397,8 @@ void ClientLoggingFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) { void ClientLoggingFilter::Call::OnClientToServerMessage( const Message& message) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientLoggingFilter::Call::OnClientToServerMessage"); if (!call_data_.has_value()) return; call_data_->LogClientMessage( /*is_client=*/true, MaybeGetContext(), @@ -397,6 +406,8 @@ void ClientLoggingFilter::Call::OnClientToServerMessage( } void ClientLoggingFilter::Call::OnClientToServerHalfClose() { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientLoggingFilter::Call::OnClientToServerHalfClose"); if (!call_data_.has_value()) return; call_data_->LogClientHalfClose( /*is_client=*/true, MaybeGetContext()); @@ -404,6 +415,8 @@ void ClientLoggingFilter::Call::OnClientToServerHalfClose() { void ClientLoggingFilter::Call::OnServerToClientMessage( const Message& message) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientLoggingFilter::Call::OnServerToClientMessage"); if (!call_data_.has_value()) return; call_data_->LogServerMessage( /*is_client=*/true, MaybeGetContext(), @@ -424,6 +437,8 @@ ServerLoggingFilter::Create(const ChannelArgs& /*args*/, // Construct a promise for one call. void ServerLoggingFilter::Call::OnClientInitialMetadata(ClientMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerLoggingFilter::Call::OnClientInitialMetadata"); call_data_.emplace(false, md, ""); if (!call_data_->ShouldLog()) { call_data_.reset(); @@ -435,6 +450,8 @@ void ServerLoggingFilter::Call::OnClientInitialMetadata(ClientMetadata& md) { } void ServerLoggingFilter::Call::OnServerInitialMetadata(ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerLoggingFilter::Call::OnServerInitialMetadata"); if (!call_data_.has_value()) return; call_data_->LogServerHeader( /*is_client=*/false, MaybeGetContext(), @@ -442,6 +459,8 @@ void ServerLoggingFilter::Call::OnServerInitialMetadata(ServerMetadata& md) { } void ServerLoggingFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerLoggingFilter::Call::OnServerTrailingMetadata"); if (!call_data_.has_value()) return; if (md.get(GrpcCallWasCancelled()).value_or(false) && md.get(GrpcStatusMetadata()) == GRPC_STATUS_CANCELLED) { @@ -456,6 +475,8 @@ void ServerLoggingFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) { void ServerLoggingFilter::Call::OnClientToServerMessage( const Message& message) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerLoggingFilter::Call::OnClientToServerMessage"); if (!call_data_.has_value()) return; call_data_->LogClientMessage( /*is_client=*/false, MaybeGetContext(), @@ -463,6 +484,8 @@ void ServerLoggingFilter::Call::OnClientToServerMessage( } void ServerLoggingFilter::Call::OnClientToServerHalfClose() { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerLoggingFilter::Call::OnClientToServerHalfClose"); if (!call_data_.has_value()) return; call_data_->LogClientHalfClose( /*is_client=*/false, MaybeGetContext()); @@ -470,6 +493,8 @@ void ServerLoggingFilter::Call::OnClientToServerHalfClose() { void ServerLoggingFilter::Call::OnServerToClientMessage( const Message& message) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerLoggingFilter::Call::OnServerToClientMessage"); if (!call_data_.has_value()) return; call_data_->LogServerMessage( /*is_client=*/false, MaybeGetContext(), diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index db0b4d514e7..01cc9a3a9d7 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -44,6 +44,7 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/latent_see.h" namespace grpc_core { @@ -201,24 +202,32 @@ ClientMessageSizeFilter::Call::Call(ClientMessageSizeFilter* filter) ServerMetadataHandle ServerMessageSizeFilter::Call::OnClientToServerMessage( const Message& message, ServerMessageSizeFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerMessageSizeFilter::Call::OnClientToServerMessage"); return CheckPayload(message, filter->parsed_config_.max_recv_size(), /*is_client=*/false, false); } ServerMetadataHandle ServerMessageSizeFilter::Call::OnServerToClientMessage( const Message& message, ServerMessageSizeFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerMessageSizeFilter::Call::OnServerToClientMessage"); return CheckPayload(message, filter->parsed_config_.max_send_size(), /*is_client=*/false, true); } ServerMetadataHandle ClientMessageSizeFilter::Call::OnClientToServerMessage( const Message& message) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientMessageSizeFilter::Call::OnClientToServerMessage"); return CheckPayload(message, limits_.max_send_size(), /*is_client=*/true, true); } ServerMetadataHandle ClientMessageSizeFilter::Call::OnServerToClientMessage( const Message& message) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientMessageSizeFilter::Call::OnServerToClientMessage"); return CheckPayload(message, limits_.max_recv_size(), /*is_client=*/true, false); } diff --git a/src/core/ext/filters/rbac/rbac_filter.cc b/src/core/ext/filters/rbac/rbac_filter.cc index 583042786f0..c7a8d139b17 100644 --- a/src/core/ext/filters/rbac/rbac_filter.cc +++ b/src/core/ext/filters/rbac/rbac_filter.cc @@ -39,6 +39,7 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/latent_see.h" namespace grpc_core { @@ -51,6 +52,7 @@ const NoInterceptor RbacFilter::Call::OnFinalize; absl::Status RbacFilter::Call::OnClientInitialMetadata(ClientMetadata& md, RbacFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE("RbacFilter::Call::OnClientInitialMetadata"); // Fetch and apply the rbac policy from the service config. auto* service_config_call_data = GetContext(); auto* method_params = static_cast( diff --git a/src/core/ext/filters/stateful_session/stateful_session_filter.cc b/src/core/ext/filters/stateful_session/stateful_session_filter.cc index 953a32a511b..3852c7155bb 100644 --- a/src/core/ext/filters/stateful_session/stateful_session_filter.cc +++ b/src/core/ext/filters/stateful_session/stateful_session_filter.cc @@ -51,6 +51,7 @@ #include "src/core/resolver/xds/xds_resolver_attributes.h" #include "src/core/service_config/service_config_call_data.h" #include "src/core/util/crash.h" +#include "src/core/util/latent_see.h" #include "src/core/util/time.h" namespace grpc_core { @@ -219,6 +220,8 @@ bool IsConfiguredPath(absl::string_view configured_path, void StatefulSessionFilter::Call::OnClientInitialMetadata( ClientMetadata& md, StatefulSessionFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "StatefulSessionFilter::Call::OnClientInitialMetadata"); // Get config. auto* service_config_call_data = GetContext(); CHECK_NE(service_config_call_data, nullptr); @@ -258,6 +261,8 @@ void StatefulSessionFilter::Call::OnClientInitialMetadata( } void StatefulSessionFilter::Call::OnServerInitialMetadata(ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "StatefulSessionFilter::Call::OnServerInitialMetadata"); if (!perform_filtering_) return; // Add cookie to server initial metadata if needed. MaybeUpdateServerInitialMetadata(cookie_config_, cluster_changed_, @@ -266,6 +271,8 @@ void StatefulSessionFilter::Call::OnServerInitialMetadata(ServerMetadata& md) { } void StatefulSessionFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) { + GRPC_LATENT_SEE_INNER_SCOPE( + "StatefulSessionFilter::Call::OnServerTrailingMetadata"); if (!perform_filtering_) return; // If we got a Trailers-Only response, then add the // cookie to the trailing metadata instead of the diff --git a/src/core/lib/channel/promise_based_filter.cc b/src/core/lib/channel/promise_based_filter.cc index bf5dadfc804..d7409e63d1d 100644 --- a/src/core/lib/channel/promise_based_filter.cc +++ b/src/core/lib/channel/promise_based_filter.cc @@ -38,6 +38,7 @@ #include "src/core/lib/promise/seq.h" #include "src/core/lib/slice/slice.h" #include "src/core/util/crash.h" +#include "src/core/util/latent_see.h" #include "src/core/util/manual_constructor.h" #include "src/core/util/status_helper.h" @@ -242,10 +243,8 @@ void BaseCallData::CapturedBatch::CancelWith(grpc_error_handle error, /////////////////////////////////////////////////////////////////////////////// // BaseCallData::Flusher -BaseCallData::Flusher::Flusher(BaseCallData* call) - : latent_see::InnerScope( - GRPC_LATENT_SEE_METADATA("PromiseBasedFilter Flusher")), - call_(call) { +BaseCallData::Flusher::Flusher(BaseCallData* call, const char* desc) + : latent_see::InnerScope(GRPC_LATENT_SEE_METADATA_RAW(desc)), call_(call) { GRPC_CALL_STACK_REF(call_->call_stack(), "flusher"); } @@ -397,7 +396,7 @@ bool BaseCallData::SendMessage::IsIdle() const { } void BaseCallData::SendMessage::OnComplete(absl::Status status) { - Flusher flusher(base_); + Flusher flusher(base_, "SendMessage::OnComplete"); GRPC_TRACE_LOG(channel, INFO) << base_->LogTag() << " SendMessage.OnComplete st=" << StateString(state_) << " status=" << status; @@ -707,7 +706,7 @@ void BaseCallData::ReceiveMessage::OnComplete(absl::Status status) { break; } completed_status_ = status; - Flusher flusher(base_); + Flusher flusher(base_, "ReceiveMessage::OnComplete"); ScopedContext ctx(base_); base_->WakeInsideCombiner(&flusher); } @@ -1221,7 +1220,8 @@ class ClientCallData::PollContext { auto* next_poll = static_cast(p); { ScopedContext ctx(next_poll->call_data); - Flusher flusher(next_poll->call_data); + Flusher flusher(next_poll->call_data, + "ClientCallData::PollContext::~PollContext"); next_poll->call_data->WakeInsideCombiner(&flusher); } GRPC_CALL_STACK_UNREF(next_poll->call_stack, "re-poll"); @@ -1350,7 +1350,7 @@ void ClientCallData::StartBatch(grpc_transport_stream_op_batch* b) { // Fake out the activity based context. ScopedContext context(this); CapturedBatch batch(b); - Flusher flusher(this); + Flusher flusher(this, "ClientCallData::StartBatch"); GRPC_TRACE_LOG(channel, INFO) << LogTag() << " StartBatch " << DebugString(); @@ -1556,7 +1556,7 @@ void ClientCallData::RecvInitialMetadataReady(grpc_error_handle error) { << DebugString() << " error:" << error.ToString() << " md:" << recv_initial_metadata_->metadata->DebugString(); ScopedContext context(this); - Flusher flusher(this); + Flusher flusher(this, "ClientCallData::RecvInitialMetadataReady"); if (!error.ok()) { switch (recv_initial_metadata_->state) { case RecvInitialMetadata::kHookedWaitingForPipe: @@ -1742,7 +1742,7 @@ void ClientCallData::RecvTrailingMetadataReadyCallback( } void ClientCallData::RecvTrailingMetadataReady(grpc_error_handle error) { - Flusher flusher(this); + Flusher flusher(this, "ClientCallData::RecvTrailingMetadataReady"); GRPC_TRACE_LOG(channel, INFO) << LogTag() << " ClientCallData.RecvTrailingMetadataReady " << "recv_trailing_state=" << StateString(recv_trailing_state_) @@ -1793,11 +1793,12 @@ void ClientCallData::SetStatusFromError(grpc_metadata_batch* metadata, // Wakeup and poll the promise if appropriate. void ClientCallData::WakeInsideCombiner(Flusher* flusher) { + GRPC_LATENT_SEE_INNER_SCOPE("ClientCallData::WakeInsideCombiner"); PollContext(this, flusher).Run(); } void ClientCallData::OnWakeup() { - Flusher flusher(this); + Flusher flusher(this, "ClientCallData::OnWakeup"); ScopedContext context(this); WakeInsideCombiner(&flusher); } @@ -1873,7 +1874,8 @@ class ServerCallData::PollContext { auto run = [](void* p, grpc_error_handle) { auto* next_poll = static_cast(p); { - Flusher flusher(next_poll->call_data); + Flusher flusher(next_poll->call_data, + "ServerCallData::PollContext::~PollContext"); ScopedContext context(next_poll->call_data); next_poll->call_data->WakeInsideCombiner(&flusher); } @@ -1977,7 +1979,7 @@ void ServerCallData::StartBatch(grpc_transport_stream_op_batch* b) { // Fake out the activity based context. ScopedContext context(this); CapturedBatch batch(b); - Flusher flusher(this); + Flusher flusher(this, "ServerCallData::StartBatch"); bool wake = false; GRPC_TRACE_LOG(channel, INFO) << LogTag() << " StartBatch: " << DebugString(); @@ -2266,7 +2268,7 @@ void ServerCallData::RecvTrailingMetadataReady(grpc_error_handle error) { GRPC_TRACE_LOG(channel, INFO) << LogTag() << ": RecvTrailingMetadataReady error=" << error << " md=" << recv_trailing_metadata_->DebugString(); - Flusher flusher(this); + Flusher flusher(this, "ServerCallData::RecvTrailingMetadataReady"); PollContext poll_ctx(this, &flusher); Completed(error, recv_trailing_metadata_->get(GrpcTarPit()).has_value(), &flusher); @@ -2280,7 +2282,7 @@ void ServerCallData::RecvInitialMetadataReadyCallback(void* arg, } void ServerCallData::RecvInitialMetadataReady(grpc_error_handle error) { - Flusher flusher(this); + Flusher flusher(this, "ServerCallData::RecvInitialMetadataReady"); GRPC_TRACE_LOG(channel, INFO) << LogTag() << ": RecvInitialMetadataReady " << error; CHECK(recv_initial_state_ == RecvInitialState::kForwarded); @@ -2343,6 +2345,7 @@ std::string ServerCallData::DebugString() const { // Wakeup and poll the promise if appropriate. void ServerCallData::WakeInsideCombiner(Flusher* flusher) { + GRPC_LATENT_SEE_INNER_SCOPE("ServerCallData::WakeInsideCombiner"); PollContext poll_ctx(this, flusher); GRPC_TRACE_LOG(channel, INFO) << LogTag() << ": WakeInsideCombiner " << DebugString(); @@ -2494,7 +2497,7 @@ void ServerCallData::WakeInsideCombiner(Flusher* flusher) { } void ServerCallData::OnWakeup() { - Flusher flusher(this); + Flusher flusher(this, "ServerCallData::OnWakeup"); ScopedContext context(this); WakeInsideCombiner(&flusher); } diff --git a/src/core/lib/channel/promise_based_filter.h b/src/core/lib/channel/promise_based_filter.h index 6b2ba31ce6b..979c9e7db95 100644 --- a/src/core/lib/channel/promise_based_filter.h +++ b/src/core/lib/channel/promise_based_filter.h @@ -976,7 +976,8 @@ class BaseCallData : public Activity, private Wakeable { class Flusher : public latent_see::InnerScope { public: - explicit Flusher(BaseCallData* call); + explicit Flusher(BaseCallData* call, + const char* desc = "PromiseBasedFilter::Flusher"); // Calls closures, schedules batches, relinquishes call combiner. ~Flusher(); diff --git a/src/core/lib/security/authorization/grpc_server_authz_filter.cc b/src/core/lib/security/authorization/grpc_server_authz_filter.cc index 672b02a9d91..540b2af1f67 100644 --- a/src/core/lib/security/authorization/grpc_server_authz_filter.cc +++ b/src/core/lib/security/authorization/grpc_server_authz_filter.cc @@ -33,6 +33,7 @@ #include "src/core/lib/security/authorization/evaluate_args.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/latent_see.h" namespace grpc_core { @@ -99,6 +100,8 @@ bool GrpcServerAuthzFilter::IsAuthorized(ClientMetadata& initial_metadata) { absl::Status GrpcServerAuthzFilter::Call::OnClientInitialMetadata( ClientMetadata& md, GrpcServerAuthzFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "GrpcServerAuthzFilter::Call::OnClientInitialMetadata"); if (!filter->IsAuthorized(md)) { return absl::PermissionDeniedError("Unauthorized RPC request rejected."); } diff --git a/src/core/load_balancing/grpclb/client_load_reporting_filter.cc b/src/core/load_balancing/grpclb/client_load_reporting_filter.cc index 40de9f0c2bc..4aff5f14580 100644 --- a/src/core/load_balancing/grpclb/client_load_reporting_filter.cc +++ b/src/core/load_balancing/grpclb/client_load_reporting_filter.cc @@ -35,6 +35,7 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/load_balancing/grpclb/grpclb_client_stats.h" +#include "src/core/util/latent_see.h" #include "src/core/util/ref_counted_ptr.h" namespace grpc_core { @@ -55,6 +56,8 @@ ClientLoadReportingFilter::Create(const ChannelArgs&, ChannelFilter::Args) { void ClientLoadReportingFilter::Call::OnClientInitialMetadata( ClientMetadata& client_initial_metadata) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientLoadReportingFilter::Call::OnClientInitialMetadata"); // Handle client initial metadata. // Grab client stats object from metadata. auto client_stats_md = @@ -65,11 +68,15 @@ void ClientLoadReportingFilter::Call::OnClientInitialMetadata( } void ClientLoadReportingFilter::Call::OnServerInitialMetadata(ServerMetadata&) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientLoadReportingFilter::Call::OnServerInitialMetadata"); saw_initial_metadata_ = true; } void ClientLoadReportingFilter::Call::OnServerTrailingMetadata( ServerMetadata& server_trailing_metadata) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ClientLoadReportingFilter::Call::OnServerTrailingMetadata"); if (client_stats_ != nullptr) { client_stats_->AddCallFinished( server_trailing_metadata.get(GrpcStreamNetworkState()) == diff --git a/src/core/server/server_call_tracer_filter.cc b/src/core/server/server_call_tracer_filter.cc index 78f8589cea0..b4fbdafde9c 100644 --- a/src/core/server/server_call_tracer_filter.cc +++ b/src/core/server/server_call_tracer_filter.cc @@ -39,6 +39,7 @@ #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/latent_see.h" namespace grpc_core { @@ -57,24 +58,31 @@ class ServerCallTracerFilter class Call { public: void OnClientInitialMetadata(ClientMetadata& client_initial_metadata) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerCallTracerFilter::Call::OnClientInitialMetadata"); auto* call_tracer = MaybeGetContext(); if (call_tracer == nullptr) return; call_tracer->RecordReceivedInitialMetadata(&client_initial_metadata); } void OnServerInitialMetadata(ServerMetadata& server_initial_metadata) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerCallTracerFilter::Call::OnServerInitialMetadata"); auto* call_tracer = MaybeGetContext(); if (call_tracer == nullptr) return; call_tracer->RecordSendInitialMetadata(&server_initial_metadata); } void OnFinalize(const grpc_call_final_info* final_info) { + GRPC_LATENT_SEE_INNER_SCOPE("ServerCallTracerFilter::Call::OnFinalize"); auto* call_tracer = MaybeGetContext(); if (call_tracer == nullptr) return; call_tracer->RecordEnd(final_info); } void OnServerTrailingMetadata(ServerMetadata& server_trailing_metadata) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerCallTracerFilter::Call::OnServerTrailingMetadata"); auto* call_tracer = MaybeGetContext(); if (call_tracer == nullptr) return; call_tracer->RecordSendTrailingMetadata(&server_trailing_metadata); diff --git a/src/core/server/server_config_selector_filter.cc b/src/core/server/server_config_selector_filter.cc index b17ea44930a..2f221e61426 100644 --- a/src/core/server/server_config_selector_filter.cc +++ b/src/core/server/server_config_selector_filter.cc @@ -38,6 +38,7 @@ #include "src/core/server/server_config_selector.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/latent_see.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/status_helper.h" #include "src/core/util/sync.h" @@ -144,6 +145,8 @@ void ServerConfigSelectorFilter::Orphan() { absl::Status ServerConfigSelectorFilter::Call::OnClientInitialMetadata( ClientMetadata& md, ServerConfigSelectorFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServerConfigSelectorFilter::Call::OnClientInitialMetadata"); auto sel = filter->config_selector(); if (!sel.ok()) return sel.status(); auto call_config = sel.value()->GetCallConfig(&md); diff --git a/src/core/service_config/service_config_channel_arg_filter.cc b/src/core/service_config/service_config_channel_arg_filter.cc index 54b1ae0d411..c17fa1a04d6 100644 --- a/src/core/service_config/service_config_channel_arg_filter.cc +++ b/src/core/service_config/service_config_channel_arg_filter.cc @@ -46,6 +46,7 @@ #include "src/core/service_config/service_config_call_data.h" #include "src/core/service_config/service_config_impl.h" #include "src/core/service_config/service_config_parser.h" +#include "src/core/util/latent_see.h" #include "src/core/util/ref_counted_ptr.h" namespace grpc_core { @@ -107,6 +108,8 @@ const NoInterceptor ServiceConfigChannelArgFilter::Call::OnFinalize; void ServiceConfigChannelArgFilter::Call::OnClientInitialMetadata( ClientMetadata& md, ServiceConfigChannelArgFilter* filter) { + GRPC_LATENT_SEE_INNER_SCOPE( + "ServiceConfigChannelArgFilter::Call::OnClientInitialMetadata"); const ServiceConfigParser::ParsedConfigVector* method_configs = nullptr; if (filter->service_config_ != nullptr) { method_configs = filter->service_config_->GetMethodParsedConfigVector( diff --git a/src/core/util/latent_see.cc b/src/core/util/latent_see.cc index 508e853055a..c8331144407 100644 --- a/src/core/util/latent_see.cc +++ b/src/core/util/latent_see.cc @@ -91,12 +91,22 @@ std::string Log::GenerateJson() { } if (!first) absl::StrAppend(&json, ",\n"); first = false; - absl::StrAppend(&json, "{\"name\": ", event.event.metadata->name, - ", \"ph\": \"", phase, "\", \"ts\": ", - std::chrono::duration( - event.event.timestamp - *start_time) - .count(), - ", \"pid\": 0, \"tid\": ", event.thread_id); + if (event.event.metadata->name[0] != '"') { + absl::StrAppend(&json, "{\"name\": \"", event.event.metadata->name, + "\", \"ph\": \"", phase, "\", \"ts\": ", + std::chrono::duration( + event.event.timestamp - *start_time) + .count(), + ", \"pid\": 0, \"tid\": ", event.thread_id); + } else { + absl::StrAppend(&json, "{\"name\": ", event.event.metadata->name, + ", \"ph\": \"", phase, "\", \"ts\": ", + std::chrono::duration( + event.event.timestamp - *start_time) + .count(), + ", \"pid\": 0, \"tid\": ", event.thread_id); + } + if (has_id) { absl::StrAppend(&json, ", \"id\": ", event.event.id); } diff --git a/src/core/util/latent_see.h b/src/core/util/latent_see.h index 34a247abd0a..19ca150b722 100644 --- a/src/core/util/latent_see.h +++ b/src/core/util/latent_see.h @@ -260,6 +260,12 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void Mark(const Metadata* md) { #name}; \ return &metadata; \ }() +#define GRPC_LATENT_SEE_METADATA_RAW(name) \ + [ptr = name]() { \ + static grpc_core::latent_see::Metadata metadata = {__FILE__, __LINE__, \ + ptr}; \ + return &metadata; \ + }() // Parent scope: logs a begin and end event, and flushes the thread log on scope // exit. Because the flush takes some time it's better to place one parent scope // at the top of the stack, and use lighter weight scopes within it. @@ -295,6 +301,7 @@ struct InnerScope { } // namespace latent_see } // namespace grpc_core #define GRPC_LATENT_SEE_METADATA(name) nullptr +#define GRPC_LATENT_SEE_METADATA_RAW(name) nullptr #define GRPC_LATENT_SEE_PARENT_SCOPE(name) \ do { \ } while (0) From 3ea3e36e95400885a323c9d7447665559c090631 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Sep 2024 15:03:10 -0700 Subject: [PATCH 13/74] [tools] Add a `--fix` argument to check_submodules.sh (#37811) IDK how many times I've messed this up over the years accidentally and had to spend thoughts trying to fix it... when really we could do that trivially with code. Closes #37811 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37811 from ctiller:bamboozled 0cfbeae925be12fa0e5533c789e992d5d8a9aaff PiperOrigin-RevId: 679741188 --- tools/run_tests/sanity/check_submodules.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index ab9c7c1cd6a..9796fb593cc 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -43,6 +43,16 @@ third_party/xds 3a472e524827f72d1ad621c4983dd5af54c46776 third_party/zlib 09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851 EOF -diff -u "$submodules" "$want_submodules" +if ! diff -u "$submodules" "$want_submodules"; then + if [ "$1" = "--fix" ]; then + while read -r path commit; do + git submodule update --init "$path" + (cd "$path" && git checkout "$commit") + done <"$want_submodules" + exit 0 + fi + echo "Submodules are out of sync. Please update this script or run with --fix." + exit 1 +fi rm "$submodules" "$want_submodules" From 6b88612d0398365c6696ab371925e2541478c933 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 28 Sep 2024 22:24:16 -0700 Subject: [PATCH 14/74] [latent-see] Compilation fix for use_strict_warning=true (#37815) Since we don't actually use the `desc` parameter when building without latent_see we had an unused parameter error. More though, I think the `GRPC_LATENT_SEE_METADATA_RAW` macro was flawed, as the inner `metadata` argument would only be created once, and so all uses would get tagged by whatever passed through `Flusher` first. Correct this by passing in the `latent_see::Metadata*` directly to the function. Closes #37815 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37815 from ctiller:woah-bubba 606a6350fec07672921780903ac2b054ea583a7d PiperOrigin-RevId: 680136826 --- src/core/lib/channel/promise_based_filter.cc | 35 ++++++++++++-------- src/core/lib/channel/promise_based_filter.h | 3 +- src/core/util/latent_see.h | 6 ---- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/core/lib/channel/promise_based_filter.cc b/src/core/lib/channel/promise_based_filter.cc index d7409e63d1d..a0fc813ad5c 100644 --- a/src/core/lib/channel/promise_based_filter.cc +++ b/src/core/lib/channel/promise_based_filter.cc @@ -243,8 +243,8 @@ void BaseCallData::CapturedBatch::CancelWith(grpc_error_handle error, /////////////////////////////////////////////////////////////////////////////// // BaseCallData::Flusher -BaseCallData::Flusher::Flusher(BaseCallData* call, const char* desc) - : latent_see::InnerScope(GRPC_LATENT_SEE_METADATA_RAW(desc)), call_(call) { +BaseCallData::Flusher::Flusher(BaseCallData* call, latent_see::Metadata* desc) + : latent_see::InnerScope(desc), call_(call) { GRPC_CALL_STACK_REF(call_->call_stack(), "flusher"); } @@ -396,7 +396,7 @@ bool BaseCallData::SendMessage::IsIdle() const { } void BaseCallData::SendMessage::OnComplete(absl::Status status) { - Flusher flusher(base_, "SendMessage::OnComplete"); + Flusher flusher(base_, GRPC_LATENT_SEE_METADATA("SendMessage::OnComplete")); GRPC_TRACE_LOG(channel, INFO) << base_->LogTag() << " SendMessage.OnComplete st=" << StateString(state_) << " status=" << status; @@ -706,7 +706,8 @@ void BaseCallData::ReceiveMessage::OnComplete(absl::Status status) { break; } completed_status_ = status; - Flusher flusher(base_, "ReceiveMessage::OnComplete"); + Flusher flusher(base_, + GRPC_LATENT_SEE_METADATA("ReceiveMessage::OnComplete")); ScopedContext ctx(base_); base_->WakeInsideCombiner(&flusher); } @@ -1221,7 +1222,8 @@ class ClientCallData::PollContext { { ScopedContext ctx(next_poll->call_data); Flusher flusher(next_poll->call_data, - "ClientCallData::PollContext::~PollContext"); + GRPC_LATENT_SEE_METADATA( + "ClientCallData::PollContext::~PollContext")); next_poll->call_data->WakeInsideCombiner(&flusher); } GRPC_CALL_STACK_UNREF(next_poll->call_stack, "re-poll"); @@ -1350,7 +1352,7 @@ void ClientCallData::StartBatch(grpc_transport_stream_op_batch* b) { // Fake out the activity based context. ScopedContext context(this); CapturedBatch batch(b); - Flusher flusher(this, "ClientCallData::StartBatch"); + Flusher flusher(this, GRPC_LATENT_SEE_METADATA("ClientCallData::StartBatch")); GRPC_TRACE_LOG(channel, INFO) << LogTag() << " StartBatch " << DebugString(); @@ -1556,7 +1558,8 @@ void ClientCallData::RecvInitialMetadataReady(grpc_error_handle error) { << DebugString() << " error:" << error.ToString() << " md:" << recv_initial_metadata_->metadata->DebugString(); ScopedContext context(this); - Flusher flusher(this, "ClientCallData::RecvInitialMetadataReady"); + Flusher flusher(this, GRPC_LATENT_SEE_METADATA( + "ClientCallData::RecvInitialMetadataReady")); if (!error.ok()) { switch (recv_initial_metadata_->state) { case RecvInitialMetadata::kHookedWaitingForPipe: @@ -1742,7 +1745,8 @@ void ClientCallData::RecvTrailingMetadataReadyCallback( } void ClientCallData::RecvTrailingMetadataReady(grpc_error_handle error) { - Flusher flusher(this, "ClientCallData::RecvTrailingMetadataReady"); + Flusher flusher(this, GRPC_LATENT_SEE_METADATA( + "ClientCallData::RecvTrailingMetadataReady")); GRPC_TRACE_LOG(channel, INFO) << LogTag() << " ClientCallData.RecvTrailingMetadataReady " << "recv_trailing_state=" << StateString(recv_trailing_state_) @@ -1798,7 +1802,7 @@ void ClientCallData::WakeInsideCombiner(Flusher* flusher) { } void ClientCallData::OnWakeup() { - Flusher flusher(this, "ClientCallData::OnWakeup"); + Flusher flusher(this, GRPC_LATENT_SEE_METADATA("ClientCallData::OnWakeup")); ScopedContext context(this); WakeInsideCombiner(&flusher); } @@ -1875,7 +1879,8 @@ class ServerCallData::PollContext { auto* next_poll = static_cast(p); { Flusher flusher(next_poll->call_data, - "ServerCallData::PollContext::~PollContext"); + GRPC_LATENT_SEE_METADATA( + "ServerCallData::PollContext::~PollContext")); ScopedContext context(next_poll->call_data); next_poll->call_data->WakeInsideCombiner(&flusher); } @@ -1979,7 +1984,7 @@ void ServerCallData::StartBatch(grpc_transport_stream_op_batch* b) { // Fake out the activity based context. ScopedContext context(this); CapturedBatch batch(b); - Flusher flusher(this, "ServerCallData::StartBatch"); + Flusher flusher(this, GRPC_LATENT_SEE_METADATA("ServerCallData::StartBatch")); bool wake = false; GRPC_TRACE_LOG(channel, INFO) << LogTag() << " StartBatch: " << DebugString(); @@ -2268,7 +2273,8 @@ void ServerCallData::RecvTrailingMetadataReady(grpc_error_handle error) { GRPC_TRACE_LOG(channel, INFO) << LogTag() << ": RecvTrailingMetadataReady error=" << error << " md=" << recv_trailing_metadata_->DebugString(); - Flusher flusher(this, "ServerCallData::RecvTrailingMetadataReady"); + Flusher flusher(this, GRPC_LATENT_SEE_METADATA( + "ServerCallData::RecvTrailingMetadataReady")); PollContext poll_ctx(this, &flusher); Completed(error, recv_trailing_metadata_->get(GrpcTarPit()).has_value(), &flusher); @@ -2282,7 +2288,8 @@ void ServerCallData::RecvInitialMetadataReadyCallback(void* arg, } void ServerCallData::RecvInitialMetadataReady(grpc_error_handle error) { - Flusher flusher(this, "ServerCallData::RecvInitialMetadataReady"); + Flusher flusher(this, GRPC_LATENT_SEE_METADATA( + "ServerCallData::RecvInitialMetadataReady")); GRPC_TRACE_LOG(channel, INFO) << LogTag() << ": RecvInitialMetadataReady " << error; CHECK(recv_initial_state_ == RecvInitialState::kForwarded); @@ -2497,7 +2504,7 @@ void ServerCallData::WakeInsideCombiner(Flusher* flusher) { } void ServerCallData::OnWakeup() { - Flusher flusher(this, "ServerCallData::OnWakeup"); + Flusher flusher(this, GRPC_LATENT_SEE_METADATA("ServerCallData::OnWakeup")); ScopedContext context(this); WakeInsideCombiner(&flusher); } diff --git a/src/core/lib/channel/promise_based_filter.h b/src/core/lib/channel/promise_based_filter.h index 979c9e7db95..1a31b901052 100644 --- a/src/core/lib/channel/promise_based_filter.h +++ b/src/core/lib/channel/promise_based_filter.h @@ -977,7 +977,8 @@ class BaseCallData : public Activity, private Wakeable { class Flusher : public latent_see::InnerScope { public: explicit Flusher(BaseCallData* call, - const char* desc = "PromiseBasedFilter::Flusher"); + latent_see::Metadata* desc = GRPC_LATENT_SEE_METADATA( + "PromiseBasedFilter::Flusher")); // Calls closures, schedules batches, relinquishes call combiner. ~Flusher(); diff --git a/src/core/util/latent_see.h b/src/core/util/latent_see.h index 19ca150b722..cf22a40ed8e 100644 --- a/src/core/util/latent_see.h +++ b/src/core/util/latent_see.h @@ -260,12 +260,6 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void Mark(const Metadata* md) { #name}; \ return &metadata; \ }() -#define GRPC_LATENT_SEE_METADATA_RAW(name) \ - [ptr = name]() { \ - static grpc_core::latent_see::Metadata metadata = {__FILE__, __LINE__, \ - ptr}; \ - return &metadata; \ - }() // Parent scope: logs a begin and end event, and flushes the thread log on scope // exit. Because the flush takes some time it's better to place one parent scope // at the top of the stack, and use lighter weight scopes within it. From 331d42140e1bb405d1f2c65244b9f516df71b623 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sun, 29 Sep 2024 22:21:19 -0700 Subject: [PATCH 15/74] [chaotic-good] Fix use after free (#37814) Closes #37814 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37814 from ctiller:flake-fightas-15 cab1017eb771442aa96452a1de061f48b2fa3349 PiperOrigin-RevId: 680418287 --- src/core/server/server.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/server/server.cc b/src/core/server/server.cc index 573cd66b224..f88eb5925da 100644 --- a/src/core/server/server.cc +++ b/src/core/server/server.cc @@ -869,8 +869,10 @@ auto Server::MatchAndPublishCall(CallHandler call_handler) { absl::StatusOr> Server::MakeCallDestination(const ChannelArgs& args) { InterceptionChainBuilder builder(args); - builder.AddOnClientInitialMetadata( - [this](ClientMetadata& md) { SetRegisteredMethodOnMetadata(md); }); + // TODO(ctiller): find a way to avoid adding a server ref per call + builder.AddOnClientInitialMetadata([self = Ref()](ClientMetadata& md) { + self->SetRegisteredMethodOnMetadata(md); + }); CoreConfiguration::Get().channel_init().AddToInterceptionChainBuilder( GRPC_SERVER_CHANNEL, builder); return builder.Build( From ff0c2e326f4ff0a5236be29d6be1094e1b3290e5 Mon Sep 17 00:00:00 2001 From: Tanvi Jagtap Date: Mon, 30 Sep 2024 04:29:43 -0700 Subject: [PATCH 16/74] [PH2][Refactor] Minor changes. 1. Rename write_state_name to get_state_name 2. Adding const where appropriate PiperOrigin-RevId: 680516861 --- .../chttp2/transport/chttp2_transport.cc | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index fef7fb92d0b..97cfe956ba9 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -441,7 +441,7 @@ grpc_chttp2_transport::~grpc_chttp2_transport() { static void read_channel_args(grpc_chttp2_transport* t, const grpc_core::ChannelArgs& channel_args, - bool is_client) { + const bool is_client) { const int initial_sequence_number = channel_args.GetInt(GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER).value_or(-1); if (initial_sequence_number > 0) { @@ -611,7 +611,7 @@ using grpc_event_engine::experimental::TcpTraceExtension; grpc_chttp2_transport::grpc_chttp2_transport( const grpc_core::ChannelArgs& channel_args, - grpc_core::OrphanablePtr endpoint, bool is_client) + grpc_core::OrphanablePtr endpoint, const bool is_client) : ep(std::move(endpoint)), peer_string( grpc_core::Slice::FromCopiedString(grpc_endpoint_get_peer(ep.get()))), @@ -935,7 +935,7 @@ grpc_chttp2_stream* grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport* t, // OUTPUT PROCESSING // -static const char* write_state_name(grpc_chttp2_write_state st) { +static const char* get_write_state_name(grpc_chttp2_write_state st) { switch (st) { case GRPC_CHTTP2_WRITE_STATE_IDLE: return "IDLE"; @@ -952,8 +952,8 @@ static void set_write_state(grpc_chttp2_transport* t, GRPC_TRACE_LOG(http, INFO) << "W:" << t << " " << (t->is_client ? "CLIENT" : "SERVER") << " [" << t->peer_string.as_string_view() << "] state " - << write_state_name(t->write_state) << " -> " << write_state_name(st) - << " [" << reason << "]"; + << get_write_state_name(t->write_state) << " -> " + << get_write_state_name(st) << " [" << reason << "]"; t->write_state = st; // If the state is being reset back to idle, it means a write was just // finished. Make sure all the run_after_write closures are scheduled. @@ -1315,7 +1315,7 @@ void grpc_chttp2_complete_closure_step(grpc_chttp2_transport* t, << " flags=" << (closure->next_data.scratch % CLOSURE_BARRIER_FIRST_REF_BIT) << " desc=" << desc << " err=" << grpc_core::StatusToString(error) - << " write_state=" << write_state_name(t->write_state) + << " write_state=" << get_write_state_name(t->write_state) << " whence=" << whence.file() << ":" << whence.line(); if (!error.ok()) { @@ -1324,7 +1324,7 @@ void grpc_chttp2_complete_closure_step(grpc_chttp2_transport* t, if (cl_err.ok()) { cl_err = GRPC_ERROR_CREATE(absl::StrCat( "Error in HTTP transport completing operation: ", desc, - " write_state=", write_state_name(t->write_state), + " write_state=", get_write_state_name(t->write_state), " refs=", closure->next_data.scratch / CLOSURE_BARRIER_FIRST_REF_BIT, " flags=", closure->next_data.scratch % CLOSURE_BARRIER_FIRST_REF_BIT, " peer_address=", t->peer_string.as_string_view())); @@ -1353,7 +1353,7 @@ static bool contains_non_ok_status(grpc_metadata_batch* batch) { } static void log_metadata(const grpc_metadata_batch* md_batch, uint32_t id, - bool is_client, bool is_initial) { + const bool is_client, const bool is_initial) { VLOG(2) << "--metadata--"; const std::string prefix = absl::StrCat( "HTTP:", id, is_initial ? ":HDR" : ":TRL", is_client ? ":CLI:" : ":SVR:"); @@ -1936,7 +1936,7 @@ class GracefulGoaway : public grpc_core::RefCounted { } // namespace static void send_goaway(grpc_chttp2_transport* t, grpc_error_handle error, - bool immediate_disconnect_hint) { + const bool immediate_disconnect_hint) { grpc_http2_error_code http_error; std::string message; grpc_error_get_status(error, grpc_core::Timestamp::InfFuture(), nullptr, @@ -3262,7 +3262,7 @@ grpc_chttp2_transport_get_socket_node(grpc_core::Transport* transport) { grpc_core::Transport* grpc_create_chttp2_transport( const grpc_core::ChannelArgs& channel_args, - grpc_core::OrphanablePtr ep, bool is_client) { + grpc_core::OrphanablePtr ep, const bool is_client) { return new grpc_chttp2_transport(channel_args, std::move(ep), is_client); } From a49d450a54c9116d107e921505f1d22efdaa6365 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 30 Sep 2024 10:52:26 -0700 Subject: [PATCH 17/74] [Build] Bumped the minimum version of cmake (#37702) Per https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md, the minimum version of cmake to support is 3.16 so let's change our cmake builds' requirements accordingly. Closes #37702 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37702 from veblush:cmake316 bb4ed1a1be5e9374980c922aac3dc1ccd27d1266 PiperOrigin-RevId: 680639191 --- CMakeLists.txt | 2 +- examples/android/helloworld/app/CMakeLists.txt | 2 +- examples/cpp/auth/CMakeLists.txt | 2 +- examples/cpp/cancellation/CMakeLists.txt | 2 +- examples/cpp/cmake/common.cmake | 2 +- examples/cpp/compression/CMakeLists.txt | 2 +- examples/cpp/deadline/CMakeLists.txt | 2 +- examples/cpp/error_details/CMakeLists.txt | 2 +- examples/cpp/error_handling/CMakeLists.txt | 2 +- examples/cpp/flow_control/CMakeLists.txt | 2 +- examples/cpp/generic_api/CMakeLists.txt | 2 +- examples/cpp/health/CMakeLists.txt | 2 +- examples/cpp/helloworld/CMakeLists.txt | 2 +- examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt | 2 +- examples/cpp/interceptors/CMakeLists.txt | 2 +- examples/cpp/keepalive/CMakeLists.txt | 2 +- examples/cpp/load_balancing/CMakeLists.txt | 2 +- examples/cpp/metadata/CMakeLists.txt | 2 +- examples/cpp/multiplex/CMakeLists.txt | 2 +- examples/cpp/otel/CMakeLists.txt | 2 +- examples/cpp/otel/codelab/CMakeLists.txt | 2 +- examples/cpp/otel/ostream/CMakeLists.txt | 2 +- examples/cpp/retry/CMakeLists.txt | 2 +- examples/cpp/route_guide/CMakeLists.txt | 2 +- examples/cpp/wait_for_ready/CMakeLists.txt | 2 +- src/android/test/interop/app/CMakeLists.txt | 2 +- src/cpp/README.md | 2 +- templates/CMakeLists.txt.template | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index da1e9c4ae87..85b51d334d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) set(PACKAGE_NAME "grpc") set(PACKAGE_VERSION "1.68.0-dev") diff --git a/examples/android/helloworld/app/CMakeLists.txt b/examples/android/helloworld/app/CMakeLists.txt index 4524d3e0250..70c2d65668c 100644 --- a/examples/android/helloworld/app/CMakeLists.txt +++ b/examples/android/helloworld/app/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) set(helloworld_PROTOBUF_PROTOC_EXECUTABLE "/usr/local/bin/protoc" CACHE STRING "Protoc binary on host") set(helloworld_GRPC_CPP_PLUGIN_EXECUTABLE "/usr/local/bin/grpc_cpp_plugin" CACHE STRING "gRPC CPP plugin binary on host") diff --git a/examples/cpp/auth/CMakeLists.txt b/examples/cpp/auth/CMakeLists.txt index 1f28ba6bcc8..c1a97cd9f65 100644 --- a/examples/cpp/auth/CMakeLists.txt +++ b/examples/cpp/auth/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building keyvaluestore. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(Cancellation C CXX) diff --git a/examples/cpp/cancellation/CMakeLists.txt b/examples/cpp/cancellation/CMakeLists.txt index c82111b5239..e98472bba65 100644 --- a/examples/cpp/cancellation/CMakeLists.txt +++ b/examples/cpp/cancellation/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building keyvaluestore. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(Cancellation C CXX) diff --git a/examples/cpp/cmake/common.cmake b/examples/cpp/cmake/common.cmake index df9bc4db0f8..9637a2ad26c 100644 --- a/examples/cpp/cmake/common.cmake +++ b/examples/cpp/cmake/common.cmake @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building route_guide. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) if(MSVC) add_definitions(-D_WIN32_WINNT=0x600) diff --git a/examples/cpp/compression/CMakeLists.txt b/examples/cpp/compression/CMakeLists.txt index ca89acff47a..63cc4400ec4 100644 --- a/examples/cpp/compression/CMakeLists.txt +++ b/examples/cpp/compression/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(Compression C CXX) diff --git a/examples/cpp/deadline/CMakeLists.txt b/examples/cpp/deadline/CMakeLists.txt index 1cf3462e31c..e0353f26df6 100644 --- a/examples/cpp/deadline/CMakeLists.txt +++ b/examples/cpp/deadline/CMakeLists.txt @@ -16,7 +16,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building this example. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(Deadline C CXX) diff --git a/examples/cpp/error_details/CMakeLists.txt b/examples/cpp/error_details/CMakeLists.txt index 3b32bc74900..36582ce67b8 100644 --- a/examples/cpp/error_details/CMakeLists.txt +++ b/examples/cpp/error_details/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(ErrorDetails C CXX) diff --git a/examples/cpp/error_handling/CMakeLists.txt b/examples/cpp/error_handling/CMakeLists.txt index 1ae09cc8c5f..14b6414c502 100644 --- a/examples/cpp/error_handling/CMakeLists.txt +++ b/examples/cpp/error_handling/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(ErrorHandling C CXX) diff --git a/examples/cpp/flow_control/CMakeLists.txt b/examples/cpp/flow_control/CMakeLists.txt index 0d6d4353177..48c7576220d 100644 --- a/examples/cpp/flow_control/CMakeLists.txt +++ b/examples/cpp/flow_control/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building example. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(HelloWorld C CXX) diff --git a/examples/cpp/generic_api/CMakeLists.txt b/examples/cpp/generic_api/CMakeLists.txt index 44e3820f0ab..988e44ca4f3 100644 --- a/examples/cpp/generic_api/CMakeLists.txt +++ b/examples/cpp/generic_api/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(GenericAPI C CXX) diff --git a/examples/cpp/health/CMakeLists.txt b/examples/cpp/health/CMakeLists.txt index 963e82f0a3e..fc19ddb9785 100644 --- a/examples/cpp/health/CMakeLists.txt +++ b/examples/cpp/health/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(HelloWorld C CXX) diff --git a/examples/cpp/helloworld/CMakeLists.txt b/examples/cpp/helloworld/CMakeLists.txt index defe3064b14..23c7ccd9211 100644 --- a/examples/cpp/helloworld/CMakeLists.txt +++ b/examples/cpp/helloworld/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(HelloWorld C CXX) diff --git a/examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt b/examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt index 8c1218a053d..e370cc48084 100644 --- a/examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt +++ b/examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt @@ -20,7 +20,7 @@ # including the "helloworld" project itself. # See https://blog.kitware.com/cmake-superbuilds-git-submodules/ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) # Project project(HelloWorld-SuperBuild C CXX) diff --git a/examples/cpp/interceptors/CMakeLists.txt b/examples/cpp/interceptors/CMakeLists.txt index 38b7c83c570..69c64fbe2cf 100644 --- a/examples/cpp/interceptors/CMakeLists.txt +++ b/examples/cpp/interceptors/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building keyvaluestore. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(KeyValueStore C CXX) diff --git a/examples/cpp/keepalive/CMakeLists.txt b/examples/cpp/keepalive/CMakeLists.txt index 8053fba1df6..95bbaed5e6b 100644 --- a/examples/cpp/keepalive/CMakeLists.txt +++ b/examples/cpp/keepalive/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(HelloWorld C CXX) diff --git a/examples/cpp/load_balancing/CMakeLists.txt b/examples/cpp/load_balancing/CMakeLists.txt index 786a508b272..73ea0c33968 100644 --- a/examples/cpp/load_balancing/CMakeLists.txt +++ b/examples/cpp/load_balancing/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(LoadBalancing C CXX) diff --git a/examples/cpp/metadata/CMakeLists.txt b/examples/cpp/metadata/CMakeLists.txt index 7a95323b16a..36cacacd4f2 100644 --- a/examples/cpp/metadata/CMakeLists.txt +++ b/examples/cpp/metadata/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(Metadata C CXX) diff --git a/examples/cpp/multiplex/CMakeLists.txt b/examples/cpp/multiplex/CMakeLists.txt index d0b97a37f26..185e79a3965 100644 --- a/examples/cpp/multiplex/CMakeLists.txt +++ b/examples/cpp/multiplex/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(Multiplex C CXX) diff --git a/examples/cpp/otel/CMakeLists.txt b/examples/cpp/otel/CMakeLists.txt index b81a2538a89..3718b5c8ae3 100644 --- a/examples/cpp/otel/CMakeLists.txt +++ b/examples/cpp/otel/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) project(grpc_opentelemetry_example C CXX) diff --git a/examples/cpp/otel/codelab/CMakeLists.txt b/examples/cpp/otel/codelab/CMakeLists.txt index 6ce38d77a2f..9403822c2b7 100644 --- a/examples/cpp/otel/codelab/CMakeLists.txt +++ b/examples/cpp/otel/codelab/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) project(grpc_opentelemetry_example C CXX) diff --git a/examples/cpp/otel/ostream/CMakeLists.txt b/examples/cpp/otel/ostream/CMakeLists.txt index c0d9a58a988..9b37a5d19f8 100644 --- a/examples/cpp/otel/ostream/CMakeLists.txt +++ b/examples/cpp/otel/ostream/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) project(grpc_opentelemetry_example C CXX) diff --git a/examples/cpp/retry/CMakeLists.txt b/examples/cpp/retry/CMakeLists.txt index f01e360bb7a..b07149a2cf6 100644 --- a/examples/cpp/retry/CMakeLists.txt +++ b/examples/cpp/retry/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building retry. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(Retry C CXX) diff --git a/examples/cpp/route_guide/CMakeLists.txt b/examples/cpp/route_guide/CMakeLists.txt index 90cebda39b1..bc321a00d57 100644 --- a/examples/cpp/route_guide/CMakeLists.txt +++ b/examples/cpp/route_guide/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building route_guide. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(RouteGuide C CXX) diff --git a/examples/cpp/wait_for_ready/CMakeLists.txt b/examples/cpp/wait_for_ready/CMakeLists.txt index 06024dfbc9b..472ece2d651 100644 --- a/examples/cpp/wait_for_ready/CMakeLists.txt +++ b/examples/cpp/wait_for_ready/CMakeLists.txt @@ -17,7 +17,7 @@ # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # that automatically builds all the dependencies before building helloworld. -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) project(HelloWorld C CXX) diff --git a/src/android/test/interop/app/CMakeLists.txt b/src/android/test/interop/app/CMakeLists.txt index 403f1e518d8..83444593191 100644 --- a/src/android/test/interop/app/CMakeLists.txt +++ b/src/android/test/interop/app/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.16) set(PROTOBUF_PROTOC_EXECUTABLE "/usr/local/bin/protoc" CACHE STRING "Protoc binary on host") set(gRPC_CPP_PLUGIN_EXECUTABLE "/usr/local/bin/grpc_cpp_plugin" CACHE STRING "gRPC CPP plugin binary on host") diff --git a/src/cpp/README.md b/src/cpp/README.md index 780528b9c5e..84c19b79187 100755 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -107,7 +107,7 @@ also sets up an `add_subdirectory()` rule for you. This causes gRPC to be built as part of your project. ```cmake -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.16) project(my_project) include(FetchContent) diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index a3e7503f373..f5b7480d639 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -275,7 +275,7 @@ protobuf_gen_files.add(src) %> - cmake_minimum_required(VERSION 3.13) + cmake_minimum_required(VERSION 3.16) set(PACKAGE_NAME "grpc") set(PACKAGE_VERSION "${settings.cpp_version}") From daa793860c4a601533d538582c97da878b7d5824 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 30 Sep 2024 12:48:13 -0700 Subject: [PATCH 18/74] [Build] Minimum version of MSVC is now 2022 (#37687) Per https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md, we can require msvc 2022 or later. Closes #37687 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37687 from veblush:msvc2022 32e35ec5b57697b2ab7341952df672eb37557038 PiperOrigin-RevId: 680682655 --- BUILDING.md | 6 +++--- src/cpp/README.md | 2 +- test/distrib/cpp/run_distrib_test_cmake.bat | 2 +- .../run_distrib_test_cmake_as_externalproject.bat | 2 +- test/distrib/cpp/run_distrib_test_cmake_for_dll.bat | 2 +- tools/run_tests/run_tests.py | 12 +----------- tools/run_tests/run_tests_matrix.py | 2 +- 7 files changed, 9 insertions(+), 19 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index a293335b50e..8af2ba8478b 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -55,7 +55,7 @@ installed by `brew` is being used: ## Windows To prepare for cmake + Microsoft Visual C++ compiler build -- Install Visual Studio 2019 or later (Visual C++ compiler will be used). +- Install Visual Studio 2022 or later (Visual C++ compiler will be used). - Install [Git](https://git-scm.com/). - Install [CMake](https://cmake.org/download/). - Install [nasm](https://www.nasm.us/) and add it to `PATH` (`choco install nasm`) - *required by boringssl* @@ -132,7 +132,7 @@ $ make If you want to build shared libraries (`.so` files), run `cmake` with `-DBUILD_SHARED_LIBS=ON`. -### Windows, Using Visual Studio 2019 or later +### Windows, Using Visual Studio 2022 or later When using the "Visual Studio" generator, cmake will generate a solution (`grpc.sln`) that contains a VS project for @@ -143,7 +143,7 @@ you will be able to browse and build the code. > @rem Run from grpc directory after cloning the repo with --recursive or updating submodules. > md .build > cd .build -> cmake .. -G "Visual Studio 16 2019" +> cmake .. -G "Visual Studio 17 2022" > cmake --build . --config Release ``` diff --git a/src/cpp/README.md b/src/cpp/README.md index 84c19b79187..a999068fb75 100755 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -31,7 +31,7 @@ Therefore, gRPC supports several major build systems, which should satisfy most | Operating System | Architectures | Versions | Support Level | |------------------|---------------|----------|---------------| | Linux - Debian, Ubuntu, CentOS | x86, x64 | clang 7+, GCC 7.3+ | Officially Supported | -| Windows 10+ | x86, x64 | Visual Studio 2019+ | Officially Supported | +| Windows 10+ | x86, x64 | Visual Studio 2022+ | Officially Supported | | MacOS | x64, ARM64 | XCode 12+ | Officially Supported | | Linux - Others | x86, x64 | clang 7+, GCC 7.3+ | Best Effort | | Linux | ARM64 | | Best Effort | diff --git a/test/distrib/cpp/run_distrib_test_cmake.bat b/test/distrib/cpp/run_distrib_test_cmake.bat index 7a485e4da51..ec8828e1fd7 100644 --- a/test/distrib/cpp/run_distrib_test_cmake.bat +++ b/test/distrib/cpp/run_distrib_test_cmake.bat @@ -31,7 +31,7 @@ set OPENSSL_DIR=%cd:\=/%/OpenSSL-Win32 @rem TODO(jtattermusch): add support for GRPC_CPP_DISTRIBTEST_BUILD_COMPILER_JOBS env variable -set VS_GENERATOR="Visual Studio 16 2019" +set VS_GENERATOR="Visual Studio 17 2022" @rem TODO(jtattermusch): switch to x64 build (will require pulling a x64 build of openssl) set VS_ARCHITECTURE="Win32" diff --git a/test/distrib/cpp/run_distrib_test_cmake_as_externalproject.bat b/test/distrib/cpp/run_distrib_test_cmake_as_externalproject.bat index a55fca355a3..cdc987da2c0 100644 --- a/test/distrib/cpp/run_distrib_test_cmake_as_externalproject.bat +++ b/test/distrib/cpp/run_distrib_test_cmake_as_externalproject.bat @@ -28,7 +28,7 @@ set OPENSSL_DIR=%cd:\=/%/OpenSSL-Win32 @rem TODO(jtattermusch): add support for GRPC_CPP_DISTRIBTEST_BUILD_COMPILER_JOBS env variable -set VS_GENERATOR="Visual Studio 16 2019" +set VS_GENERATOR="Visual Studio 17 2022" @rem TODO(jtattermusch): switch to x64 build (will require pulling a x64 build of openssl) set VS_ARCHITECTURE="Win32" diff --git a/test/distrib/cpp/run_distrib_test_cmake_for_dll.bat b/test/distrib/cpp/run_distrib_test_cmake_for_dll.bat index 887c20dcd74..e4676c018a8 100644 --- a/test/distrib/cpp/run_distrib_test_cmake_for_dll.bat +++ b/test/distrib/cpp/run_distrib_test_cmake_for_dll.bat @@ -31,7 +31,7 @@ set OPENSSL_DIR=%cd:\=/%/OpenSSL-Win32 @rem TODO(jtattermusch): add support for GRPC_CPP_DISTRIBTEST_BUILD_COMPILER_JOBS env variable -set VS_GENERATOR="Visual Studio 16 2019" +set VS_GENERATOR="Visual Studio 17 2022" @rem TODO(jtattermusch): switch to x64 build (will require pulling a x64 build of openssl) set VS_ARCHITECTURE="Win32" diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 90073bb8e2c..c4d7ddcb892 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -283,9 +283,7 @@ class CLanguage(object): [ "default", "cmake", - "cmake_ninja_vs2019", "cmake_ninja_vs2022", - "cmake_vs2019", "cmake_vs2022", ], ) @@ -293,19 +291,13 @@ class CLanguage(object): activate_vs_tools = "" if ( - self.args.compiler == "cmake_ninja_vs2019" + self.args.compiler == "cmake_ninja_vs2022" or self.args.compiler == "cmake" or self.args.compiler == "default" ): # cmake + ninja build is the default because it is faster and supports boringssl assembly optimizations - # the compiler used is exactly the same as for cmake_vs2017 - cmake_generator = "Ninja" - activate_vs_tools = "2019" - elif self.args.compiler == "cmake_ninja_vs2022": cmake_generator = "Ninja" activate_vs_tools = "2022" - elif self.args.compiler == "cmake_vs2019": - cmake_generator = "Visual Studio 16 2019" elif self.args.compiler == "cmake_vs2022": cmake_generator = "Visual Studio 17 2022" else: @@ -1698,9 +1690,7 @@ argp.add_argument( "all_the_cpythons", "coreclr", "cmake", - "cmake_ninja_vs2019", "cmake_ninja_vs2022", - "cmake_vs2019", "cmake_vs2022", "mono", ], diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py index 4058cc5261d..3b9f2238248 100755 --- a/tools/run_tests/run_tests_matrix.py +++ b/tools/run_tests/run_tests_matrix.py @@ -383,7 +383,7 @@ def _create_portability_test_jobs( configs=["dbg"], platforms=["windows"], arch="default", - compiler="cmake_ninja_vs2019", + compiler="cmake_ninja_vs2022", labels=["portability", "corelang"], extra_args=extra_args, inner_jobs=inner_jobs, From 80b57c909b7bd4f7b459e62e441ebed027d68a6d Mon Sep 17 00:00:00 2001 From: Yijie Ma Date: Mon, 30 Sep 2024 15:09:05 -0700 Subject: [PATCH 19/74] [call_creds_util] Add debug checks for metadata accesses (#37822) Fix https://github.com/grpc/grpc/issues/37701 Closes #37822 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37822 from yijiem:debug-check-metadata 67df0da89c6a9be19a6ac3feb9dece436cfe9453 PiperOrigin-RevId: 680734161 --- src/core/lib/security/credentials/call_creds_util.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/lib/security/credentials/call_creds_util.cc b/src/core/lib/security/credentials/call_creds_util.cc index 71c3da6dfa3..3acc0708f62 100644 --- a/src/core/lib/security/credentials/call_creds_util.cc +++ b/src/core/lib/security/credentials/call_creds_util.cc @@ -18,6 +18,7 @@ #include +#include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" @@ -42,6 +43,7 @@ struct ServiceUrlAndMethod { ServiceUrlAndMethod MakeServiceUrlAndMethod( const ClientMetadataHandle& initial_metadata, const grpc_call_credentials::GetRequestMetadataArgs* args) { + DCHECK(initial_metadata->get_pointer(HttpPathMetadata()) != nullptr); auto service = initial_metadata->get_pointer(HttpPathMetadata())->as_string_view(); auto last_slash = service.find_last_of('/'); @@ -56,6 +58,7 @@ ServiceUrlAndMethod MakeServiceUrlAndMethod( method_name = service.substr(last_slash + 1); service = service.substr(0, last_slash); } + DCHECK(initial_metadata->get_pointer(HttpAuthorityMetadata()) != nullptr); auto host_and_port = initial_metadata->get_pointer(HttpAuthorityMetadata())->as_string_view(); absl::string_view url_scheme = args->security_connector->url_scheme(); From 229de2530b9f0b5dee660942cef2333e20cd747d Mon Sep 17 00:00:00 2001 From: Tanvi Jagtap <139093547+tanvi-jagtap@users.noreply.github.com> Date: Mon, 30 Sep 2024 22:31:47 -0700 Subject: [PATCH 20/74] [PH2][Refactor] Creating call_tracer_wrapper.h . (#37786) [PH2][Refactor] Creating call_tracer_wrapper.h and cc and moving code as-is into it. The content of the functions or classes has not changed. In the next few iterations, more code will come into this file. Closes #37786 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37786 from tanvi-jagtap:ph2_internal_h_split_01 31af14a4e76eb67fadab37d5e5522b4637b5b511 PiperOrigin-RevId: 680861154 --- BUILD | 2 + CMakeLists.txt | 2 + Makefile | 1 + Package.swift | 2 + build_autogenerated.yaml | 4 ++ config.m4 | 1 + config.w32 | 1 + gRPC-C++.podspec | 2 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + .../chttp2/transport/call_tracer_wrapper.cc | 53 ++++++++++++++ .../chttp2/transport/call_tracer_wrapper.h | 72 +++++++++++++++++++ .../chttp2/transport/chttp2_transport.cc | 29 +------- .../transport/chttp2/transport/frame_data.cc | 1 + .../chttp2/transport/frame_rst_stream.cc | 1 + .../chttp2/transport/frame_window_update.cc | 1 + .../ext/transport/chttp2/transport/internal.h | 46 +----------- .../ext/transport/chttp2/transport/parsing.cc | 1 + .../ext/transport/chttp2/transport/writing.cc | 1 + src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.c++.internal | 2 + tools/doxygen/Doxyfile.core.internal | 2 + 23 files changed, 159 insertions(+), 73 deletions(-) create mode 100644 src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc create mode 100644 src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h diff --git a/BUILD b/BUILD index 0a0a13ee091..51633565bb3 100644 --- a/BUILD +++ b/BUILD @@ -4763,6 +4763,7 @@ grpc_cc_library( name = "grpc_transport_chttp2", srcs = [ "//src/core:ext/transport/chttp2/transport/bin_decoder.cc", + "//src/core:ext/transport/chttp2/transport/call_tracer_wrapper.cc", "//src/core:ext/transport/chttp2/transport/chttp2_transport.cc", "//src/core:ext/transport/chttp2/transport/frame_data.cc", "//src/core:ext/transport/chttp2/transport/frame_goaway.cc", @@ -4776,6 +4777,7 @@ grpc_cc_library( ], hdrs = [ "//src/core:ext/transport/chttp2/transport/bin_decoder.h", + "//src/core:ext/transport/chttp2/transport/call_tracer_wrapper.h", "//src/core:ext/transport/chttp2/transport/chttp2_transport.h", "//src/core:ext/transport/chttp2/transport/frame_data.h", "//src/core:ext/transport/chttp2/transport/frame_goaway.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 85b51d334d2..99147ab3f31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1907,6 +1907,7 @@ add_library(grpc src/core/ext/transport/chttp2/server/chttp2_server.cc src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc + src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc src/core/ext/transport/chttp2/transport/chttp2_transport.cc src/core/ext/transport/chttp2/transport/decode_huff.cc src/core/ext/transport/chttp2/transport/flow_control.cc @@ -3015,6 +3016,7 @@ add_library(grpc_unsecure src/core/ext/transport/chttp2/server/chttp2_server.cc src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc + src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc src/core/ext/transport/chttp2/transport/chttp2_transport.cc src/core/ext/transport/chttp2/transport/decode_huff.cc src/core/ext/transport/chttp2/transport/flow_control.cc diff --git a/Makefile b/Makefile index 028c9f90090..b33a29370b9 100644 --- a/Makefile +++ b/Makefile @@ -711,6 +711,7 @@ LIBGRPC_SRC = \ src/core/ext/transport/chttp2/server/chttp2_server.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ + src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc \ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \ src/core/ext/transport/chttp2/transport/decode_huff.cc \ src/core/ext/transport/chttp2/transport/flow_control.cc \ diff --git a/Package.swift b/Package.swift index c21dedc5f8b..f1e60c511ca 100644 --- a/Package.swift +++ b/Package.swift @@ -210,6 +210,8 @@ let package = Package( "src/core/ext/transport/chttp2/transport/bin_decoder.h", "src/core/ext/transport/chttp2/transport/bin_encoder.cc", "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc", + "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.cc", "src/core/ext/transport/chttp2/transport/chttp2_transport.h", "src/core/ext/transport/chttp2/transport/context_list_entry.h", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index b45eb26192f..1dd0e4f335f 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -267,6 +267,7 @@ libs: - src/core/ext/transport/chttp2/server/chttp2_server.h - src/core/ext/transport/chttp2/transport/bin_decoder.h - src/core/ext/transport/chttp2/transport/bin_encoder.h + - src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h - src/core/ext/transport/chttp2/transport/chttp2_transport.h - src/core/ext/transport/chttp2/transport/context_list_entry.h - src/core/ext/transport/chttp2/transport/decode_huff.h @@ -1317,6 +1318,7 @@ libs: - src/core/ext/transport/chttp2/server/chttp2_server.cc - src/core/ext/transport/chttp2/transport/bin_decoder.cc - src/core/ext/transport/chttp2/transport/bin_encoder.cc + - src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc - src/core/ext/transport/chttp2/transport/chttp2_transport.cc - src/core/ext/transport/chttp2/transport/decode_huff.cc - src/core/ext/transport/chttp2/transport/flow_control.cc @@ -2294,6 +2296,7 @@ libs: - src/core/ext/transport/chttp2/server/chttp2_server.h - src/core/ext/transport/chttp2/transport/bin_decoder.h - src/core/ext/transport/chttp2/transport/bin_encoder.h + - src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h - src/core/ext/transport/chttp2/transport/chttp2_transport.h - src/core/ext/transport/chttp2/transport/context_list_entry.h - src/core/ext/transport/chttp2/transport/decode_huff.h @@ -2776,6 +2779,7 @@ libs: - src/core/ext/transport/chttp2/server/chttp2_server.cc - src/core/ext/transport/chttp2/transport/bin_decoder.cc - src/core/ext/transport/chttp2/transport/bin_encoder.cc + - src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc - src/core/ext/transport/chttp2/transport/chttp2_transport.cc - src/core/ext/transport/chttp2/transport/decode_huff.cc - src/core/ext/transport/chttp2/transport/flow_control.cc diff --git a/config.m4 b/config.m4 index 9bc1a068f3f..cd9212d3572 100644 --- a/config.m4 +++ b/config.m4 @@ -86,6 +86,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/transport/chttp2/server/chttp2_server.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ + src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc \ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \ src/core/ext/transport/chttp2/transport/decode_huff.cc \ src/core/ext/transport/chttp2/transport/flow_control.cc \ diff --git a/config.w32 b/config.w32 index f1f0df73b81..b590018a1bd 100644 --- a/config.w32 +++ b/config.w32 @@ -51,6 +51,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\transport\\chttp2\\server\\chttp2_server.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\bin_decoder.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\bin_encoder.cc " + + "src\\core\\ext\\transport\\chttp2\\transport\\call_tracer_wrapper.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\chttp2_transport.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\decode_huff.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\flow_control.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index abca293e113..aeb929b9ad6 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -356,6 +356,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/server/chttp2_server.h', 'src/core/ext/transport/chttp2/transport/bin_decoder.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', 'src/core/ext/transport/chttp2/transport/context_list_entry.h', 'src/core/ext/transport/chttp2/transport/decode_huff.h', @@ -1660,6 +1661,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/server/chttp2_server.h', 'src/core/ext/transport/chttp2/transport/bin_decoder.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', 'src/core/ext/transport/chttp2/transport/context_list_entry.h', 'src/core/ext/transport/chttp2/transport/decode_huff.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 48543720dee..26ed8c8dfab 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -330,6 +330,8 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/bin_decoder.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc', + 'src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', 'src/core/ext/transport/chttp2/transport/context_list_entry.h', @@ -2448,6 +2450,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/server/chttp2_server.h', 'src/core/ext/transport/chttp2/transport/bin_decoder.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', 'src/core/ext/transport/chttp2/transport/context_list_entry.h', 'src/core/ext/transport/chttp2/transport/decode_huff.h', diff --git a/grpc.gemspec b/grpc.gemspec index 7c4645fc5d2..349abdf9586 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -216,6 +216,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.h ) s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc ) + s.files += %w( src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h ) s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.h ) s.files += %w( src/core/ext/transport/chttp2/transport/context_list_entry.h ) diff --git a/package.xml b/package.xml index 69833761539..3add46c2e40 100644 --- a/package.xml +++ b/package.xml @@ -198,6 +198,8 @@ + + diff --git a/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc b/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc new file mode 100644 index 00000000000..476f7844cd1 --- /dev/null +++ b/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc @@ -0,0 +1,53 @@ +// +// +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// + +#include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" + +#include "src/core/ext/transport/chttp2/transport/internal.h" + +namespace grpc_core { + +void Chttp2CallTracerWrapper::RecordIncomingBytes( + const CallTracerInterface::TransportByteSize& transport_byte_size) { + // Update legacy API. + stream_->stats.incoming.framing_bytes += transport_byte_size.framing_bytes; + stream_->stats.incoming.data_bytes += transport_byte_size.data_bytes; + stream_->stats.incoming.header_bytes += transport_byte_size.header_bytes; + // Update new API. + if (!IsCallTracerInTransportEnabled()) return; + auto* call_tracer = stream_->arena->GetContext(); + if (call_tracer != nullptr) { + call_tracer->RecordIncomingBytes(transport_byte_size); + } +} + +void Chttp2CallTracerWrapper::RecordOutgoingBytes( + const CallTracerInterface::TransportByteSize& transport_byte_size) { + // Update legacy API. + stream_->stats.outgoing.framing_bytes += transport_byte_size.framing_bytes; + stream_->stats.outgoing.data_bytes += transport_byte_size.data_bytes; + stream_->stats.outgoing.header_bytes += + transport_byte_size.header_bytes; // Update new API. + if (!IsCallTracerInTransportEnabled()) return; + auto* call_tracer = stream_->arena->GetContext(); + if (call_tracer != nullptr) { + call_tracer->RecordOutgoingBytes(transport_byte_size); + } +} + +} // namespace grpc_core \ No newline at end of file diff --git a/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h b/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h new file mode 100644 index 00000000000..cf535afc6cd --- /dev/null +++ b/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h @@ -0,0 +1,72 @@ +// +// +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// + +#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CALL_TRACER_WRAPPER_H +#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CALL_TRACER_WRAPPER_H + +#include "src/core/lib/transport/transport.h" +#include "src/core/telemetry/call_tracer.h" + +struct grpc_chttp2_stream; + +namespace grpc_core { + +// A CallTracer wrapper that updates both the legacy and new APIs for +// transport byte sizes. +// TODO(ctiller): This can go away as part of removing the +// grpc_transport_stream_stats struct. +class Chttp2CallTracerWrapper final : public CallTracerInterface { + public: + explicit Chttp2CallTracerWrapper(grpc_chttp2_stream* stream) + : stream_(stream) {} + + void RecordIncomingBytes( + const TransportByteSize& transport_byte_size) override; + void RecordOutgoingBytes( + const TransportByteSize& transport_byte_size) override; + + // Everything else is a no-op. + void RecordSendInitialMetadata( + grpc_metadata_batch* /*send_initial_metadata*/) override {} + void RecordSendTrailingMetadata( + grpc_metadata_batch* /*send_trailing_metadata*/) override {} + void RecordSendMessage(const SliceBuffer& /*send_message*/) override {} + void RecordSendCompressedMessage( + const SliceBuffer& /*send_compressed_message*/) override {} + void RecordReceivedInitialMetadata( + grpc_metadata_batch* /*recv_initial_metadata*/) override {} + void RecordReceivedMessage(const SliceBuffer& /*recv_message*/) override {} + void RecordReceivedDecompressedMessage( + const SliceBuffer& /*recv_decompressed_message*/) override {} + void RecordCancel(grpc_error_handle /*cancel_error*/) override {} + std::shared_ptr StartNewTcpTrace() override { + return nullptr; + } + void RecordAnnotation(absl::string_view /*annotation*/) override {} + void RecordAnnotation(const Annotation& /*annotation*/) override {} + std::string TraceId() override { return ""; } + std::string SpanId() override { return ""; } + bool IsSampled() override { return false; } + + private: + grpc_chttp2_stream* stream_; +}; + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CALL_TRACER_WRAPPER_H diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 97cfe956ba9..e4b0b1fdf25 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -56,6 +56,7 @@ #include #include +#include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/context_list_entry.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/frame_data.h" @@ -361,34 +362,6 @@ std::string HttpAnnotation::ToString() const { return s; } -void Chttp2CallTracerWrapper::RecordIncomingBytes( - const CallTracerInterface::TransportByteSize& transport_byte_size) { - // Update legacy API. - stream_->stats.incoming.framing_bytes += transport_byte_size.framing_bytes; - stream_->stats.incoming.data_bytes += transport_byte_size.data_bytes; - stream_->stats.incoming.header_bytes += transport_byte_size.header_bytes; - // Update new API. - if (!IsCallTracerInTransportEnabled()) return; - auto* call_tracer = stream_->arena->GetContext(); - if (call_tracer != nullptr) { - call_tracer->RecordIncomingBytes(transport_byte_size); - } -} - -void Chttp2CallTracerWrapper::RecordOutgoingBytes( - const CallTracerInterface::TransportByteSize& transport_byte_size) { - // Update legacy API. - stream_->stats.outgoing.framing_bytes += transport_byte_size.framing_bytes; - stream_->stats.outgoing.data_bytes += transport_byte_size.data_bytes; - stream_->stats.outgoing.header_bytes += - transport_byte_size.header_bytes; // Update new API. - if (!IsCallTracerInTransportEnabled()) return; - auto* call_tracer = stream_->arena->GetContext(); - if (call_tracer != nullptr) { - call_tracer->RecordOutgoingBytes(transport_byte_size); - } -} - } // namespace grpc_core // diff --git a/src/core/ext/transport/chttp2/transport/frame_data.cc b/src/core/ext/transport/chttp2/transport/frame_data.cc index b20f1630add..b5bd13d2fc0 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.cc +++ b/src/core/ext/transport/chttp2/transport/frame_data.cc @@ -27,6 +27,7 @@ #include #include +#include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/slice/slice.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc index 14d91329eae..0e38b36c05c 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc @@ -30,6 +30,7 @@ #include #include +#include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/ext/transport/chttp2/transport/ping_callbacks.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.cc b/src/core/ext/transport/chttp2/transport/frame_window_update.cc index 20cddebd5ca..5209ab2899a 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.cc +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.cc @@ -27,6 +27,7 @@ #include +#include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/stream_lists.h" diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index bdbbd6890c7..76deea4f043 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -41,6 +41,7 @@ #include #include "src/core/channelz/channelz.h" +#include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/context_list_entry.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" @@ -553,51 +554,6 @@ typedef enum { GRPC_METADATA_PUBLISHED_AT_CLOSE } grpc_published_metadata_method; -namespace grpc_core { - -// A CallTracer wrapper that updates both the legacy and new APIs for -// transport byte sizes. -// TODO(ctiller): This can go away as part of removing the -// grpc_transport_stream_stats struct. -class Chttp2CallTracerWrapper final : public CallTracerInterface { - public: - explicit Chttp2CallTracerWrapper(grpc_chttp2_stream* stream) - : stream_(stream) {} - - void RecordIncomingBytes( - const TransportByteSize& transport_byte_size) override; - void RecordOutgoingBytes( - const TransportByteSize& transport_byte_size) override; - - // Everything else is a no-op. - void RecordSendInitialMetadata( - grpc_metadata_batch* /*send_initial_metadata*/) override {} - void RecordSendTrailingMetadata( - grpc_metadata_batch* /*send_trailing_metadata*/) override {} - void RecordSendMessage(const SliceBuffer& /*send_message*/) override {} - void RecordSendCompressedMessage( - const SliceBuffer& /*send_compressed_message*/) override {} - void RecordReceivedInitialMetadata( - grpc_metadata_batch* /*recv_initial_metadata*/) override {} - void RecordReceivedMessage(const SliceBuffer& /*recv_message*/) override {} - void RecordReceivedDecompressedMessage( - const SliceBuffer& /*recv_decompressed_message*/) override {} - void RecordCancel(grpc_error_handle /*cancel_error*/) override {} - std::shared_ptr StartNewTcpTrace() override { - return nullptr; - } - void RecordAnnotation(absl::string_view /*annotation*/) override {} - void RecordAnnotation(const Annotation& /*annotation*/) override {} - std::string TraceId() override { return ""; } - std::string SpanId() override { return ""; } - bool IsSampled() override { return false; } - - private: - grpc_chttp2_stream* stream_; -}; - -} // namespace grpc_core - struct grpc_chttp2_stream { grpc_chttp2_stream(grpc_chttp2_transport* t, grpc_stream_refcount* refcount, const void* server_data, grpc_core::Arena* arena); diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc index cd102ff85df..e9d746d8e24 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.cc +++ b/src/core/ext/transport/chttp2/transport/parsing.cc @@ -43,6 +43,7 @@ #include #include "src/core/channelz/channelz.h" +#include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/frame_data.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc index d5678956f51..583d9eaa03d 100644 --- a/src/core/ext/transport/chttp2/transport/writing.cc +++ b/src/core/ext/transport/chttp2/transport/writing.cc @@ -37,6 +37,7 @@ #include #include "src/core/channelz/channelz.h" +#include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/context_list_entry.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index fde998c3af6..e1bbd06531f 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -60,6 +60,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/transport/chttp2/server/chttp2_server.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', + 'src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc', 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc', 'src/core/ext/transport/chttp2/transport/decode_huff.cc', 'src/core/ext/transport/chttp2/transport/flow_control.cc', diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index efef382f359..4147fafc791 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1221,6 +1221,8 @@ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.h \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.h \ +src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc \ +src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h \ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \ src/core/ext/transport/chttp2/transport/chttp2_transport.h \ src/core/ext/transport/chttp2/transport/context_list_entry.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 0471de0c886..cf962517d9e 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -988,6 +988,8 @@ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.h \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.h \ +src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc \ +src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h \ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \ src/core/ext/transport/chttp2/transport/chttp2_transport.h \ src/core/ext/transport/chttp2/transport/context_list_entry.h \ From c938a7b564eebbd9f8eef8718e2d70e0bd35f093 Mon Sep 17 00:00:00 2001 From: Arjan Singh Bal <46515553+arjan-bal@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:35:25 -0700 Subject: [PATCH 21/74] [interop] Remove python dependencies from Go dockerfile and add v1.67.0 release (#37792) ## Why Thanks to @ejona86 for finding this. The python dependencies were wrongly added in https://github.com/grpc/grpc/commit/0589e533cd65a2ca9e0e610cc1b284d016986572. And from then on people were just maintaining what was there. Java had it then too. Java removed the extra dockerfile steps at https://github.com/grpc/grpc/commit/977e4b1450d9910ccc51f2f8de51e2e00349c969 ## Testing Passing master branch test: https://source.cloud.google.com/results/invocations/79fc6c6f-c3d9-4692-870d-4d7002f4778a Passing ad-hoc interop matrix build: https://source.cloud.google.com/results/invocations/683d7487-2637-4a69-b65e-95dc82740679 Closes #37792 PiperOrigin-RevId: 681054405 --- .../dockerfile/gcp_api_libraries_venv.include | 7 ---- .../grpc_interop_go/Dockerfile.template | 1 - .../grpc_interop_go1.x/Dockerfile.template | 1 - .../run_tests_python_deps_venv.include | 31 ---------------- .../dockerimage_current_versions.bzl | 4 +-- .../grpc_interop_go.current_version | 2 +- .../interoptest/grpc_interop_go/Dockerfile | 36 ------------------- .../grpc_interop_go1.x.current_version | 2 +- .../interoptest/grpc_interop_go1.x/Dockerfile | 36 ------------------- tools/interop_matrix/client_matrix.py | 1 + 10 files changed, 5 insertions(+), 116 deletions(-) delete mode 100644 templates/tools/dockerfile/gcp_api_libraries_venv.include delete mode 100644 templates/tools/dockerfile/run_tests_python_deps_venv.include diff --git a/templates/tools/dockerfile/gcp_api_libraries_venv.include b/templates/tools/dockerfile/gcp_api_libraries_venv.include deleted file mode 100644 index 3cd4b48c44a..00000000000 --- a/templates/tools/dockerfile/gcp_api_libraries_venv.include +++ /dev/null @@ -1,7 +0,0 @@ -# Install Google Cloud Platform API libraries -# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts) -# This template is similar to gcp_api_libraries.include but installs the -# dependencies in a python virtual environment. This is required from pip 23.0 -# onwards as installation of system-wide packages is blocked by default. -RUN /bin/bash -c "source $PYTHON_ENV/bin/activate && \ - python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0" diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template index bf6d317fe7c..fa1c1005f77 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template @@ -21,7 +21,6 @@ FROM golang:latest <%include file="../../go_path.include"/> - <%include file="../../run_tests_python_deps_venv.include"/> # Define the default command. CMD ["bash"] diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_go1.x/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_go1.x/Dockerfile.template index 3137796840f..46a6de48e60 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_go1.x/Dockerfile.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_go1.x/Dockerfile.template @@ -17,7 +17,6 @@ FROM golang:latest <%include file="../../go_path.include"/> - <%include file="../../run_tests_python_deps_venv.include"/> # Define the default command. CMD ["bash"] diff --git a/templates/tools/dockerfile/run_tests_python_deps_venv.include b/templates/tools/dockerfile/run_tests_python_deps_venv.include deleted file mode 100644 index 864c26bf526..00000000000 --- a/templates/tools/dockerfile/run_tests_python_deps_venv.include +++ /dev/null @@ -1,31 +0,0 @@ -#==================== -# run_tests.py python dependencies - -# Basic python dependencies to be able to run tools/run_tests python scripts -# These dependencies are not sufficient to build gRPC Python, gRPC Python -# deps are defined elsewhere (e.g. python_deps.include) -# This template is similar to run_tests_python_deps.include but installs the -# dependencies in a python virtual environment. This is required from pip 23.0 -# onwards as installation of system-wide packages is blocked by default. -RUN apt-get update && apt-get install -y ${'\\'} - python3 ${'\\'} - python3-pip ${'\\'} - python3-setuptools ${'\\'} - python3-yaml ${'\\'} - python3-venv ${'\\'} - && apt-get clean - -# Create a python virtual env for installing required dependencies. -ENV PYTHON_ENV="/opt/venv/grpc-interop" -RUN python3 -m venv "$PYTHON_ENV" -RUN echo "source $PYTHON_ENV/bin/activate" >> ~/.bashrc - -# Use bash explicitly as /bin/sh doesn't support the "source" command. -# use pinned version of pip to avoid sudden breakages -# TODO(#36814): currently six is needed for tools/run_tests scripts -# but since our python2 usage is deprecated, we should get rid of it. -RUN /bin/bash -c "source $PYTHON_ENV/bin/activate && \ - python3 -m pip install --upgrade pip==19.3.1 && \ - python3 -m pip install six==1.16.0" - -<%include file="./gcp_api_libraries_venv.include"/> diff --git a/tools/bazelify_tests/dockerimage_current_versions.bzl b/tools/bazelify_tests/dockerimage_current_versions.bzl index 973a649dfe5..541d9a7b9dc 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -72,12 +72,12 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/interoptest/grpc_interop_aspnetcore.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_aspnetcore@sha256:8e2e732e78724a8382c340dca72e7653c5f82c251a3110fa2874cc00ba538878", "tools/dockerfile/interoptest/grpc_interop_cxx.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_cxx@sha256:e5a474d33773d52ec6a8abbe2d61ee0c2a9c2b5f48793a5ea3b82c4445becf3f", "tools/dockerfile/interoptest/grpc_interop_dart.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_dart@sha256:4915a280788126dad029858eb384dbbef2dc18cadccb434df6450dfd7a4929f2", - "tools/dockerfile/interoptest/grpc_interop_go.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go@sha256:c925667feb3e065abf586a9e8b028f64b4673cb94bfb4b5e389c652ce906f5dc", + "tools/dockerfile/interoptest/grpc_interop_go.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go@sha256:7affc40dd8c229a12aff76c44b173ce786fced97e563777640b5d696f1d8cd89", "tools/dockerfile/interoptest/grpc_interop_go1.11.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.11@sha256:f2fe3a0a581c687ee4217bf58fd42b18bb1f63d3d006f1b67379ff553b0e23c6", "tools/dockerfile/interoptest/grpc_interop_go1.16.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.16@sha256:3767f47c9d06584c6c07b7ab536e13f3e87550330e6c2652ad288d3a72b0de23", "tools/dockerfile/interoptest/grpc_interop_go1.19.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.19@sha256:889e7ff34399a5e16af87940d1eaa239e56da307f7faca3f8f1d28379c2e3df3", "tools/dockerfile/interoptest/grpc_interop_go1.8.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.8@sha256:7830a301b37539252c592b9cd7fa30a6142d0afc717a05fc8d2b82c74fb45efe", - "tools/dockerfile/interoptest/grpc_interop_go1.x.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.x@sha256:9d02b61552a93770ebb022f588daf9acd1088d29197fe120e0b082ede73f4584", + "tools/dockerfile/interoptest/grpc_interop_go1.x.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.x@sha256:7affc40dd8c229a12aff76c44b173ce786fced97e563777640b5d696f1d8cd89", "tools/dockerfile/interoptest/grpc_interop_http2.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_http2@sha256:e3f247d8038374848fadf7215b841e3575c0b2a4217feb503a79b8004b164c5a", "tools/dockerfile/interoptest/grpc_interop_java.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_java@sha256:6c0319bbbf77d6c198f61adf92d205efd33cbd2cccaf914a1af8f2dcb61b16a1", "tools/dockerfile/interoptest/grpc_interop_node.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_node@sha256:549a7683cc024fb7ffee807eaa8acb6c2d5a5dd0184a2590f91852804eea39a4", diff --git a/tools/dockerfile/interoptest/grpc_interop_go.current_version b/tools/dockerfile/interoptest/grpc_interop_go.current_version index 2aca19d40be..c703fa40ee4 100644 --- a/tools/dockerfile/interoptest/grpc_interop_go.current_version +++ b/tools/dockerfile/interoptest/grpc_interop_go.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go:969ce4614d1152a43f9083e7d08f1932c63a1616@sha256:c925667feb3e065abf586a9e8b028f64b4673cb94bfb4b5e389c652ce906f5dc \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go:e779403fffab573454461a7357acf9851c14b640@sha256:7affc40dd8c229a12aff76c44b173ce786fced97e563777640b5d696f1d8cd89 \ No newline at end of file diff --git a/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile index bf41ce181e0..2968da76eda 100644 --- a/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile @@ -21,41 +21,5 @@ FROM golang:latest # Using login shell removes Go from path, so we add it. RUN ln -s /usr/local/go/bin/go /usr/local/bin -#==================== -# run_tests.py python dependencies - -# Basic python dependencies to be able to run tools/run_tests python scripts -# These dependencies are not sufficient to build gRPC Python, gRPC Python -# deps are defined elsewhere (e.g. python_deps.include) -# This template is similar to run_tests_python_deps.include but installs the -# dependencies in a python virtual environment. This is required from pip 23.0 -# onwards as installation of system-wide packages is blocked by default. -RUN apt-get update && apt-get install -y \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-yaml \ - python3-venv \ - && apt-get clean - -# Create a python virtual env for installing required dependencies. -ENV PYTHON_ENV="/opt/venv/grpc-interop" -RUN python3 -m venv "$PYTHON_ENV" -RUN echo "source $PYTHON_ENV/bin/activate" >> ~/.bashrc - -# Use bash explicitly as /bin/sh doesn't support the "source" command. -# use pinned version of pip to avoid sudden breakages -# TODO(#36814): currently six is needed for tools/run_tests scripts -# but since our python2 usage is deprecated, we should get rid of it. -RUN /bin/bash -c "source $PYTHON_ENV/bin/activate && python3 -m pip install --upgrade pip==19.3.1 && python3 -m pip install six==1.16.0" - -# Install Google Cloud Platform API libraries -# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts) -# This template is similar to gcp_api_libraries.include but installs the -# dependencies in a python virtual environment. This is required from pip 23.0 -# onwards as installation of system-wide packages is blocked by default. -RUN /bin/bash -c "source $PYTHON_ENV/bin/activate && python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0" - - # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/interoptest/grpc_interop_go1.x.current_version b/tools/dockerfile/interoptest/grpc_interop_go1.x.current_version index 99a32701de6..d8b3e4cd6bc 100644 --- a/tools/dockerfile/interoptest/grpc_interop_go1.x.current_version +++ b/tools/dockerfile/interoptest/grpc_interop_go1.x.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.x:9a524415365a73162b7f463bf0409ca04f64a73c@sha256:9d02b61552a93770ebb022f588daf9acd1088d29197fe120e0b082ede73f4584 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.x:a50334d44bb6c5d23b08622328d97266b4bfacd8@sha256:7affc40dd8c229a12aff76c44b173ce786fced97e563777640b5d696f1d8cd89 \ No newline at end of file diff --git a/tools/dockerfile/interoptest/grpc_interop_go1.x/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_go1.x/Dockerfile index 8aa291f0173..439757fc1a5 100644 --- a/tools/dockerfile/interoptest/grpc_interop_go1.x/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_go1.x/Dockerfile @@ -17,41 +17,5 @@ FROM golang:latest # Using login shell removes Go from path, so we add it. RUN ln -s /usr/local/go/bin/go /usr/local/bin -#==================== -# run_tests.py python dependencies - -# Basic python dependencies to be able to run tools/run_tests python scripts -# These dependencies are not sufficient to build gRPC Python, gRPC Python -# deps are defined elsewhere (e.g. python_deps.include) -# This template is similar to run_tests_python_deps.include but installs the -# dependencies in a python virtual environment. This is required from pip 23.0 -# onwards as installation of system-wide packages is blocked by default. -RUN apt-get update && apt-get install -y \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-yaml \ - python3-venv \ - && apt-get clean - -# Create a python virtual env for installing required dependencies. -ENV PYTHON_ENV="/opt/venv/grpc-interop" -RUN python3 -m venv "$PYTHON_ENV" -RUN echo "source $PYTHON_ENV/bin/activate" >> ~/.bashrc - -# Use bash explicitly as /bin/sh doesn't support the "source" command. -# use pinned version of pip to avoid sudden breakages -# TODO(#36814): currently six is needed for tools/run_tests scripts -# but since our python2 usage is deprecated, we should get rid of it. -RUN /bin/bash -c "source $PYTHON_ENV/bin/activate && python3 -m pip install --upgrade pip==19.3.1 && python3 -m pip install six==1.16.0" - -# Install Google Cloud Platform API libraries -# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts) -# This template is similar to gcp_api_libraries.include but installs the -# dependencies in a python virtual environment. This is required from pip 23.0 -# onwards as installation of system-wide packages is blocked by default. -RUN /bin/bash -c "source $PYTHON_ENV/bin/activate && python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0" - - # Define the default command. CMD ["bash"] diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index bc4ea2d919e..1ec4c542fdc 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -306,6 +306,7 @@ LANG_RELEASE_MATRIX = { ("v1.64.1", ReleaseInfo()), ("v1.65.0", ReleaseInfo()), ("v1.66.2", ReleaseInfo()), + ("v1.67.0", ReleaseInfo()), ] ), "java": OrderedDict( From 74e640341d02e3e821232644fd26542e64c1e7cc Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 1 Oct 2024 13:42:53 -0700 Subject: [PATCH 22/74] [CSM O11y] Example logs (#37823) Closes #37823 PiperOrigin-RevId: 681149244 --- examples/cpp/csm/observability/BUILD | 2 ++ examples/cpp/csm/observability/Dockerfile.server | 2 ++ examples/cpp/csm/observability/csm_greeter_server.cc | 5 +++++ examples/cpp/otel/util.cc | 4 ++-- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/cpp/csm/observability/BUILD b/examples/cpp/csm/observability/BUILD index d6d8bb0eb33..e27bb9cfb5f 100644 --- a/examples/cpp/csm/observability/BUILD +++ b/examples/cpp/csm/observability/BUILD @@ -44,6 +44,8 @@ cc_binary( "@com_google_absl//absl/flags:flag", "@com_google_absl//absl/flags:parse", "@com_google_absl//absl/log", + "@com_google_absl//absl/log:globals", + "@com_google_absl//absl/log:initialize", "@io_opentelemetry_cpp//exporters/prometheus:prometheus_exporter", "@io_opentelemetry_cpp//sdk/src/metrics", ], diff --git a/examples/cpp/csm/observability/Dockerfile.server b/examples/cpp/csm/observability/Dockerfile.server index a6d82fdc793..1439072ec29 100644 --- a/examples/cpp/csm/observability/Dockerfile.server +++ b/examples/cpp/csm/observability/Dockerfile.server @@ -27,6 +27,8 @@ RUN cp -rL /workdir/bazel-bin/examples/cpp/csm/observability/csm_greeter_server FROM python:3.9-slim-bookworm +ENV GRPC_TRACE="xds_client,xds_resolver,xds_cluster_manager_lb,cds_lb,xds_cluster_resolver_lb,priority_lb,xds_cluster_impl_lb,weighted_target_lb,xds_server_config_fetcher,ring_hash_lb,outlier_detection_lb,xds_wrr_locality_lb,xds_override_host_lb" + RUN apt-get update \ && apt-get -y upgrade \ && apt-get -y autoremove \ diff --git a/examples/cpp/csm/observability/csm_greeter_server.cc b/examples/cpp/csm/observability/csm_greeter_server.cc index 12cdef49ca4..a3d7eccd978 100644 --- a/examples/cpp/csm/observability/csm_greeter_server.cc +++ b/examples/cpp/csm/observability/csm_greeter_server.cc @@ -22,6 +22,8 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" +#include "absl/log/globals.h" +#include "absl/log/initialize.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "examples/cpp/otel/util.h" @@ -42,6 +44,9 @@ ABSL_FLAG(std::string, prometheus_endpoint, "localhost:9464", int main(int argc, char** argv) { absl::ParseCommandLine(argc, argv); + absl::SetStderrThreshold(absl::LogSeverityAtLeast::kInfo); + absl::SetGlobalVLogLevel(2); + absl::InitializeLog(); opentelemetry::exporter::metrics::PrometheusExporterOptions opts; // default was "localhost:9464" which causes connection issue across GKE pods opts.url = "0.0.0.0:9464"; diff --git a/examples/cpp/otel/util.cc b/examples/cpp/otel/util.cc index cba83f736ad..f844a044a6e 100644 --- a/examples/cpp/otel/util.cc +++ b/examples/cpp/otel/util.cc @@ -169,10 +169,10 @@ void RunClient(const std::string& target_str) { // are created. This channel models a connection to an endpoint specified by // the argument "--target=" which is the only expected argument. grpc::ChannelArguments args; + GreeterClient greeter(grpc::CreateCustomChannel( + target_str, grpc::InsecureChannelCredentials(), args)); // Continuously send RPCs every second. while (true) { - GreeterClient greeter(grpc::CreateCustomChannel( - target_str, grpc::InsecureChannelCredentials(), args)); std::string user("world"); std::string reply = greeter.SayHello(user); std::cout << "Greeter received: " << reply << std::endl; From 9a12ec91e10c555cadc42893983a3e8ac30eb805 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 1 Oct 2024 13:44:59 -0700 Subject: [PATCH 23/74] [xds_client_test] change test to use FuzzingEventEngine (#37668) Closes #37668 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37668 from markdroth:xds_client_test_fuzzing_ee e1fe7f56c268ba8088a0ed931a533c22007248fc PiperOrigin-RevId: 681150007 --- CMakeLists.txt | 6 + build_autogenerated.yaml | 5 + .../fuzzing_event_engine.cc | 17 +- .../fuzzing_event_engine.h | 5 + test/core/xds/BUILD | 9 +- test/core/xds/xds_client_fuzzer.cc | 40 ++- test/core/xds/xds_client_fuzzer.proto | 2 + test/core/xds/xds_client_test.cc | 267 ++++++++++-------- test/core/xds/xds_transport_fake.cc | 79 +++--- test/core/xds/xds_transport_fake.h | 44 ++- 10 files changed, 269 insertions(+), 205 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 99147ab3f31..41e69b70ab7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34193,8 +34193,14 @@ add_executable(xds_client_test ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/percent.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/percent.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/percent.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.cc + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h src/cpp/client/global_callback_hook.cc src/cpp/util/status.cc + test/core/event_engine/event_engine_test_utils.cc + test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc test/core/xds/xds_client_test.cc test/core/xds/xds_transport_fake.cc ) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 1dd0e4f335f..3ae9dd5577c 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -21562,6 +21562,8 @@ targets: build: test language: c++ headers: + - test/core/event_engine/event_engine_test_utils.h + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h - test/core/test_util/scoped_env_var.h - test/core/xds/xds_client_test_peer.h - test/core/xds/xds_transport_fake.h @@ -21569,8 +21571,11 @@ targets: - src/proto/grpc/testing/xds/v3/base.proto - src/proto/grpc/testing/xds/v3/discovery.proto - src/proto/grpc/testing/xds/v3/percent.proto + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto - src/cpp/client/global_callback_hook.cc - src/cpp/util/status.cc + - test/core/event_engine/event_engine_test_utils.cc + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc - test/core/xds/xds_client_test.cc - test/core/xds/xds_transport_fake.cc deps: diff --git a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc index 0a85dafe2b4..1bc8a7a203e 100644 --- a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc +++ b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc @@ -194,16 +194,23 @@ void FuzzingEventEngine::TickUntilIdle() { << "TickUntilIdle: " << GRPC_DUMP_ARGS(tasks_by_id_.size(), outstanding_reads_.load(), outstanding_writes_.load()); - if (tasks_by_id_.empty() && - outstanding_writes_.load(std::memory_order_relaxed) == 0 && - outstanding_reads_.load(std::memory_order_relaxed) == 0) { - return; - } + if (IsIdleLocked()) return; } Tick(); } } +bool FuzzingEventEngine::IsIdle() { + grpc_core::MutexLock lock(&*mu_); + return IsIdleLocked(); +} + +bool FuzzingEventEngine::IsIdleLocked() { + return tasks_by_id_.empty() && + outstanding_writes_.load(std::memory_order_relaxed) == 0 && + outstanding_reads_.load(std::memory_order_relaxed) == 0; +} + void FuzzingEventEngine::TickUntil(Time t) { while (true) { auto now = Now(); diff --git a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h index 23193ce99c6..6ff76e32a23 100644 --- a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h +++ b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h @@ -72,6 +72,8 @@ class FuzzingEventEngine : public EventEngine { ABSL_LOCKS_EXCLUDED(mu_); // Repeatedly call Tick() until there is no more work to do. void TickUntilIdle() ABSL_LOCKS_EXCLUDED(mu_); + // Returns true if idle. + bool IsIdle() ABSL_LOCKS_EXCLUDED(mu_); // Tick until some time void TickUntil(Time t) ABSL_LOCKS_EXCLUDED(mu_); // Tick for some duration @@ -296,6 +298,9 @@ class FuzzingEventEngine : public EventEngine { int AllocatePort() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); // Is the given port in use by any listener? bool IsPortUsed(int port) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + bool IsIdleLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); + // For the next connection being built, query the list of fuzzer selected // write size limits. std::queue WriteSizesForConnection() diff --git a/test/core/xds/BUILD b/test/core/xds/BUILD index f152a44953f..03fe7802783 100644 --- a/test/core/xds/BUILD +++ b/test/core/xds/BUILD @@ -145,6 +145,7 @@ grpc_cc_library( "//:orphanable", "//:ref_counted_ptr", "//:xds_client", + "//test/core/event_engine/fuzzing_event_engine", "//test/core/test_util:grpc_test_util", ], ) @@ -166,7 +167,6 @@ grpc_cc_test( srcs = ["xds_client_test.cc"], external_deps = ["gtest"], language = "C++", - shard_count = 10, uses_event_engine = True, uses_polling = False, deps = [ @@ -174,6 +174,8 @@ grpc_cc_test( ":xds_transport_fake", "//:xds_client", "//src/proto/grpc/testing/xds/v3:discovery_proto", + "//test/core/event_engine:event_engine_test_utils", + "//test/core/event_engine/fuzzing_event_engine", "//test/core/test_util:grpc_test_util", "//test/core/test_util:scoped_env_var", ], @@ -188,9 +190,10 @@ grpc_proto_fuzzer( proto = "xds_client_fuzzer.proto", proto_deps = [ "//src/proto/grpc/testing/xds/v3:discovery_proto", + "//test/core/event_engine/fuzzing_event_engine:fuzzing_event_engine_proto", ], tags = ["no_windows"], - uses_event_engine = False, + uses_event_engine = True, uses_polling = False, deps = [ ":xds_client_test_peer", @@ -206,6 +209,8 @@ grpc_proto_fuzzer( "//src/proto/grpc/testing/xds/v3:endpoint_proto", "//src/proto/grpc/testing/xds/v3:http_connection_manager_proto", "//src/proto/grpc/testing/xds/v3:router_proto", + "//test/core/event_engine/fuzzing_event_engine", + "//test/core/event_engine:event_engine_test_utils", ], ) diff --git a/test/core/xds/xds_client_fuzzer.cc b/test/core/xds/xds_client_fuzzer.cc index ef660977c8d..158563429e8 100644 --- a/test/core/xds/xds_client_fuzzer.cc +++ b/test/core/xds/xds_client_fuzzer.cc @@ -30,7 +30,7 @@ #include -#include "src/core/lib/event_engine/default_event_engine.h" +#include "src/core/lib/iomgr/timer_manager.h" #include "src/core/util/orphanable.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" @@ -46,15 +46,24 @@ #include "src/core/xds/xds_client/xds_client.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "src/proto/grpc/testing/xds/v3/discovery.pb.h" +#include "test/core/event_engine/event_engine_test_utils.h" +#include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/xds/xds_client_fuzzer.pb.h" #include "test/core/xds/xds_client_test_peer.h" #include "test/core/xds/xds_transport_fake.h" +using grpc_event_engine::experimental::FuzzingEventEngine; + namespace grpc_core { class Fuzzer { public: - explicit Fuzzer(absl::string_view bootstrap_json) { + Fuzzer(absl::string_view bootstrap_json, + const fuzzing_event_engine::Actions& fuzzing_ee_actions) { + event_engine_ = std::make_shared( + FuzzingEventEngine::Options(), fuzzing_ee_actions); + grpc_timer_manager_set_start_threaded(false); + grpc_init(); auto bootstrap = GrpcXdsBootstrap::Create(bootstrap_json); if (!bootstrap.ok()) { LOG(ERROR) << "error creating bootstrap: " << bootstrap.status(); @@ -62,15 +71,25 @@ class Fuzzer { return; } transport_factory_ = MakeRefCounted( - []() { Crash("Multiple concurrent reads"); }); + []() { Crash("Multiple concurrent reads"); }, event_engine_); transport_factory_->SetAutoCompleteMessagesFromClient(false); transport_factory_->SetAbortOnUndrainedMessages(false); xds_client_ = MakeRefCounted( - std::move(*bootstrap), transport_factory_, - grpc_event_engine::experimental::GetDefaultEventEngine(), + std::move(*bootstrap), transport_factory_, event_engine_, /*metrics_reporter=*/nullptr, "foo agent", "foo version"); } + ~Fuzzer() { + transport_factory_.reset(); + xds_client_.reset(); + event_engine_->FuzzingDone(); + event_engine_->TickUntilIdle(); + event_engine_->UnsetGlobalHooks(); + grpc_event_engine::experimental::WaitForSingleOwner( + std::move(event_engine_)); + grpc_shutdown_blocking(); + } + void Act(const xds_client_fuzzer::Action& action) { if (xds_client_ == nullptr) return; switch (action.action_type_case()) { @@ -276,8 +295,7 @@ class Fuzzer { if (xds_server == nullptr) return nullptr; const char* method = StreamIdMethod(stream_id); if (method == nullptr) return nullptr; - return transport_factory_->WaitForStream(*xds_server, method, - absl::ZeroDuration()); + return transport_factory_->WaitForStream(*xds_server, method); } static std::string StreamIdString( @@ -293,7 +311,7 @@ class Fuzzer { auto stream = GetStream(stream_id); if (stream == nullptr) return; LOG(INFO) << " stream=" << stream.get(); - auto message = stream->WaitForMessageFromClient(absl::ZeroDuration()); + auto message = stream->WaitForMessageFromClient(); if (message.has_value()) { LOG(INFO) << " completing send_message"; stream->CompleteSendMessageFromClient(ok); @@ -320,6 +338,7 @@ class Fuzzer { stream->MaybeSendStatusToClient(std::move(status)); } + std::shared_ptr event_engine_; RefCountedPtr xds_client_; RefCountedPtr transport_factory_; @@ -336,10 +355,9 @@ class Fuzzer { bool squelch = true; DEFINE_PROTO_FUZZER(const xds_client_fuzzer::Msg& message) { - grpc_init(); - grpc_core::Fuzzer fuzzer(message.bootstrap()); + grpc_core::Fuzzer fuzzer(message.bootstrap(), + message.fuzzing_event_engine_actions()); for (int i = 0; i < message.actions_size(); i++) { fuzzer.Act(message.actions(i)); } - grpc_shutdown(); } diff --git a/test/core/xds/xds_client_fuzzer.proto b/test/core/xds/xds_client_fuzzer.proto index e2ce7aa5d46..ae32016c644 100644 --- a/test/core/xds/xds_client_fuzzer.proto +++ b/test/core/xds/xds_client_fuzzer.proto @@ -19,6 +19,7 @@ syntax = "proto3"; package xds_client_fuzzer; import "src/proto/grpc/testing/xds/v3/discovery.proto"; +import "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto"; // We'd ideally like to use google.rpc.Status instead of creating our // own proto for this, but that winds up causing all sorts of dependency @@ -120,4 +121,5 @@ message Action { message Msg { string bootstrap = 1; repeated Action actions = 2; + fuzzing_event_engine.Actions fuzzing_event_engine_actions = 3; } diff --git a/test/core/xds/xds_client_test.cc b/test/core/xds/xds_client_test.cc index 87e3a8a2e11..c28966f2c23 100644 --- a/test/core/xds/xds_client_test.cc +++ b/test/core/xds/xds_client_test.cc @@ -46,7 +46,7 @@ #include #include -#include "src/core/lib/event_engine/default_event_engine.h" +#include "src/core/lib/iomgr/timer_manager.h" #include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" @@ -59,6 +59,8 @@ #include "src/core/xds/xds_client/xds_resource_type_impl.h" #include "src/proto/grpc/testing/xds/v3/base.pb.h" #include "src/proto/grpc/testing/xds/v3/discovery.pb.h" +#include "test/core/event_engine/event_engine_test_utils.h" +#include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/test_util/scoped_env_var.h" #include "test/core/test_util/test_config.h" #include "test/core/xds/xds_client_test_peer.h" @@ -73,6 +75,7 @@ using envoy::service::discovery::v3::DiscoveryRequest; using envoy::service::discovery::v3::DiscoveryResponse; +using grpc_event_engine::experimental::FuzzingEventEngine; namespace grpc_core { namespace testing { @@ -252,6 +255,9 @@ class XdsClientTest : public ::testing::Test { all_resources_required_in_sotw>, ResourceStruct>::WatcherInterface { public: + explicit Watcher(std::shared_ptr event_engine) + : event_engine_(std::move(event_engine)) {} + ~Watcher() override { MutexLock lock(&mu_); EXPECT_THAT(queue_, ::testing::IsEmpty()) @@ -270,42 +276,46 @@ class XdsClientTest : public ::testing::Test { }); } - // Returns true if no event is received during the timeout period. - bool ExpectNoEvent(absl::Duration timeout) { - MutexLock lock(&mu_); - return !WaitForEventLocked(timeout); - } - bool HasEvent() { MutexLock lock(&mu_); return !queue_.empty(); } + // Returns true if no event is received after draining the fuzzing + // EE queue. + bool ExpectNoEvent() { + event_engine_->TickUntilIdle(); + return !HasEvent(); + } + absl::optional WaitForNextResourceAndHandle( - absl::Duration timeout = absl::Seconds(1), SourceLocation location = SourceLocation()) { - MutexLock lock(&mu_); - if (!WaitForEventLocked(timeout)) return absl::nullopt; - Event& event = queue_.front(); - if (!absl::holds_alternative(event)) { - EXPECT_TRUE(false) - << "got unexpected event " - << (absl::holds_alternative(event) - ? "error" - : "does-not-exist") - << " at " << location.file() << ":" << location.line(); - return absl::nullopt; + while (true) { + event_engine_->Tick(); + MutexLock lock(&mu_); + if (queue_.empty()) { + if (event_engine_->IsIdle()) return absl::nullopt; + continue; + } + Event& event = queue_.front(); + if (!absl::holds_alternative(event)) { + EXPECT_TRUE(false) + << "got unexpected event " + << (absl::holds_alternative(event) + ? "error" + : "does-not-exist") + << " at " << location.file() << ":" << location.line(); + return absl::nullopt; + } + auto foo = std::move(absl::get(event)); + queue_.pop_front(); + return foo; } - auto foo = std::move(absl::get(event)); - queue_.pop_front(); - return foo; } std::shared_ptr WaitForNextResource( - absl::Duration timeout = absl::Seconds(1), SourceLocation location = SourceLocation()) { - auto resource_and_handle = - WaitForNextResourceAndHandle(timeout, location); + auto resource_and_handle = WaitForNextResourceAndHandle(location); if (!resource_and_handle.has_value()) { return nullptr; } @@ -313,40 +323,50 @@ class XdsClientTest : public ::testing::Test { } absl::optional WaitForNextError( - absl::Duration timeout = absl::Seconds(1), SourceLocation location = SourceLocation()) { - MutexLock lock(&mu_); - if (!WaitForEventLocked(timeout)) return absl::nullopt; - Event& event = queue_.front(); - if (!absl::holds_alternative(event)) { - EXPECT_TRUE(false) - << "got unexpected event " - << (absl::holds_alternative(event) - ? "resource" - : "does-not-exist") - << " at " << location.file() << ":" << location.line(); - return absl::nullopt; + while (true) { + event_engine_->Tick(); + MutexLock lock(&mu_); + if (queue_.empty()) { + if (event_engine_->IsIdle()) return absl::nullopt; + continue; + } + Event& event = queue_.front(); + if (!absl::holds_alternative(event)) { + EXPECT_TRUE(false) + << "got unexpected event " + << (absl::holds_alternative(event) + ? "resource" + : "does-not-exist") + << " at " << location.file() << ":" << location.line(); + return absl::nullopt; + } + absl::Status error = std::move(absl::get(event)); + queue_.pop_front(); + return std::move(error); } - absl::Status error = std::move(absl::get(event)); - queue_.pop_front(); - return std::move(error); } - bool WaitForDoesNotExist(absl::Duration timeout, - SourceLocation location = SourceLocation()) { - MutexLock lock(&mu_); - if (!WaitForEventLocked(timeout)) return false; - Event& event = queue_.front(); - if (!absl::holds_alternative(event)) { - EXPECT_TRUE(false) - << "got unexpected event " - << (absl::holds_alternative(event) ? "error" - : "resource") - << " at " << location.file() << ":" << location.line(); - return false; + bool WaitForDoesNotExist(SourceLocation location = SourceLocation()) { + while (true) { + event_engine_->Tick(); + MutexLock lock(&mu_); + if (queue_.empty()) { + if (event_engine_->IsIdle()) return false; + continue; + } + Event& event = queue_.front(); + if (!absl::holds_alternative(event)) { + EXPECT_TRUE(false) + << "got unexpected event " + << (absl::holds_alternative(event) ? "error" + : "resource") + << " at " << location.file() << ":" << location.line(); + return false; + } + queue_.pop_front(); + return true; } - queue_.pop_front(); - return true; } private: @@ -361,7 +381,6 @@ class XdsClientTest : public ::testing::Test { ResourceAndReadDelayHandle event_details = { std::move(foo), std::move(read_delay_handle)}; queue_.emplace_back(std::move(event_details)); - cv_.Signal(); } void OnError( @@ -370,7 +389,6 @@ class XdsClientTest : public ::testing::Test { override { MutexLock lock(&mu_); queue_.push_back(std::move(status)); - cv_.Signal(); } void OnResourceDoesNotExist( @@ -378,24 +396,11 @@ class XdsClientTest : public ::testing::Test { override { MutexLock lock(&mu_); queue_.push_back(DoesNotExist()); - cv_.Signal(); } - // Returns true if an event was received, or false if the timeout - // expires before any event is received. - bool WaitForEventLocked(absl::Duration timeout) - ABSL_EXCLUSIVE_LOCKS_REQUIRED(&mu_) { - while (queue_.empty()) { - if (cv_.WaitWithTimeout(&mu_, - timeout * grpc_test_slowdown_factor())) { - return false; - } - } - return true; - } + std::shared_ptr event_engine_; Mutex mu_; - CondVar cv_; std::deque queue_ ABSL_GUARDED_BY(&mu_); }; @@ -626,6 +631,9 @@ class XdsClientTest : public ::testing::Test { uint64_t>; using ServerFailureMap = std::map; + explicit MetricsReporter(std::shared_ptr event_engine) + : event_engine_(std::move(event_engine)) {} + ResourceUpdateMap resource_updates_valid() const { MutexLock lock(&mu_); return resource_updates_valid_; @@ -643,12 +651,10 @@ class XdsClientTest : public ::testing::Test { ::testing::Matcher resource_updates_valid_matcher, ::testing::Matcher resource_updates_invalid_matcher, ::testing::Matcher server_failures_matcher, - absl::Duration timeout = absl::Seconds(3), SourceLocation location = SourceLocation()) { - const absl::Time deadline = - absl::Now() + (timeout * grpc_test_slowdown_factor()); - MutexLock lock(&mu_); while (true) { + event_engine_->Tick(); + MutexLock lock(&mu_); if (::testing::Matches(resource_updates_valid_matcher)( resource_updates_valid_) && ::testing::Matches(resource_updates_invalid_matcher)( @@ -656,15 +662,15 @@ class XdsClientTest : public ::testing::Test { ::testing::Matches(server_failures_matcher)(server_failures_)) { return true; } - if (cond_.WaitWithDeadline(&mu_, deadline)) break; + if (!event_engine_->IsIdle()) continue; + EXPECT_THAT(resource_updates_valid_, resource_updates_valid_matcher) + << location.file() << ":" << location.line(); + EXPECT_THAT(resource_updates_invalid_, resource_updates_invalid_matcher) + << location.file() << ":" << location.line(); + EXPECT_THAT(server_failures_, server_failures_matcher) + << location.file() << ":" << location.line(); + return false; } - EXPECT_THAT(resource_updates_valid_, resource_updates_valid_matcher) - << location.file() << ":" << location.line(); - EXPECT_THAT(resource_updates_invalid_, resource_updates_invalid_matcher) - << location.file() << ":" << location.line(); - EXPECT_THAT(server_failures_, server_failures_matcher) - << location.file() << ":" << location.line(); - return false; } private: @@ -690,6 +696,8 @@ class XdsClientTest : public ::testing::Test { cond_.SignalAll(); } + std::shared_ptr event_engine_; + mutable Mutex mu_; ResourceUpdateMap resource_updates_valid_ ABSL_GUARDED_BY(mu_); ResourceUpdateMap resource_updates_invalid_ ABSL_GUARDED_BY(mu_); @@ -724,18 +732,35 @@ class XdsClientTest : public ::testing::Test { return server_connection_map; } + void SetUp() override { + event_engine_ = std::make_shared( + FuzzingEventEngine::Options(), fuzzing_event_engine::Actions()); + grpc_timer_manager_set_start_threaded(false); + grpc_init(); + } + + void TearDown() override { + transport_factory_.reset(); + xds_client_.reset(); + event_engine_->FuzzingDone(); + event_engine_->TickUntilIdle(); + event_engine_->UnsetGlobalHooks(); + grpc_event_engine::experimental::WaitForSingleOwner( + std::move(event_engine_)); + grpc_shutdown_blocking(); + } + // Sets transport_factory_ and initializes xds_client_ with the // specified bootstrap config. void InitXdsClient( FakeXdsBootstrap::Builder bootstrap_builder = FakeXdsBootstrap::Builder(), Duration resource_request_timeout = Duration::Seconds(15)) { transport_factory_ = MakeRefCounted( - []() { FAIL() << "Multiple concurrent reads"; }); - auto metrics_reporter = std::make_unique(); + []() { FAIL() << "Multiple concurrent reads"; }, event_engine_); + auto metrics_reporter = std::make_unique(event_engine_); metrics_reporter_ = metrics_reporter.get(); xds_client_ = MakeRefCounted( - bootstrap_builder.Build(), transport_factory_, - grpc_event_engine::experimental::GetDefaultEventEngine(), + bootstrap_builder.Build(), transport_factory_, event_engine_, std::move(metrics_reporter), "foo agent", "foo version", resource_request_timeout * grpc_test_slowdown_factor()); } @@ -743,7 +768,7 @@ class XdsClientTest : public ::testing::Test { // Starts and cancels a watch for a Foo resource. RefCountedPtr StartFooWatch( absl::string_view resource_name) { - auto watcher = MakeRefCounted(); + auto watcher = MakeRefCounted(event_engine_); XdsFooResourceType::StartWatch(xds_client_.get(), resource_name, watcher); return watcher; } @@ -757,7 +782,7 @@ class XdsClientTest : public ::testing::Test { // Starts and cancels a watch for a Bar resource. RefCountedPtr StartBarWatch( absl::string_view resource_name) { - auto watcher = MakeRefCounted(); + auto watcher = MakeRefCounted(event_engine_); XdsBarResourceType::StartWatch(xds_client_.get(), resource_name, watcher); return watcher; } @@ -771,7 +796,8 @@ class XdsClientTest : public ::testing::Test { // Starts and cancels a watch for a WildcardCapable resource. RefCountedPtr StartWildcardCapableWatch(absl::string_view resource_name) { - auto watcher = MakeRefCounted(); + auto watcher = + MakeRefCounted(event_engine_); XdsWildcardCapableResourceType::StartWatch(xds_client_.get(), resource_name, watcher); return watcher; @@ -784,11 +810,13 @@ class XdsClientTest : public ::testing::Test { } RefCountedPtr WaitForAdsStream( - const XdsBootstrap::XdsServer& xds_server, - absl::Duration timeout = absl::Seconds(5)) { + const XdsBootstrap::XdsServer& xds_server) { return transport_factory_->WaitForStream( - xds_server, FakeXdsTransportFactory::kAdsMethod, - timeout * grpc_test_slowdown_factor()); + xds_server, FakeXdsTransportFactory::kAdsMethod); + } + + RefCountedPtr WaitForAdsStream() { + return WaitForAdsStream(*xds_client_->bootstrap().servers().front()); } void TriggerConnectionFailure(const XdsBootstrap::XdsServer& xds_server, @@ -796,19 +824,11 @@ class XdsClientTest : public ::testing::Test { transport_factory_->TriggerConnectionFailure(xds_server, std::move(status)); } - RefCountedPtr WaitForAdsStream( - absl::Duration timeout = absl::Seconds(5)) { - return WaitForAdsStream(*xds_client_->bootstrap().servers().front(), - timeout); - } - // Gets the latest request sent to the fake xDS server. absl::optional WaitForRequest( FakeXdsTransportFactory::FakeStreamingCall* stream, - absl::Duration timeout = absl::Seconds(3), SourceLocation location = SourceLocation()) { - auto message = - stream->WaitForMessageFromClient(timeout * grpc_test_slowdown_factor()); + auto message = stream->WaitForMessageFromClient(); if (!message.has_value()) return absl::nullopt; DiscoveryRequest request; bool success = request.ParseFromString(*message); @@ -893,6 +913,7 @@ class XdsClientTest : public ::testing::Test { << location.file() << ":" << location.line(); } + std::shared_ptr event_engine_; RefCountedPtr transport_factory_; RefCountedPtr xds_client_; MetricsReporter* metrics_reporter_ = nullptr; @@ -2011,7 +2032,7 @@ TEST_F(XdsClientTest, ResourceDeletion) { .set_nonce("B") .Serialize()); // Watcher should see the does-not-exist event. - EXPECT_TRUE(watcher->WaitForDoesNotExist(absl::Seconds(1))); + EXPECT_TRUE(watcher->WaitForDoesNotExist()); // Check metric data. EXPECT_TRUE(metrics_reporter_->WaitForMetricsReporterData( ::testing::ElementsAre(::testing::Pair( @@ -2029,7 +2050,7 @@ TEST_F(XdsClientTest, ResourceDeletion) { // Start a new watcher for the same resource. It should immediately // receive the same does-not-exist notification. auto watcher2 = StartWildcardCapableWatch("wc1"); - EXPECT_TRUE(watcher2->WaitForDoesNotExist(absl::Seconds(1))); + EXPECT_TRUE(watcher2->WaitForDoesNotExist()); // XdsClient should have sent an ACK message to the xDS server. request = WaitForRequest(stream.get()); ASSERT_TRUE(request.has_value()); @@ -2142,7 +2163,7 @@ TEST_F(XdsClientTest, ResourceDeletionIgnoredWhenConfigured) { .Serialize()); // Watcher should not see any update, since we should have ignored the // deletion. - EXPECT_TRUE(watcher->ExpectNoEvent(absl::Seconds(1))); + EXPECT_TRUE(watcher->ExpectNoEvent()); // Check metric data. EXPECT_TRUE(metrics_reporter_->WaitForMetricsReporterData( ::testing::ElementsAre(::testing::Pair( @@ -2438,7 +2459,7 @@ TEST_F(XdsClientTest, ConnectionFails) { ::testing::ElementsAre(::testing::Pair(kDefaultXdsServerUrl, 1)))); // We should not see a resource-does-not-exist event, because the // timer should not be running while the channel is disconnected. - EXPECT_TRUE(watcher->ExpectNoEvent(absl::Seconds(4))); + EXPECT_TRUE(watcher->ExpectNoEvent()); // Start a new watch. This watcher should be given the same error, // since we have not yet recovered. auto watcher2 = StartFooWatch("foo1"); @@ -2517,7 +2538,7 @@ TEST_F(XdsClientTest, ResourceDoesNotExistUponTimeout) { CheckRequestNode(*request); // Should be present on the first request. // Do not send a response, but wait for the resource to be reported as // not existing. - EXPECT_TRUE(watcher->WaitForDoesNotExist(absl::Seconds(5))); + EXPECT_TRUE(watcher->WaitForDoesNotExist()); // Check metric data. EXPECT_TRUE(metrics_reporter_->WaitForMetricsReporterData( ::testing::ElementsAre(), ::testing::ElementsAre(), ::testing::_)); @@ -2530,7 +2551,7 @@ TEST_F(XdsClientTest, ResourceDoesNotExistUponTimeout) { // Start a new watcher for the same resource. It should immediately // receive the same does-not-exist notification. auto watcher2 = StartFooWatch("foo1"); - EXPECT_TRUE(watcher2->WaitForDoesNotExist(absl::Seconds(1))); + EXPECT_TRUE(watcher2->WaitForDoesNotExist()); // Now server sends a response. stream->SendMessageToClient( ResponseBuilder(XdsFooResourceType::Get()->type_url()) @@ -2641,7 +2662,7 @@ TEST_F(XdsClientTest, ResourceDoesNotExistAfterStreamRestart) { CheckRequestNode(*request); // Should be present on the first request. // Server does NOT send a response immediately. // Client should receive a resource does-not-exist. - ASSERT_TRUE(watcher->WaitForDoesNotExist(absl::Seconds(4))); + ASSERT_TRUE(watcher->WaitForDoesNotExist()); // Check metric data. EXPECT_TRUE(metrics_reporter_->WaitForMetricsReporterData( ::testing::ElementsAre(), ::testing::ElementsAre(), ::testing::_)); @@ -2713,7 +2734,7 @@ TEST_F(XdsClientTest, DoesNotExistTimerNotStartedUntilSendCompletes) { // Server does NOT send a response. // We should not see a resource-does-not-exist event, because the // timer should not be running while the channel is disconnected. - EXPECT_TRUE(watcher->ExpectNoEvent(absl::Seconds(4))); + EXPECT_TRUE(watcher->ExpectNoEvent()); // Check metric data. EXPECT_THAT(GetResourceCounts(), ::testing::ElementsAre(::testing::Pair( @@ -2726,7 +2747,7 @@ TEST_F(XdsClientTest, DoesNotExistTimerNotStartedUntilSendCompletes) { stream->CompleteSendMessageFromClient(); // Server does NOT send a response. // Watcher should see a does-not-exist event. - EXPECT_TRUE(watcher->WaitForDoesNotExist(absl::Seconds(4))); + EXPECT_TRUE(watcher->WaitForDoesNotExist()); // Check metric data. EXPECT_THAT(GetResourceCounts(), ::testing::ElementsAre(::testing::Pair( @@ -2915,7 +2936,7 @@ TEST_F(XdsClientTest, /*resource_names=*/{"foo1", "foo2"}); stream->CompleteSendMessageFromClient(); // Make sure the watcher for foo1 does not see a does-not-exist event. - EXPECT_TRUE(watcher->ExpectNoEvent(absl::Seconds(5))); + EXPECT_TRUE(watcher->ExpectNoEvent()); // Cancel watches. CancelFooWatch(watcher.get(), "foo1", /*delay_unsubscription=*/true); CancelFooWatch(watcher2.get(), "foo2"); @@ -2992,7 +3013,7 @@ TEST_F(XdsClientTest, DoNotSendDoesNotExistForCachedResource) { // We should not see a resource-does-not-exist event, because the // resource was already cached, so the server can optimize by not // resending it. - EXPECT_TRUE(watcher->ExpectNoEvent(absl::Seconds(4))); + EXPECT_TRUE(watcher->ExpectNoEvent()); // Check metric data. EXPECT_TRUE(metrics_reporter_->WaitForMetricsReporterData( ::testing::ElementsAre(::testing::Pair( @@ -3014,7 +3035,7 @@ TEST_F(XdsClientTest, DoNotSendDoesNotExistForCachedResource) { .AddFooResource(XdsFooResource("foo1", 6)) .Serialize()); // Watcher will not see any update, since the resource is unchanged. - EXPECT_TRUE(watcher->ExpectNoEvent(absl::Seconds(1))); + EXPECT_TRUE(watcher->ExpectNoEvent()); // Check metric data. EXPECT_TRUE(metrics_reporter_->WaitForMetricsReporterData( ::testing::ElementsAre(::testing::Pair( @@ -3504,7 +3525,7 @@ TEST_F(XdsClientTest, FederationWithUnknownAuthority) { << *error; } -TEST_F(XdsClientTest, FederationWithUnparsableXdstpResourceName) { +TEST_F(XdsClientTest, FederationWithUnparseableXdstpResourceName) { // Note: Not adding authority to bootstrap config. InitXdsClient(); // Start a watch for the xdstp resource name. @@ -3724,7 +3745,6 @@ TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { } TEST_F(XdsClientTest, AdsReadWaitsForHandleRelease) { - const absl::Duration timeout = absl::Seconds(5) * grpc_test_slowdown_factor(); InitXdsClient(); // Start watches for "foo1" and "foo2". auto watcher1 = StartFooWatch("foo1"); @@ -3777,11 +3797,11 @@ TEST_F(XdsClientTest, AdsReadWaitsForHandleRelease) { /*version_info=*/"1", /*response_nonce=*/"A", /*error_detail=*/absl::OkStatus(), /*resource_names=*/{"foo1", "foo2"}); - EXPECT_TRUE(stream->WaitForReadsStarted(1, timeout)); + EXPECT_TRUE(stream->WaitForReadsStarted(1)); resource1->read_delay_handle.reset(); - EXPECT_TRUE(stream->WaitForReadsStarted(1, timeout)); + EXPECT_TRUE(stream->WaitForReadsStarted(1)); resource2->read_delay_handle.reset(); - EXPECT_TRUE(stream->WaitForReadsStarted(2, timeout)); + EXPECT_TRUE(stream->WaitForReadsStarted(2)); resource1 = watcher1->WaitForNextResourceAndHandle(); ASSERT_NE(resource1, absl::nullopt); EXPECT_EQ(resource1->resource->name, "foo1"); @@ -3794,9 +3814,9 @@ TEST_F(XdsClientTest, AdsReadWaitsForHandleRelease) { /*version_info=*/"2", /*response_nonce=*/"B", /*error_detail=*/absl::OkStatus(), /*resource_names=*/{"foo1", "foo2"}); - EXPECT_TRUE(stream->WaitForReadsStarted(2, timeout)); + EXPECT_TRUE(stream->WaitForReadsStarted(2)); resource1->read_delay_handle.reset(); - EXPECT_TRUE(stream->WaitForReadsStarted(3, timeout)); + EXPECT_TRUE(stream->WaitForReadsStarted(3)); // Cancel watch. CancelFooWatch(watcher1.get(), "foo1"); request = WaitForRequest(stream.get()); @@ -4185,8 +4205,5 @@ TEST_F(XdsClientTest, FallbackOnStartup) { int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); grpc::testing::TestEnvironment env(&argc, argv); - grpc_init(); - int ret = RUN_ALL_TESTS(); - grpc_shutdown(); - return ret; + return RUN_ALL_TESTS(); } diff --git a/test/core/xds/xds_transport_fake.cc b/test/core/xds/xds_transport_fake.cc index 8c0fc5f5ea3..6369fd60c97 100644 --- a/test/core/xds/xds_transport_fake.cc +++ b/test/core/xds/xds_transport_fake.cc @@ -29,15 +29,12 @@ #include #include -#include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/orphanable.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "test/core/test_util/test_config.h" -using grpc_event_engine::experimental::GetDefaultEventEngine; - namespace grpc_core { // @@ -60,8 +57,8 @@ FakeXdsTransportFactory::FakeStreamingCall::~FakeStreamingCall() { // synchronously, since those operations will trigger code in // XdsClient that acquires its mutex, but it was already holding its // mutex when it called us, so it would deadlock. - GetDefaultEventEngine()->Run([event_handler = std::move(event_handler_), - status_sent = status_sent_]() mutable { + event_engine_->Run([event_handler = std::move(event_handler_), + status_sent = status_sent_]() mutable { ExecCtx exec_ctx; if (!status_sent) event_handler->OnStatusReceived(absl::OkStatus()); event_handler.reset(); @@ -82,7 +79,6 @@ void FakeXdsTransportFactory::FakeStreamingCall::SendMessage( MutexLock lock(&mu_); CHECK(!orphaned_); from_client_messages_.push_back(std::move(payload)); - cv_client_msg_.Signal(); if (transport_->auto_complete_messages_from_client()) { CompleteSendMessageFromClientLocked(/*ok=*/true); } @@ -94,18 +90,18 @@ bool FakeXdsTransportFactory::FakeStreamingCall::HaveMessageFromClient() { } absl::optional -FakeXdsTransportFactory::FakeStreamingCall::WaitForMessageFromClient( - absl::Duration timeout) { - MutexLock lock(&mu_); - while (from_client_messages_.empty()) { - if (cv_client_msg_.WaitWithTimeout(&mu_, - timeout * grpc_test_slowdown_factor())) { - return absl::nullopt; +FakeXdsTransportFactory::FakeStreamingCall::WaitForMessageFromClient() { + while (true) { + event_engine_->Tick(); + MutexLock lock(&mu_); + if (from_client_messages_.empty()) { + if (event_engine_->IsIdle()) return absl::nullopt; + continue; } + std::string payload = std::move(from_client_messages_.front()); + from_client_messages_.pop_front(); + return payload; } - std::string payload = from_client_messages_.front(); - from_client_messages_.pop_front(); - return payload; } void FakeXdsTransportFactory::FakeStreamingCall:: @@ -113,12 +109,11 @@ void FakeXdsTransportFactory::FakeStreamingCall:: // Can't call event_handler_->OnRequestSent() synchronously, since that // operation will trigger code in XdsClient that acquires its mutex, but it // was already holding its mutex when it called us, so it would deadlock. - GetDefaultEventEngine()->Run( - [event_handler = event_handler_->Ref(), ok]() mutable { - ExecCtx exec_ctx; - event_handler->OnRequestSent(ok); - event_handler.reset(); - }); + event_engine_->Run([event_handler = event_handler_->Ref(), ok]() mutable { + ExecCtx exec_ctx; + event_handler->OnRequestSent(ok); + event_handler.reset(); + }); } void FakeXdsTransportFactory::FakeStreamingCall::CompleteSendMessageFromClient( @@ -135,11 +130,10 @@ void FakeXdsTransportFactory::FakeStreamingCall::StartRecvMessage() { } ++reads_started_; ++num_pending_reads_; - cv_reads_started_.SignalAll(); if (!to_client_messages_.empty()) { // Dispatch pending message (if there's one) on a separate thread to avoid // recursion - GetDefaultEventEngine()->Run([call = RefAsSubclass()]() { + event_engine_->Run([call = RefAsSubclass()]() { call->MaybeDeliverMessageToClient(); }); } @@ -187,6 +181,16 @@ void FakeXdsTransportFactory::FakeStreamingCall::MaybeSendStatusToClient( event_handler->OnStatusReceived(std::move(status)); } +bool FakeXdsTransportFactory::FakeStreamingCall::WaitForReadsStarted( + size_t expected) { + while (true) { + event_engine_->Tick(); + MutexLock lock(&mu_); + if (reads_started_ == expected) return true; + if (event_engine_->IsIdle()) return false; + } +} + bool FakeXdsTransportFactory::FakeStreamingCall::IsOrphaned() { MutexLock lock(&mu_); return orphaned_; @@ -223,7 +227,7 @@ void FakeXdsTransportFactory::FakeXdsTransport::Orphaned() { // Can't destroy watchers synchronously, since that operation will trigger // code in XdsClient that acquires its mutex, but it was already holding // its mutex when it called us, so it would deadlock. - GetDefaultEventEngine()->Run([watchers = std::move(watchers_)]() mutable { + event_engine_->Run([watchers = std::move(watchers_)]() mutable { ExecCtx exec_ctx; watchers.clear(); }); @@ -231,17 +235,14 @@ void FakeXdsTransportFactory::FakeXdsTransport::Orphaned() { } RefCountedPtr -FakeXdsTransportFactory::FakeXdsTransport::WaitForStream( - const char* method, absl::Duration timeout) { - MutexLock lock(&mu_); - auto it = active_calls_.find(method); - while (it == active_calls_.end() || it->second == nullptr) { - if (cv_.WaitWithTimeout(&mu_, timeout * grpc_test_slowdown_factor())) { - return nullptr; - } - it = active_calls_.find(method); +FakeXdsTransportFactory::FakeXdsTransport::WaitForStream(const char* method) { + while (true) { + event_engine_->Tick(); + MutexLock lock(&mu_); + auto it = active_calls_.find(method); + if (it != active_calls_.end() && it->second != nullptr) return it->second; + if (event_engine_->IsIdle()) return nullptr; } - return it->second; } void FakeXdsTransportFactory::FakeXdsTransport::RemoveStream( @@ -273,7 +274,6 @@ FakeXdsTransportFactory::FakeXdsTransport::CreateStreamingCall( WeakRefAsSubclass(), method, std::move(event_handler)); MutexLock lock(&mu_); active_calls_[method] = call->Ref().TakeAsSubclass(); - cv_.Signal(); return call; } @@ -318,13 +318,14 @@ void FakeXdsTransportFactory::SetAbortOnUndrainedMessages(bool value) { RefCountedPtr FakeXdsTransportFactory::WaitForStream(const XdsBootstrap::XdsServer& server, - const char* method, - absl::Duration timeout) { + const char* method) { auto transport = GetTransport(server); if (transport == nullptr) return nullptr; - return transport->WaitForStream(method, timeout); + return transport->WaitForStream(method); } +void FakeXdsTransportFactory::Orphaned() { event_engine_.reset(); } + RefCountedPtr FakeXdsTransportFactory::GetTransport(const XdsBootstrap::XdsServer& server) { std::string key = server.Key(); diff --git a/test/core/xds/xds_transport_fake.h b/test/core/xds/xds_transport_fake.h index 0eb37e8a489..ffa4c746551 100644 --- a/test/core/xds/xds_transport_fake.h +++ b/test/core/xds/xds_transport_fake.h @@ -40,6 +40,7 @@ #include "src/core/util/sync.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_transport.h" +#include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" namespace grpc_core { @@ -61,6 +62,7 @@ class FakeXdsTransportFactory : public XdsTransportFactory { std::unique_ptr event_handler) : transport_(std::move(transport)), method_(method), + event_engine_(transport_->factory()->event_engine_), event_handler_(MakeRefCounted( std::move(event_handler))) {} @@ -75,8 +77,7 @@ class FakeXdsTransportFactory : public XdsTransportFactory { using StreamingCall::Ref; // Make it public. bool HaveMessageFromClient(); - absl::optional WaitForMessageFromClient( - absl::Duration timeout); + absl::optional WaitForMessageFromClient(); // If FakeXdsTransportFactory::SetAutoCompleteMessagesFromClient() // was called to set the value to false before the creation of the @@ -88,16 +89,7 @@ class FakeXdsTransportFactory : public XdsTransportFactory { void SendMessageToClient(absl::string_view payload); void MaybeSendStatusToClient(absl::Status status); - bool WaitForReadsStarted(size_t expected, absl::Duration timeout) { - MutexLock lock(&mu_); - const absl::Time deadline = absl::Now() + timeout; - do { - if (reads_started_ == expected) { - return true; - } - } while (!cv_reads_started_.WaitWithDeadline(&mu_, deadline)); - return false; - } + bool WaitForReadsStarted(size_t expected); private: class RefCountedEventHandler : public RefCounted { @@ -126,10 +118,10 @@ class FakeXdsTransportFactory : public XdsTransportFactory { WeakRefCountedPtr transport_; const char* method_; + std::shared_ptr + event_engine_; Mutex mu_; - CondVar cv_reads_started_; - CondVar cv_client_msg_; RefCountedPtr event_handler_ ABSL_GUARDED_BY(&mu_); std::deque from_client_messages_ ABSL_GUARDED_BY(&mu_); bool status_sent_ ABSL_GUARDED_BY(&mu_) = false; @@ -140,8 +132,11 @@ class FakeXdsTransportFactory : public XdsTransportFactory { }; explicit FakeXdsTransportFactory( - std::function too_many_pending_reads_callback) - : too_many_pending_reads_callback_( + std::function too_many_pending_reads_callback, + std::shared_ptr + event_engine) + : event_engine_(std::move(event_engine)), + too_many_pending_reads_callback_( std::move(too_many_pending_reads_callback)) {} void TriggerConnectionFailure(const XdsBootstrap::XdsServer& server, @@ -169,10 +164,9 @@ class FakeXdsTransportFactory : public XdsTransportFactory { void SetAbortOnUndrainedMessages(bool value); RefCountedPtr WaitForStream( - const XdsBootstrap::XdsServer& server, const char* method, - absl::Duration timeout); + const XdsBootstrap::XdsServer& server, const char* method); - void Orphaned() override {} + void Orphaned() override; private: class FakeXdsTransport : public XdsTransport { @@ -185,7 +179,8 @@ class FakeXdsTransportFactory : public XdsTransportFactory { server_(server), auto_complete_messages_from_client_( auto_complete_messages_from_client), - abort_on_undrained_messages_(abort_on_undrained_messages) {} + abort_on_undrained_messages_(abort_on_undrained_messages), + event_engine_(factory_->event_engine_) {} void Orphaned() override; @@ -199,8 +194,7 @@ class FakeXdsTransportFactory : public XdsTransportFactory { void TriggerConnectionFailure(absl::Status status); - RefCountedPtr WaitForStream(const char* method, - absl::Duration timeout); + RefCountedPtr WaitForStream(const char* method); void RemoveStream(const char* method, FakeStreamingCall* call); @@ -224,9 +218,10 @@ class FakeXdsTransportFactory : public XdsTransportFactory { const XdsBootstrap::XdsServer& server_; const bool auto_complete_messages_from_client_; const bool abort_on_undrained_messages_; + std::shared_ptr + event_engine_; Mutex mu_; - CondVar cv_; std::set> watchers_ ABSL_GUARDED_BY(&mu_); std::map> @@ -244,6 +239,9 @@ class FakeXdsTransportFactory : public XdsTransportFactory { RefCountedPtr GetTransportLocked(const std::string& key) ABSL_EXCLUSIVE_LOCKS_REQUIRED(&mu_); + std::shared_ptr + event_engine_; + Mutex mu_; std::map transport_map_ ABSL_GUARDED_BY(&mu_); From b44de399c1539d793504e03573d64228ee0f4733 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 1 Oct 2024 15:21:44 -0700 Subject: [PATCH 24/74] [Chttp2Server] Remove unnecessary ExecCtx Flush (#37824) This seems to be a vestige from around 8 years ago. The code has changed a lot since then, and this makes no sense anymore. (Making this change separately to be safe.) Closes #37824 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37824 from yashykt:RemoveUnnecessaryExecCtxStuff 97a7625033df07ce5fcd24b915d76942ba24e912 PiperOrigin-RevId: 681184980 --- src/core/ext/transport/chttp2/server/chttp2_server.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index 212493f95f7..3ebc5758950 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -783,15 +783,11 @@ Chttp2ServerListener::Chttp2ServerListener( } Chttp2ServerListener::~Chttp2ServerListener() { - // Flush queued work before destroying handshaker factory, since that - // may do a synchronous unref. - ExecCtx::Get()->Flush(); if (passive_listener_ != nullptr) { passive_listener_->ListenerDestroyed(); } if (on_destroy_done_ != nullptr) { ExecCtx::Run(DEBUG_LOCATION, on_destroy_done_, absl::OkStatus()); - ExecCtx::Get()->Flush(); } } From cd129b49c20e6eb741e291e5c6f0db9b43125a64 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 1 Oct 2024 17:20:13 -0700 Subject: [PATCH 25/74] [GCP auth filter] hold ref to service config (#37831) This fixes the following crash: https://btx.cloud.google.com/invocations/3a7065d4-db7f-4f01-a239-5376b7f5ee8b/targets/%2F%2Ftest%2Fcpp%2Fend2end%2Fxds:xds_gcp_authn_end2end_test@experiment%3Dwork_serializer_dispatch;config=1a7dc092b28796b045d00aec96c95b85c1d4dc656912e0021a1fc84b3ecb2ac9/log The problem is caused by a race whereby the channel swaps out the service config due to a resolver update while the old dynamic filter stack is still processing calls in another thread. The GCP auth filter was dereferencing the old service config but not holding a ref to it. I've fixed this by having it hold a ref. In the long run, I suspect that we may run into other cases like this, in which case we may want the dynamic filter stack itself to hold a ref to the service config, so that individual filters don't have to. Closes #37831 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37831 from markdroth:gcp_auth_race_fix f2a0d1dd7921adfbb47332d50109ae612fc43240 PiperOrigin-RevId: 681221795 --- .../gcp_authentication/gcp_authentication_filter.cc | 11 +++++++---- .../gcp_authentication/gcp_authentication_filter.h | 4 ++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc index 7e51b20dca3..e301ed62154 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc @@ -153,7 +153,7 @@ absl::StatusOr> GcpAuthenticationFilter::Create(const ChannelArgs& args, ChannelFilter::Args filter_args) { // Get filter config. - auto* service_config = args.GetObject(); + auto service_config = args.GetObjectRef(); if (service_config == nullptr) { return absl::InvalidArgumentError( "gcp_auth: no service config in channel args"); @@ -184,15 +184,18 @@ GcpAuthenticationFilter::Create(const ChannelArgs& args, // cache but it has the wrong size. cache->SetMaxSize(filter_config->cache_size); // Instantiate filter. - return std::unique_ptr(new GcpAuthenticationFilter( - filter_config, std::move(xds_config), std::move(cache))); + return std::unique_ptr( + new GcpAuthenticationFilter(std::move(service_config), filter_config, + std::move(xds_config), std::move(cache))); } GcpAuthenticationFilter::GcpAuthenticationFilter( + RefCountedPtr service_config, const GcpAuthenticationParsedConfig::Config* filter_config, RefCountedPtr xds_config, RefCountedPtr cache) - : filter_config_(filter_config), + : service_config_(std::move(service_config)), + filter_config_(filter_config), xds_config_(std::move(xds_config)), cache_(std::move(cache)) {} diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h index f8fc704c9e8..a3136ebd460 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h @@ -80,10 +80,14 @@ class GcpAuthenticationFilter }; GcpAuthenticationFilter( + RefCountedPtr service_config, const GcpAuthenticationParsedConfig::Config* filter_config, RefCountedPtr xds_config, RefCountedPtr cache); + // TODO(roth): Consider having the channel stack hold this ref so that + // individual filters don't need to. + const RefCountedPtr service_config_; const GcpAuthenticationParsedConfig::Config* filter_config_; const RefCountedPtr xds_config_; const RefCountedPtr cache_; From d6fd0bd9919695b2047a66910628fb9b36145fa0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 1 Oct 2024 17:44:44 -0700 Subject: [PATCH 26/74] [chaotic-good] Annotate key promises for latent-see (#37830) Closes #37830 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37830 from ctiller:promising-latent-see 4f7dd1b7c60abe83f32c520d0d6106c04df9b27e PiperOrigin-RevId: 681228010 --- .../chaotic_good/client_transport.cc | 84 +++++----- .../chaotic_good/server_transport.cc | 152 +++++++++--------- .../posix_engine/posix_endpoint.cc | 2 +- src/core/lib/transport/promise_endpoint.h | 77 ++++----- src/core/util/latent_see.h | 20 ++- 5 files changed, 187 insertions(+), 148 deletions(-) diff --git a/src/core/ext/transport/chaotic_good/client_transport.cc b/src/core/ext/transport/chaotic_good/client_transport.cc index 28af0d5ba98..29a39c1fbac 100644 --- a/src/core/ext/transport/chaotic_good/client_transport.cc +++ b/src/core/ext/transport/chaotic_good/client_transport.cc @@ -117,7 +117,9 @@ auto ChaoticGoodClientTransport::PushFrameIntoCall(ServerFragmentFrame frame, }); // Wrap the actual sequence with something that owns the call handler so that // its lifetime extends until the push completes. - return [call_handler, push = std::move(push)]() mutable { return push(); }; + return GRPC_LATENT_SEE_PROMISE( + "PushFrameIntoCall", + ([call_handler, push = std::move(push)]() mutable { return push(); })); } auto ChaoticGoodClientTransport::TransportReadLoop( @@ -205,11 +207,15 @@ ChaoticGoodClientTransport::ChaoticGoodClientTransport( party_arena->SetContext( event_engine.get()); party_ = Party::Make(std::move(party_arena)); - party_->Spawn("client-chaotic-writer", TransportWriteLoop(transport), + party_->Spawn("client-chaotic-writer", + GRPC_LATENT_SEE_PROMISE("ClientTransportWriteLoop", + TransportWriteLoop(transport)), OnTransportActivityDone("write_loop")); - party_->Spawn("client-chaotic-reader", - TransportReadLoop(std::move(transport)), - OnTransportActivityDone("read_loop")); + party_->Spawn( + "client-chaotic-reader", + GRPC_LATENT_SEE_PROMISE("ClientTransportReadLoop", + TransportReadLoop(std::move(transport))), + OnTransportActivityDone("read_loop")); } ChaoticGoodClientTransport::~ChaoticGoodClientTransport() { party_.reset(); } @@ -265,38 +271,42 @@ auto ChaoticGoodClientTransport::CallOutboundLoop(uint32_t stream_id, return absl::OkStatus(); }); }; - return TrySeq( - // Wait for initial metadata then send it out. - call_handler.PullClientInitialMetadata(), - [send_fragment](ClientMetadataHandle md) mutable { - GRPC_TRACE_LOG(chaotic_good, INFO) - << "CHAOTIC_GOOD: Sending initial metadata: " << md->DebugString(); - ClientFragmentFrame frame; - frame.headers = std::move(md); - return send_fragment(std::move(frame)); - }, - // Continuously send client frame with client to server messages. - ForEach(OutgoingMessages(call_handler), - [send_fragment, - aligned_bytes = aligned_bytes_](MessageHandle message) mutable { - ClientFragmentFrame frame; - // Construct frame header (flags, header_length and - // trailer_length will be added in serialization). - const uint32_t message_length = message->payload()->Length(); - const uint32_t padding = - message_length % aligned_bytes == 0 - ? 0 - : aligned_bytes - message_length % aligned_bytes; - CHECK_EQ((message_length + padding) % aligned_bytes, 0u); - frame.message = FragmentMessage(std::move(message), padding, - message_length); - return send_fragment(std::move(frame)); - }), - [send_fragment]() mutable { - ClientFragmentFrame frame; - frame.end_of_stream = true; - return send_fragment(std::move(frame)); - }); + return GRPC_LATENT_SEE_PROMISE( + "CallOutboundLoop", + TrySeq( + // Wait for initial metadata then send it out. + call_handler.PullClientInitialMetadata(), + [send_fragment](ClientMetadataHandle md) mutable { + GRPC_TRACE_LOG(chaotic_good, INFO) + << "CHAOTIC_GOOD: Sending initial metadata: " + << md->DebugString(); + ClientFragmentFrame frame; + frame.headers = std::move(md); + return send_fragment(std::move(frame)); + }, + // Continuously send client frame with client to server messages. + ForEach(OutgoingMessages(call_handler), + [send_fragment, aligned_bytes = aligned_bytes_]( + MessageHandle message) mutable { + ClientFragmentFrame frame; + // Construct frame header (flags, header_length and + // trailer_length will be added in serialization). + const uint32_t message_length = + message->payload()->Length(); + const uint32_t padding = + message_length % aligned_bytes == 0 + ? 0 + : aligned_bytes - message_length % aligned_bytes; + CHECK_EQ((message_length + padding) % aligned_bytes, 0u); + frame.message = FragmentMessage(std::move(message), padding, + message_length); + return send_fragment(std::move(frame)); + }), + [send_fragment]() mutable { + ClientFragmentFrame frame; + frame.end_of_stream = true; + return send_fragment(std::move(frame)); + })); } void ChaoticGoodClientTransport::StartCall(CallHandler call_handler) { diff --git a/src/core/ext/transport/chaotic_good/server_transport.cc b/src/core/ext/transport/chaotic_good/server_transport.cc index 6588227a264..492dee5c843 100644 --- a/src/core/ext/transport/chaotic_good/server_transport.cc +++ b/src/core/ext/transport/chaotic_good/server_transport.cc @@ -199,25 +199,27 @@ auto ChaoticGoodServerTransport::SendCallInitialMetadataAndBody( auto ChaoticGoodServerTransport::CallOutboundLoop( uint32_t stream_id, CallInitiator call_initiator) { auto outgoing_frames = outgoing_frames_.MakeSender(); - return Seq( - Map(SendCallInitialMetadataAndBody(stream_id, outgoing_frames, - call_initiator), - [stream_id](absl::Status main_body_result) { - GRPC_TRACE_VLOG(chaotic_good, 2) - << "CHAOTIC_GOOD: CallOutboundLoop: stream_id=" << stream_id - << " main_body_result=" << main_body_result; - return Empty{}; - }), - call_initiator.PullServerTrailingMetadata(), - // Capture the call_initator to ensure the underlying call_spine - // is alive until the SendFragment promise completes. - [stream_id, outgoing_frames, - call_initiator](ServerMetadataHandle md) mutable { - ServerFragmentFrame frame; - frame.trailers = std::move(md); - frame.stream_id = stream_id; - return SendFragment(std::move(frame), outgoing_frames, call_initiator); - }); + return GRPC_LATENT_SEE_PROMISE( + "CallOutboundLoop", + Seq(Map(SendCallInitialMetadataAndBody(stream_id, outgoing_frames, + call_initiator), + [stream_id](absl::Status main_body_result) { + GRPC_TRACE_VLOG(chaotic_good, 2) + << "CHAOTIC_GOOD: CallOutboundLoop: stream_id=" << stream_id + << " main_body_result=" << main_body_result; + return Empty{}; + }), + call_initiator.PullServerTrailingMetadata(), + // Capture the call_initator to ensure the underlying call_spine + // is alive until the SendFragment promise completes. + [stream_id, outgoing_frames, + call_initiator](ServerMetadataHandle md) mutable { + ServerFragmentFrame frame; + frame.trailers = std::move(md); + frame.stream_id = stream_id; + return SendFragment(std::move(frame), outgoing_frames, + call_initiator); + })); } auto ChaoticGoodServerTransport::DeserializeAndPushFragmentToNewCall( @@ -269,57 +271,59 @@ auto ChaoticGoodServerTransport::DeserializeAndPushFragmentToExistingCall( } auto ChaoticGoodServerTransport::ReadOneFrame(ChaoticGoodTransport& transport) { - return TrySeq( - transport.ReadFrameBytes(), - [this, transport = - &transport](std::tuple frame_bytes) { - const auto& frame_header = std::get<0>(frame_bytes); - auto& buffers = std::get<1>(frame_bytes); - return Switch( - frame_header.type, - Case(FrameType::kSettings, - []() -> absl::Status { - return absl::InternalError("Unexpected settings frame"); - }), - Case(FrameType::kFragment, - [this, &frame_header, &buffers, transport]() { - return If( - frame_header.flags.is_set(0), - [this, &frame_header, &buffers, transport]() { - return DeserializeAndPushFragmentToNewCall( - frame_header, std::move(buffers), *transport); - }, - [this, &frame_header, &buffers, transport]() { - return DeserializeAndPushFragmentToExistingCall( - frame_header, std::move(buffers), *transport); - }); - }), - Case(FrameType::kCancel, - [this, &frame_header]() { - absl::optional call_initiator = - ExtractStream(frame_header.stream_id); - GRPC_TRACE_LOG(chaotic_good, INFO) - << "Cancel stream " << frame_header.stream_id - << (call_initiator.has_value() ? " (active)" - : " (not found)"); - return If( - call_initiator.has_value(), - [&call_initiator]() { - auto c = std::move(*call_initiator); - return c.SpawnWaitable("cancel", [c]() mutable { - c.Cancel(); - return absl::OkStatus(); - }); - }, - []() -> absl::Status { return absl::OkStatus(); }); - }), - Default([frame_header]() { - return absl::InternalError( - absl::StrCat("Unexpected frame type: ", - static_cast(frame_header.type))); - })); - }, - []() -> LoopCtl { return Continue{}; }); + return GRPC_LATENT_SEE_PROMISE( + "ReadOneFrame", + TrySeq( + transport.ReadFrameBytes(), + [this, transport = &transport]( + std::tuple frame_bytes) { + const auto& frame_header = std::get<0>(frame_bytes); + auto& buffers = std::get<1>(frame_bytes); + return Switch( + frame_header.type, + Case(FrameType::kSettings, + []() -> absl::Status { + return absl::InternalError("Unexpected settings frame"); + }), + Case(FrameType::kFragment, + [this, &frame_header, &buffers, transport]() { + return If( + frame_header.flags.is_set(0), + [this, &frame_header, &buffers, transport]() { + return DeserializeAndPushFragmentToNewCall( + frame_header, std::move(buffers), *transport); + }, + [this, &frame_header, &buffers, transport]() { + return DeserializeAndPushFragmentToExistingCall( + frame_header, std::move(buffers), *transport); + }); + }), + Case(FrameType::kCancel, + [this, &frame_header]() { + absl::optional call_initiator = + ExtractStream(frame_header.stream_id); + GRPC_TRACE_LOG(chaotic_good, INFO) + << "Cancel stream " << frame_header.stream_id + << (call_initiator.has_value() ? " (active)" + : " (not found)"); + return If( + call_initiator.has_value(), + [&call_initiator]() { + auto c = std::move(*call_initiator); + return c.SpawnWaitable("cancel", [c]() mutable { + c.Cancel(); + return absl::OkStatus(); + }); + }, + []() -> absl::Status { return absl::OkStatus(); }); + }), + Default([frame_header]() { + return absl::InternalError( + absl::StrCat("Unexpected frame type: ", + static_cast(frame_header.type))); + })); + }, + []() -> LoopCtl { return Continue{}; })); } auto ChaoticGoodServerTransport::TransportReadLoop( @@ -360,9 +364,13 @@ ChaoticGoodServerTransport::ChaoticGoodServerTransport( party_arena->SetContext( event_engine.get()); party_ = Party::Make(std::move(party_arena)); - party_->Spawn("server-chaotic-writer", TransportWriteLoop(transport), + party_->Spawn("server-chaotic-writer", + GRPC_LATENT_SEE_PROMISE("ServerTransportWriteLoop", + TransportWriteLoop(transport)), OnTransportActivityDone("writer")); - party_->Spawn("server-chaotic-reader", TransportReadLoop(transport), + party_->Spawn("server-chaotic-reader", + GRPC_LATENT_SEE_PROMISE("ServerTransportReadLoop", + TransportReadLoop(transport)), OnTransportActivityDone("reader")); } diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc index c603f940359..bf6a78bb23c 100644 --- a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc @@ -102,7 +102,7 @@ namespace { // of bytes sent. ssize_t TcpSend(int fd, const struct msghdr* msg, int* saved_errno, int additional_flags = 0) { - GRPC_LATENT_SEE_INNER_SCOPE("TcpSend"); + GRPC_LATENT_SEE_PARENT_SCOPE("TcpSend"); ssize_t sent_length; do { sent_length = sendmsg(fd, msg, SENDMSG_FLAGS | additional_flags); diff --git a/src/core/lib/transport/promise_endpoint.h b/src/core/lib/transport/promise_endpoint.h index 077a1a01f70..0e69b82f7a1 100644 --- a/src/core/lib/transport/promise_endpoint.h +++ b/src/core/lib/transport/promise_endpoint.h @@ -106,24 +106,25 @@ class PromiseEndpoint { return absl::OkStatus(); }; }, - [this]() { - return [write_state = write_state_]() -> Poll { - // If current write isn't finished return `Pending()`, else - // return write result. - WriteState::State expected = WriteState::kWritten; - if (write_state->state.compare_exchange_strong( - expected, WriteState::kIdle, std::memory_order_acquire, - std::memory_order_relaxed)) { - // State was Written, and we changed it to Idle. We can return - // the result. - return std::move(write_state->result); - } - // State was not Written; since we're polling it must be - // Writing. Assert that and return Pending. - CHECK(expected == WriteState::kWriting); - return Pending(); - }; - }); + GRPC_LATENT_SEE_PROMISE( + "DelayedWrite", ([this]() { + return [write_state = write_state_]() -> Poll { + // If current write isn't finished return `Pending()`, else + // return write result. + WriteState::State expected = WriteState::kWritten; + if (write_state->state.compare_exchange_strong( + expected, WriteState::kIdle, std::memory_order_acquire, + std::memory_order_relaxed)) { + // State was Written, and we changed it to Idle. We can return + // the result. + return std::move(write_state->result); + } + // State was not Written; since we're polling it must be + // Writing. Assert that and return Pending. + CHECK(expected == WriteState::kWriting); + return Pending(); + }; + }))); } // Returns a promise that resolves to `SliceBuffer` with @@ -174,25 +175,27 @@ class PromiseEndpoint { return std::move(ret); }; }, - [this, num_bytes]() { - return [read_state = read_state_, - num_bytes]() -> Poll> { - if (!read_state->complete.load(std::memory_order_acquire)) { - return Pending(); - } - // If read succeeds, return `SliceBuffer` with `num_bytes` bytes. - if (read_state->result.ok()) { - SliceBuffer ret; - grpc_slice_buffer_move_first_no_inline( - read_state->buffer.c_slice_buffer(), num_bytes, - ret.c_slice_buffer()); - read_state->complete.store(false, std::memory_order_relaxed); - return std::move(ret); - } - read_state->complete.store(false, std::memory_order_relaxed); - return std::move(read_state->result); - }; - }); + GRPC_LATENT_SEE_PROMISE( + "DelayedRead", ([this, num_bytes]() { + return [read_state = read_state_, + num_bytes]() -> Poll> { + if (!read_state->complete.load(std::memory_order_acquire)) { + return Pending(); + } + // If read succeeds, return `SliceBuffer` with `num_bytes` + // bytes. + if (read_state->result.ok()) { + SliceBuffer ret; + grpc_slice_buffer_move_first_no_inline( + read_state->buffer.c_slice_buffer(), num_bytes, + ret.c_slice_buffer()); + read_state->complete.store(false, std::memory_order_relaxed); + return std::move(ret); + } + read_state->complete.store(false, std::memory_order_relaxed); + return std::move(read_state->result); + }; + }))); } // Returns a promise that resolves to `Slice` with at least diff --git a/src/core/util/latent_see.h b/src/core/util/latent_see.h index cf22a40ed8e..1ace01110a6 100644 --- a/src/core/util/latent_see.h +++ b/src/core/util/latent_see.h @@ -252,12 +252,26 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void Mark(const Metadata* md) { Log::CurrentThreadBin()->Append(md, EventType::kMark, 0); } +template +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION auto Promise(const Metadata* md_poll, + const Metadata* md_flow, + P promise) { + return [md_poll, md_flow, promise = std::move(promise), + flow = Flow(md_flow)]() mutable { + InnerScope scope(md_poll); + flow.End(); + auto r = promise(); + flow.Begin(md_flow); + return r; + }; +} + } // namespace latent_see } // namespace grpc_core #define GRPC_LATENT_SEE_METADATA(name) \ []() { \ static grpc_core::latent_see::Metadata metadata = {__FILE__, __LINE__, \ - #name}; \ + name}; \ return &metadata; \ }() // Parent scope: logs a begin and end event, and flushes the thread log on scope @@ -277,6 +291,9 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void Mark(const Metadata* md) { // scope. #define GRPC_LATENT_SEE_MARK(name) \ grpc_core::latent_see::Mark(GRPC_LATENT_SEE_METADATA(name)) +#define GRPC_LATENT_SEE_PROMISE(name, promise) \ + grpc_core::latent_see::Promise(GRPC_LATENT_SEE_METADATA("Poll:" name), \ + GRPC_LATENT_SEE_METADATA(name), promise) #else // !def(GRPC_ENABLE_LATENT_SEE) namespace grpc_core { namespace latent_see { @@ -305,6 +322,7 @@ struct InnerScope { #define GRPC_LATENT_SEE_MARK(name) \ do { \ } while (0) +#define GRPC_LATENT_SEE_PROMISE(name, promise) promise #endif // GRPC_ENABLE_LATENT_SEE #endif // GRPC_SRC_CORE_UTIL_LATENT_SEE_H From 863aca8949c02c244c8fd7dea3a1f9c087c4f110 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 1 Oct 2024 18:13:27 -0700 Subject: [PATCH 27/74] [call-v3] Implement failed_before_recv_message() on {Client,Server}Call (#37810) Closes #37810 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37810 from ctiller:CANCELLED 134f49a07b242dc2eaa924e784f9b6d48378c1d4 PiperOrigin-RevId: 681236011 --- src/core/lib/surface/client_call.h | 4 +++- src/core/lib/surface/server_call.h | 4 +++- src/core/lib/transport/call_filters.h | 7 +++++++ src/core/lib/transport/call_spine.h | 8 ++++++++ src/core/lib/transport/call_state.h | 23 +++++++++++++++++++++++ src/core/util/dump_args.h | 13 +++++++++---- test/core/transport/call_state_test.cc | 6 ++++++ 7 files changed, 59 insertions(+), 6 deletions(-) diff --git a/src/core/lib/surface/client_call.h b/src/core/lib/surface/client_call.h index 014eafed11d..8180c273ba2 100644 --- a/src/core/lib/surface/client_call.h +++ b/src/core/lib/surface/client_call.h @@ -98,7 +98,9 @@ class ClientCall final char* GetPeer() override; bool Completed() final { Crash("unimplemented"); } - bool failed_before_recv_message() const final { Crash("unimplemented"); } + bool failed_before_recv_message() const final { + return started_call_initiator_.WasCancelledPushed(); + } grpc_compression_algorithm incoming_compression_algorithm() override { return message_receiver_.incoming_compression_algorithm(); diff --git a/src/core/lib/surface/server_call.h b/src/core/lib/surface/server_call.h index b8e4299731b..dcc9d86606e 100644 --- a/src/core/lib/surface/server_call.h +++ b/src/core/lib/surface/server_call.h @@ -129,7 +129,9 @@ class ServerCall final : public Call, public DualRefCounted { } bool Completed() final { Crash("unimplemented"); } - bool failed_before_recv_message() const final { Crash("unimplemented"); } + bool failed_before_recv_message() const final { + return call_handler_.WasCancelledPushed(); + } uint32_t test_only_message_flags() override { return message_receiver_.last_message_flags(); diff --git a/src/core/lib/transport/call_filters.h b/src/core/lib/transport/call_filters.h index b1a54f5dfec..01d4c7614de 100644 --- a/src/core/lib/transport/call_filters.h +++ b/src/core/lib/transport/call_filters.h @@ -1590,10 +1590,17 @@ class CallFilters { GRPC_MUST_USE_RESULT auto WasCancelled() { return [this]() { return call_state_.PollWasCancelled(); }; } + // Client & server: returns true if server trailing metadata has been pushed + // *and* contained a cancellation, false otherwise. + GRPC_MUST_USE_RESULT bool WasCancelledPushed() const { + return call_state_.WasCancelledPushed(); + } + // Returns true if server trailing metadata has been pulled bool WasServerTrailingMetadataPulled() const { return call_state_.WasServerTrailingMetadataPulled(); } + // Client & server: fill in final_info with the final status of the call. void Finalize(const grpc_call_final_info* final_info); diff --git a/src/core/lib/transport/call_spine.h b/src/core/lib/transport/call_spine.h index 6e8e20146be..c3d5687b971 100644 --- a/src/core/lib/transport/call_spine.h +++ b/src/core/lib/transport/call_spine.h @@ -263,6 +263,10 @@ class CallInitiator { return spine_->SpawnWaitable(name, std::move(promise_factory)); } + bool WasCancelledPushed() const { + return spine_->call_filters().WasCancelledPushed(); + } + Arena* arena() { return spine_->arena(); } Party* party() { return spine_.get(); } @@ -304,6 +308,10 @@ class CallHandler { auto WasCancelled() { return spine_->WasCancelled(); } + bool WasCancelledPushed() const { + return spine_->call_filters().WasCancelledPushed(); + } + template void SpawnGuarded(absl::string_view name, PromiseFactory promise_factory, DebugLocation whence = {}) { diff --git a/src/core/lib/transport/call_state.h b/src/core/lib/transport/call_state.h index d741c541f2f..33eca5e66b4 100644 --- a/src/core/lib/transport/call_state.h +++ b/src/core/lib/transport/call_state.h @@ -52,8 +52,14 @@ class CallState { Poll> PollPullServerToClientMessageAvailable(); void FinishPullServerToClientMessage(); Poll PollServerTrailingMetadataAvailable(); + void FinishPullServerTrailingMetadata(); bool WasServerTrailingMetadataPulled() const; + // Resolves after server trailing metadata has been pulled, to true if the + // call was cancelled, and false otherwise. Poll PollWasCancelled(); + // Return true if server trailing metadata has been pushed *and* that push was + // a cancellation. + bool WasCancelledPushed() const; // Debug std::string DebugString() const; @@ -939,6 +945,23 @@ CallState::PollWasCancelled() { Crash("Unreachable"); } +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline bool CallState::WasCancelledPushed() + const { + GRPC_TRACE_LOG(call_state, INFO) + << "[call_state] PollWasCancelledPushed: " + << GRPC_DUMP_ARGS(this, server_trailing_metadata_state_); + switch (server_trailing_metadata_state_) { + case ServerTrailingMetadataState::kNotPushed: + case ServerTrailingMetadataState::kPulled: + case ServerTrailingMetadataState::kPushed: + return false; + case ServerTrailingMetadataState::kPushedCancel: + case ServerTrailingMetadataState::kPulledCancel: + return true; + } + Crash("Unreachable"); +} + } // namespace grpc_core #endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_STATE_H diff --git a/src/core/util/dump_args.h b/src/core/util/dump_args.h index 02519075c36..da923e4f060 100644 --- a/src/core/util/dump_args.h +++ b/src/core/util/dump_args.h @@ -78,20 +78,25 @@ class DumpArgs { return 0; } - int AddDumper(void** p) { + int AddDumper(void const* const* p) { arg_dumpers_.push_back( [p](CustomSink& os) { os.Append(absl::StrFormat("%p", *p)); }); return 0; } template - int AddDumper(T** p) { - return AddDumper(reinterpret_cast(p)); + int AddDumper(T const* const* p) { + return AddDumper(reinterpret_cast(p)); } template int AddDumper(T* const* p) { - return AddDumper(const_cast(p)); + return AddDumper(const_cast(p)); + } + + template + int AddDumper(T const** p) { + return AddDumper(const_cast(p)); } void Stringify(CustomSink& sink) const; diff --git a/test/core/transport/call_state_test.cc b/test/core/transport/call_state_test.cc index c8dcca2825b..fcdf91b2818 100644 --- a/test/core/transport/call_state_test.cc +++ b/test/core/transport/call_state_test.cc @@ -262,11 +262,14 @@ TEST(CallStateTest, RecallNoCancellation) { activity.Activate(); CallState state; state.Start(); + EXPECT_EQ(state.WasCancelledPushed(), false); state.PushServerTrailingMetadata(false); + EXPECT_EQ(state.WasCancelledPushed(), false); EXPECT_THAT(state.PollPullServerInitialMetadataAvailable(), IsReady(false)); state.FinishPullServerInitialMetadata(); EXPECT_THAT(state.PollServerTrailingMetadataAvailable(), IsReady()); EXPECT_THAT(state.PollWasCancelled(), IsReady(false)); + EXPECT_EQ(state.WasCancelledPushed(), false); } TEST(CallStateTest, RecallCancellation) { @@ -274,11 +277,14 @@ TEST(CallStateTest, RecallCancellation) { activity.Activate(); CallState state; state.Start(); + EXPECT_EQ(state.WasCancelledPushed(), false); state.PushServerTrailingMetadata(true); + EXPECT_EQ(state.WasCancelledPushed(), true); EXPECT_THAT(state.PollPullServerInitialMetadataAvailable(), IsReady(false)); state.FinishPullServerInitialMetadata(); EXPECT_THAT(state.PollServerTrailingMetadataAvailable(), IsReady()); EXPECT_THAT(state.PollWasCancelled(), IsReady(true)); + EXPECT_EQ(state.WasCancelledPushed(), true); } TEST(CallStateTest, ReceiveTrailingMetadataAfterMessageRead) { From adc7affc2d84c5c932158e903596415d3e1a6742 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 1 Oct 2024 18:14:17 -0700 Subject: [PATCH 28/74] [resource-quota] Add metrics for number of calls, connections dropped due to quota exceeded (#37833) Closes #37833 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37833 from ctiller:statty f0499160867d52d4d18b679497749ae7c2a6cd86 PiperOrigin-RevId: 681236201 --- .../transport/chttp2/transport/chttp2_transport.cc | 2 ++ src/core/telemetry/stats_data.cc | 13 +++++++++++++ src/core/telemetry/stats_data.h | 13 +++++++++++++ src/core/telemetry/stats_data.yaml | 5 +++++ 4 files changed, 33 insertions(+) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index e4b0b1fdf25..4087efcf6dd 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -3110,6 +3110,7 @@ static void benign_reclaimer_locked( if (error.ok() && t->stream_map.empty()) { // Channel with no active streams: send a goaway to try and make it // disconnect cleanly + grpc_core::global_stats().IncrementRqConnectionsDropped(); GRPC_TRACE_LOG(resource_quota, INFO) << "HTTP2: " << t->peer_string.as_string_view() << " - send goaway to free memory"; @@ -3139,6 +3140,7 @@ static void destructive_reclaimer_locked( GRPC_TRACE_LOG(resource_quota, INFO) << "HTTP2: " << t->peer_string.as_string_view() << " - abandon stream id " << s->id; + grpc_core::global_stats().IncrementRqCallsDropped(); grpc_chttp2_cancel_stream( t.get(), s, grpc_error_set_int(GRPC_ERROR_CREATE("Buffers full"), diff --git a/src/core/telemetry/stats_data.cc b/src/core/telemetry/stats_data.cc index b39702f4762..a357b674844 100644 --- a/src/core/telemetry/stats_data.cc +++ b/src/core/telemetry/stats_data.cc @@ -128,6 +128,8 @@ const absl::string_view "client_subchannels_created", "server_channels_created", "insecure_connections_created", + "rq_connections_dropped", + "rq_calls_dropped", "syscall_write", "syscall_read", "tcp_read_alloc_8k", @@ -165,6 +167,8 @@ const absl::string_view GlobalStats::counter_doc[static_cast( "Number of client subchannels created", "Number of server channels created", "Number of insecure connections created", + "Number of connections dropped due to resource quota exceeded", + "Number of calls dropped due to resource quota exceeded", "Number of write syscalls (or equivalent - eg sendmsg) made by this " "process", "Number of read syscalls (or equivalent - eg recvmsg) made by this process", @@ -464,6 +468,8 @@ GlobalStats::GlobalStats() client_subchannels_created{0}, server_channels_created{0}, insecure_connections_created{0}, + rq_connections_dropped{0}, + rq_calls_dropped{0}, syscall_write{0}, syscall_read{0}, tcp_read_alloc_8k{0}, @@ -601,6 +607,10 @@ std::unique_ptr GlobalStatsCollector::Collect() const { data.server_channels_created.load(std::memory_order_relaxed); result->insecure_connections_created += data.insecure_connections_created.load(std::memory_order_relaxed); + result->rq_connections_dropped += + data.rq_connections_dropped.load(std::memory_order_relaxed); + result->rq_calls_dropped += + data.rq_calls_dropped.load(std::memory_order_relaxed); result->syscall_write += data.syscall_write.load(std::memory_order_relaxed); result->syscall_read += data.syscall_read.load(std::memory_order_relaxed); result->tcp_read_alloc_8k += @@ -716,6 +726,9 @@ std::unique_ptr GlobalStats::Diff(const GlobalStats& other) const { server_channels_created - other.server_channels_created; result->insecure_connections_created = insecure_connections_created - other.insecure_connections_created; + result->rq_connections_dropped = + rq_connections_dropped - other.rq_connections_dropped; + result->rq_calls_dropped = rq_calls_dropped - other.rq_calls_dropped; result->syscall_write = syscall_write - other.syscall_write; result->syscall_read = syscall_read - other.syscall_read; result->tcp_read_alloc_8k = tcp_read_alloc_8k - other.tcp_read_alloc_8k; diff --git a/src/core/telemetry/stats_data.h b/src/core/telemetry/stats_data.h index d0e7e5fd267..1ac7579a994 100644 --- a/src/core/telemetry/stats_data.h +++ b/src/core/telemetry/stats_data.h @@ -206,6 +206,8 @@ struct GlobalStats { kClientSubchannelsCreated, kServerChannelsCreated, kInsecureConnectionsCreated, + kRqConnectionsDropped, + kRqCallsDropped, kSyscallWrite, kSyscallRead, kTcpReadAlloc8k, @@ -283,6 +285,8 @@ struct GlobalStats { uint64_t client_subchannels_created; uint64_t server_channels_created; uint64_t insecure_connections_created; + uint64_t rq_connections_dropped; + uint64_t rq_calls_dropped; uint64_t syscall_write; uint64_t syscall_read; uint64_t tcp_read_alloc_8k; @@ -373,6 +377,13 @@ class GlobalStatsCollector { data_.this_cpu().insecure_connections_created.fetch_add( 1, std::memory_order_relaxed); } + void IncrementRqConnectionsDropped() { + data_.this_cpu().rq_connections_dropped.fetch_add( + 1, std::memory_order_relaxed); + } + void IncrementRqCallsDropped() { + data_.this_cpu().rq_calls_dropped.fetch_add(1, std::memory_order_relaxed); + } void IncrementSyscallWrite() { data_.this_cpu().syscall_write.fetch_add(1, std::memory_order_relaxed); } @@ -562,6 +573,8 @@ class GlobalStatsCollector { std::atomic client_subchannels_created{0}; std::atomic server_channels_created{0}; std::atomic insecure_connections_created{0}; + std::atomic rq_connections_dropped{0}; + std::atomic rq_calls_dropped{0}; std::atomic syscall_write{0}; std::atomic syscall_read{0}; std::atomic tcp_read_alloc_8k{0}; diff --git a/src/core/telemetry/stats_data.yaml b/src/core/telemetry/stats_data.yaml index 6b1f04878d0..c9580cded0b 100644 --- a/src/core/telemetry/stats_data.yaml +++ b/src/core/telemetry/stats_data.yaml @@ -32,6 +32,11 @@ doc: Number of server channels created - counter: insecure_connections_created doc: Number of insecure connections created +# resource quota +- counter: rq_connections_dropped + doc: Number of connections dropped due to resource quota exceeded +- counter: rq_calls_dropped + doc: Number of calls dropped due to resource quota exceeded # tcp - counter: syscall_write doc: Number of write syscalls (or equivalent - eg sendmsg) made by this process From d87165acf4c401ce1d71c8276ea4e975e685362c Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 2 Oct 2024 12:33:26 -0700 Subject: [PATCH 29/74] [chttp2_server] Fix race between connection starting and it being orphaned (#37683) Sample race - https://btx.cloud.google.com/invocations/0c4e65f2-3a38-4b4f-b67e-c53a4a4650ea/targets/%2F%2Ftest%2Fcore%2Fend2end:connectivity_test@poller%3Dpoll;config=2aed862ff4fd4384687d63aa95df415c7cb955355c2ab6dc6c6d7a9d123a76ec/log ``` WARNING: ThreadSanitizer: data race (pid=18) Write of size 8 at 0x72300000c318 by thread T29: #0 grpc_core::Chttp2ServerListener* std::__exchange(grpc_core::Chttp2ServerListener*&, grpc_core::Chttp2ServerListener*&) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h:152:13 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x68c85) #1 grpc_core::Chttp2ServerListener* std::exchange(grpc_core::Chttp2ServerListener*&, grpc_core::Chttp2ServerListener*&) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility:287:14 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x68c05) #2 grpc_core::RefCountedPtr::reset(grpc_core::Chttp2ServerListener*) /proc/self/cwd/./src/core/lib/gprpp/ref_counted_ptr.h:126:20 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x68b32) #3 grpc_core::RefCountedPtr::operator=(grpc_core::RefCountedPtr&&) /proc/self/cwd/./src/core/lib/gprpp/ref_counted_ptr.h:66:5 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x54380) #4 grpc_core::Chttp2ServerListener::ActiveConnection::Start(grpc_core::RefCountedPtr, std::unique_ptr, grpc_core::ChannelArgs const&) /proc/self/cwd/src/core/ext/transport/chttp2/server/chttp2_server.cc:615:13 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x48914) #5 grpc_core::Chttp2ServerListener::OnAccept(void*, grpc_endpoint*, grpc_pollset*, grpc_tcp_server_acceptor*) /proc/self/cwd/src/core/ext/transport/chttp2/server/chttp2_server.cc:881:21 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x49ce2) #6 CreateEventEngineListener(grpc_tcp_server*, grpc_closure*, grpc_event_engine::experimental::EndpointConfig const&, grpc_tcp_server**)::$_2::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const /proc/self/cwd/src/core/lib/iomgr/tcp_server_posix.cc:228:11 (liblibiomgr.so+0xef627) #7 decltype(std::declval()(std::declval>>(), std::declval())) absl::lts_20240116::base_internal::Callable::Invoke>, grpc_event_engine::experimental::MemoryAllocator>(CreateEventEngineListener(grpc_tcp_server*, grpc_closure*, grpc_event_engine::experimental::EndpointConfig const&, grpc_tcp_server**)::$_2&, std::unique_ptr>&&, grpc_event_engine::experimental::MemoryAllocator&&) /proc/self/cwd/external/com_google_absl/absl/base/internal/invoke.h:185:12 (liblibiomgr.so+0xef3c2) #8 decltype(Invoker>, grpc_event_engine::experimental::MemoryAllocator>::type::Invoke(std::declval(), std::declval>>(), std::declval())) absl::lts_20240116::base_internal::invoke>, grpc_event_engine::experimental::MemoryAllocator>(CreateEventEngineListener(grpc_tcp_server*, grpc_closure*, grpc_event_engine::experimental::EndpointConfig const&, grpc_tcp_server**)::$_2&, std::unique_ptr>&&, grpc_event_engine::experimental::MemoryAllocator&&) /proc/self/cwd/external/com_google_absl/absl/base/internal/invoke.h:212:10 (liblibiomgr.so+0xef325) #9 void absl::lts_20240116::internal_any_invocable::InvokeR>, grpc_event_engine::experimental::MemoryAllocator, void>(CreateEventEngineListener(grpc_tcp_server*, grpc_closure*, grpc_event_engine::experimental::EndpointConfig const&, grpc_tcp_server**)::$_2&, std::unique_ptr>&&, grpc_event_engine::experimental::MemoryAllocator&&) /proc/self/cwd/external/com_google_absl/absl/functional/internal/any_invocable.h:132:3 (liblibiomgr.so+0xef2b5) #10 void absl::lts_20240116::internal_any_invocable::LocalInvoker>, grpc_event_engine::experimental::MemoryAllocator>(absl::lts_20240116::internal_any_invocable::TypeErasedState*, absl::lts_20240116::internal_any_invocable::ForwardedParameter>>::type, absl::lts_20240116::internal_any_invocable::ForwardedParameter::type) /proc/self/cwd/external/com_google_absl/absl/functional/internal/any_invocable.h:310:10 (liblibiomgr.so+0xef1e2) #11 absl::lts_20240116::internal_any_invocable::Impl>, grpc_event_engine::experimental::MemoryAllocator)>::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) /proc/self/cwd/external/com_google_absl/absl/functional/internal/any_invocable.h:868:1 (libsrc_Score_Slibposix_Uevent_Uengine.so+0xa754f) #12 grpc_event_engine::experimental::ThreadyEventEngine::CreateListener(absl::lts_20240116::AnyInvocable>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()::operator()() /proc/self/cwd/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc:61:15 (libsrc_Score_Slibthready_Uevent_Uengine.so+0x27cdb) #13 decltype(std::declval>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&>()()) absl::lts_20240116::base_internal::Callable::Invoke>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&>(grpc_event_engine::experimental::ThreadyEventEngine::CreateListener(absl::lts_20240116::AnyInvocable>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&) /proc/self/cwd/external/com_google_absl/absl/base/internal/invoke.h:185:12 (libsrc_Score_Slibthready_Uevent_Uengine.so+0x27c45) #14 decltype(Invoker>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&>::type::Invoke(std::declval>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&>())) absl::lts_20240116::base_internal::invoke>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&>(grpc_event_engine::experimental::ThreadyEventEngine::CreateListener(absl::lts_20240116::AnyInvocable>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&) /proc/self/cwd/external/com_google_absl/absl/base/internal/invoke.h:212:10 (libsrc_Score_Slibthready_Uevent_Uengine.so+0x27bf5) #15 void absl::lts_20240116::internal_any_invocable::InvokeR>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&, void>(grpc_event_engine::experimental::ThreadyEventEngine::CreateListener(absl::lts_20240116::AnyInvocable>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&) /proc/self/cwd/external/com_google_absl/absl/functional/internal/any_invocable.h:132:3 (libsrc_Score_Slibthready_Uevent_Uengine.so+0x27ba5) #16 void absl::lts_20240116::internal_any_invocable::RemoteInvoker>, grpc_event_engine::experimental::MemoryAllocator)>, absl::lts_20240116::AnyInvocable, grpc_event_engine::experimental::EndpointConfig const&, std::unique_ptr>)::$_0::operator()(std::unique_ptr>, grpc_event_engine::experimental::MemoryAllocator) const::'lambda'()&>(absl::lts_20240116::internal_any_invocable::TypeErasedState*) /proc/self/cwd/external/com_google_absl/absl/functional/internal/any_invocable.h:368:10 (libsrc_Score_Slibthready_Uevent_Uengine.so+0x279cd) #17 absl::lts_20240116::internal_any_invocable::Impl::operator()() /proc/self/cwd/external/com_google_absl/absl/functional/internal/any_invocable.h:868:1 (libtest_Score_Send2end_Slibconnectivity_Ulibrary.so+0x337ff) #18 grpc_core::Thread::Thread(char const*, absl::lts_20240116::AnyInvocable, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::operator()(void*) const /proc/self/cwd/./src/core/lib/gprpp/thd.h:108:15 (libsrc_Score_Slibthready_Uevent_Uengine.so+0x2e264) #19 grpc_core::Thread::Thread(char const*, absl::lts_20240116::AnyInvocable, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) /proc/self/cwd/./src/core/lib/gprpp/thd.h:105:13 (libsrc_Score_Slibthready_Uevent_Uengine.so+0x2e1e9) #20 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::operator()(void*) const /proc/self/cwd/src/core/lib/gprpp/posix/thd.cc:148:11 (liblibgpr.so+0x1d830) #21 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) /proc/self/cwd/src/core/lib/gprpp/posix/thd.cc:118:9 (liblibgpr.so+0x1d659) Previous read of size 8 at 0x72300000c318 by main thread: #0 grpc_core::RefCountedPtr::operator!=(std::nullptr_t) const /proc/self/cwd/./src/core/lib/gprpp/ref_counted_ptr.h:192:50 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x52345) #1 grpc_core::Chttp2ServerListener::ActiveConnection::HandshakingState::~HandshakingState() /proc/self/cwd/src/core/ext/transport/chttp2/server/chttp2_server.cc:394:30 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x463ed) #2 std::enable_if::value, grpc_core::Chttp2ServerListener::ActiveConnection::HandshakingState*>::type grpc_event_engine::experimental::MemoryAllocator::New, grpc_pollset*&, std::unique_ptr, grpc_core::ChannelArgs const&>(grpc_core::RefCountedPtr&&, grpc_pollset*&, std::unique_ptr&&, grpc_core::ChannelArgs const&)::Wrapper::~Wrapper() /proc/self/cwd/include/grpc/event_engine/memory_allocator.h:117:65 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x67a1c) #3 std::enable_if::value, grpc_core::Chttp2ServerListener::ActiveConnection::HandshakingState*>::type grpc_event_engine::experimental::MemoryAllocator::New, grpc_pollset*&, std::unique_ptr, grpc_core::ChannelArgs const&>(grpc_core::RefCountedPtr&&, grpc_pollset*&, std::unique_ptr&&, grpc_core::ChannelArgs const&)::Wrapper::~Wrapper() /proc/self/cwd/include/grpc/event_engine/memory_allocator.h:117:27 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x67a59) #4 void grpc_core::UnrefDelete::operator()(grpc_core::Chttp2ServerListener::ActiveConnection::HandshakingState*) const /proc/self/cwd/./src/core/lib/gprpp/ref_counted.h:224:5 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x6449d) #5 grpc_core::InternallyRefCounted::Unref() /proc/self/cwd/./src/core/lib/gprpp/orphanable.h:132:7 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x52581) #6 grpc_core::Chttp2ServerListener::ActiveConnection::HandshakingState::Orphan() /proc/self/cwd/src/core/ext/transport/chttp2/server/chttp2_server.cc:407:3 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x466ac) #7 void grpc_core::OrphanableDelete::operator()(grpc_core::Chttp2ServerListener::ActiveConnection::HandshakingState*) /proc/self/cwd/./src/core/lib/gprpp/orphanable.h:60:8 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x653b1) #8 std::unique_ptr::~unique_ptr() /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x53ddf) #9 grpc_core::Chttp2ServerListener::ActiveConnection::Orphan() /proc/self/cwd/src/core/ext/transport/chttp2/server/chttp2_server.cc:581:1 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x487db) #10 void grpc_core::OrphanableDelete::operator()(grpc_core::Chttp2ServerListener::ActiveConnection*) /proc/self/cwd/./src/core/lib/gprpp/orphanable.h:60:8 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x66b01) #11 std::unique_ptr::~unique_ptr() /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x53d1f) #12 std::pair>::~pair() /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h:208:12 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x597f9) #13 void __gnu_cxx::new_allocator>>>::destroy>>(std::pair>*) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h:152:10 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x597c1) #14 void std::allocator_traits>>>>::destroy>>(std::allocator>>>&, std::pair>*) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h:496:8 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x59725) #15 std::_Rb_tree>, std::_Select1st>>, std::less, std::allocator>>>::_M_destroy_node(std::_Rb_tree_node>>*) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:642:2 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x59674) #16 std::_Rb_tree>, std::_Select1st>>, std::less, std::allocator>>>::_M_drop_node(std::_Rb_tree_node>>*) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:650:2 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x595f9) #17 std::_Rb_tree>, std::_Select1st>>, std::less, std::allocator>>>::_M_erase(std::_Rb_tree_node>>*) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:1920:4 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x5945f) #18 std::_Rb_tree>, std::_Select1st>>, std::less, std::allocator>>>::~_Rb_tree() /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:1000:9 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x593c5) #19 std::map, std::less, std::allocator>>>::~map() /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_map.h:300:22 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x51525) #20 grpc_core::Chttp2ServerListener::Orphan() /proc/self/cwd/src/core/ext/transport/chttp2/server/chttp2_server.cc:923:1 (libsrc_Score_Slibgrpc_Utransport_Uchttp2_Userver.so+0x4b5dd) #21 void grpc_core::OrphanableDelete::operator()(grpc_core::Server::ListenerInterface*) /proc/self/cwd/./src/core/lib/gprpp/orphanable.h:60:8 (libsrc_Score_Slibchaotic_Ugood_Userver.so+0x1d0981) #22 std::unique_ptr::reset(grpc_core::Server::ListenerInterface*) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:402:4 (liblibserver.so+0x1d5c21) #23 grpc_core::Server::StopListening() /proc/self/cwd/src/core/server/server.cc:1211:23 (liblibserver.so+0x1b9c62) #24 grpc_core::Server::ShutdownAndNotify(grpc_completion_queue*, void*) /proc/self/cwd/src/core/server/server.cc:1195:3 (liblibserver.so+0x1b97da) #25 grpc_server_shutdown_and_notify /proc/self/cwd/src/core/server/server.cc:1829:37 (liblibserver.so+0x1bf212) #26 grpc_core::CoreEnd2endTest::ShutdownServerAndNotify(int) /proc/self/cwd/./test/core/end2end/end2end_tests.h:459:5 (libtest_Score_Send2end_Slibconnectivity_Ulibrary.so+0x33370) #27 grpc_core::(anonymous namespace)::CoreEnd2endTest_RetryHttp2Test_ConnectivityWatch::RunTest() /proc/self/cwd/test/core/end2end/tests/connectivity.cc:74:3 (libtest_Score_Send2end_Slibconnectivity_Ulibrary.so+0x2ee8d) #28 grpc_core::(anonymous namespace)::CoreEnd2endTest_RetryHttp2Test_ConnectivityWatch::TestBody() /proc/self/cwd/test/core/end2end/tests/connectivity.cc:32:1 (libtest_Score_Send2end_Slibconnectivity_Ulibrary.so+0x2dc96) #29 void testing::internal::HandleSehExceptionsInMethodIfSupported(testing::Test*, void (testing::Test::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2612:10 (libexternal_Scom_Ugoogle_Ugoogletest_Slibgtest.so+0x16d2dc) #30 void testing::internal::HandleExceptionsInMethodIfSupported(testing::Test*, void (testing::Test::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2648:14 (libexternal_Scom_Ugoogle_Ugoogletest_Slibgtest.so+0x14a51d) #31 testing::Test::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2687:5 (libexternal_Scom_Ugoogle_Ugoogletest_Slibgtest.so+0x120458) #32 testing::TestInfo::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2836:11 (libexternal_Scom_Ugoogle_Ugoogletest_Slibgtest.so+0x1215f3) #33 testing::TestSuite::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:3015:30 (libexternal_Scom_Ugoogle_Ugoogletest_Slibgtest.so+0x12230c) #34 testing::internal::UnitTestImpl::RunAllTests() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5921:44 (libexternal_Scom_Ugoogle_Ugoogletest_Slibgtest.so+0x138142) #35 bool testing::internal::HandleSehExceptionsInMethodIfSupported(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2612:10 (libexternal_Scom_Ugoogle_Ugoogletest_Slibgtest.so+0x17508f) #36 bool testing::internal::HandleExceptionsInMethodIfSupported(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2648:14 (libexternal_Scom_Ugoogle_Ugoogletest_Slibgtest.so+0x14e5b3) #37 testing::UnitTest::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5485:10 (libexternal_Scom_Ugoogle_Ugoogletest_Slibgtest.so+0x13795b) #38 RUN_ALL_TESTS() /proc/self/cwd/external/com_google_googletest/googletest/include/gtest/gtest.h:2316:73 (libtest_Score_Send2end_Slibend2end_Utest_Umain.so+0x8457) #39 main /proc/self/cwd/test/core/end2end/end2end_test_main.cc:50:10 (libtest_Score_Send2end_Slibend2end_Utest_Umain.so+0x77b6) ``` We start the connection outside the critical region and that's where we supply the listener ref to the connection. There is a freak case where the connection can be orphaned due to the listener stopping to serve and the `Orphan()` would also be trying to access the listener ref resulting in a race. Closes #37683 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37683 from yashykt:FixChttp2ServerRace e3c452984f9c2fa0b9ea425fbd8b58d285d1fc5f PiperOrigin-RevId: 681552145 --- .../transport/chttp2/server/chttp2_server.cc | 47 +++++++++++-------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index 3ebc5758950..ac0562c4117 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -207,7 +207,8 @@ class Chttp2ServerListener : public Server::ListenerInterface { grpc_pollset_set* const interested_parties_; }; - ActiveConnection(grpc_pollset* accepting_pollset, AcceptorPtr acceptor, + ActiveConnection(RefCountedPtr listener, + grpc_pollset* accepting_pollset, AcceptorPtr acceptor, EventEngine* event_engine, const ChannelArgs& args, MemoryOwner memory_owner); @@ -215,8 +216,7 @@ class Chttp2ServerListener : public Server::ListenerInterface { void SendGoAway(); - void Start(RefCountedPtr listener, - OrphanablePtr endpoint, const ChannelArgs& args); + void Start(OrphanablePtr endpoint, const ChannelArgs& args); // Needed to be able to grab an external ref in // Chttp2ServerListener::OnAccept() @@ -228,6 +228,9 @@ class Chttp2ServerListener : public Server::ListenerInterface { RefCountedPtr listener_; Mutex mu_ ABSL_ACQUIRED_AFTER(&listener_->mu_); + // Was ActiveConnection::Start() invoked? Used to determine whether + // tcp_server needs to be unreffed. + bool connection_started_ ABSL_GUARDED_BY(&mu_) = false; // Set by HandshakingState before the handshaking begins and reset when // handshaking is done. OrphanablePtr handshaking_state_ ABSL_GUARDED_BY(&mu_); @@ -390,11 +393,16 @@ Chttp2ServerListener::ActiveConnection::HandshakingState::HandshakingState( } Chttp2ServerListener::ActiveConnection::HandshakingState::~HandshakingState() { + bool connection_started = false; + { + MutexLock lock(&connection_->mu_); + connection_started = connection_->connection_started_; + } if (accepting_pollset_ != nullptr) { grpc_pollset_set_del_pollset(interested_parties_, accepting_pollset_); } grpc_pollset_set_destroy(interested_parties_); - if (connection_->listener_ != nullptr && + if (connection_started && connection_->listener_ != nullptr && connection_->listener_->tcp_server_ != nullptr) { grpc_tcp_server_unref(connection_->listener_->tcp_server_); } @@ -566,10 +574,12 @@ void Chttp2ServerListener::ActiveConnection::HandshakingState::OnHandshakeDone( // Chttp2ServerListener::ActiveConnection::ActiveConnection( + RefCountedPtr listener, grpc_pollset* accepting_pollset, AcceptorPtr acceptor, EventEngine* event_engine, const ChannelArgs& args, MemoryOwner memory_owner) - : handshaking_state_(memory_owner.MakeOrphanable( + : listener_(std::move(listener)), + handshaking_state_(memory_owner.MakeOrphanable( Ref(), accepting_pollset, std::move(acceptor), args)), event_engine_(event_engine) { GRPC_CLOSURE_INIT(&on_close_, ActiveConnection::OnClose, this, @@ -626,12 +636,11 @@ void Chttp2ServerListener::ActiveConnection::SendGoAway() { } void Chttp2ServerListener::ActiveConnection::Start( - RefCountedPtr listener, OrphanablePtr endpoint, const ChannelArgs& args) { - listener_ = std::move(listener); RefCountedPtr handshaking_state_ref; { MutexLock lock(&mu_); + connection_started_ = true; // If the Connection is already shutdown at this point, it implies the // owning Chttp2ServerListener and all associated ActiveConnections have // been orphaned. @@ -863,34 +872,32 @@ void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp, auto memory_owner = self->memory_quota_->CreateMemoryOwner(); EventEngine* const event_engine = self->args_.GetObject(); auto connection = memory_owner.MakeOrphanable( - accepting_pollset, std::move(acceptor), event_engine, args, - std::move(memory_owner)); + self->RefAsSubclass(), accepting_pollset, + std::move(acceptor), event_engine, args, std::move(memory_owner)); // Hold a ref to connection to allow starting handshake outside the // critical region RefCountedPtr connection_ref = connection->Ref(); - RefCountedPtr listener_ref; { MutexLock lock(&self->mu_); // Shutdown the the connection if listener's stopped serving or if the // connection manager has changed. if (!self->shutdown_ && self->is_serving_ && connection_manager == self->connection_manager_) { - // The ref for both the listener and tcp_server need to be taken in the - // critical region after having made sure that the listener has not been - // Orphaned, so as to avoid heap-use-after-free issues where `Ref()` is - // invoked when the listener is already shutdown. Note that the listener - // holds a ref to the tcp_server but this ref is given away when the - // listener is orphaned (shutdown). A connection needs the tcp_server to - // outlast the handshake since the acceptor needs it. + // The ref for the tcp_server needs to be taken in the critical region + // after having made sure that the listener has not been Orphaned, so as + // to avoid heap-use-after-free issues where `Ref()` is invoked when the + // listener is already shutdown. Note that the listener holds a ref to the + // tcp_server but this ref is given away when the listener is orphaned + // (shutdown). A connection needs the tcp_server to outlast the handshake + // since the acceptor needs it. if (self->tcp_server_ != nullptr) { grpc_tcp_server_ref(self->tcp_server_); } - listener_ref = self->RefAsSubclass(); self->connections_.emplace(connection.get(), std::move(connection)); } } - if (connection == nullptr && listener_ref != nullptr) { - connection_ref->Start(std::move(listener_ref), std::move(endpoint), args); + if (connection == nullptr) { + connection_ref->Start(std::move(endpoint), args); } } From 7c7a979ab278303fc65df747de4519a1282f440f Mon Sep 17 00:00:00 2001 From: Kukki <16548543+AlienCookie@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:41:23 -0700 Subject: [PATCH 30/74] Added static Type method to some credential types (#37795) * grpc_google_default_channel_credentials * TlsServerCredentials * grpc_alts(_server)_credentials * UrlExternalAccountCredentials * FileExternalAccountCredentials * AwsExternalAccountCredentials Closes #37795 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37795 from AlienCookie:patch-1 34ffa5eca5d3520c7127c10c0f1e66144e0595a1 PiperOrigin-RevId: 681554756 --- .../lib/security/credentials/alts/alts_credentials.cc | 4 ++-- src/core/lib/security/credentials/alts/alts_credentials.h | 8 ++++++-- .../external/aws_external_account_credentials.cc | 2 +- .../external/aws_external_account_credentials.h | 4 +++- .../external/file_external_account_credentials.cc | 2 +- .../external/file_external_account_credentials.h | 4 +++- .../external/url_external_account_credentials.cc | 2 +- .../external/url_external_account_credentials.h | 4 +++- .../google_default/google_default_credentials.cc | 3 +-- .../google_default/google_default_credentials.h | 4 +++- src/core/lib/security/credentials/tls/tls_credentials.cc | 2 +- src/core/lib/security/credentials/tls/tls_credentials.h | 4 +++- 12 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/core/lib/security/credentials/alts/alts_credentials.cc b/src/core/lib/security/credentials/alts/alts_credentials.cc index fd8c364c26a..45888d0e808 100644 --- a/src/core/lib/security/credentials/alts/alts_credentials.cc +++ b/src/core/lib/security/credentials/alts/alts_credentials.cc @@ -54,7 +54,7 @@ grpc_alts_credentials::create_security_connector( this->Ref(), std::move(call_creds), target_name); } -grpc_core::UniqueTypeName grpc_alts_credentials::type() const { +grpc_core::UniqueTypeName grpc_alts_credentials::Type() { static grpc_core::UniqueTypeName::Factory kFactory("Alts"); return kFactory.Create(); } @@ -80,7 +80,7 @@ grpc_alts_server_credentials::~grpc_alts_server_credentials() { gpr_free(handshaker_service_url_); } -grpc_core::UniqueTypeName grpc_alts_server_credentials::type() const { +grpc_core::UniqueTypeName grpc_alts_server_credentials::Type() { static grpc_core::UniqueTypeName::Factory kFactory("Alts"); return kFactory.Create(); } diff --git a/src/core/lib/security/credentials/alts/alts_credentials.h b/src/core/lib/security/credentials/alts/alts_credentials.h index 3aa072789ff..c998c05210f 100644 --- a/src/core/lib/security/credentials/alts/alts_credentials.h +++ b/src/core/lib/security/credentials/alts/alts_credentials.h @@ -43,7 +43,9 @@ class grpc_alts_credentials final : public grpc_channel_credentials { grpc_core::RefCountedPtr call_creds, const char* target_name, grpc_core::ChannelArgs* args) override; - grpc_core::UniqueTypeName type() const override; + static grpc_core::UniqueTypeName Type(); + + grpc_core::UniqueTypeName type() const override { return Type(); } const grpc_alts_credentials_options* options() const { return options_; } grpc_alts_credentials_options* mutable_options() { return options_; } @@ -70,7 +72,9 @@ class grpc_alts_server_credentials final : public grpc_server_credentials { grpc_core::RefCountedPtr create_security_connector(const grpc_core::ChannelArgs& /* args */) override; - grpc_core::UniqueTypeName type() const override; + static grpc_core::UniqueTypeName Type(); + + grpc_core::UniqueTypeName type() const override { return Type(); } const grpc_alts_credentials_options* options() const { return options_; } grpc_alts_credentials_options* mutable_options() { return options_; } diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc index 23061f1679a..3348e3c5aba 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc @@ -512,7 +512,7 @@ std::string AwsExternalAccountCredentials::debug_string() { ")"); } -UniqueTypeName AwsExternalAccountCredentials::type() const { +UniqueTypeName AwsExternalAccountCredentials::Type() { static UniqueTypeName::Factory kFactory("AwsExternalAccountCredentials"); return kFactory.Create(); } diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.h b/src/core/lib/security/credentials/external/aws_external_account_credentials.h index 466094cbe23..3ccac92ad7a 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.h @@ -51,7 +51,9 @@ class AwsExternalAccountCredentials final : public ExternalAccountCredentials { std::string debug_string() override; - UniqueTypeName type() const override; + static UniqueTypeName Type(); + + UniqueTypeName type() const override { return Type(); } private: // A FetchBody impl that itself performs a sequence of FetchBody operations. diff --git a/src/core/lib/security/credentials/external/file_external_account_credentials.cc b/src/core/lib/security/credentials/external/file_external_account_credentials.cc index c38adc83dc6..6c8e1f06062 100644 --- a/src/core/lib/security/credentials/external/file_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/file_external_account_credentials.cc @@ -157,7 +157,7 @@ std::string FileExternalAccountCredentials::debug_string() { ")"); } -UniqueTypeName FileExternalAccountCredentials::type() const { +UniqueTypeName FileExternalAccountCredentials::Type() { static UniqueTypeName::Factory kFactory("FileExternalAccountCredentials"); return kFactory.Create(); } diff --git a/src/core/lib/security/credentials/external/file_external_account_credentials.h b/src/core/lib/security/credentials/external/file_external_account_credentials.h index 7d4721a0bf4..093f0a02809 100644 --- a/src/core/lib/security/credentials/external/file_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/file_external_account_credentials.h @@ -46,7 +46,9 @@ class FileExternalAccountCredentials final : public ExternalAccountCredentials { std::string debug_string() override; - UniqueTypeName type() const override; + static UniqueTypeName Type(); + + UniqueTypeName type() const override { return Type(); } private: class FileFetchBody final : public FetchBody { diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.cc b/src/core/lib/security/credentials/external/url_external_account_credentials.cc index bcea5eadc09..39efb91d8f3 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.cc @@ -137,7 +137,7 @@ std::string UrlExternalAccountCredentials::debug_string() { ")"); } -UniqueTypeName UrlExternalAccountCredentials::type() const { +UniqueTypeName UrlExternalAccountCredentials::Type() { static UniqueTypeName::Factory kFactory("UrlExternalAccountCredentials"); return kFactory.Create(); } diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.h b/src/core/lib/security/credentials/external/url_external_account_credentials.h index bf44736edf6..d7a28777d2d 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.h @@ -50,7 +50,9 @@ class UrlExternalAccountCredentials final : public ExternalAccountCredentials { std::string debug_string() override; - UniqueTypeName type() const override; + static UniqueTypeName Type(); + + UniqueTypeName type() const override { return Type(); } private: OrphanablePtr RetrieveSubjectToken( diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index ba9aeca2942..6581194e911 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -162,8 +162,7 @@ grpc_google_default_channel_credentials::update_arguments( return args.SetIfUnset(GRPC_ARG_DNS_ENABLE_SRV_QUERIES, true); } -grpc_core::UniqueTypeName grpc_google_default_channel_credentials::type() - const { +grpc_core::UniqueTypeName grpc_google_default_channel_credentials::Type() { static grpc_core::UniqueTypeName::Factory kFactory("GoogleDefault"); return kFactory.Create(); } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index 58f9ae40cdc..889aebde57b 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -65,7 +65,9 @@ class grpc_google_default_channel_credentials grpc_core::ChannelArgs update_arguments(grpc_core::ChannelArgs args) override; - grpc_core::UniqueTypeName type() const override; + static grpc_core::UniqueTypeName Type(); + + grpc_core::UniqueTypeName type() const override { return Type(); } const grpc_channel_credentials* alts_creds() const { return alts_creds_.get(); diff --git a/src/core/lib/security/credentials/tls/tls_credentials.cc b/src/core/lib/security/credentials/tls/tls_credentials.cc index 765f669e5ce..5fd5abf419e 100644 --- a/src/core/lib/security/credentials/tls/tls_credentials.cc +++ b/src/core/lib/security/credentials/tls/tls_credentials.cc @@ -145,7 +145,7 @@ TlsServerCredentials::create_security_connector( CreateTlsServerSecurityConnector(this->Ref(), options_); } -grpc_core::UniqueTypeName TlsServerCredentials::type() const { +grpc_core::UniqueTypeName TlsServerCredentials::Type() { static grpc_core::UniqueTypeName::Factory kFactory("Tls"); return kFactory.Create(); } diff --git a/src/core/lib/security/credentials/tls/tls_credentials.h b/src/core/lib/security/credentials/tls/tls_credentials.h index fd78967d8f5..a22cd428657 100644 --- a/src/core/lib/security/credentials/tls/tls_credentials.h +++ b/src/core/lib/security/credentials/tls/tls_credentials.h @@ -62,7 +62,9 @@ class TlsServerCredentials final : public grpc_server_credentials { grpc_core::RefCountedPtr create_security_connector(const grpc_core::ChannelArgs& /* args */) override; - grpc_core::UniqueTypeName type() const override; + static grpc_core::UniqueTypeName Type(); + + grpc_core::UniqueTypeName type() const override { return Type(); } grpc_tls_credentials_options* options() const { return options_.get(); } From a422c8ffe3e57040fa47bb6c5579e50967d41775 Mon Sep 17 00:00:00 2001 From: Yousuk Seung Date: Wed, 2 Oct 2024 15:16:10 -0700 Subject: [PATCH 31/74] [experiments] retry work_serializer_dispatch with posix (#37839) All known flakes/bugs have been fixed. Closes #37839 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37839 from yousukseung:work_serializer_dispatch a82a068ebfd5d5f19c014e68321829f7c9216332 PiperOrigin-RevId: 681609545 --- bazel/experiments.bzl | 16 ++++++---------- src/core/lib/experiments/experiments.cc | 2 +- src/core/lib/experiments/experiments.h | 3 ++- src/core/lib/experiments/rollouts.yaml | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/bazel/experiments.bzl b/bazel/experiments.bzl index 0709155657e..830d4a076d2 100644 --- a/bazel/experiments.bzl +++ b/bazel/experiments.bzl @@ -138,10 +138,6 @@ EXPERIMENTS = { "core_end2end_test": [ "event_engine_client", "local_connector_secure", - "work_serializer_dispatch", - ], - "cpp_end2end_test": [ - "work_serializer_dispatch", ], "endpoint_test": [ "tcp_frame_size_tuning", @@ -155,16 +151,10 @@ EXPERIMENTS = { "tcp_frame_size_tuning", "tcp_rcv_lowat", ], - "lb_unit_test": [ - "work_serializer_dispatch", - ], "resource_quota_test": [ "free_large_allocator", "unconstrained_max_quota_buffer_size", ], - "xds_end2end_test": [ - "work_serializer_dispatch", - ], }, "on": { "cancel_ares_query_test": [ @@ -172,6 +162,10 @@ EXPERIMENTS = { ], "core_end2end_test": [ "event_engine_listener", + "work_serializer_dispatch", + ], + "cpp_end2end_test": [ + "work_serializer_dispatch", ], "cpp_lb_end2end_test": [ "pick_first_new", @@ -181,12 +175,14 @@ EXPERIMENTS = { ], "lb_unit_test": [ "pick_first_new", + "work_serializer_dispatch", ], "resolver_component_tests_runner_invoker": [ "event_engine_dns", ], "xds_end2end_test": [ "pick_first_new", + "work_serializer_dispatch", ], }, }, diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index 7a6522410d7..8464f0756a0 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -462,7 +462,7 @@ const ExperimentMetadata g_experiment_metadata[] = { additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, true}, {"work_serializer_dispatch", description_work_serializer_dispatch, - additional_constraints_work_serializer_dispatch, nullptr, 0, false, true}, + additional_constraints_work_serializer_dispatch, nullptr, 0, true, true}, }; } // namespace grpc_core diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index ca6c0734a81..8aa59e12f9b 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h @@ -155,7 +155,8 @@ inline bool IsTraceRecordCallopsEnabled() { return true; } inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; } -inline bool IsWorkSerializerDispatchEnabled() { return false; } +#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_DISPATCH +inline bool IsWorkSerializerDispatchEnabled() { return true; } #endif #else diff --git a/src/core/lib/experiments/rollouts.yaml b/src/core/lib/experiments/rollouts.yaml index 36ef43d8b40..eb86f1d851e 100644 --- a/src/core/lib/experiments/rollouts.yaml +++ b/src/core/lib/experiments/rollouts.yaml @@ -112,6 +112,6 @@ default: # TODO(ysseung): Not fully tested. ios: broken - posix: false + posix: true # TODO(ysseung): Test flakes not fully resolved. windows: broken From 14d15834b96fef8158a08be1145bac5481ed7408 Mon Sep 17 00:00:00 2001 From: Sourabh Singh Date: Thu, 3 Oct 2024 08:26:30 -0700 Subject: [PATCH 32/74] [grpc][Python][doc] Added CONTRIBUTING.md to guide new contributors through the process of contributing to gRPC Python (#36749) This PR introduces a new CONTRIBUTING.md file to the gRPC Python repository. The goal of this document is to provide clear and comprehensive guidelines for new contributors who are interested in contributing to the project. - **Code of Conduct**: Establishes expectations for respectful and inclusive interactions within the community. - **Guidelines**: Offers advice and best practices for contributing effectively, including how to find issues, get started with the codebase, and follow the project's standards. - **Ways to Contribute**: Highlights the diverse ways in which people can contribute beyond just code, including documentation, community support, and testing. - **Steps to Contributing**: Provides a step-by-step guide on how to set up a development environment, make changes, run tests, and submit a pull request. - **Code Style**: Outlines the coding conventions and tools used in the project to ensure consistency. Closes #36749 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36749 from sourabhsinghs:documentation/python-contributing-guide bcd11237420ab1a54455624f9a251aeea757f997 PiperOrigin-RevId: 681889662 --- src/python/CONTRIBUTING.md | 92 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/python/CONTRIBUTING.md diff --git a/src/python/CONTRIBUTING.md b/src/python/CONTRIBUTING.md new file mode 100644 index 00000000000..9e92b6679c5 --- /dev/null +++ b/src/python/CONTRIBUTING.md @@ -0,0 +1,92 @@ +# Contributing to gRPC Python +We're thrilled you're interested in contributing to gRPC Python! Our vibrant community is the heart of this project. Your expertise and ideas are invaluable, so join us in shaping the future of gRPC Python. + +## Legal Requirements +**Sign the CLA:** Before your PR can be reviewed, you'll need to sign the [CNCF Contributor License Agreement (CLA)](https://identity.linuxfoundation.org/projects/cncf). + +## Community Code of Conduct +gRPC Python follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). + + +## Guidelines +gRPC Python Follows [gRPC Guidelines for Pull Requests](https://github.com/grpc/grpc/blob/master/CONTRIBUTING.md#guidelines-for-pull-requests) + +## There are many ways to contribute! + +* **Code:** Fix bugs, add new features, or improve existing code. +* **Documentation:** Improve tutorials, guides, or API reference documentation. +* **Community:** Answer questions on forums, help triage issues, or write blog posts. +* **Testing:** Help ensure the quality of gRPC Python by writing tests or reporting bugs. + + +## Writing Your First Patch for gRPC Python + +Ready to dive in? We'll walk you through the entire process of making your first contribution, from identifying an issue to submitting your changes for review. Don't worry if you're new to open source – our documentation and helpful community will ensure a smooth experience. + +### Prerequisites + +* **Git:** You should have Git installed on your system. If not, download and install it from the [official Git website](https://git-scm.com/). +* **GitHub Account:** You'll need a GitHub account to fork the repository and submit pull requests. +* **Python:** You should have a good understanding of Python programming. If you're new to Python, there are many resources available online to get you started. You can find the official documentation on the [Python website](https://www.python.org/doc/). +* **gRPC Concepts:** Familiarize yourself with the basics of gRPC, including concepts like protocol buffers, services, clients, and servers. Refer to the [gRPC documentation](https://grpc.io/docs/) for an overview. +* **Bazel:** Bazel is one of the build systems used for gRPC. To install it, follow the instructions for your operating system on the [Bazel website](https://bazel.build/install). + +### Steps to Contributing to gRPC Python + +1. **Find an Issue:** + * **Browse Open Issues:** Look for issues labeled "[help wanted](https://github.com/grpc/grpc/issues?q=is%3Aopen+label%3A%22disposition%2Fhelp+wanted%22)" on the [gRPC Python issue tracker](https://github.com/grpc/grpc/issues?q=is%3Aissue+is%3Aopen+label%3Alang%2Fpython+sort%3Aupdated-desc). + * **Ask for Help:** If you're unsure where to start or need clarification on an issue, feel free to ask questions on the [gRPC forum](https://groups.google.com/g/grpc-io). +2. **Get a Copy of the gRPC Python Development Version:** + * **Fork:** Click the "Fork" button on the top right of the [gRPC repository page](https://github.com/grpc/grpc) to create a copy of the repository under your GitHub account. + * **Clone your fork:** + ```git clone https://github.com//grpc.git``` + * **Initialize and Update Submodules:** + ```bash + cd grpc + git submodule update --init --recursive + ``` + * **Create a Branch:** Make your changes on a new branch: + ```git checkout -b my-feature-branch``` +3. **Setting up Your Local System for Development and Testing:** + * Create a new virtual environment by running:```python -m venv ~/.virtualenvs/grpc-python``` + * Activate the environment: ```source ~/.virtualenvs/grpc-python/bin/activate``` + * Install Dependencies: ```pip install -r requirements.txt``` +4. **Run Tests:** + * Before making any changes, run the existing test suite to ensure your environment is set up correctly: + * **Using Bazel (Recommended):** + * To run a single unit test: + ```bash + bazel test --cache_test_results=no "//src/python/grpcio_tests/tests/unit:_abort_test" + ``` + * To execute all unit tests for Python: + ```bash + bazel test --cache_test_results=no "//src/python/..." + ``` + * **Using Provided Scripts (Alternative):** + * Install Python Modules: + ```bash + ./tools/distrib/install_all_python_modules.sh + ``` + * Run Tooling Tests: + ```bash + ./tools/distrib/run_python_tooling_tests.sh + ``` + * **Verify No Failures:** Make sure all tests pass before submitting your patch. +5. **Commit & Push Changes:** + * **Commit:** `git commit -m "Add new feature: brief description"` (Make sure your commit message is clear and concise.) + * **Push:** `git push origin my-feature-branch` +6. **Open a Pull Request (PR):** + * **Go to GitHub:** Visit the original gRPC Python repository on GitHub. + * **Click "New Pull Request":** Compare your branch with the main branch and submit your pull request. + * **Provide a Description:** Write a clear explanation of your changes, referencing the relevant issue(s). +7. **Code Review:** + * **Wait for Feedback:** Maintainers will review your PR and provide feedback. + * **Respond to Comments:** Address any questions or concerns raised during the review. + * **Make Revisions:** Update your code as needed based on the feedback. + +## Code Style + +* **Pythonic Code:** Follow the [PEP 8 style guide](https://www.python.org/dev/peps/pep-0008/) for Python code. +* **Type Hints:** Use type hints to improve code readability and maintainability. +* **Formatting:** Use [Black](https://black.readthedocs.io/en/stable/) for automatic code formatting. + From 0979765fd32a5f913b7492cb1999f99ac49f9a3b Mon Sep 17 00:00:00 2001 From: erm-g <110920239+erm-g@users.noreply.github.com> Date: Thu, 3 Oct 2024 08:30:48 -0700 Subject: [PATCH 33/74] [flake] Increase timeout to ssl_credentials_test flakiness (#37844) In some rare occasions on Win machines (0,3-0,4%), the tests are stuck when we execute the loop of 10 DoRpc calls. We receive Deadline Exceeded for such cases. The PR bumps the deadline from 10 to 60s (no flakes for --runs_per_test=10000). Closes #37844 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37844 from erm-g:seqFix 8644db81949735d7793d70c6510e1e6e830c7dd6 PiperOrigin-RevId: 681891281 --- test/cpp/end2end/ssl_credentials_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/end2end/ssl_credentials_test.cc b/test/cpp/end2end/ssl_credentials_test.cc index 325dc79068d..b111e5bfbc2 100644 --- a/test/cpp/end2end/ssl_credentials_test.cc +++ b/test/cpp/end2end/ssl_credentials_test.cc @@ -100,7 +100,7 @@ void DoRpc(const std::string& server_addr, grpc::testing::EchoResponse response; request.set_message(kMessage); ClientContext context; - context.set_deadline(grpc_timeout_seconds_to_deadline(/*time_s=*/10)); + context.set_deadline(grpc_timeout_seconds_to_deadline(/*time_s=*/60)); grpc::Status result = stub->Echo(&context, request, &response); EXPECT_TRUE(result.ok()); if (!result.ok()) { From 00545fa0fab227ed4a93bf6a67f12648d8a42cad Mon Sep 17 00:00:00 2001 From: Yousuk Seung Date: Thu, 3 Oct 2024 10:21:21 -0700 Subject: [PATCH 34/74] [generic API] add separate targets for cq generic stub/service (#36447) (#37838) This allows to restrict CQ based generic stub/service use. See https://github.com/grpc/proposal/pull/426 Closes #37838 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37838 from yousukseung:generic-stub 3e7c558372e733bfd6c73279619eb10040c6e061 PiperOrigin-RevId: 681932616 --- BUILD | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/BUILD b/BUILD index 51633565bb3..4d57a053c1f 100644 --- a/BUILD +++ b/BUILD @@ -2961,6 +2961,18 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "generic_stub", + hdrs = [ + "include/grpcpp/generic/generic_stub.h", + ], + language = "c++", + visibility = ["@grpc:public"], + deps = [ + "generic_stub_internal", + ], +) + grpc_cc_library( name = "generic_stub_callback", hdrs = [ @@ -2973,6 +2985,18 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "async_generic_service", + hdrs = [ + "include/grpcpp/generic/async_generic_service.h", + ], + language = "c++", + visibility = ["@grpc:public"], + deps = [ + "grpc++_public_hdrs", + ], +) + grpc_cc_library( name = "callback_generic_service", hdrs = [ From 41dc97e1d66f32d95fdf016641164d9f7dc6fb94 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 3 Oct 2024 11:30:33 -0700 Subject: [PATCH 35/74] Handle backport PRs without piper info in release notes automation Example commits on v1.67.x that are failing the current regex match: ``` commit 1eb5673cdd2471cfa8f68dbe1123c35e9ee03574 Author: apolcyn Date: Mon Sep 16 12:35:34 2024 -0700 [objc] backport https://github.com/grpc/grpc/pull/37690 to v1.67.x (#37712) Backport https://github.com/grpc/grpc/pull/37690 cc @HannahShiSFB @sampajano Co-authored-by: Hannah Shi commit ace22e307d1bb2f81420cd55a81b2725f50c894b Author: apolcyn Date: Thu Sep 12 10:16:46 2024 -0700 [ruby] reduce an INFO log to DEBUG (backport https://github.com/grpc/grpc/pull/37633) (#37686) Backport https://github.com/grpc/grpc/pull/37633 to 1.67 Note https://github.com/grpc/grpc/pull/37633 is not yet merged b/c of the master branch freeze. Merging on 1.67 with the idea that https://github.com/grpc/grpc/pull/37633 will merge as soon as the master branch is unfrozen. ``` PiperOrigin-RevId: 681960402 --- tools/release/release_notes.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/release/release_notes.py b/tools/release/release_notes.py index 5576b9f7161..a8423bf69b3 100644 --- a/tools/release/release_notes.py +++ b/tools/release/release_notes.py @@ -104,15 +104,16 @@ def get_commit_detail(commit): detail += "- " + title if not title.endswith("."): detail += "." - matches = re.search("PiperOrigin-RevId: ([0-9]+)$", output) - cl_num = matches.group(1) - detail += ( - " ([commit](https://github.com/grpc/grpc/commit/" - + commit - + ")) ([CL](https://critique.corp.google.com/cl/" - + cl_num - + "))" + detail += " ([commit](https://github.com/grpc/grpc/commit/{}))".format( + commit ) + matches = re.search("PiperOrigin-RevId: ([0-9]+)$", output) + # backport commits might not have PiperOrigin-RevId + if matches is not None: + cl_num = matches.group(1) + detail += " ([CL](https://critique.corp.google.com/cl/{}))".format( + cl_num + ) return detail From dbb5164ac7322d2a396675aab9cee7979203126d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Oct 2024 09:41:56 -0700 Subject: [PATCH 36/74] [clang-format] Remove custom clang-format rules for include ordering (#37820) Closes #37820 PiperOrigin-RevId: 682352913 --- .clang-format | 30 ----------- .../grpc/binder/cpp/exampleclient/native.cc | 5 +- .../grpc/binder/cpp/exampleserver/native.cc | 9 ++-- examples/cpp/auth/ssl_client.cc | 4 +- examples/cpp/auth/ssl_server.cc | 4 +- examples/cpp/cancellation/client.cc | 4 +- examples/cpp/cancellation/server.cc | 4 +- examples/cpp/compression/greeter_client.cc | 4 +- examples/cpp/compression/greeter_server.cc | 4 +- examples/cpp/csm/csm_greeter_client.cc | 7 ++- examples/cpp/csm/csm_greeter_server.cc | 15 +++--- .../csm/observability/csm_greeter_client.cc | 7 ++- .../csm/observability/csm_greeter_server.cc | 14 ++--- examples/cpp/deadline/client.cc | 4 +- examples/cpp/deadline/server.cc | 4 +- .../cpp/debugging/crashing_greeter_client.cc | 4 +- .../greeter_callback_server_admin.cc | 10 ++-- examples/cpp/error_details/greeter_client.cc | 5 +- examples/cpp/error_details/greeter_server.cc | 9 ++-- examples/cpp/error_handling/greeter_client.cc | 4 +- examples/cpp/error_handling/greeter_server.cc | 8 +-- .../client_flow_control_client.cc | 8 +-- .../client_flow_control_server.cc | 8 +-- .../server_flow_control_client.cc | 8 +-- .../server_flow_control_server.cc | 10 ++-- .../helloworld/greeter_client.cc | 6 +-- .../helloworld/greeter_server.cc | 10 ++-- examples/cpp/generic_api/greeter_client.cc | 6 +-- examples/cpp/generic_api/greeter_server.cc | 6 +-- examples/cpp/health/health_client.cc | 5 +- examples/cpp/health/health_server.cc | 8 +-- .../cpp/helloworld/greeter_async_client.cc | 4 +- .../cpp/helloworld/greeter_async_client2.cc | 4 +- .../cpp/helloworld/greeter_async_server.cc | 4 +- .../cpp/helloworld/greeter_callback_client.cc | 4 +- .../cpp/helloworld/greeter_callback_server.cc | 8 +-- examples/cpp/helloworld/greeter_client.cc | 4 +- examples/cpp/helloworld/greeter_server.cc | 8 +-- examples/cpp/helloworld/xds_greeter_client.cc | 4 +- examples/cpp/helloworld/xds_greeter_server.cc | 12 ++--- .../cpp/interceptors/caching_interceptor.h | 4 +- examples/cpp/interceptors/client.cc | 4 +- examples/cpp/interceptors/server.cc | 6 +-- .../cpp/keepalive/greeter_callback_client.cc | 4 +- .../cpp/keepalive/greeter_callback_server.cc | 8 +-- examples/cpp/load_balancing/greeter_client.cc | 4 +- examples/cpp/load_balancing/greeter_server.cc | 4 +- examples/cpp/metadata/greeter_client.cc | 4 +- examples/cpp/metadata/greeter_server.cc | 4 +- examples/cpp/multiplex/multiplex_client.cc | 4 +- examples/cpp/multiplex/multiplex_server.cc | 8 +-- examples/cpp/orca/orca_server.cc | 12 ++--- .../otel/codelab/greeter_callback_client.cc | 6 +-- .../greeter_callback_client_solution.cc | 6 +-- .../otel/codelab/greeter_callback_server.cc | 10 ++-- .../greeter_callback_server_solution.cc | 10 ++-- examples/cpp/otel/codelab/util.cc | 4 +- examples/cpp/otel/greeter_callback_client.cc | 4 +- examples/cpp/otel/greeter_callback_server.cc | 4 +- .../otel/ostream/greeter_callback_client.cc | 4 +- .../otel/ostream/greeter_callback_server.cc | 4 +- examples/cpp/otel/util.cc | 8 +-- examples/cpp/reflection/reflection_server.cc | 6 +-- examples/cpp/retry/client.cc | 6 +-- examples/cpp/retry/server.cc | 8 +-- .../route_guide_callback_client.cc | 14 ++--- .../route_guide_callback_server.cc | 12 ++--- .../cpp/route_guide/route_guide_client.cc | 12 ++--- .../cpp/route_guide/route_guide_server.cc | 12 ++--- .../cpp/systemd_socket_activation/client.cc | 4 +- .../cpp/systemd_socket_activation/server.cc | 8 +-- examples/cpp/unix_abstract_sockets/client.cc | 4 +- examples/cpp/unix_abstract_sockets/server.cc | 8 +-- .../wait_for_ready/greeter_callback_client.cc | 4 +- examples/cpp/xds/xds_greeter_client.cc | 4 +- examples/cpp/xds/xds_greeter_server.cc | 12 ++--- include/grpc++/impl/.clang-format | 50 ----------------- include/grpc/.clang-format | 50 ----------------- include/grpc/compression.h | 3 +- include/grpc/credentials.h | 3 +- include/grpc/event_engine/endpoint_config.h | 4 +- include/grpc/event_engine/event_engine.h | 12 ++--- include/grpc/event_engine/extensible.h | 4 +- .../internal/memory_allocator_impl.h | 8 +-- include/grpc/event_engine/memory_allocator.h | 7 ++- include/grpc/event_engine/memory_request.h | 3 +- include/grpc/event_engine/slice.h | 7 ++- include/grpc/event_engine/slice_buffer.h | 13 +++-- include/grpc/grpc.h | 3 +- include/grpc/grpc_audit_logging.h | 6 +-- include/grpc/grpc_crl_provider.h | 8 +-- include/grpc/grpc_posix.h | 3 +- include/grpc/grpc_security.h | 3 +- include/grpc/impl/call.h | 4 +- include/grpc/impl/grpc_types.h | 3 +- include/grpc/impl/slice_type.h | 3 +- include/grpc/passive_listener.h | 4 +- include/grpc/support/alloc.h | 3 +- include/grpc/support/json.h | 3 +- include/grpc/support/log.h | 3 +- include/grpc/support/metrics.h | 4 +- include/grpc/support/sync_posix.h | 3 +- include/grpc/support/time.h | 3 +- include/grpcpp/.clang-format | 50 ----------------- include/grpcpp/alarm.h | 4 +- include/grpcpp/channel.h | 4 +- include/grpcpp/client_context.h | 12 ++--- include/grpcpp/completion_queue.h | 8 +-- include/grpcpp/create_channel.h | 4 +- include/grpcpp/create_channel_binder.h | 7 ++- include/grpcpp/create_channel_posix.h | 4 +- include/grpcpp/ext/call_metric_recorder.h | 6 +-- include/grpcpp/ext/csm_observability.h | 6 +-- include/grpcpp/ext/gcp_observability.h | 6 +-- ...alth_check_service_server_builder_option.h | 4 +- include/grpcpp/ext/orca_service.h | 12 ++--- include/grpcpp/ext/otel_plugin.h | 9 ++-- .../ext/proto_server_reflection_plugin.h | 4 +- include/grpcpp/ext/server_metric_recorder.h | 6 +-- include/grpcpp/impl/.clang-format | 50 ----------------- include/grpcpp/impl/call_op_set.h | 14 ++--- include/grpcpp/impl/channel_argument_option.h | 6 +-- include/grpcpp/impl/codegen/.clang-format | 50 ----------------- include/grpcpp/impl/create_auth_context.h | 4 +- include/grpcpp/impl/delegating_channel.h | 4 +- include/grpcpp/impl/generic_stub_internal.h | 4 +- include/grpcpp/impl/grpc_library.h | 4 +- include/grpcpp/impl/interceptor_common.h | 10 ++-- include/grpcpp/impl/metadata_map.h | 4 +- include/grpcpp/impl/proto_utils.h | 8 +-- include/grpcpp/impl/rpc_method.h | 4 +- include/grpcpp/impl/rpc_service_method.h | 10 ++-- include/grpcpp/impl/server_builder_option.h | 6 +-- include/grpcpp/impl/server_builder_plugin.h | 4 +- .../grpcpp/impl/server_callback_handlers.h | 4 +- include/grpcpp/impl/server_initializer.h | 4 +- include/grpcpp/impl/service_type.h | 4 +- include/grpcpp/impl/sync.h | 6 +-- include/grpcpp/security/.clang-format | 50 ----------------- include/grpcpp/security/alts_context.h | 6 +-- include/grpcpp/security/alts_util.h | 4 +- include/grpcpp/security/audit_logging.h | 6 +-- include/grpcpp/security/auth_context.h | 6 +-- .../grpcpp/security/auth_metadata_processor.h | 4 +- .../security/authorization_policy_provider.h | 4 +- include/grpcpp/security/binder_credentials.h | 4 +- include/grpcpp/security/credentials.h | 8 +-- include/grpcpp/security/server_credentials.h | 6 +-- .../security/tls_certificate_provider.h | 12 ++--- .../security/tls_certificate_verifier.h | 12 ++--- .../grpcpp/security/tls_credentials_options.h | 6 +-- include/grpcpp/server.h | 8 +-- include/grpcpp/server_builder.h | 10 ++-- include/grpcpp/server_context.h | 14 ++--- include/grpcpp/server_interface.h | 4 +- include/grpcpp/server_posix.h | 4 +- include/grpcpp/support/.clang-format | 50 ----------------- include/grpcpp/support/async_stream.h | 4 +- include/grpcpp/support/async_unary_call.h | 4 +- include/grpcpp/support/byte_buffer.h | 4 +- include/grpcpp/support/callback_common.h | 8 +-- include/grpcpp/support/channel_arguments.h | 6 +-- include/grpcpp/support/client_callback.h | 10 ++-- include/grpcpp/support/client_interceptor.h | 8 +-- include/grpcpp/support/interceptor.h | 8 +-- include/grpcpp/support/method_handler.h | 4 +- include/grpcpp/support/proto_buffer_reader.h | 10 ++-- include/grpcpp/support/proto_buffer_writer.h | 10 ++-- include/grpcpp/support/server_callback.h | 12 ++--- include/grpcpp/support/server_interceptor.h | 8 +-- include/grpcpp/support/string_ref.h | 3 +- include/grpcpp/support/sync_stream.h | 4 +- include/grpcpp/support/time.h | 4 +- .../grpcpp/test/client_context_test_peer.h | 4 +- include/grpcpp/test/mock_stream.h | 4 +- .../grpcpp/test/server_context_test_spouse.h | 4 +- src/.clang-format | 50 ----------------- src/compiler/.clang-format | 50 ----------------- src/compiler/objective_c_generator.cc | 4 +- src/compiler/objective_c_generator_helpers.h | 4 +- src/compiler/objective_c_plugin.cc | 4 +- src/compiler/php_generator.cc | 4 +- src/core/.clang-format | 50 ----------------- src/core/channelz/channel_trace.cc | 9 ++-- src/core/channelz/channel_trace.h | 8 ++- src/core/channelz/channelz.cc | 9 ++-- src/core/channelz/channelz.h | 10 ++-- src/core/channelz/channelz_registry.cc | 11 ++-- src/core/channelz/channelz_registry.h | 5 +- src/core/client_channel/.clang-format | 53 ------------------- src/core/client_channel/backup_poller.cc | 9 ++-- src/core/client_channel/client_channel.cc | 21 ++++---- src/core/client_channel/client_channel.h | 1 - .../client_channel/client_channel_factory.cc | 4 +- .../client_channel/client_channel_factory.h | 1 - .../client_channel/client_channel_filter.cc | 19 +++---- .../client_channel/client_channel_filter.h | 7 +-- .../client_channel/client_channel_internal.h | 1 - .../client_channel/client_channel_plugin.cc | 4 +- .../client_channel_service_config.cc | 5 +- .../client_channel_service_config.h | 2 - src/core/client_channel/config_selector.h | 5 +- src/core/client_channel/dynamic_filters.cc | 4 +- src/core/client_channel/dynamic_filters.h | 3 +- .../client_channel/global_subchannel_pool.cc | 4 +- .../client_channel/global_subchannel_pool.h | 1 - src/core/client_channel/lb_metadata.h | 5 +- .../load_balanced_call_destination.cc | 1 - .../load_balanced_call_destination.h | 1 - .../client_channel/local_subchannel_pool.cc | 5 +- src/core/client_channel/retry_filter.cc | 8 ++- src/core/client_channel/retry_filter.h | 9 ++-- .../retry_filter_legacy_call_data.cc | 4 +- .../retry_filter_legacy_call_data.h | 9 ++-- .../client_channel/retry_service_config.cc | 12 ++--- .../client_channel/retry_service_config.h | 2 - src/core/client_channel/retry_throttle.cc | 7 ++- src/core/client_channel/retry_throttle.h | 5 +- src/core/client_channel/subchannel.cc | 11 ++-- src/core/client_channel/subchannel.h | 7 +-- .../subchannel_pool_interface.cc | 4 +- .../subchannel_pool_interface.h | 1 - .../subchannel_stream_client.cc | 7 +-- .../client_channel/subchannel_stream_client.h | 10 ++-- src/core/ext/.clang-format | 50 ----------------- src/core/ext/filters/.clang-format | 53 ------------------- .../backend_metrics/backend_metric_filter.cc | 13 ++--- .../backend_metrics/backend_metric_filter.h | 1 - src/core/ext/filters/census/grpc_context.cc | 3 +- .../filters/channel_idle/idle_filter_state.cc | 3 +- .../filters/channel_idle/idle_filter_state.h | 1 - .../legacy_channel_idle_filter.cc | 8 ++- .../channel_idle/legacy_channel_idle_filter.h | 4 +- .../fault_injection/fault_injection_filter.cc | 7 +-- .../fault_injection/fault_injection_filter.h | 2 - .../fault_injection_service_config_parser.cc | 5 +- .../fault_injection_service_config_parser.h | 5 +- .../gcp_authentication_filter.cc | 1 - .../gcp_authentication_filter.h | 1 - ...cp_authentication_service_config_parser.cc | 5 +- ...gcp_authentication_service_config_parser.h | 1 - .../filters/http/client/http_client_filter.cc | 12 ++--- .../filters/http/client/http_client_filter.h | 1 - .../filters/http/client_authority_filter.cc | 8 ++- .../filters/http/client_authority_filter.h | 1 - .../ext/filters/http/http_filters_plugin.cc | 1 - .../message_compress/compression_filter.cc | 13 ++--- .../message_compress/compression_filter.h | 5 +- .../filters/http/server/http_server_filter.cc | 10 ++-- .../filters/http/server/http_server_filter.h | 1 - .../registered_opencensus_objects.h | 1 - .../server_load_reporting_filter.cc | 13 ++--- .../server_load_reporting_filter.h | 2 - .../ext/filters/logging/logging_filter.cc | 11 ++-- src/core/ext/filters/logging/logging_filter.h | 1 - src/core/ext/filters/logging/logging_sink.h | 2 - .../message_size/message_size_filter.cc | 9 ++-- .../message_size/message_size_filter.h | 2 - src/core/ext/filters/rbac/rbac_filter.cc | 8 ++- src/core/ext/filters/rbac/rbac_filter.h | 2 - .../rbac/rbac_service_config_parser.cc | 8 ++- .../filters/rbac/rbac_service_config_parser.h | 2 - .../stateful_session_filter.cc | 4 +- .../stateful_session_filter.h | 2 - .../stateful_session_service_config_parser.cc | 5 +- .../stateful_session_service_config_parser.h | 2 - src/core/ext/transport/.clang-format | 50 ----------------- src/core/ext/transport/binder/.clang-format | 50 ----------------- .../binder/client/binder_connector.cc | 5 +- .../binder/client/binder_connector.h | 11 ++-- .../transport/binder/client/channel_create.cc | 7 ++- .../binder/client/channel_create_impl.cc | 1 - .../binder/client/connection_id_generator.h | 5 +- .../binder/client/endpoint_binder_pool.cc | 4 +- .../binder/client/endpoint_binder_pool.h | 5 +- .../ext/transport/binder/client/jni_utils.cc | 4 +- .../ext/transport/binder/client/jni_utils.h | 3 +- .../binder/client/security_policy_setting.cc | 4 +- .../binder/client/security_policy_setting.h | 5 +- .../security_policy/binder_security_policy.cc | 1 - .../transport/binder/server/binder_server.cc | 5 +- .../transport/binder/server/binder_server.h | 7 ++- .../server/binder_server_credentials.cc | 4 +- .../binder/transport/binder_transport.cc | 1 - .../binder/transport/binder_transport.h | 7 ++- .../ext/transport/binder/utils/ndk_binder.cc | 1 - .../binder/utils/transport_stream_receiver.h | 5 +- .../utils/transport_stream_receiver_impl.cc | 1 - .../utils/transport_stream_receiver_impl.h | 4 +- .../ext/transport/binder/wire_format/binder.h | 5 +- .../binder/wire_format/binder_android.cc | 1 - .../binder/wire_format/binder_android.h | 1 - .../binder/wire_format/binder_constants.h | 4 +- .../binder/wire_format/transaction.h | 5 +- .../binder/wire_format/wire_reader.h | 4 +- .../binder/wire_format/wire_reader_impl.cc | 1 - .../binder/wire_format/wire_reader_impl.h | 7 ++- .../binder/wire_format/wire_writer.cc | 1 - .../binder/wire_format/wire_writer.h | 5 +- .../chaotic_good/chaotic_good_transport.h | 5 +- .../client/chaotic_good_connector.cc | 7 ++- .../client/chaotic_good_connector.h | 7 ++- .../chaotic_good/client_transport.cc | 9 ++-- .../transport/chaotic_good/client_transport.h | 10 ++-- src/core/ext/transport/chaotic_good/frame.cc | 6 +-- src/core/ext/transport/chaotic_good/frame.h | 5 +- .../transport/chaotic_good/frame_header.cc | 4 +- .../ext/transport/chaotic_good/frame_header.h | 4 +- .../server/chaotic_good_server.cc | 11 ++-- .../chaotic_good/server/chaotic_good_server.h | 7 ++- .../chaotic_good/server_transport.cc | 11 ++-- .../transport/chaotic_good/server_transport.h | 12 ++--- .../chaotic_good/settings_metadata.cc | 3 +- .../chaotic_good/settings_metadata.h | 3 +- src/core/ext/transport/chttp2/alpn/alpn.cc | 3 +- src/core/ext/transport/chttp2/alpn/alpn.h | 3 +- .../chttp2/client/chttp2_connector.cc | 18 +++---- .../chttp2/client/chttp2_connector.h | 5 +- .../transport/chttp2/server/chttp2_server.cc | 18 +++---- .../transport/chttp2/server/chttp2_server.h | 4 +- .../transport/chttp2/transport/.clang-format | 50 ----------------- .../transport/chttp2/transport/bin_decoder.cc | 7 ++- .../transport/chttp2/transport/bin_decoder.h | 5 +- .../transport/chttp2/transport/bin_encoder.cc | 4 +- .../transport/chttp2/transport/bin_encoder.h | 3 +- .../chttp2/transport/chttp2_transport.cc | 20 ++++--- .../chttp2/transport/chttp2_transport.h | 7 ++- .../chttp2/transport/context_list_entry.h | 3 +- .../transport/chttp2/transport/decode_huff.h | 4 +- .../chttp2/transport/flow_control.cc | 4 +- .../transport/chttp2/transport/flow_control.h | 4 +- .../ext/transport/chttp2/transport/frame.cc | 4 +- .../ext/transport/chttp2/transport/frame.h | 5 +- .../transport/chttp2/transport/frame_data.cc | 6 +-- .../transport/chttp2/transport/frame_data.h | 6 +-- .../chttp2/transport/frame_goaway.cc | 8 ++- .../transport/chttp2/transport/frame_goaway.h | 3 +- .../transport/chttp2/transport/frame_ping.cc | 6 +-- .../transport/chttp2/transport/frame_ping.h | 3 +- .../chttp2/transport/frame_rst_stream.cc | 6 +-- .../chttp2/transport/frame_rst_stream.h | 3 +- .../chttp2/transport/frame_settings.cc | 6 +-- .../chttp2/transport/frame_settings.h | 5 +- .../chttp2/transport/frame_window_update.cc | 4 +- .../chttp2/transport/frame_window_update.h | 3 +- .../chttp2/transport/hpack_constants.h | 4 +- .../chttp2/transport/hpack_encoder.cc | 9 ++-- .../chttp2/transport/hpack_encoder.h | 6 +-- .../chttp2/transport/hpack_encoder_table.cc | 4 +- .../chttp2/transport/hpack_encoder_table.h | 3 +- .../chttp2/transport/hpack_parse_result.cc | 4 +- .../chttp2/transport/hpack_parse_result.h | 4 +- .../chttp2/transport/hpack_parser.cc | 6 +-- .../transport/chttp2/transport/hpack_parser.h | 6 +-- .../chttp2/transport/hpack_parser_table.cc | 4 +- .../chttp2/transport/hpack_parser_table.h | 4 +- .../chttp2/transport/http2_settings.cc | 3 +- .../chttp2/transport/http2_settings.h | 4 +- .../ext/transport/chttp2/transport/internal.h | 14 +++-- .../ext/transport/chttp2/transport/parsing.cc | 10 ++-- .../chttp2/transport/ping_abuse_policy.cc | 6 +-- .../chttp2/transport/ping_abuse_policy.h | 4 +- .../chttp2/transport/ping_callbacks.cc | 4 +- .../chttp2/transport/ping_callbacks.h | 6 +-- .../chttp2/transport/ping_rate_policy.cc | 7 ++- .../chttp2/transport/ping_rate_policy.h | 4 +- .../chttp2/transport/stream_lists.cc | 5 +- .../ext/transport/chttp2/transport/varint.cc | 4 +- .../ext/transport/chttp2/transport/varint.h | 3 +- .../chttp2/transport/write_size_policy.cc | 4 +- .../chttp2/transport/write_size_policy.h | 3 +- .../ext/transport/chttp2/transport/writing.cc | 10 ++-- .../client/secure/cronet_channel_create.cc | 5 +- .../cronet/transport/cronet_api_phony.cc | 4 +- .../cronet/transport/cronet_transport.cc | 16 +++--- .../ext/transport/inproc/inproc_transport.cc | 7 ++- .../inproc/legacy_inproc_transport.cc | 16 +++--- src/core/filter/blackboard.h | 1 - .../endpoint_info/endpoint_info_handshaker.cc | 5 +- src/core/handshaker/handshaker.cc | 12 ++--- src/core/handshaker/handshaker.h | 8 ++- src/core/handshaker/handshaker_registry.cc | 3 +- src/core/handshaker/handshaker_registry.h | 4 +- .../http_connect/http_connect_handshaker.cc | 10 ++-- .../http_connect/http_proxy_mapper.cc | 8 ++- .../http_connect/http_proxy_mapper.h | 5 +- src/core/handshaker/proxy_mapper.h | 5 +- src/core/handshaker/proxy_mapper_registry.cc | 4 +- src/core/handshaker/proxy_mapper_registry.h | 5 +- .../handshaker/security/secure_endpoint.cc | 18 +++---- .../handshaker/security/secure_endpoint.h | 3 +- .../security/security_handshaker.cc | 16 +++--- .../handshaker/security/security_handshaker.h | 3 +- .../tcp_connect/tcp_connect_handshaker.cc | 11 ++-- src/core/lib/address_utils/parse_address.cc | 1 - src/core/lib/address_utils/parse_address.h | 4 +- src/core/lib/address_utils/sockaddr_utils.cc | 4 +- src/core/lib/address_utils/sockaddr_utils.h | 4 +- src/core/lib/channel/call_finalization.h | 4 +- src/core/lib/channel/channel_args.cc | 10 ++-- src/core/lib/channel/channel_args.h | 8 ++- .../channel/channel_args_preconditioning.cc | 4 +- .../channel/channel_args_preconditioning.h | 6 +-- src/core/lib/channel/channel_stack.cc | 4 +- src/core/lib/channel/channel_stack.h | 9 ++-- src/core/lib/channel/channel_stack_builder.cc | 4 +- src/core/lib/channel/channel_stack_builder.h | 5 +- .../lib/channel/channel_stack_builder_impl.cc | 6 +-- .../lib/channel/channel_stack_builder_impl.h | 3 +- src/core/lib/channel/connected_channel.cc | 10 ++-- src/core/lib/channel/promise_based_filter.cc | 7 ++- src/core/lib/channel/promise_based_filter.h | 8 ++- src/core/lib/channel/status_util.cc | 4 +- src/core/lib/channel/status_util.h | 6 +-- src/core/lib/compression/compression.cc | 8 ++- .../lib/compression/compression_internal.cc | 6 +-- .../lib/compression/compression_internal.h | 6 +-- src/core/lib/compression/message_compress.cc | 9 ++-- src/core/lib/config/config_vars.cc | 5 +- src/core/lib/config/config_vars.h | 3 +- .../lib/config/config_vars_non_generated.cc | 4 +- src/core/lib/config/core_configuration.cc | 4 +- src/core/lib/config/core_configuration.h | 5 +- src/core/lib/config/load_config.cc | 4 +- src/core/lib/config/load_config.h | 3 +- src/core/lib/debug/trace.cc | 7 ++- src/core/lib/debug/trace_flags.cc | 1 - src/core/lib/debug/trace_impl.h | 4 +- src/core/lib/event_engine/ares_resolver.cc | 8 ++- src/core/lib/event_engine/ares_resolver.h | 13 ++--- .../lib/event_engine/cf_engine/cf_engine.cc | 4 +- .../cf_engine/cfstream_endpoint.cc | 1 - .../cf_engine/cfstream_endpoint.h | 4 +- .../cf_engine/dns_service_resolver.cc | 1 - .../cf_engine/dns_service_resolver.h | 4 +- .../channel_args_endpoint_config.cc | 7 ++- .../channel_args_endpoint_config.h | 5 +- src/core/lib/event_engine/common_closures.h | 6 +-- .../lib/event_engine/default_event_engine.cc | 7 ++- .../lib/event_engine/default_event_engine.h | 4 +- .../default_event_engine_factory.cc | 4 +- .../default_event_engine_factory.h | 4 +- src/core/lib/event_engine/event_engine.cc | 4 +- .../extensions/can_track_errors.h | 4 +- .../extensions/chaotic_good_extension.h | 3 +- .../lib/event_engine/extensions/supports_fd.h | 6 +-- .../lib/event_engine/extensions/tcp_trace.h | 1 - src/core/lib/event_engine/forkable.cc | 4 +- src/core/lib/event_engine/forkable.h | 4 +- src/core/lib/event_engine/grpc_polled_fd.h | 5 +- src/core/lib/event_engine/handle_containers.h | 5 +- .../event_engine/memory_allocator_factory.h | 7 ++- src/core/lib/event_engine/poller.h | 4 +- .../event_engine/posix_engine/.clang-format | 50 ----------------- .../posix_engine/ev_epoll1_linux.cc | 10 ++-- .../posix_engine/ev_epoll1_linux.h | 7 ++- .../posix_engine/ev_poll_posix.cc | 15 +++--- .../event_engine/posix_engine/ev_poll_posix.h | 7 ++- .../event_engine/posix_engine/event_poller.h | 7 ++- .../event_poller_posix_default.cc | 5 +- .../posix_engine/event_poller_posix_default.h | 4 +- .../posix_engine/grpc_polled_fd_posix.h | 8 ++- .../posix_engine/internal_errqueue.cc | 3 +- .../posix_engine/internal_errqueue.h | 3 +- .../posix_engine/lockfree_event.cc | 7 ++- .../posix_engine/lockfree_event.h | 5 +- .../posix_engine/native_posix_dns_resolver.cc | 1 - .../posix_engine/native_posix_dns_resolver.h | 5 +- .../posix_engine/posix_endpoint.cc | 12 ++--- .../posix_engine/posix_endpoint.h | 11 ++-- .../event_engine/posix_engine/posix_engine.cc | 13 +++-- .../event_engine/posix_engine/posix_engine.h | 11 ++-- .../posix_engine/posix_engine_closure.h | 6 +-- .../posix_engine/posix_engine_listener.cc | 8 ++- .../posix_engine/posix_engine_listener.h | 12 ++--- .../posix_engine_listener_utils.cc | 6 +-- .../posix_engine_listener_utils.h | 3 +- .../posix_engine/tcp_socket_utils.cc | 11 ++-- .../posix_engine/tcp_socket_utils.h | 13 +++-- .../lib/event_engine/posix_engine/timer.cc | 6 +-- .../lib/event_engine/posix_engine/timer.h | 6 +-- .../event_engine/posix_engine/timer_heap.cc | 3 +- .../event_engine/posix_engine/timer_heap.h | 4 +- .../posix_engine/timer_manager.cc | 7 ++- .../event_engine/posix_engine/timer_manager.h | 6 +-- .../posix_engine/traced_buffer_list.cc | 6 +-- .../posix_engine/traced_buffer_list.h | 6 +-- .../posix_engine/wakeup_fd_eventfd.cc | 5 +- .../posix_engine/wakeup_fd_eventfd.h | 5 +- .../posix_engine/wakeup_fd_pipe.cc | 5 +- .../posix_engine/wakeup_fd_pipe.h | 5 +- .../posix_engine/wakeup_fd_posix.h | 4 +- .../posix_engine/wakeup_fd_posix_default.cc | 5 +- .../posix_engine/wakeup_fd_posix_default.h | 4 +- src/core/lib/event_engine/query_extensions.h | 4 +- .../ref_counted_dns_resolver_interface.h | 6 +-- src/core/lib/event_engine/resolved_address.cc | 6 +-- src/core/lib/event_engine/slice.cc | 8 ++- src/core/lib/event_engine/slice_buffer.cc | 3 +- src/core/lib/event_engine/tcp_socket_utils.cc | 1 - src/core/lib/event_engine/tcp_socket_utils.h | 6 +-- .../event_engine/thread_pool/thread_count.cc | 4 +- .../event_engine/thread_pool/thread_count.h | 7 ++- .../event_engine/thread_pool/thread_pool.h | 6 +-- .../thread_pool/thread_pool_factory.cc | 3 +- .../thread_pool/work_stealing_thread_pool.cc | 6 +-- .../thread_pool/work_stealing_thread_pool.h | 8 ++- .../thready_event_engine.cc | 4 +- .../thready_event_engine.h | 10 ++-- src/core/lib/event_engine/time_util.cc | 4 +- src/core/lib/event_engine/time_util.h | 3 +- src/core/lib/event_engine/utils.cc | 6 +-- src/core/lib/event_engine/utils.h | 5 +- .../lib/event_engine/windows/.clang-format | 50 ----------------- .../windows/grpc_polled_fd_windows.cc | 7 +-- .../windows/grpc_polled_fd_windows.h | 8 ++- src/core/lib/event_engine/windows/iocp.cc | 7 ++- src/core/lib/event_engine/windows/iocp.h | 3 +- .../windows/native_windows_dns_resolver.cc | 4 +- .../lib/event_engine/windows/win_socket.cc | 5 +- .../lib/event_engine/windows/win_socket.h | 5 +- .../event_engine/windows/windows_endpoint.cc | 7 ++- .../event_engine/windows/windows_engine.cc | 13 +++-- .../lib/event_engine/windows/windows_engine.h | 11 ++-- .../event_engine/windows/windows_listener.cc | 1 - .../event_engine/windows/windows_listener.h | 7 ++- .../work_queue/basic_work_queue.cc | 4 +- .../work_queue/basic_work_queue.h | 6 +-- .../lib/event_engine/work_queue/work_queue.h | 5 +- src/core/lib/experiments/config.cc | 4 +- src/core/lib/experiments/config.h | 3 +- src/core/lib/iomgr/buffer_list.cc | 3 +- src/core/lib/iomgr/buffer_list.h | 3 +- src/core/lib/iomgr/call_combiner.cc | 4 +- src/core/lib/iomgr/call_combiner.h | 6 +-- src/core/lib/iomgr/cfstream_handle.cc | 4 +- src/core/lib/iomgr/closure.cc | 4 +- src/core/lib/iomgr/closure.h | 6 +-- src/core/lib/iomgr/combiner.cc | 6 +-- src/core/lib/iomgr/combiner.h | 3 +- src/core/lib/iomgr/endpoint.h | 3 +- src/core/lib/iomgr/endpoint_cfstream.cc | 6 +-- src/core/lib/iomgr/endpoint_pair_posix.cc | 4 +- src/core/lib/iomgr/endpoint_pair_windows.cc | 1 - src/core/lib/iomgr/error.cc | 10 ++-- src/core/lib/iomgr/error.h | 10 ++-- src/core/lib/iomgr/error_cfstream.cc | 4 +- src/core/lib/iomgr/ev_apple.cc | 1 - src/core/lib/iomgr/ev_epoll1_linux.cc | 6 +-- src/core/lib/iomgr/ev_poll_posix.cc | 4 +- src/core/lib/iomgr/ev_posix.cc | 6 +-- src/core/lib/iomgr/ev_posix.h | 3 +- .../lib/iomgr/event_engine_shims/closure.cc | 7 ++- .../lib/iomgr/event_engine_shims/closure.h | 3 +- .../lib/iomgr/event_engine_shims/endpoint.cc | 15 +++--- .../lib/iomgr/event_engine_shims/endpoint.h | 4 +- .../iomgr/event_engine_shims/tcp_client.cc | 5 +- src/core/lib/iomgr/exec_ctx.cc | 7 ++- src/core/lib/iomgr/exec_ctx.h | 7 ++- src/core/lib/iomgr/executor.cc | 10 ++-- src/core/lib/iomgr/fork_posix.cc | 6 +-- src/core/lib/iomgr/fork_windows.cc | 4 +- src/core/lib/iomgr/internal_errqueue.cc | 3 +- src/core/lib/iomgr/iocp_windows.cc | 6 +-- src/core/lib/iomgr/iomgr.cc | 10 ++-- src/core/lib/iomgr/iomgr.h | 3 +- src/core/lib/iomgr/iomgr_internal.cc | 3 +- src/core/lib/iomgr/iomgr_internal.h | 3 +- src/core/lib/iomgr/iomgr_windows.cc | 1 - src/core/lib/iomgr/lockfree_event.cc | 5 +- src/core/lib/iomgr/polling_entity.cc | 5 +- src/core/lib/iomgr/pollset_set_windows.cc | 3 +- src/core/lib/iomgr/resolve_address.cc | 3 +- src/core/lib/iomgr/resolve_address.h | 6 +-- src/core/lib/iomgr/resolve_address_impl.h | 3 +- src/core/lib/iomgr/resolve_address_posix.cc | 5 +- src/core/lib/iomgr/resolve_address_posix.h | 4 +- src/core/lib/iomgr/resolve_address_windows.cc | 10 ++-- src/core/lib/iomgr/resolve_address_windows.h | 4 +- src/core/lib/iomgr/resolved_address.h | 3 +- src/core/lib/iomgr/sockaddr_utils_posix.cc | 6 +-- src/core/lib/iomgr/socket_mutator.h | 3 +- src/core/lib/iomgr/socket_utils.h | 3 +- .../lib/iomgr/socket_utils_common_posix.cc | 8 ++- src/core/lib/iomgr/socket_utils_posix.cc | 6 +-- src/core/lib/iomgr/socket_windows.cc | 6 +-- src/core/lib/iomgr/socket_windows.h | 3 +- src/core/lib/iomgr/tcp_client_cfstream.cc | 8 ++- src/core/lib/iomgr/tcp_client_posix.cc | 6 +-- src/core/lib/iomgr/tcp_client_windows.cc | 6 +-- src/core/lib/iomgr/tcp_posix.cc | 19 +++---- src/core/lib/iomgr/tcp_server.h | 4 +- src/core/lib/iomgr/tcp_server_posix.cc | 18 +++---- src/core/lib/iomgr/tcp_server_utils_posix.h | 5 +- .../iomgr/tcp_server_utils_posix_common.cc | 6 +-- .../iomgr/tcp_server_utils_posix_ifaddrs.cc | 4 +- src/core/lib/iomgr/tcp_server_windows.cc | 16 +++--- src/core/lib/iomgr/tcp_windows.cc | 8 ++- src/core/lib/iomgr/timer.h | 4 +- src/core/lib/iomgr/timer_generic.cc | 10 ++-- src/core/lib/iomgr/timer_heap.cc | 3 +- src/core/lib/iomgr/timer_manager.cc | 6 +-- src/core/lib/iomgr/timer_manager.h | 3 +- src/core/lib/iomgr/unix_sockets_posix.cc | 5 +- src/core/lib/iomgr/unix_sockets_posix.h | 7 ++- src/core/lib/iomgr/vsock.cc | 4 +- src/core/lib/iomgr/vsock.h | 7 ++- src/core/lib/iomgr/wakeup_fd_pipe.cc | 1 - src/core/lib/promise/activity.cc | 4 +- src/core/lib/promise/activity.h | 4 +- src/core/lib/promise/all_ok.h | 5 +- src/core/lib/promise/arena_promise.h | 4 +- src/core/lib/promise/context.h | 5 +- src/core/lib/promise/detail/join_state.h | 5 +- src/core/lib/promise/detail/promise_factory.h | 5 +- src/core/lib/promise/detail/promise_like.h | 5 +- src/core/lib/promise/detail/seq_state.h | 4 +- src/core/lib/promise/detail/status.h | 4 +- .../promise/event_engine_wakeup_scheduler.h | 7 ++- .../lib/promise/exec_ctx_wakeup_scheduler.h | 3 +- src/core/lib/promise/for_each.h | 4 +- src/core/lib/promise/if.h | 5 +- src/core/lib/promise/inter_activity_latch.h | 4 +- src/core/lib/promise/inter_activity_pipe.h | 4 +- src/core/lib/promise/interceptor_list.h | 4 +- src/core/lib/promise/join.h | 4 +- src/core/lib/promise/latch.h | 4 +- src/core/lib/promise/loop.h | 5 +- src/core/lib/promise/map.h | 3 +- src/core/lib/promise/map_pipe.h | 5 +- src/core/lib/promise/mpsc.h | 4 +- src/core/lib/promise/observable.h | 5 +- src/core/lib/promise/party.cc | 5 +- src/core/lib/promise/party.h | 6 +-- src/core/lib/promise/pipe.h | 4 +- src/core/lib/promise/poll.h | 5 +- src/core/lib/promise/prioritized_race.h | 4 +- src/core/lib/promise/promise.h | 5 +- src/core/lib/promise/promise_mutex.h | 5 +- src/core/lib/promise/race.h | 4 +- src/core/lib/promise/seq.h | 3 +- src/core/lib/promise/sleep.cc | 4 +- src/core/lib/promise/sleep.h | 7 ++- src/core/lib/promise/status_flag.h | 5 +- src/core/lib/promise/switch.h | 4 +- src/core/lib/promise/try_join.h | 5 +- src/core/lib/promise/try_seq.h | 4 +- src/core/lib/promise/wait_for_callback.h | 5 +- src/core/lib/promise/wait_set.h | 5 +- src/core/lib/resource_quota/api.cc | 8 ++- src/core/lib/resource_quota/api.h | 3 +- src/core/lib/resource_quota/arena.cc | 7 ++- src/core/lib/resource_quota/arena.h | 5 +- .../lib/resource_quota/connection_quota.cc | 4 +- .../lib/resource_quota/connection_quota.h | 5 +- src/core/lib/resource_quota/memory_quota.cc | 8 ++- src/core/lib/resource_quota/memory_quota.h | 8 ++- .../lib/resource_quota/periodic_update.cc | 4 +- src/core/lib/resource_quota/periodic_update.h | 4 +- src/core/lib/resource_quota/resource_quota.h | 9 ++-- src/core/lib/resource_quota/thread_quota.cc | 4 +- src/core/lib/resource_quota/thread_quota.h | 5 +- .../security/authorization/audit_logging.cc | 9 ++-- .../security/authorization/audit_logging.h | 9 ++-- .../authorization/authorization_engine.h | 4 +- .../authorization_policy_provider.h | 3 +- .../authorization/cel_authorization_engine.cc | 3 +- .../authorization/cel_authorization_engine.h | 7 ++- .../security/authorization/evaluate_args.cc | 6 +-- .../security/authorization/evaluate_args.h | 7 ++- .../grpc_authorization_engine.cc | 5 +- .../authorization/grpc_authorization_engine.h | 5 +- .../grpc_authorization_policy_provider.cc | 14 +++-- .../grpc_authorization_policy_provider.h | 9 ++-- .../authorization/grpc_server_authz_filter.cc | 5 +- .../authorization/grpc_server_authz_filter.h | 3 +- .../lib/security/authorization/matchers.cc | 6 +-- .../lib/security/authorization/matchers.h | 4 +- .../authorization/mock_cel/activation.h | 3 +- .../mock_cel/cel_expr_builder_factory.h | 4 +- .../authorization/mock_cel/cel_expression.h | 5 +- .../authorization/mock_cel/cel_value.h | 3 +- .../authorization/mock_cel/evaluator_core.h | 5 +- .../mock_cel/flat_expr_builder.h | 5 +- .../lib/security/authorization/rbac_policy.cc | 4 +- .../lib/security/authorization/rbac_policy.h | 6 +-- .../security/authorization/rbac_translator.cc | 8 ++- .../security/authorization/rbac_translator.h | 5 +- .../security/authorization/stdout_logger.cc | 8 +-- .../security/authorization/stdout_logger.h | 8 +-- .../certificate_provider_factory.h | 7 ++- .../certificate_provider_registry.cc | 4 +- .../certificate_provider_registry.h | 5 +- .../lib/security/context/security_context.cc | 12 ++--- .../lib/security/context/security_context.h | 12 ++--- .../credentials/alts/alts_credentials.cc | 4 +- .../credentials/alts/check_gcp_environment.cc | 5 +- .../alts/check_gcp_environment_linux.cc | 3 +- .../alts/check_gcp_environment_no_op.cc | 1 - .../alts/check_gcp_environment_windows.cc | 5 +- .../grpc_alts_credentials_client_options.cc | 3 +- .../alts/grpc_alts_credentials_options.cc | 4 +- .../security/credentials/call_creds_util.cc | 6 +-- .../security/credentials/call_creds_util.h | 4 +- .../credentials/channel_creds_registry.h | 5 +- .../channel_creds_registry_init.cc | 13 +++-- .../composite/composite_credentials.cc | 5 +- .../composite/composite_credentials.h | 13 +++-- .../lib/security/credentials/credentials.cc | 4 +- .../lib/security/credentials/credentials.h | 15 +++--- .../aws_external_account_credentials.cc | 16 +++--- .../aws_external_account_credentials.h | 5 +- .../external/aws_request_signer.cc | 9 ++-- .../credentials/external/aws_request_signer.h | 4 +- .../external/external_account_credentials.cc | 16 +++--- .../external/external_account_credentials.h | 6 +-- .../file_external_account_credentials.cc | 9 ++-- .../file_external_account_credentials.h | 5 +- .../url_external_account_credentials.cc | 16 +++--- .../url_external_account_credentials.h | 5 +- .../credentials/fake/fake_credentials.cc | 4 +- .../credentials/fake/fake_credentials.h | 7 ++- ...cp_service_account_identity_credentials.cc | 5 +- ...gcp_service_account_identity_credentials.h | 6 +-- .../google_default/credentials_generic.cc | 5 +- .../google_default_credentials.cc | 18 +++---- .../google_default_credentials.h | 4 +- .../credentials/iam/iam_credentials.cc | 4 +- .../credentials/iam/iam_credentials.h | 9 ++-- .../insecure/insecure_credentials.cc | 4 +- .../security/credentials/jwt/json_token.cc | 25 ++++----- .../lib/security/credentials/jwt/json_token.h | 3 +- .../credentials/jwt/jwt_credentials.cc | 14 +++-- .../credentials/jwt/jwt_credentials.h | 12 ++--- .../security/credentials/jwt/jwt_verifier.cc | 31 +++++------ .../security/credentials/jwt/jwt_verifier.h | 3 +- .../credentials/local/local_credentials.cc | 4 +- .../credentials/oauth2/oauth2_credentials.cc | 20 ++++--- .../credentials/oauth2/oauth2_credentials.h | 13 +++-- .../credentials/plugin/plugin_credentials.cc | 7 ++- .../credentials/plugin/plugin_credentials.h | 14 +++-- .../credentials/ssl/ssl_credentials.cc | 10 ++-- .../credentials/ssl/ssl_credentials.h | 6 +-- .../tls/grpc_tls_certificate_distributor.cc | 6 +-- .../tls/grpc_tls_certificate_distributor.h | 5 +- .../tls/grpc_tls_certificate_match.cc | 4 +- .../tls/grpc_tls_certificate_provider.cc | 10 ++-- .../tls/grpc_tls_certificate_provider.h | 8 ++- .../tls/grpc_tls_certificate_verifier.cc | 8 ++- .../tls/grpc_tls_certificate_verifier.h | 11 ++-- .../tls/grpc_tls_credentials_options.cc | 7 ++- .../credentials/tls/grpc_tls_crl_provider.cc | 4 +- .../credentials/tls/grpc_tls_crl_provider.h | 12 ++--- .../credentials/tls/tls_credentials.cc | 11 ++-- .../lib/security/credentials/tls/tls_utils.cc | 3 +- .../lib/security/credentials/tls/tls_utils.h | 6 +-- .../token_fetcher/token_fetcher_credentials.h | 5 +- .../credentials/xds/xds_credentials.cc | 5 +- .../credentials/xds/xds_credentials.h | 10 ++-- .../alts/alts_security_connector.cc | 16 +++--- .../fake/fake_security_connector.cc | 12 ++--- .../insecure/insecure_security_connector.cc | 6 +-- .../insecure/insecure_security_connector.h | 9 ++-- .../load_system_roots_supported.cc | 8 ++- .../load_system_roots_windows.cc | 7 ++- .../local/local_security_connector.cc | 12 ++--- .../security_connector/security_connector.cc | 4 +- .../security_connector/security_connector.h | 9 ++-- .../ssl/ssl_security_connector.cc | 6 +-- .../ssl/ssl_security_connector.h | 3 +- .../security/security_connector/ssl_utils.cc | 18 +++---- .../security/security_connector/ssl_utils.h | 12 ++--- .../tls/tls_security_connector.cc | 12 ++--- .../tls/tls_security_connector.h | 11 ++-- .../lib/security/transport/auth_filters.h | 3 +- .../security/transport/client_auth_filter.cc | 14 +++-- .../security/transport/server_auth_filter.cc | 15 +++--- src/core/lib/security/util/json_util.cc | 9 ++-- src/core/lib/slice/percent_encoding.cc | 4 +- src/core/lib/slice/slice.cc | 8 ++- src/core/lib/slice/slice.h | 10 ++-- src/core/lib/slice/slice_buffer.cc | 10 ++-- src/core/lib/slice/slice_buffer.h | 7 ++- src/core/lib/slice/slice_internal.h | 6 +-- src/core/lib/slice/slice_refcount.h | 3 +- src/core/lib/slice/slice_string_helpers.h | 3 +- src/core/lib/surface/byte_buffer.cc | 3 +- src/core/lib/surface/byte_buffer_reader.cc | 8 ++- src/core/lib/surface/call.cc | 28 +++++----- src/core/lib/surface/call.h | 10 ++-- src/core/lib/surface/call_log_batch.cc | 8 ++- src/core/lib/surface/call_test_only.h | 3 +- src/core/lib/surface/call_utils.cc | 28 +++++----- src/core/lib/surface/call_utils.h | 28 +++++----- src/core/lib/surface/channel.cc | 3 +- src/core/lib/surface/channel.h | 13 +++-- src/core/lib/surface/channel_create.cc | 3 +- src/core/lib/surface/channel_create.h | 5 +- src/core/lib/surface/channel_init.cc | 4 +- src/core/lib/surface/channel_init.h | 4 +- src/core/lib/surface/client_call.cc | 28 +++++----- src/core/lib/surface/client_call.h | 24 ++++----- src/core/lib/surface/completion_queue.cc | 14 +++-- src/core/lib/surface/completion_queue.h | 3 +- .../lib/surface/completion_queue_factory.cc | 3 +- src/core/lib/surface/event_string.cc | 4 +- src/core/lib/surface/event_string.h | 4 +- src/core/lib/surface/filter_stack_call.cc | 28 +++++----- src/core/lib/surface/filter_stack_call.h | 28 +++++----- src/core/lib/surface/init.cc | 9 ++-- src/core/lib/surface/init.h | 4 +- src/core/lib/surface/lame_client.cc | 11 ++-- src/core/lib/surface/lame_client.h | 7 ++- src/core/lib/surface/legacy_channel.cc | 11 ++-- src/core/lib/surface/legacy_channel.h | 9 ++-- src/core/lib/surface/metadata_array.cc | 3 +- src/core/lib/surface/server_call.cc | 22 ++++---- src/core/lib/surface/server_call.h | 28 +++++----- src/core/lib/surface/validate_metadata.cc | 5 +- src/core/lib/surface/validate_metadata.h | 6 +-- src/core/lib/transport/bdp_estimator.cc | 3 +- src/core/lib/transport/bdp_estimator.h | 6 +-- .../lib/transport/call_arena_allocator.cc | 4 +- src/core/lib/transport/call_arena_allocator.h | 3 +- src/core/lib/transport/call_filters.cc | 5 +- src/core/lib/transport/call_filters.h | 5 +- src/core/lib/transport/call_final_info.cc | 4 +- src/core/lib/transport/call_final_info.h | 4 +- src/core/lib/transport/call_spine.cc | 3 +- src/core/lib/transport/call_spine.h | 3 +- src/core/lib/transport/call_state.h | 3 +- src/core/lib/transport/connectivity_state.cc | 3 +- src/core/lib/transport/connectivity_state.h | 7 ++- src/core/lib/transport/error_utils.cc | 5 +- src/core/lib/transport/error_utils.h | 7 ++- src/core/lib/transport/interception_chain.cc | 4 +- src/core/lib/transport/interception_chain.h | 4 +- src/core/lib/transport/message.cc | 4 +- src/core/lib/transport/metadata_batch.cc | 4 +- src/core/lib/transport/metadata_batch.h | 8 ++- .../transport/metadata_compression_traits.h | 3 +- src/core/lib/transport/parsed_metadata.h | 6 +-- src/core/lib/transport/promise_endpoint.cc | 11 ++-- src/core/lib/transport/promise_endpoint.h | 12 ++--- .../transport/simple_slice_based_metadata.h | 3 +- src/core/lib/transport/timeout_encoding.cc | 6 +-- src/core/lib/transport/timeout_encoding.h | 4 +- src/core/lib/transport/transport.cc | 8 ++- src/core/lib/transport/transport.h | 12 ++--- src/core/lib/transport/transport_op_string.cc | 5 +- src/core/load_balancing/.clang-format | 50 ----------------- src/core/load_balancing/address_filtering.cc | 4 +- src/core/load_balancing/address_filtering.h | 5 +- src/core/load_balancing/backend_metric_data.h | 4 +- .../load_balancing/backend_metric_parser.cc | 3 +- .../load_balancing/backend_metric_parser.h | 4 +- .../load_balancing/child_policy_handler.cc | 7 ++- .../load_balancing/child_policy_handler.h | 5 +- src/core/load_balancing/delegating_helper.h | 9 ++-- src/core/load_balancing/endpoint_list.cc | 8 ++- src/core/load_balancing/endpoint_list.h | 6 +-- .../grpclb/client_load_reporting_filter.cc | 5 +- .../grpclb/client_load_reporting_filter.h | 3 +- src/core/load_balancing/grpclb/grpclb.cc | 20 ++++--- .../grpclb/grpclb_balancer_addresses.cc | 3 +- .../grpclb/grpclb_client_stats.cc | 3 +- .../grpclb/grpclb_client_stats.h | 6 +-- .../grpclb/load_balancer_api.cc | 8 ++- .../load_balancing/grpclb/load_balancer_api.h | 8 ++- .../load_balancing/health_check_client.cc | 16 +++--- src/core/load_balancing/health_check_client.h | 4 +- .../health_check_client_internal.h | 7 ++- src/core/load_balancing/lb_policy.h | 12 ++--- src/core/load_balancing/lb_policy_factory.h | 5 +- src/core/load_balancing/lb_policy_registry.cc | 7 ++- src/core/load_balancing/lb_policy_registry.h | 5 +- src/core/load_balancing/oob_backend_metric.cc | 18 +++---- src/core/load_balancing/oob_backend_metric.h | 4 +- .../oob_backend_metric_internal.h | 7 ++- .../outlier_detection/outlier_detection.cc | 8 ++- .../outlier_detection/outlier_detection.h | 4 +- .../load_balancing/pick_first/pick_first.cc | 10 ++-- src/core/load_balancing/priority/priority.cc | 10 ++-- .../load_balancing/ring_hash/ring_hash.cc | 10 ++-- src/core/load_balancing/ring_hash/ring_hash.h | 3 +- src/core/load_balancing/rls/rls.cc | 28 +++++----- .../load_balancing/round_robin/round_robin.cc | 6 +-- .../load_balancing/subchannel_interface.h | 7 ++- .../static_stride_scheduler.cc | 4 +- .../static_stride_scheduler.h | 3 +- .../weighted_round_robin.cc | 8 ++- .../weighted_target/weighted_target.cc | 8 ++- src/core/load_balancing/xds/cds.cc | 11 ++-- .../load_balancing/xds/xds_cluster_impl.cc | 6 +-- .../load_balancing/xds/xds_cluster_manager.cc | 8 ++- .../load_balancing/xds/xds_override_host.cc | 8 ++- .../load_balancing/xds/xds_override_host.h | 3 +- .../load_balancing/xds/xds_wrr_locality.cc | 9 ++-- src/core/resolver/.clang-format | 50 ----------------- src/core/resolver/binder/binder_resolver.cc | 6 +-- .../resolver/dns/c_ares/dns_resolver_ares.cc | 9 ++-- .../resolver/dns/c_ares/dns_resolver_ares.h | 3 +- .../resolver/dns/c_ares/grpc_ares_ev_driver.h | 8 ++- .../dns/c_ares/grpc_ares_ev_driver_posix.cc | 4 +- .../dns/c_ares/grpc_ares_ev_driver_windows.cc | 13 ++--- .../resolver/dns/c_ares/grpc_ares_wrapper.cc | 20 +++---- .../resolver/dns/c_ares/grpc_ares_wrapper.h | 7 +-- src/core/resolver/dns/dns_resolver_plugin.cc | 5 +- .../event_engine_client_channel_resolver.cc | 8 ++- .../event_engine_client_channel_resolver.h | 3 +- .../dns/event_engine/service_config_helper.cc | 4 +- .../dns/event_engine/service_config_helper.h | 4 +- src/core/resolver/dns/native/dns_resolver.cc | 7 ++- src/core/resolver/endpoint_addresses.cc | 4 +- src/core/resolver/endpoint_addresses.h | 5 +- src/core/resolver/fake/fake_resolver.cc | 5 +- src/core/resolver/fake/fake_resolver.h | 7 ++- .../google_c2p/google_c2p_resolver.cc | 7 ++- src/core/resolver/polling_resolver.cc | 4 +- src/core/resolver/polling_resolver.h | 7 ++- src/core/resolver/resolver.h | 5 +- src/core/resolver/resolver_factory.h | 5 +- src/core/resolver/resolver_registry.cc | 4 +- src/core/resolver/resolver_registry.h | 5 +- .../resolver/sockaddr/sockaddr_resolver.cc | 5 +- src/core/resolver/xds/xds_config.cc | 1 - src/core/resolver/xds/xds_config.h | 1 - .../resolver/xds/xds_dependency_manager.cc | 1 - .../resolver/xds/xds_dependency_manager.h | 1 - src/core/resolver/xds/xds_resolver.cc | 10 ++-- .../resolver/xds/xds_resolver_attributes.h | 3 +- src/core/server/server.cc | 18 +++---- src/core/server/server.h | 14 +++-- src/core/server/server_call_tracer_filter.cc | 5 +- src/core/server/server_config_selector.h | 5 +- .../server/server_config_selector_filter.cc | 5 +- src/core/server/xds_channel_stack_modifier.cc | 4 +- src/core/server/xds_channel_stack_modifier.h | 7 ++- src/core/server/xds_server_config_fetcher.cc | 14 +++-- src/core/service_config/service_config.h | 6 +-- .../service_config/service_config_call_data.h | 3 +- .../service_config_channel_arg_filter.cc | 7 ++- .../service_config/service_config_impl.cc | 4 +- src/core/service_config/service_config_impl.h | 6 +-- .../service_config/service_config_parser.cc | 3 +- .../service_config/service_config_parser.h | 4 +- src/core/telemetry/call_tracer.cc | 5 +- src/core/telemetry/call_tracer.h | 7 ++- src/core/telemetry/histogram_view.h | 3 +- src/core/telemetry/metrics.cc | 5 +- src/core/telemetry/metrics.h | 7 ++- src/core/telemetry/stats.cc | 3 +- src/core/telemetry/stats.h | 4 +- src/core/telemetry/stats_data.cc | 3 +- src/core/telemetry/stats_data.h | 4 +- src/core/telemetry/tcp_tracer.h | 3 +- src/core/tsi/alts/crypt/aes_gcm.cc | 13 ++--- src/core/tsi/alts/crypt/gsec.cc | 5 +- src/core/tsi/alts/crypt/gsec.h | 7 ++- .../tsi/alts/frame_protector/alts_counter.cc | 3 +- .../tsi/alts/frame_protector/alts_counter.h | 5 +- .../tsi/alts/frame_protector/alts_crypter.cc | 3 +- .../tsi/alts/frame_protector/alts_crypter.h | 5 +- .../frame_protector/alts_frame_protector.cc | 6 +-- .../frame_protector/alts_frame_protector.h | 3 +- .../tsi/alts/frame_protector/frame_handler.cc | 6 +-- .../tsi/alts/frame_protector/frame_handler.h | 3 +- .../alts/handshaker/alts_handshaker_client.cc | 11 ++-- .../alts/handshaker/alts_shared_resource.cc | 3 +- .../alts/handshaker/alts_tsi_handshaker.cc | 14 +++-- .../tsi/alts/handshaker/alts_tsi_utils.cc | 5 +- .../transport_security_common_api.cc | 4 +- ...lts_grpc_integrity_only_record_protocol.cc | 6 +-- ...alts_grpc_integrity_only_record_protocol.h | 3 +- ..._grpc_privacy_integrity_record_protocol.cc | 3 +- ...s_grpc_privacy_integrity_record_protocol.h | 3 +- .../alts_grpc_record_protocol_common.cc | 6 +-- .../alts_iovec_record_protocol.cc | 5 +- .../alts_iovec_record_protocol.h | 3 +- .../alts_zero_copy_grpc_protector.cc | 6 +-- .../alts_zero_copy_grpc_protector.h | 3 +- src/core/tsi/fake_transport_security.cc | 6 +-- src/core/tsi/local_transport_security.cc | 8 ++- .../tsi/ssl/key_logging/ssl_key_logging.cc | 5 +- .../tsi/ssl/key_logging/ssl_key_logging.h | 12 ++--- src/core/tsi/ssl/session_cache/ssl_session.h | 7 ++- .../ssl/session_cache/ssl_session_cache.cc | 5 +- .../tsi/ssl/session_cache/ssl_session_cache.h | 7 ++- .../ssl/session_cache/ssl_session_openssl.cc | 4 +- src/core/tsi/ssl_transport_security.cc | 23 ++++---- src/core/tsi/ssl_transport_security.h | 10 ++-- src/core/tsi/ssl_transport_security_utils.cc | 4 +- src/core/tsi/ssl_transport_security_utils.h | 6 +-- src/core/tsi/ssl_types.h | 3 +- src/core/tsi/transport_security.cc | 5 +- src/core/tsi/transport_security.h | 3 +- src/core/tsi/transport_security_interface.h | 3 +- src/core/util/.clang-format | 53 ------------------- src/core/util/alloc.cc | 5 +- src/core/util/atm.cc | 3 +- src/core/util/avl.h | 1 - src/core/util/backoff.cc | 4 +- src/core/util/backoff.h | 1 - src/core/util/bitset.h | 1 - src/core/util/chunked_vector.h | 1 - src/core/util/crash.cc | 3 +- src/core/util/crash.h | 1 - src/core/util/dual_ref_counted.h | 1 - src/core/util/event_log.cc | 4 +- src/core/util/event_log.h | 2 - src/core/util/examine_stack.cc | 4 +- src/core/util/fork.cc | 7 ++- src/core/util/gcp_metadata_query.cc | 11 ++-- src/core/util/gcp_metadata_query.h | 1 - src/core/util/gethostname_host_name_max.cc | 3 +- src/core/util/gethostname_sysconf.cc | 3 +- src/core/util/gpr_time.cc | 7 +-- src/core/util/grpc_if_nametoindex.h | 1 - src/core/util/grpc_if_nametoindex_posix.cc | 1 - .../util/grpc_if_nametoindex_unsupported.cc | 1 - src/core/util/host_port.cc | 3 +- src/core/util/http_client/format_request.cc | 7 +-- src/core/util/http_client/format_request.h | 3 +- src/core/util/http_client/httpcli.cc | 11 ++-- src/core/util/http_client/httpcli.h | 7 +-- .../http_client/httpcli_security_connector.cc | 15 +++--- .../http_client/httpcli_ssl_credentials.h | 3 +- src/core/util/http_client/parser.cc | 6 +-- src/core/util/http_client/parser.h | 4 +- src/core/util/iphone/cpu.cc | 3 +- src/core/util/json/json.h | 3 +- src/core/util/json/json_channel_args.h | 1 - src/core/util/json/json_object_loader.cc | 7 ++- src/core/util/json/json_object_loader.h | 1 - src/core/util/json/json_reader.cc | 5 +- src/core/util/json/json_reader.h | 1 - src/core/util/json/json_util.cc | 4 +- src/core/util/json/json_util.h | 1 - src/core/util/json/json_writer.cc | 2 - src/core/util/latent_see.cc | 1 - src/core/util/latent_see.h | 1 - src/core/util/linux/cpu.cc | 6 +-- src/core/util/load_file.cc | 8 ++- src/core/util/load_file.h | 1 - src/core/util/log.cc | 11 ++-- src/core/util/manual_constructor.h | 1 - src/core/util/match.h | 1 - src/core/util/matchers.cc | 4 +- src/core/util/matchers.h | 1 - src/core/util/memory.h | 3 +- src/core/util/mpscq.cc | 4 +- src/core/util/mpscq.h | 1 - src/core/util/msys/tmpfile.cc | 5 +- src/core/util/notification.h | 1 - src/core/util/per_cpu.cc | 3 +- src/core/util/per_cpu.h | 4 +- src/core/util/posix/cpu.cc | 6 +-- src/core/util/posix/stat.cc | 1 - src/core/util/posix/string.cc | 5 +- src/core/util/posix/sync.cc | 6 +-- src/core/util/posix/thd.cc | 9 ++-- src/core/util/posix/time.cc | 3 +- src/core/util/posix/tmpfile.cc | 6 +-- src/core/util/random_early_detection.cc | 4 +- src/core/util/random_early_detection.h | 1 - src/core/util/ref_counted.h | 1 - src/core/util/ref_counted_ptr.h | 2 - src/core/util/ref_counted_string.cc | 6 +-- src/core/util/ref_counted_string.h | 2 - src/core/util/spinlock.h | 3 +- src/core/util/stat.h | 1 - src/core/util/status_helper.cc | 8 ++- src/core/util/status_helper.h | 2 - src/core/util/strerror.cc | 3 +- src/core/util/string.cc | 9 ++-- src/core/util/string.h | 4 +- src/core/util/subprocess_posix.cc | 4 +- src/core/util/subprocess_windows.cc | 4 +- src/core/util/sync.cc | 8 ++- src/core/util/sync.h | 3 +- src/core/util/sync_abseil.cc | 8 ++- src/core/util/table.h | 2 - src/core/util/tchar.cc | 4 +- src/core/util/thd.h | 4 +- src/core/util/time.cc | 8 ++- src/core/util/time.h | 7 +-- src/core/util/time_averaged_stats.cc | 4 +- src/core/util/time_precise.cc | 5 +- src/core/util/time_precise.h | 1 - src/core/util/time_util.cc | 6 +-- src/core/util/time_util.h | 3 +- src/core/util/tmpfile.h | 1 - src/core/util/unique_type_name.h | 1 - src/core/util/uri.cc | 3 +- src/core/util/uuid_v4.cc | 4 +- src/core/util/uuid_v4.h | 1 - src/core/util/validation_errors.cc | 3 +- src/core/util/validation_errors.h | 1 - src/core/util/windows/directory_reader.cc | 1 - src/core/util/windows/stat.cc | 1 - src/core/util/windows/string.cc | 5 +- src/core/util/windows/string_util.cc | 10 ++-- src/core/util/windows/sync.cc | 3 +- src/core/util/windows/thd.cc | 8 ++- src/core/util/windows/time.cc | 4 +- src/core/util/windows/tmpfile.cc | 5 +- src/core/util/work_serializer.cc | 7 +-- src/core/util/work_serializer.h | 4 +- .../xds/grpc/certificate_provider_store.cc | 5 +- .../xds/grpc/certificate_provider_store.h | 7 ++- ...le_watcher_certificate_provider_factory.cc | 7 ++- ...ile_watcher_certificate_provider_factory.h | 7 ++- .../xds/grpc/xds_audit_logger_registry.cc | 5 +- src/core/xds/grpc/xds_audit_logger_registry.h | 5 +- src/core/xds/grpc/xds_bootstrap_grpc.cc | 6 +-- src/core/xds/grpc/xds_bootstrap_grpc.h | 5 +- src/core/xds/grpc/xds_certificate_provider.cc | 5 +- src/core/xds/grpc/xds_certificate_provider.h | 9 ++-- src/core/xds/grpc/xds_client_grpc.cc | 17 +++--- src/core/xds/grpc/xds_client_grpc.h | 7 ++- src/core/xds/grpc/xds_cluster.cc | 1 - src/core/xds/grpc/xds_cluster.h | 1 - src/core/xds/grpc/xds_cluster_parser.cc | 5 +- src/core/xds/grpc/xds_cluster_parser.h | 3 +- .../xds/grpc/xds_cluster_specifier_plugin.cc | 12 ++--- .../xds/grpc/xds_cluster_specifier_plugin.h | 9 ++-- src/core/xds/grpc/xds_common_types.cc | 1 - src/core/xds/grpc/xds_common_types.h | 1 - src/core/xds/grpc/xds_common_types_parser.cc | 14 +++-- src/core/xds/grpc/xds_common_types_parser.h | 1 - src/core/xds/grpc/xds_endpoint.h | 1 - src/core/xds/grpc/xds_endpoint_parser.cc | 6 +-- src/core/xds/grpc/xds_endpoint_parser.h | 3 +- src/core/xds/grpc/xds_health_status.h | 1 - src/core/xds/grpc/xds_http_fault_filter.cc | 8 ++- src/core/xds/grpc/xds_http_fault_filter.h | 7 ++- src/core/xds/grpc/xds_http_filter.h | 3 +- src/core/xds/grpc/xds_http_filter_registry.cc | 5 +- src/core/xds/grpc/xds_http_filter_registry.h | 3 +- .../xds/grpc/xds_http_gcp_authn_filter.cc | 5 +- src/core/xds/grpc/xds_http_gcp_authn_filter.h | 3 +- src/core/xds/grpc/xds_http_rbac_filter.cc | 8 ++- src/core/xds/grpc/xds_http_rbac_filter.h | 7 ++- .../grpc/xds_http_stateful_session_filter.cc | 7 ++- .../grpc/xds_http_stateful_session_filter.h | 7 ++- src/core/xds/grpc/xds_lb_policy_registry.cc | 6 +-- src/core/xds/grpc/xds_lb_policy_registry.h | 5 +- src/core/xds/grpc/xds_listener.cc | 1 - src/core/xds/grpc/xds_listener.h | 1 - src/core/xds/grpc/xds_listener_parser.cc | 6 +-- src/core/xds/grpc/xds_listener_parser.h | 3 +- src/core/xds/grpc/xds_metadata.h | 1 - src/core/xds/grpc/xds_metadata_parser.cc | 5 +- src/core/xds/grpc/xds_metadata_parser.h | 1 - src/core/xds/grpc/xds_route_config.cc | 1 - src/core/xds/grpc/xds_route_config.h | 1 - src/core/xds/grpc/xds_route_config_parser.cc | 12 ++--- src/core/xds/grpc/xds_route_config_parser.h | 6 +-- src/core/xds/grpc/xds_routing.cc | 4 +- src/core/xds/grpc/xds_routing.h | 4 +- src/core/xds/grpc/xds_server_grpc.cc | 1 - src/core/xds/grpc/xds_transport_grpc.cc | 18 +++---- src/core/xds/grpc/xds_transport_grpc.h | 11 ++-- src/core/xds/xds_client/lrs_client.cc | 13 +++-- src/core/xds/xds_client/lrs_client.h | 7 ++- src/core/xds/xds_client/xds_api.cc | 14 +++-- src/core/xds/xds_client/xds_api.h | 8 ++- .../xds_backend_metric_propagation.cc | 1 - .../xds_backend_metric_propagation.h | 1 - src/core/xds/xds_client/xds_bootstrap.cc | 3 +- src/core/xds/xds_client/xds_bootstrap.h | 4 +- src/core/xds/xds_client/xds_client.cc | 10 ++-- src/core/xds/xds_client/xds_client.h | 9 ++-- src/core/xds/xds_client/xds_locality.h | 1 - src/core/xds/xds_client/xds_metrics.h | 4 +- src/core/xds/xds_client/xds_resource_type.h | 9 ++-- .../xds/xds_client/xds_resource_type_impl.h | 5 +- src/core/xds/xds_client/xds_transport.h | 1 - src/cpp/client/call_credentials.cc | 5 +- src/cpp/client/channel_cc.cc | 17 +++--- src/cpp/client/channel_credentials.cc | 8 +-- src/cpp/client/client_context.cc | 20 ++++--- src/cpp/client/create_channel.cc | 10 ++-- src/cpp/client/create_channel_internal.cc | 4 +- src/cpp/client/create_channel_internal.h | 8 +-- src/cpp/client/create_channel_posix.cc | 10 ++-- src/cpp/client/cronet_credentials.cc | 10 ++-- src/cpp/client/global_callback_hook.cc | 4 +- src/cpp/client/insecure_credentials.cc | 4 +- src/cpp/client/secure_credentials.cc | 24 ++++----- src/cpp/client/xds_credentials.cc | 8 +-- src/cpp/common/alarm.cc | 15 +++--- src/cpp/common/alts_context.cc | 10 ++-- src/cpp/common/alts_util.cc | 15 +++--- src/cpp/common/auth_property_iterator.cc | 4 +- src/cpp/common/channel_arguments.cc | 13 +++-- src/cpp/common/completion_queue_cc.cc | 11 ++-- .../common/insecure_create_auth_context.cc | 4 +- src/cpp/common/resource_quota_cc.cc | 5 +- src/cpp/common/secure_auth_context.cc | 4 +- src/cpp/common/secure_auth_context.h | 6 +-- src/cpp/common/secure_create_auth_context.cc | 4 +- src/cpp/common/tls_certificate_provider.cc | 9 ++-- src/cpp/common/tls_certificate_verifier.cc | 19 ++++--- src/cpp/common/tls_credentials_options.cc | 10 ++-- src/cpp/common/validate_service_config.cc | 7 ++- src/cpp/common/version_cc.cc | 4 +- src/cpp/ext/chaotic_good.cc | 4 +- src/cpp/ext/chaotic_good.h | 4 +- src/cpp/ext/csm/csm_observability.cc | 7 ++- src/cpp/ext/csm/csm_observability.h | 3 +- src/cpp/ext/csm/metadata_exchange.cc | 8 ++- src/cpp/ext/csm/metadata_exchange.h | 7 ++- src/cpp/ext/filters/census/client_filter.cc | 14 +++-- src/cpp/ext/filters/census/client_filter.h | 3 +- src/cpp/ext/filters/census/context.cc | 5 +- src/cpp/ext/filters/census/context.h | 12 ++--- src/cpp/ext/filters/census/grpc_plugin.cc | 9 ++-- src/cpp/ext/filters/census/grpc_plugin.h | 6 +-- src/cpp/ext/filters/census/measures.cc | 3 +- src/cpp/ext/filters/census/measures.h | 4 +- .../filters/census/open_census_call_tracer.h | 8 ++- src/cpp/ext/filters/census/rpc_encoding.h | 3 +- .../ext/filters/census/server_call_tracer.cc | 8 ++- src/cpp/ext/filters/census/views.cc | 7 ++- src/cpp/ext/gcp/environment_autodetect.cc | 11 ++-- src/cpp/ext/gcp/environment_autodetect.h | 7 ++- src/cpp/ext/gcp/observability.cc | 16 +++--- src/cpp/ext/gcp/observability_config.cc | 8 ++- src/cpp/ext/gcp/observability_config.h | 4 +- src/cpp/ext/gcp/observability_logging_sink.cc | 17 +++--- src/cpp/ext/gcp/observability_logging_sink.h | 6 +-- src/cpp/ext/otel/key_value_iterable.h | 4 +- src/cpp/ext/otel/otel_client_call_tracer.cc | 8 ++- src/cpp/ext/otel/otel_client_call_tracer.h | 6 +-- src/cpp/ext/otel/otel_plugin.cc | 9 ++-- src/cpp/ext/otel/otel_plugin.h | 8 ++- src/cpp/ext/otel/otel_server_call_tracer.cc | 5 +- src/cpp/ext/otel/otel_server_call_tracer.h | 3 +- src/cpp/ext/proto_server_reflection.cc | 6 +-- src/cpp/ext/proto_server_reflection.h | 12 ++--- src/cpp/ext/proto_server_reflection_plugin.cc | 6 +-- .../server/authorization_policy_provider.cc | 6 +-- src/cpp/server/backend_metric_recorder.cc | 6 +-- src/cpp/server/backend_metric_recorder.h | 10 ++-- src/cpp/server/channel_argument_option.cc | 8 +-- src/cpp/server/channelz/channelz_service.cc | 4 +- .../channelz/channelz_service_plugin.cc | 6 +-- src/cpp/server/csds/csds.cc | 10 ++-- src/cpp/server/dynamic_thread_pool.h | 4 +- .../external_connection_acceptor_impl.cc | 8 +-- .../external_connection_acceptor_impl.h | 6 +-- .../health/default_health_check_service.cc | 14 +++-- .../health/default_health_check_service.h | 14 +++-- ...lth_check_service_server_builder_option.cc | 8 +-- src/cpp/server/insecure_server_credentials.cc | 4 +- src/cpp/server/load_reporter/constants.h | 3 +- src/cpp/server/load_reporter/get_cpu_stats.h | 3 +- .../load_reporter/get_cpu_stats_linux.cc | 4 +- .../get_cpu_stats_unsupported.cc | 1 - .../server/load_reporter/load_data_store.cc | 4 +- .../server/load_reporter/load_data_store.h | 5 +- src/cpp/server/load_reporter/load_reporter.cc | 4 +- src/cpp/server/load_reporter/load_reporter.h | 7 +-- .../load_reporter_async_service_impl.cc | 9 ++-- .../load_reporter_async_service_impl.h | 12 ++--- ...reporting_service_server_builder_option.cc | 8 +-- ...reporting_service_server_builder_plugin.cc | 4 +- ..._reporting_service_server_builder_plugin.h | 6 +-- src/cpp/server/load_reporter/util.cc | 9 ++-- src/cpp/server/orca/orca_service.cc | 32 ++++++----- src/cpp/server/secure_server_credentials.cc | 8 +-- src/cpp/server/secure_server_credentials.h | 4 +- src/cpp/server/server_builder.cc | 22 ++++---- src/cpp/server/server_cc.cc | 34 ++++++------ src/cpp/server/server_context.cc | 30 +++++------ src/cpp/server/xds_server_credentials.cc | 8 +-- src/cpp/thread_manager/thread_manager.cc | 1 - src/cpp/util/byte_buffer_cc.cc | 6 +-- src/cpp/util/status.cc | 4 +- src/cpp/util/string_ref.cc | 3 +- src/cpp/util/time_cc.cc | 6 +-- .../tests/CppCronetTests/TestHelper.h | 7 ++- .../grpc_observability/client_call_tracer.cc | 4 +- .../grpc_observability/client_call_tracer.h | 4 +- .../grpc_observability/metadata_exchange.cc | 4 +- .../grpc_observability/metadata_exchange.h | 1 - .../grpc_observability/observability_util.h | 3 +- .../python_observability_context.cc | 1 - .../python_observability_context.h | 4 +- .../grpc_observability/rpc_encoding.h | 3 +- .../grpc_observability/server_call_tracer.cc | 4 +- .../grpc_observability/server_call_tracer.h | 5 +- src/ruby/ext/grpc/rb_byte_buffer.c | 6 +-- src/ruby/ext/grpc/rb_call.c | 10 ++-- src/ruby/ext/grpc/rb_call_credentials.c | 11 ++-- src/ruby/ext/grpc/rb_channel.c | 13 +++-- src/ruby/ext/grpc/rb_channel_args.c | 6 +-- src/ruby/ext/grpc/rb_channel_credentials.c | 11 ++-- src/ruby/ext/grpc/rb_channel_credentials.h | 3 +- src/ruby/ext/grpc/rb_completion_queue.c | 7 ++- src/ruby/ext/grpc/rb_compression_options.c | 11 ++-- src/ruby/ext/grpc/rb_event_thread.c | 9 ++-- src/ruby/ext/grpc/rb_grpc.c | 7 ++- src/ruby/ext/grpc/rb_grpc.h | 3 +- src/ruby/ext/grpc/rb_server.c | 12 ++--- src/ruby/ext/grpc/rb_server_credentials.c | 6 +-- src/ruby/ext/grpc/rb_server_credentials.h | 3 +- .../ext/grpc/rb_xds_channel_credentials.c | 11 ++-- .../ext/grpc/rb_xds_channel_credentials.h | 3 +- src/ruby/ext/grpc/rb_xds_server_credentials.c | 8 +-- src/ruby/ext/grpc/rb_xds_server_credentials.h | 3 +- test/core/address_utils/parse_address_test.cc | 5 +- .../parse_address_with_named_scope_id_test.cc | 8 ++- .../sockaddr_utils_fuzzer_test.cc | 1 - .../core/address_utils/sockaddr_utils_test.cc | 5 +- test/core/bad_client/bad_client.cc | 10 ++-- test/core/bad_client/bad_client.h | 5 +- .../core/bad_client/tests/bad_streaming_id.cc | 8 ++- test/core/bad_client/tests/badreq.cc | 3 +- .../bad_client/tests/connection_prefix.cc | 3 +- .../core/bad_client/tests/duplicate_header.cc | 6 +-- .../bad_client/tests/head_of_line_blocking.cc | 10 ++-- test/core/bad_client/tests/headers.cc | 3 +- .../tests/initial_settings_frame.cc | 5 +- test/core/bad_client/tests/out_of_bounds.cc | 8 ++- .../tests/server_registered_method.cc | 3 +- test/core/bad_client/tests/simple_request.cc | 3 +- test/core/bad_client/tests/unknown_frame.cc | 8 ++- test/core/bad_client/tests/window_overflow.cc | 6 +-- test/core/bad_connection/close_fd_test.cc | 17 +++--- test/core/bad_ssl/bad_ssl_test.cc | 12 ++--- test/core/bad_ssl/server_common.cc | 4 +- test/core/bad_ssl/servers/alpn.cc | 6 +-- test/core/bad_ssl/servers/cert.cc | 3 +- test/core/call/batch_builder.h | 1 - test/core/call/bm_client_call.cc | 1 - test/core/call/call_utils_test.cc | 4 +- test/core/call/client_call_test.cc | 3 +- test/core/call/request_buffer_test.cc | 1 - test/core/call/server_call_test.cc | 7 ++- test/core/call/yodel/fuzzer_main.cc | 7 +-- test/core/call/yodel/test_main.cc | 1 - test/core/call/yodel/yodel_test.cc | 1 - test/core/call/yodel/yodel_test.h | 5 +- test/core/channel/call_finalization_test.cc | 5 +- test/core/channel/channel_args_test.cc | 10 ++-- .../channel/channel_stack_builder_test.cc | 5 +- test/core/channel/channel_stack_test.cc | 5 +- .../channel/minimal_stack_is_minimal_test.cc | 7 ++- .../server_call_tracer_factory_test.cc | 1 - test/core/channelz/channel_trace_test.cc | 10 ++-- test/core/channelz/channelz_registry_test.cc | 1 - test/core/channelz/channelz_test.cc | 18 +++---- test/core/client_channel/bm_client_channel.cc | 4 +- .../bm_load_balanced_call_destination.cc | 4 +- .../client_channel_service_config_test.cc | 7 ++- .../client_channel/client_channel_test.cc | 5 +- .../connected_subchannel_test.cc | 5 +- test/core/client_channel/lb_metadata_test.cc | 1 - .../load_balanced_call_destination_test.cc | 5 +- .../retry_service_config_test.cc | 7 ++- .../client_channel/retry_throttle_test.cc | 1 - .../client_channel/subchannel_args_test.cc | 7 ++- .../miscompile_with_no_unique_address_test.cc | 4 +- test/core/compression/compression_test.cc | 6 +-- .../compression/message_compress_fuzzer.cc | 5 +- .../core/compression/message_compress_test.cc | 6 +-- .../compression/message_decompress_fuzzer.cc | 5 +- test/core/config/core_configuration_test.cc | 4 +- test/core/config/load_config_test.cc | 1 - test/core/end2end/bad_server_response_test.cc | 20 ++++--- test/core/end2end/connection_refused_test.cc | 12 ++--- test/core/end2end/cq_verifier.cc | 14 +++-- test/core/end2end/cq_verifier.h | 10 ++-- test/core/end2end/dualstack_socket_test.cc | 21 ++++---- test/core/end2end/end2end_test_fuzzer.cc | 7 +-- test/core/end2end/end2end_test_main.cc | 1 - test/core/end2end/end2end_test_suites.cc | 22 ++++---- test/core/end2end/end2end_tests.h | 22 ++++---- test/core/end2end/fixtures/h2_oauth2_common.h | 6 +-- .../fixtures/h2_ssl_cred_reload_fixture.h | 6 +-- .../core/end2end/fixtures/h2_ssl_tls_common.h | 6 +-- test/core/end2end/fixtures/h2_tls_common.h | 14 +++-- .../end2end/fixtures/http_proxy_fixture.cc | 12 ++--- test/core/end2end/fixtures/inproc_fixture.h | 3 +- test/core/end2end/fixtures/local_util.cc | 7 ++- test/core/end2end/fixtures/local_util.h | 7 ++- test/core/end2end/fixtures/proxy.cc | 16 +++--- test/core/end2end/fixtures/secure_fixture.h | 9 ++-- test/core/end2end/fixtures/sockpair_fixture.h | 9 ++-- test/core/end2end/fuzzers/api_fuzzer.cc | 14 +++-- test/core/end2end/fuzzers/client_fuzzer.cc | 9 ++-- test/core/end2end/fuzzers/connector_fuzzer.h | 1 - test/core/end2end/fuzzers/fuzzing_common.cc | 16 +++--- test/core/end2end/fuzzers/fuzzing_common.h | 4 +- test/core/end2end/fuzzers/network_input.cc | 4 +- test/core/end2end/fuzzers/server_fuzzer.cc | 9 ++-- test/core/end2end/fuzzers/server_fuzzer.h | 3 +- .../fuzzers/server_fuzzer_chaotic_good.cc | 3 +- test/core/end2end/goaway_server_test.cc | 22 ++++---- test/core/end2end/h2_ssl_cert_test.cc | 22 ++++---- .../core/end2end/h2_ssl_session_reuse_test.cc | 15 +++--- ...ls_peer_property_external_verifier_test.cc | 17 +++--- .../end2end/invalid_call_argument_test.cc | 18 +++---- test/core/end2end/no_server_test.cc | 16 +++--- test/core/end2end/tests/bad_ping.cc | 7 ++- test/core/end2end/tests/binary_metadata.cc | 7 ++- test/core/end2end/tests/call_creds.cc | 11 ++-- test/core/end2end/tests/call_host_override.cc | 7 ++- .../core/end2end/tests/cancel_after_accept.cc | 7 ++- .../end2end/tests/cancel_after_client_done.cc | 5 +- .../core/end2end/tests/cancel_after_invoke.cc | 5 +- .../end2end/tests/cancel_after_round_trip.cc | 7 ++- .../end2end/tests/cancel_before_invoke.cc | 5 +- test/core/end2end/tests/cancel_with_status.cc | 7 ++- test/core/end2end/tests/channelz.cc | 7 ++- test/core/end2end/tests/client_streaming.cc | 5 +- test/core/end2end/tests/compressed_payload.cc | 10 ++-- test/core/end2end/tests/connectivity.cc | 5 +- test/core/end2end/tests/default_host.cc | 5 +- .../core/end2end/tests/disappearing_server.cc | 5 +- .../core/end2end/tests/filter_causes_close.cc | 4 +- test/core/end2end/tests/filter_init_fails.cc | 5 +- test/core/end2end/tests/filtered_metadata.cc | 5 +- .../end2end/tests/graceful_server_shutdown.cc | 5 +- test/core/end2end/tests/grpc_authz.cc | 11 ++-- test/core/end2end/tests/high_initial_seqno.cc | 7 ++- test/core/end2end/tests/hpack_size.cc | 6 +-- test/core/end2end/tests/http2_stats.cc | 7 ++- .../end2end/tests/invoke_large_request.cc | 6 +-- test/core/end2end/tests/keepalive_timeout.cc | 7 ++- test/core/end2end/tests/large_metadata.cc | 6 +-- .../end2end/tests/max_concurrent_streams.cc | 7 ++- test/core/end2end/tests/max_connection_age.cc | 6 +-- .../core/end2end/tests/max_connection_idle.cc | 9 ++-- test/core/end2end/tests/max_message_length.cc | 7 ++- test/core/end2end/tests/negative_deadline.cc | 5 +- test/core/end2end/tests/no_logging.cc | 7 ++- test/core/end2end/tests/payload.cc | 5 +- test/core/end2end/tests/ping.cc | 5 +- .../core/end2end/tests/ping_pong_streaming.cc | 4 +- test/core/end2end/tests/proxy_auth.cc | 5 +- test/core/end2end/tests/registered_call.cc | 3 +- test/core/end2end/tests/request_with_flags.cc | 10 ++-- .../end2end/tests/request_with_payload.cc | 5 +- .../end2end/tests/resource_quota_server.cc | 8 ++- test/core/end2end/tests/retry.cc | 7 ++- ...retry_cancel_after_first_attempt_starts.cc | 5 +- .../tests/retry_cancel_during_delay.cc | 7 ++- ...retry_cancel_with_multiple_send_batches.cc | 7 ++- test/core/end2end/tests/retry_cancellation.cc | 7 ++- test/core/end2end/tests/retry_disabled.cc | 7 ++- .../retry_exceeds_buffer_size_in_delay.cc | 7 ++- ...ry_exceeds_buffer_size_in_initial_batch.cc | 7 ++- ...exceeds_buffer_size_in_subsequent_batch.cc | 7 ++- test/core/end2end/tests/retry_lb_drop.cc | 9 ++-- test/core/end2end/tests/retry_lb_fail.cc | 7 ++- .../tests/retry_non_retriable_status.cc | 7 ++- ...ry_non_retriable_status_before_trailers.cc | 7 ++- .../tests/retry_per_attempt_recv_timeout.cc | 7 ++- ...er_attempt_recv_timeout_on_last_attempt.cc | 7 ++- .../tests/retry_recv_initial_metadata.cc | 7 ++- test/core/end2end/tests/retry_recv_message.cc | 7 ++- .../tests/retry_recv_message_replay.cc | 7 ++- .../retry_recv_trailing_metadata_error.cc | 7 ++- .../tests/retry_send_initial_metadata_refs.cc | 9 ++-- .../core/end2end/tests/retry_send_op_fails.cc | 7 ++- .../end2end/tests/retry_send_recv_batch.cc | 7 ++- .../tests/retry_server_pushback_delay.cc | 7 ++- .../tests/retry_server_pushback_disabled.cc | 7 ++- test/core/end2end/tests/retry_streaming.cc | 7 ++- .../tests/retry_streaming_after_commit.cc | 7 ++- ...reaming_succeeds_before_replay_finished.cc | 7 ++- test/core/end2end/tests/retry_throttled.cc | 7 ++- .../end2end/tests/retry_too_many_attempts.cc | 7 ++- .../end2end/tests/retry_transparent_goaway.cc | 7 ++- ...etry_transparent_max_concurrent_streams.cc | 9 ++-- .../retry_transparent_not_sent_on_wire.cc | 6 +-- .../tests/retry_unref_before_finish.cc | 7 ++- .../end2end/tests/retry_unref_before_recv.cc | 7 ++- .../end2end/tests/server_finishes_request.cc | 5 +- test/core/end2end/tests/server_streaming.cc | 5 +- .../end2end/tests/shutdown_finishes_calls.cc | 7 ++- .../end2end/tests/simple_delayed_request.cc | 9 ++-- test/core/end2end/tests/simple_metadata.cc | 5 +- test/core/end2end/tests/simple_request.cc | 4 +- .../end2end/tests/streaming_error_response.cc | 5 +- .../tests/timeout_before_request_call.cc | 8 ++- test/core/end2end/tests/trailing_metadata.cc | 5 +- test/core/end2end/tests/write_buffering.cc | 7 ++- .../end2end/tests/write_buffering_at_end.cc | 7 ++- test/core/event_engine/cf/cf_engine_test.cc | 7 ++- .../core/event_engine/common_closures_test.cc | 5 +- .../default_engine_methods_test.cc | 13 +++-- .../core/event_engine/endpoint_config_test.cc | 5 +- .../event_engine/event_engine_test_utils.cc | 12 ++--- .../event_engine/event_engine_test_utils.h | 7 ++- test/core/event_engine/factory_test.cc | 7 ++- test/core/event_engine/forkable_test.cc | 1 - .../fuzzing_event_engine.cc | 6 +-- .../fuzzing_event_engine.h | 12 ++--- .../fuzzing_event_engine_unittest.cc | 5 +- test/core/event_engine/handle_tests.cc | 6 +-- test/core/event_engine/mock_event_engine.h | 8 +-- .../posix/event_poller_posix_test.cc | 10 ++-- .../posix/lock_free_event_test.cc | 10 ++-- .../posix/log_too_many_open_files_test.cc | 1 - .../event_engine/posix/posix_endpoint_test.cc | 9 ++-- .../posix/posix_engine_listener_utils_test.cc | 5 +- .../posix/posix_engine_test_utils.cc | 1 - .../posix/posix_engine_test_utils.h | 5 +- .../posix/posix_event_engine_connect_test.cc | 8 ++- .../posix/tcp_posix_socket_utils_test.cc | 7 +-- .../event_engine/posix/timer_heap_test.cc | 1 - .../event_engine/posix/timer_list_test.cc | 7 ++- .../event_engine/posix/timer_manager_test.cc | 5 +- .../posix/traced_buffer_list_test.cc | 6 +-- .../posix/wakeup_fd_posix_test.cc | 1 - .../event_engine/query_extensions_test.cc | 9 ++-- test/core/event_engine/slice_buffer_test.cc | 11 ++-- test/core/event_engine/smoke_test.cc | 9 ++-- .../event_engine/tcp_socket_utils_test.cc | 6 +-- test/core/event_engine/test_init.cc | 4 +- test/core/event_engine/test_init.h | 4 +- .../test_suite/event_engine_test_framework.cc | 3 +- .../test_suite/event_engine_test_framework.h | 7 ++- .../test_suite/fuzzing_event_engine_test.cc | 4 +- .../posix/oracle_event_engine_posix.cc | 6 +-- .../posix/oracle_event_engine_posix.h | 11 ++-- .../posix_event_engine_native_dns_test.cc | 7 ++- .../test_suite/posix_event_engine_test.cc | 5 +- .../test_suite/tests/client_test.cc | 9 ++-- .../event_engine/test_suite/tests/dns_test.cc | 7 ++- .../test_suite/tests/server_test.cc | 9 ++-- .../test_suite/tests/timer_test.cc | 5 +- .../thready_posix_event_engine_test.cc | 5 +- .../test_suite/tools/echo_client.cc | 14 +++-- .../tools/posix_event_engine_factory.cc | 7 ++- .../tools/windows_event_engine_factory.cc | 6 +-- test/core/event_engine/thread_pool_test.cc | 7 ++- .../event_engine/util/aborting_event_engine.h | 9 ++-- .../event_engine/windows/create_sockpair.cc | 1 - test/core/event_engine/windows/iocp_test.cc | 10 ++-- .../event_engine/windows/win_socket_test.cc | 6 +-- .../windows/windows_endpoint_test.cc | 6 +-- .../work_queue/basic_work_queue_fuzzer.cc | 6 +-- .../work_queue/basic_work_queue_test.cc | 7 ++- test/core/experiments/experiments_tag_test.cc | 5 +- test/core/experiments/experiments_test.cc | 5 +- .../resolver_fuzzer.cc | 7 ++- .../rbac/rbac_service_config_parser_test.cc | 9 ++-- test/core/filters/bm_http_client_filter.cc | 4 +- test/core/filters/client_auth_filter_test.cc | 11 ++-- .../filters/client_authority_filter_test.cc | 5 +- test/core/filters/filter_test.cc | 5 +- test/core/filters/filter_test.h | 9 ++-- test/core/filters/filter_test_test.cc | 5 +- .../filters/gcp_authentication_filter_test.cc | 1 - test/core/handshake/client_ssl.cc | 26 ++++----- test/core/handshake/http_proxy_mapper_test.cc | 5 +- .../readahead_handshaker_server_ssl.cc | 5 +- test/core/handshake/server_ssl.cc | 1 - test/core/handshake/server_ssl_common.cc | 25 ++++----- test/core/handshake/verify_peer_options.cc | 15 +++--- test/core/http/format_request_test.cc | 1 - test/core/http/httpcli_test.cc | 19 +++---- test/core/http/httpcli_test_util.cc | 10 ++-- test/core/http/httpscli_test.cc | 15 +++--- test/core/http/parser_test.cc | 4 +- test/core/http/request_fuzzer.cc | 5 +- test/core/http/response_fuzzer.cc | 5 +- test/core/iomgr/buffer_list_test.cc | 6 +-- test/core/iomgr/combiner_test.cc | 7 ++- test/core/iomgr/endpoint_pair_test.cc | 12 ++--- test/core/iomgr/endpoint_tests.cc | 8 ++- test/core/iomgr/error_test.cc | 9 ++-- test/core/iomgr/fd_conservation_posix_test.cc | 4 +- test/core/iomgr/fd_posix_test.cc | 10 ++-- .../grpc_ipv6_loopback_available_test.cc | 3 +- .../iomgr/pollset_windows_starvation_test.cc | 4 +- test/core/iomgr/resolve_address_posix_test.cc | 13 ++--- test/core/iomgr/resolve_address_test.cc | 13 ++--- test/core/iomgr/socket_utils_test.cc | 9 ++-- test/core/iomgr/tcp_client_posix_test.cc | 8 ++- test/core/iomgr/tcp_posix_test.cc | 12 ++--- test/core/iomgr/tcp_server_posix_test.cc | 9 ++-- test/core/iomgr/timer_heap_test.cc | 7 +-- test/core/iomgr/timer_list_test.cc | 4 +- test/core/json/fuzzer.cc | 4 +- test/core/json/json_object_loader_test.cc | 5 +- test/core/json/json_test.cc | 1 - test/core/load_balancing/bm_picker.cc | 8 ++- test/core/load_balancing/lb_policy_test_lib.h | 10 ++-- ...outlier_detection_lb_config_parser_test.cc | 5 +- .../load_balancing/outlier_detection_test.cc | 6 +-- test/core/load_balancing/pick_first_test.cc | 6 +-- test/core/load_balancing/ring_hash_test.cc | 6 +-- .../rls_lb_config_parser_test.cc | 5 +- test/core/load_balancing/round_robin_test.cc | 5 +- .../static_stride_scheduler_benchmark.cc | 5 +- .../weighted_round_robin_config_test.cc | 5 +- .../weighted_round_robin_test.cc | 6 +-- ...xds_override_host_lb_config_parser_test.cc | 5 +- .../load_balancing/xds_override_host_test.cc | 6 +-- test/core/memory_usage/callback_client.cc | 12 ++--- test/core/memory_usage/callback_server.cc | 12 ++--- test/core/memory_usage/client.cc | 22 ++++---- test/core/memory_usage/memory_usage_test.cc | 12 ++--- test/core/memory_usage/server.cc | 21 ++++---- .../message_size_service_config_test.cc | 6 +-- test/core/nanopb/fuzzer_response.cc | 3 +- test/core/nanopb/fuzzer_serverlist.cc | 3 +- .../network_benchmarks/low_level_ping_pong.cc | 6 +-- test/core/promise/activity_test.cc | 1 - test/core/promise/arena_promise_test.cc | 5 +- test/core/promise/bm_party.cc | 1 - test/core/promise/cancel_callback_test.cc | 1 - .../event_engine_wakeup_scheduler_test.cc | 6 +-- .../promise/exec_ctx_wakeup_scheduler_test.cc | 1 - test/core/promise/for_each_test.cc | 5 +- .../core/promise/inter_activity_latch_test.cc | 5 +- test/core/promise/inter_activity_pipe_test.cc | 1 - test/core/promise/interceptor_list_test.cc | 5 +- test/core/promise/join_test.cc | 1 - test/core/promise/latch_test.cc | 1 - test/core/promise/loop_test.cc | 1 - test/core/promise/map_pipe_test.cc | 5 +- test/core/promise/map_test.cc | 1 - test/core/promise/mpsc_test.cc | 5 +- test/core/promise/observable_test.cc | 5 +- test/core/promise/party_test.cc | 8 ++- test/core/promise/pipe_test.cc | 7 ++- test/core/promise/prioritized_race_test.cc | 1 - test/core/promise/promise_factory_test.cc | 1 - test/core/promise/promise_fuzzer.cc | 1 - test/core/promise/promise_mutex_test.cc | 1 - test/core/promise/race_test.cc | 1 - test/core/promise/sleep_test.cc | 5 +- test/core/promise/try_seq_metadata_test.cc | 7 ++- test/core/promise/wait_for_callback_test.cc | 1 - test/core/resolver/binder_resolver_test.cc | 4 +- .../resolver/dns_resolver_cooldown_test.cc | 16 +++--- test/core/resolver/dns_resolver_test.cc | 1 - test/core/resolver/endpoint_addresses_test.cc | 5 +- test/core/resolver/fake_resolver_test.cc | 4 +- .../core/resolver/google_c2p_resolver_test.cc | 12 ++--- test/core/resolver/sockaddr_resolver_test.cc | 1 - test/core/resource_quota/arena_test.cc | 6 +-- .../resource_quota/memory_quota_fuzzer.cc | 8 ++- .../memory_quota_stress_test.cc | 6 +-- test/core/resource_quota/memory_quota_test.cc | 7 ++- .../resource_quota/periodic_update_test.cc | 6 +-- .../resource_quota/resource_quota_test.cc | 1 - test/core/security/alts_credentials_fuzzer.cc | 6 +-- .../security/alts_security_connector_test.cc | 9 ++-- test/core/security/auth_context_test.cc | 4 +- .../security/authorization_matchers_test.cc | 7 ++- test/core/security/aws_request_signer_test.cc | 4 +- .../certificate_provider_registry_test.cc | 1 - .../security/channel_creds_registry_test.cc | 4 +- .../check_gcp_environment_linux_test.cc | 8 ++- .../check_gcp_environment_windows_test.cc | 8 ++- test/core/security/create_jwt.cc | 5 +- test/core/security/credentials_test.cc | 21 ++++---- test/core/security/evaluate_args_test.cc | 3 +- test/core/security/fetch_oauth2.cc | 10 ++-- .../grpc_alts_credentials_options_test.cc | 6 +-- test/core/security/grpc_audit_logging_test.cc | 10 ++-- .../grpc_authorization_engine_test.cc | 7 ++- ...grpc_authorization_policy_provider_test.cc | 3 +- .../grpc_tls_certificate_distributor_test.cc | 12 ++--- .../grpc_tls_certificate_provider_test.cc | 12 ++--- .../grpc_tls_certificate_verifier_test.cc | 12 ++--- .../grpc_tls_credentials_options_test.cc | 3 +- .../security/grpc_tls_crl_provider_test.cc | 12 ++--- .../insecure_security_connector_test.cc | 3 +- test/core/security/json_token_test.cc | 13 ++--- test/core/security/jwt_verifier_test.cc | 9 ++-- .../security/local_security_connector_test.cc | 3 +- test/core/security/oauth2_utils.cc | 6 +-- .../print_google_default_creds_token.cc | 8 ++- test/core/security/rbac_translator_test.cc | 8 ++- test/core/security/secure_endpoint_test.cc | 9 ++-- test/core/security/security_connector_test.cc | 11 ++-- test/core/security/ssl_credentials_test.cc | 8 ++- test/core/security/ssl_server_fuzzer.cc | 5 +- test/core/security/system_roots_test.cc | 6 +-- .../security/tls_security_connector_test.cc | 11 ++-- test/core/security/verify_jwt.cc | 8 ++- test/core/security/xds_credentials_test.cc | 3 +- .../server/server_config_selector_test.cc | 5 +- .../server/xds_channel_stack_modifier_test.cc | 5 +- .../service_config/service_config_test.cc | 4 +- test/core/slice/c_slice_buffer_test.cc | 6 +-- test/core/slice/percent_decode_fuzzer.cc | 3 +- test/core/slice/percent_encode_fuzzer.cc | 4 +- test/core/slice/percent_encoding_test.cc | 4 +- test/core/slice/slice_buffer_test.cc | 8 ++- test/core/slice/slice_string_helpers_test.cc | 5 +- test/core/slice/slice_test.cc | 6 +-- test/core/surface/byte_buffer_reader_test.cc | 12 ++--- test/core/surface/channel_init_test.cc | 1 - test/core/surface/completion_queue_test.cc | 8 ++- .../completion_queue_threading_test.cc | 10 ++-- .../surface/concurrent_connectivity_test.cc | 14 +++-- test/core/surface/init_test.cc | 7 ++- test/core/surface/lame_client_test.cc | 12 ++--- ...num_external_connectivity_watchers_test.cc | 12 ++--- .../surface/secure_channel_create_test.cc | 5 +- .../surface/sequential_connectivity_test.cc | 14 +++-- test/core/surface/server_chttp2_test.cc | 7 ++- test/core/surface/server_test.cc | 12 ++--- test/core/telemetry/call_tracer_test.cc | 7 ++- test/core/telemetry/metrics_test.cc | 1 - test/core/telemetry/stats_test.cc | 5 +- test/core/telemetry/trace_flags_test.cc | 5 +- test/core/test_util/audit_logging_utils.cc | 9 ++-- test/core/test_util/audit_logging_utils.h | 8 +-- test/core/test_util/cmdline.cc | 4 +- test/core/test_util/cmdline.h | 4 +- test/core/test_util/cmdline_test.cc | 1 - test/core/test_util/evaluate_args_test_util.h | 8 ++- test/core/test_util/fake_stats_plugin.cc | 1 - test/core/test_util/fake_stats_plugin.h | 1 - .../core/test_util/fake_udp_and_tcp_server.cc | 6 +-- test/core/test_util/fake_udp_and_tcp_server.h | 6 +-- .../test_util/fuzz_config_vars_helpers.cc | 1 - .../core/test_util/fuzz_config_vars_helpers.h | 3 +- test/core/test_util/fuzzer_corpus_test.cc | 6 +-- test/core/test_util/fuzzer_util.cc | 3 +- test/core/test_util/fuzzing_channel_args.h | 4 +- test/core/test_util/histogram.cc | 6 +-- test/core/test_util/histogram.h | 3 +- test/core/test_util/mock_endpoint.cc | 9 ++-- test/core/test_util/mock_endpoint.h | 4 +- .../core/test_util/one_corpus_entry_fuzzer.cc | 4 +- test/core/test_util/parse_hexstring.cc | 3 +- test/core/test_util/parse_hexstring.h | 1 - test/core/test_util/passthrough_endpoint.h | 4 +- test/core/test_util/port.cc | 8 ++- .../port_isolated_runtime_environment.cc | 6 +-- test/core/test_util/port_server_client.cc | 16 +++--- test/core/test_util/proto_bit_gen.h | 3 +- test/core/test_util/reconnect_server.cc | 6 +-- test/core/test_util/reconnect_server.h | 4 +- test/core/test_util/resolve_localhost_ip46.cc | 5 +- test/core/test_util/slice_splitter.cc | 5 +- test/core/test_util/slice_splitter.h | 3 +- .../socket_use_after_close_detector.cc | 8 ++- .../socket_use_after_close_detector.h | 6 +-- test/core/test_util/stack_tracer.cc | 5 +- test/core/test_util/stack_tracer.h | 4 +- test/core/test_util/stack_tracer_test.cc | 1 - test/core/test_util/test_config.cc | 8 ++- test/core/test_util/test_config.h | 3 +- test/core/test_util/test_lb_policies.cc | 6 +-- test/core/test_util/test_lb_policies.h | 5 +- test/core/test_util/test_tcp_server.cc | 10 ++-- test/core/test_util/test_tcp_server.h | 4 +- test/core/test_util/tls_utils.cc | 8 ++- test/core/test_util/tls_utils.h | 9 ++-- test/core/transport/bdp_estimator_test.cc | 4 +- .../transport/benchmarks/bm_chaotic_good.cc | 4 +- test/core/transport/benchmarks/bm_inproc.cc | 8 ++- .../transport/binder/binder_transport_test.cc | 10 ++-- .../binder/end2end/binder_server_test.cc | 12 ++--- .../end2end/end2end_binder_transport_test.cc | 10 ++-- .../transport/binder/end2end/fake_binder.cc | 1 - .../transport/binder/end2end/fake_binder.h | 1 - .../binder/end2end/fake_binder_test.cc | 7 ++- .../binder/end2end/fuzzers/client_fuzzer.cc | 7 ++- .../binder/end2end/fuzzers/fuzzer_utils.h | 1 - .../binder/end2end/fuzzers/server_fuzzer.cc | 3 +- .../binder/end2end/testing_channel_create.cc | 5 +- .../binder/end2end/testing_channel_create.h | 4 +- .../binder/endpoint_binder_pool_test.cc | 7 ++- .../binder/transport_stream_receiver_test.cc | 7 ++- .../core/transport/binder/wire_reader_test.cc | 10 ++-- .../core/transport/binder/wire_writer_test.cc | 8 ++- test/core/transport/bm_call_spine.cc | 1 - .../transport/call_arena_allocator_test.cc | 6 +-- test/core/transport/call_filters_test.cc | 1 - test/core/transport/call_spine_benchmarks.h | 1 - test/core/transport/call_spine_test.cc | 5 +- test/core/transport/call_state_test.cc | 1 - .../chaotic_good/chaotic_good_server_test.cc | 11 ++-- .../client_transport_error_test.cc | 14 +++-- .../chaotic_good/client_transport_test.cc | 15 +++--- .../transport/chaotic_good/frame_fuzzer.cc | 4 +- .../chaotic_good/frame_header_fuzzer.cc | 1 - .../core/transport/chaotic_good/frame_test.cc | 1 - .../chaotic_good/mock_promise_endpoint.cc | 4 +- .../chaotic_good/mock_promise_endpoint.h | 5 +- .../chaotic_good/server_transport_test.cc | 15 +++--- .../transport/chaotic_good/transport_test.h | 1 - test/core/transport/chttp2/alpn_test.cc | 1 - .../core/transport/chttp2/bin_decoder_test.cc | 4 +- .../core/transport/chttp2/bin_encoder_test.cc | 9 ++-- .../transport/chttp2/decode_huff_fuzzer.cc | 1 - .../chttp2/encode_decode_huff_fuzzer.cc | 4 +- .../transport/chttp2/flow_control_fuzzer.cc | 6 +-- .../transport/chttp2/flow_control_test.cc | 5 +- test/core/transport/chttp2/frame_test.cc | 1 - .../chttp2/graceful_shutdown_test.cc | 14 +++-- .../transport/chttp2/hpack_encoder_test.cc | 6 +-- .../chttp2/hpack_parser_fuzzer_test.cc | 6 +-- .../chttp2/hpack_parser_input_size_fuzzer.cc | 10 ++-- .../chttp2/hpack_parser_table_test.cc | 5 +- .../transport/chttp2/hpack_parser_test.cc | 13 +++-- .../transport/chttp2/hpack_sync_fuzzer.cc | 1 - .../core/transport/chttp2/hpack_utils_test.cc | 8 ++- .../chttp2/ping_abuse_policy_test.cc | 4 +- .../transport/chttp2/ping_callbacks_test.cc | 1 - .../chttp2/ping_configuration_test.cc | 7 ++- .../transport/chttp2/ping_rate_policy_test.cc | 1 - .../remove_stream_from_stalled_lists_test.cc | 25 ++++----- .../transport/chttp2/settings_timeout_test.cc | 22 ++++---- ...ak_with_queued_flow_control_update_test.cc | 20 ++++--- .../transport/chttp2/streams_not_seen_test.cc | 22 ++++---- .../transport/chttp2/too_many_pings_test.cc | 22 ++++---- test/core/transport/chttp2/varint_test.cc | 5 +- .../core/transport/connectivity_state_test.cc | 3 +- test/core/transport/error_utils_test.cc | 1 - .../core/transport/interception_chain_test.cc | 7 ++- test/core/transport/metadata_map_test.cc | 4 +- test/core/transport/parsed_metadata_test.cc | 1 - test/core/transport/promise_endpoint_test.cc | 9 ++-- test/core/transport/status_conversion_test.cc | 5 +- .../core/transport/test_suite/call_content.cc | 1 - .../test_suite/chaotic_good_fixture.cc | 1 - test/core/transport/test_suite/stress.cc | 1 - .../transport/test_suite/transport_test.h | 1 - test/core/transport/timeout_encoding_test.cc | 1 - test/core/tsi/alts/crypt/aes_gcm_test.cc | 8 ++- test/core/tsi/alts/crypt/gsec_test_util.cc | 3 +- test/core/tsi/alts/crypt/gsec_test_util.h | 3 +- .../fake_handshaker/fake_handshaker_server.cc | 15 +++--- .../fake_handshaker/fake_handshaker_server.h | 4 +- .../fake_handshaker_server_main.cc | 7 ++- .../alts/frame_protector/alts_counter_test.cc | 3 +- .../alts/frame_protector/alts_crypter_test.cc | 7 +-- .../alts_frame_protector_test.cc | 6 +-- .../frame_protector/frame_handler_test.cc | 6 +-- .../alts_concurrent_connectivity_test.cc | 25 ++++----- .../handshaker/alts_handshaker_client_test.cc | 6 +-- .../handshaker/alts_tsi_handshaker_test.cc | 11 ++-- .../alts/handshaker/alts_tsi_utils_test.cc | 3 +- .../transport_security_common_api_test.cc | 3 +- .../alts_grpc_record_protocol_test.cc | 8 ++- .../alts_iovec_record_protocol_test.cc | 8 ++- .../alts_zero_copy_grpc_protector_test.cc | 6 +-- .../tsi/crl_ssl_transport_security_test.cc | 13 ++--- test/core/tsi/fake_transport_security_test.cc | 8 ++- test/core/tsi/ssl_session_cache_test.cc | 8 ++- test/core/tsi/ssl_transport_security_test.cc | 15 +++--- .../tsi/ssl_transport_security_utils_test.cc | 9 ++-- test/core/tsi/transport_security_test.cc | 11 ++-- test/core/tsi/transport_security_test_lib.cc | 13 ++--- test/core/tsi/transport_security_test_lib.h | 3 +- test/core/util/alloc_test.cc | 4 +- test/core/util/backoff_test.cc | 5 +- test/core/util/chunked_vector_fuzzer.cc | 4 +- test/core/util/chunked_vector_test.cc | 5 +- test/core/util/cpp_impl_of_test.cc | 4 +- test/core/util/cpu_test.cc | 10 ++-- test/core/util/directory_reader_test.cc | 1 - test/core/util/dual_ref_counted_test.cc | 1 - test/core/util/env_test.cc | 1 - test/core/util/fork_test.cc | 4 +- test/core/util/glob_test.cc | 5 +- test/core/util/gpr_time_test.cc | 4 +- test/core/util/host_port_test.cc | 1 - test/core/util/load_file_test.cc | 4 +- test/core/util/mpscq_test.cc | 6 +-- test/core/util/orphanable_test.cc | 1 - test/core/util/ref_counted_ptr_test.cc | 1 - test/core/util/ref_counted_test.cc | 1 - test/core/util/ring_buffer_test.cc | 4 +- test/core/util/spinlock_test.cc | 6 +-- test/core/util/stat_test.cc | 4 +- test/core/util/string_test.cc | 6 +-- test/core/util/sync_test.cc | 8 ++- test/core/util/thd_test.cc | 7 ++- test/core/util/time_averaged_stats_test.cc | 3 +- test/core/util/time_util_test.cc | 4 +- test/core/util/unique_ptr_with_bitset_test.cc | 3 +- test/core/util/uri_fuzzer_test.cc | 5 +- test/core/util/uri_test.cc | 5 +- test/core/util/useful_test.cc | 3 +- test/core/util/validation_errors_test.cc | 1 - test/core/util/work_serializer_test.cc | 8 ++- .../xds/certificate_provider_store_test.cc | 5 +- ...tcher_certificate_provider_factory_test.cc | 5 +- .../xds/xds_audit_logger_registry_test.cc | 14 +++-- test/core/xds/xds_bootstrap_test.cc | 10 ++-- .../core/xds/xds_certificate_provider_test.cc | 5 +- test/core/xds/xds_client_fuzzer.cc | 5 +- test/core/xds/xds_client_test.cc | 15 +++--- test/core/xds/xds_client_test_peer.h | 5 +- .../xds/xds_cluster_resource_type_test.cc | 16 +++--- test/core/xds/xds_common_types_test.cc | 14 +++-- .../xds/xds_endpoint_resource_type_test.cc | 11 ++-- test/core/xds/xds_http_filters_test.cc | 22 ++++---- test/core/xds/xds_lb_policy_registry_test.cc | 12 ++--- .../xds/xds_listener_resource_type_test.cc | 16 +++--- test/core/xds/xds_metadata_test.cc | 7 ++- .../xds_route_config_resource_type_test.cc | 17 +++--- test/core/xds/xds_transport_fake.cc | 7 ++- test/core/xds/xds_transport_fake.h | 4 +- test/cpp/client/credentials_test.cc | 10 ++-- ...channel_with_active_connect_stress_test.cc | 15 +++--- test/cpp/codegen/codegen_test_full.cc | 3 +- test/cpp/codegen/golden_file_test.cc | 5 +- test/cpp/codegen/proto_utils_test.cc | 3 +- test/cpp/common/alarm_test.cc | 9 ++-- test/cpp/common/alts_util_test.cc | 6 +-- .../cpp/common/auth_property_iterator_test.cc | 3 +- test/cpp/common/channel_arguments_test.cc | 3 +- test/cpp/common/secure_auth_context_test.cc | 3 +- test/cpp/common/time_jump_test.cc | 7 +-- test/cpp/common/timer_test.cc | 4 +- .../end2end/admin_services_end2end_test.cc | 6 +-- test/cpp/end2end/async_end2end_test.cc | 19 ++++--- test/cpp/end2end/cfstream_test.cc | 20 ++++--- test/cpp/end2end/channelz_service_test.cc | 8 ++- .../end2end/client_callback_end2end_test.cc | 24 ++++----- test/cpp/end2end/client_crash_test.cc | 8 ++- test/cpp/end2end/client_crash_test_server.cc | 9 ++-- test/cpp/end2end/client_fork_test.cc | 11 ++-- .../client_interceptors_end2end_test.cc | 14 +++-- test/cpp/end2end/client_lb_end2end_test.cc | 38 +++++++------ .../end2end/connection_attempt_injector.cc | 1 - .../end2end/context_allocator_end2end_test.cc | 22 ++++---- test/cpp/end2end/crl_provider_test.cc | 24 ++++----- test/cpp/end2end/delegating_channel_test.cc | 9 ++-- test/cpp/end2end/end2end_test.cc | 19 ++++--- test/cpp/end2end/exception_test.cc | 9 ++-- test/cpp/end2end/flaky_network_test.cc | 22 ++++---- test/cpp/end2end/generic_end2end_test.cc | 12 ++--- test/cpp/end2end/grpc_authz_end2end_test.cc | 7 ++- test/cpp/end2end/grpclb_end2end_test.cc | 26 +++++---- .../end2end/health_service_end2end_test.cc | 13 +++-- test/cpp/end2end/hybrid_end2end_test.cc | 14 +++-- test/cpp/end2end/interceptors_util.cc | 1 - test/cpp/end2end/interceptors_util.h | 8 ++- .../end2end/message_allocator_end2end_test.cc | 24 ++++----- test/cpp/end2end/mock_test.cc | 14 +++-- test/cpp/end2end/nonblocking_test.cc | 9 ++-- test/cpp/end2end/orca_service_end2end_test.cc | 10 ++-- test/cpp/end2end/port_sharing_end2end_test.cc | 14 +++-- .../end2end/proto_server_reflection_test.cc | 9 ++-- test/cpp/end2end/raw_end2end_test.cc | 14 +++-- .../resource_quota_end2end_stress_test.cc | 16 +++--- test/cpp/end2end/rls_end2end_test.cc | 22 ++++---- test/cpp/end2end/rls_server.cc | 1 - test/cpp/end2end/rls_server.h | 1 - .../cpp/end2end/server_builder_plugin_test.cc | 10 ++-- test/cpp/end2end/server_crash_test.cc | 10 ++-- test/cpp/end2end/server_crash_test_client.cc | 9 ++-- test/cpp/end2end/server_early_return_test.cc | 3 +- .../server_interceptors_end2end_test.cc | 14 +++-- .../server_load_reporting_end2end_test.cc | 10 ++-- .../end2end/service_config_end2end_test.cc | 28 +++++----- test/cpp/end2end/shutdown_test.cc | 12 ++--- test/cpp/end2end/ssl_credentials_test.cc | 12 ++--- test/cpp/end2end/streaming_throughput_test.cc | 15 +++--- .../end2end/test_health_check_service_impl.h | 6 +-- test/cpp/end2end/test_service_impl.cc | 12 ++--- test/cpp/end2end/test_service_impl.h | 14 +++-- test/cpp/end2end/thread_stress_test.cc | 14 +++-- test/cpp/end2end/time_change_test.cc | 15 +++--- test/cpp/end2end/tls_credentials_test.cc | 12 ++--- test/cpp/end2end/tls_key_export_test.cc | 15 +++--- .../end2end/xds/xds_cluster_end2end_test.cc | 7 ++- .../xds/xds_cluster_type_end2end_test.cc | 8 ++- test/cpp/end2end/xds/xds_core_end2end_test.cc | 7 ++- .../xds/xds_credentials_end2end_test.cc | 3 +- test/cpp/end2end/xds/xds_csds_end2end_test.cc | 12 ++--- test/cpp/end2end/xds/xds_end2end_test.cc | 32 ++++++----- test/cpp/end2end/xds/xds_end2end_test_lib.cc | 10 ++-- test/cpp/end2end/xds/xds_end2end_test_lib.h | 22 ++++---- .../end2end/xds/xds_fallback_end2end_test.cc | 14 +++-- .../xds/xds_fault_injection_end2end_test.cc | 6 +-- .../end2end/xds/xds_gcp_authn_end2end_test.cc | 5 +- .../xds/xds_outlier_detection_end2end_test.cc | 7 ++- .../xds/xds_override_host_end2end_test.cc | 7 ++- .../xds/xds_pick_first_end2end_test.cc | 11 ++-- .../end2end/xds/xds_ring_hash_end2end_test.cc | 10 ++-- test/cpp/end2end/xds/xds_rls_end2end_test.cc | 5 +- .../end2end/xds/xds_routing_end2end_test.cc | 7 ++- test/cpp/end2end/xds/xds_server.cc | 1 - test/cpp/end2end/xds/xds_server.h | 5 +- test/cpp/end2end/xds/xds_utils.cc | 5 +- test/cpp/end2end/xds/xds_utils.h | 1 - test/cpp/end2end/xds/xds_wrr_end2end_test.cc | 12 ++--- test/cpp/ext/chaotic_good_test.cc | 3 +- test/cpp/ext/csm/csm_observability_test.cc | 7 ++- test/cpp/ext/csm/mesh_id_test.cc | 3 +- test/cpp/ext/csm/metadata_exchange_test.cc | 7 ++- .../filters/census/constant_labels_test.cc | 7 ++- test/cpp/ext/filters/census/library.h | 7 ++- .../census/stats_plugin_end2end_test.cc | 7 ++- test/cpp/ext/filters/logging/library.h | 9 ++-- .../logging_census_integration_test.cc | 9 ++-- test/cpp/ext/filters/logging/logging_test.cc | 7 ++- .../ext/gcp/environment_autodetect_test.cc | 5 +- test/cpp/ext/gcp/observability_config_test.cc | 5 +- .../gcp/observability_logging_sink_test.cc | 1 - test/cpp/ext/gcp/observability_test.cc | 5 +- test/cpp/ext/otel/otel_plugin_test.cc | 7 ++- test/cpp/ext/otel/otel_test_library.cc | 5 +- test/cpp/ext/otel/otel_test_library.h | 9 ++-- test/cpp/grpclb/grpclb_api_test.cc | 8 ++- test/cpp/interop/backend_metrics_lb_policy.cc | 5 +- .../interop/backend_metrics_lb_policy_test.cc | 9 ++-- test/cpp/interop/client.cc | 11 ++-- test/cpp/interop/client_helper.cc | 15 +++--- test/cpp/interop/client_helper.h | 8 +-- test/cpp/interop/grpclb_fallback_test.cc | 14 +++-- test/cpp/interop/http2_client.cc | 9 ++-- test/cpp/interop/http2_client.h | 4 +- test/cpp/interop/interop_client.cc | 17 +++--- test/cpp/interop/interop_client.h | 6 +-- test/cpp/interop/interop_server.cc | 17 +++--- test/cpp/interop/interop_test.cc | 4 +- test/cpp/interop/istio_echo_server.cc | 19 ++++--- test/cpp/interop/istio_echo_server_lib.cc | 7 ++- test/cpp/interop/istio_echo_server_test.cc | 12 ++--- test/cpp/interop/metrics_client.cc | 5 +- test/cpp/interop/observability_client.cc | 15 +++--- .../observability_interop_server_bootstrap.cc | 4 +- test/cpp/interop/pre_stop_hook_server.cc | 5 +- test/cpp/interop/pre_stop_hook_server_test.cc | 10 ++-- test/cpp/interop/reconnect_interop_client.cc | 11 ++-- test/cpp/interop/reconnect_interop_server.cc | 10 ++-- test/cpp/interop/rpc_behavior_lb_policy.cc | 5 +- test/cpp/interop/server_helper.cc | 5 +- test/cpp/interop/server_helper.h | 6 +-- test/cpp/interop/stress_interop_client.cc | 5 +- test/cpp/interop/stress_interop_client.h | 4 +- test/cpp/interop/stress_test.cc | 8 ++- test/cpp/interop/xds_federation_client.cc | 7 ++- test/cpp/interop/xds_interop_client.cc | 17 +++--- test/cpp/interop/xds_interop_server.cc | 9 ++-- test/cpp/interop/xds_interop_server_lib.cc | 11 ++-- test/cpp/interop/xds_interop_server_lib.h | 4 +- test/cpp/interop/xds_interop_server_test.cc | 10 ++-- test/cpp/interop/xds_stats_watcher.h | 5 +- test/cpp/interop/xds_stats_watcher_test.cc | 7 ++- test/cpp/microbenchmarks/bm_alarm.cc | 1 - .../microbenchmarks/bm_basic_work_queue.cc | 8 ++- test/cpp/microbenchmarks/bm_byte_buffer.cc | 8 ++- test/cpp/microbenchmarks/bm_channel.cc | 1 - test/cpp/microbenchmarks/bm_channel_args.cc | 8 ++- test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 9 ++-- test/cpp/microbenchmarks/bm_closure.cc | 5 +- test/cpp/microbenchmarks/bm_cq.cc | 4 +- .../microbenchmarks/bm_cq_multiple_threads.cc | 9 ++-- .../microbenchmarks/bm_event_engine_run.cc | 10 ++-- test/cpp/microbenchmarks/bm_exec_ctx.cc | 7 ++- test/cpp/microbenchmarks/bm_huffman_decode.cc | 5 +- .../microbenchmarks/bm_opencensus_plugin.cc | 12 ++--- test/cpp/microbenchmarks/bm_rng.cc | 1 - test/cpp/microbenchmarks/bm_stats_plugin.cc | 8 ++- test/cpp/microbenchmarks/bm_thread_pool.cc | 10 ++-- .../callback_streaming_ping_pong.h | 5 +- .../microbenchmarks/callback_test_service.h | 4 +- .../callback_unary_ping_pong.h | 5 +- test/cpp/microbenchmarks/fullstack_fixtures.h | 3 +- .../fullstack_streaming_ping_pong.h | 5 +- .../fullstack_streaming_pump.h | 5 +- .../fullstack_unary_ping_pong.h | 5 +- test/cpp/microbenchmarks/helpers.h | 7 ++- test/cpp/naming/address_sorting_test.cc | 15 +++--- test/cpp/naming/cancel_ares_query_test.cc | 17 +++--- test/cpp/naming/resolver_component_test.cc | 17 +++--- ...resolver_component_tests_runner_invoker.cc | 12 ++--- test/cpp/performance/writes_per_rpc_test.cc | 14 +++-- test/cpp/qps/benchmark_config.cc | 5 +- test/cpp/qps/client.h | 12 ++--- test/cpp/qps/client_async.cc | 15 +++--- test/cpp/qps/client_callback.cc | 13 +++-- test/cpp/qps/client_sync.cc | 17 +++--- test/cpp/qps/driver.cc | 13 +++-- .../qps/inproc_sync_unary_ping_pong_test.cc | 1 - test/cpp/qps/interarrival.h | 4 +- test/cpp/qps/json_run_localhost.cc | 1 - test/cpp/qps/parse_json.cc | 1 - test/cpp/qps/qps_json_driver.cc | 5 +- test/cpp/qps/qps_openloop_test.cc | 1 - test/cpp/qps/qps_server_builder.h | 4 +- test/cpp/qps/qps_worker.cc | 17 +++--- test/cpp/qps/qps_worker.h | 4 +- test/cpp/qps/report.cc | 5 +- test/cpp/qps/report.h | 6 +-- test/cpp/qps/scenario_runner.cc | 1 - .../qps/secure_sync_unary_ping_pong_test.cc | 1 - test/cpp/qps/server.h | 7 ++- test/cpp/qps/server_async.cc | 17 +++--- test/cpp/qps/server_callback.cc | 3 +- test/cpp/qps/server_sync.cc | 9 ++-- test/cpp/qps/usage_timer.cc | 5 +- test/cpp/qps/worker.cc | 6 +-- .../security/tls_certificate_verifier_test.cc | 7 ++- .../authorization_policy_provider_test.cc | 3 +- test/cpp/server/credentials_test.cc | 10 ++-- .../load_reporter/get_cpu_stats_test.cc | 3 +- .../load_reporter/load_data_store_test.cc | 9 ++-- .../load_reporter/load_reporter_test.cc | 12 ++--- test/cpp/server/server_builder_test.cc | 6 +-- ...server_builder_with_socket_mutator_test.cc | 7 ++- test/cpp/server/server_request_call_test.cc | 12 ++--- .../cpp/test/client_context_test_peer_test.cc | 9 ++-- test/cpp/test/mock_stream_test.cc | 4 +- .../test/server_context_test_spouse_test.cc | 9 ++-- .../cpp/thread_manager/thread_manager_test.cc | 10 ++-- test/cpp/util/byte_buffer_proto_helper.h | 4 +- test/cpp/util/byte_buffer_test.cc | 9 ++-- test/cpp/util/channel_trace_proto_helper.cc | 3 +- test/cpp/util/channelz_sampler.cc | 26 +++++---- test/cpp/util/channelz_sampler_test.cc | 26 +++++---- test/cpp/util/cli_call.cc | 11 ++-- test/cpp/util/cli_call.h | 4 +- test/cpp/util/cli_call_test.cc | 3 +- test/cpp/util/cli_credentials.cc | 5 +- test/cpp/util/create_test_channel.cc | 5 +- test/cpp/util/create_test_channel.h | 4 +- test/cpp/util/error_details_test.cc | 3 +- test/cpp/util/grpc_cli.cc | 5 +- test/cpp/util/grpc_tool.cc | 17 +++--- test/cpp/util/grpc_tool.h | 4 +- test/cpp/util/grpc_tool_test.cc | 16 +++--- test/cpp/util/metrics_server.cc | 3 +- test/cpp/util/metrics_server.h | 4 +- test/cpp/util/proto_buffer_reader_test.cc | 3 +- test/cpp/util/proto_buffer_writer_test.cc | 3 +- test/cpp/util/proto_file_parser.cc | 4 +- test/cpp/util/proto_file_parser.h | 4 +- .../proto_reflection_descriptor_database.cc | 1 - .../proto_reflection_descriptor_database.h | 6 +-- test/cpp/util/slice_test.cc | 3 +- test/cpp/util/string_ref_test.cc | 6 +-- test/cpp/util/test_config_cc.cc | 1 - test/cpp/util/test_credentials_provider.cc | 7 ++- test/cpp/util/test_credentials_provider.h | 4 +- test/cpp/util/time_test.cc | 3 +- test/cpp/util/tls_test_utils.h | 4 +- test/cpp/util/windows/manifest_file.cc | 1 - .../python/grpcio_tools/grpc_tools/main.cc | 15 +++--- 2150 files changed, 5746 insertions(+), 9439 deletions(-) delete mode 100644 include/grpc++/impl/.clang-format delete mode 100644 include/grpc/.clang-format delete mode 100644 include/grpcpp/.clang-format delete mode 100644 include/grpcpp/impl/.clang-format delete mode 100644 include/grpcpp/impl/codegen/.clang-format delete mode 100644 include/grpcpp/security/.clang-format delete mode 100644 include/grpcpp/support/.clang-format delete mode 100644 src/.clang-format delete mode 100644 src/compiler/.clang-format delete mode 100644 src/core/.clang-format delete mode 100644 src/core/client_channel/.clang-format delete mode 100644 src/core/ext/.clang-format delete mode 100644 src/core/ext/filters/.clang-format delete mode 100644 src/core/ext/transport/.clang-format delete mode 100644 src/core/ext/transport/binder/.clang-format delete mode 100644 src/core/ext/transport/chttp2/transport/.clang-format delete mode 100644 src/core/lib/event_engine/posix_engine/.clang-format delete mode 100644 src/core/lib/event_engine/windows/.clang-format delete mode 100644 src/core/load_balancing/.clang-format delete mode 100644 src/core/resolver/.clang-format delete mode 100644 src/core/util/.clang-format diff --git a/.clang-format b/.clang-format index 5f150ef6edb..6c6c4548e80 100644 --- a/.clang-format +++ b/.clang-format @@ -8,36 +8,6 @@ IncludeCategories: # ruby.h is even more first if it's included - Regex: '^' Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 --- Language: ObjC BasedOnStyle: Google diff --git a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/native.cc b/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/native.cc index fe7d910f1b4..3cb8637eb69 100644 --- a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/native.cc +++ b/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/native.cc @@ -13,14 +13,13 @@ // limitations under the License. #include +#include +#include #include #include "examples/protos/helloworld.grpc.pb.h" #include "examples/protos/helloworld.pb.h" -#include -#include - extern "C" JNIEXPORT jstring JNICALL Java_io_grpc_binder_cpp_exampleclient_ButtonPressHandler_native_1entry( JNIEnv* env, jobject /*this*/, jobject application) { diff --git a/examples/android/binder/java/io/grpc/binder/cpp/exampleserver/native.cc b/examples/android/binder/java/io/grpc/binder/cpp/exampleserver/native.cc index 8b2e546ab2c..0f220c1066c 100644 --- a/examples/android/binder/java/io/grpc/binder/cpp/exampleserver/native.cc +++ b/examples/android/binder/java/io/grpc/binder/cpp/exampleserver/native.cc @@ -13,15 +13,14 @@ // limitations under the License. #include -#include - -#include "examples/protos/helloworld.grpc.pb.h" -#include "examples/protos/helloworld.pb.h" - #include #include #include #include +#include + +#include "examples/protos/helloworld.grpc.pb.h" +#include "examples/protos/helloworld.pb.h" namespace { class GreeterService : public helloworld::Greeter::Service { diff --git a/examples/cpp/auth/ssl_client.cc b/examples/cpp/auth/ssl_client.cc index 95e94eb1dbe..9a0efcadaac 100644 --- a/examples/cpp/auth/ssl_client.cc +++ b/examples/cpp/auth/ssl_client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -26,8 +28,6 @@ #include "absl/flags/parse.h" #include "helper.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/auth/ssl_server.cc b/examples/cpp/auth/ssl_server.cc index dc76ecdc093..e9bf94cf890 100644 --- a/examples/cpp/auth/ssl_server.cc +++ b/examples/cpp/auth/ssl_server.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include @@ -21,8 +23,6 @@ #include "absl/strings/str_format.h" #include "helper.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/cancellation/client.cc b/examples/cpp/cancellation/client.cc index 97c9f1fac48..d78c9da25ac 100644 --- a/examples/cpp/cancellation/client.cc +++ b/examples/cpp/cancellation/client.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include @@ -23,8 +25,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_cat.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/cancellation/server.cc b/examples/cpp/cancellation/server.cc index 7c537976508..f2a468d6ad2 100644 --- a/examples/cpp/cancellation/server.cc +++ b/examples/cpp/cancellation/server.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include @@ -21,8 +23,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/compression/greeter_client.cc b/examples/cpp/compression/greeter_client.cc index b1ef4546d8a..95aa5a9c152 100644 --- a/examples/cpp/compression/greeter_client.cc +++ b/examples/cpp/compression/greeter_client.cc @@ -16,12 +16,12 @@ * */ +#include + #include #include #include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/compression/greeter_server.cc b/examples/cpp/compression/greeter_server.cc index dc1b1f6530f..f27447b13d9 100644 --- a/examples/cpp/compression/greeter_server.cc +++ b/examples/cpp/compression/greeter_server.cc @@ -16,12 +16,12 @@ * */ +#include + #include #include #include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/csm/csm_greeter_client.cc b/examples/cpp/csm/csm_greeter_client.cc index a689fdfa0d2..90d550a9928 100644 --- a/examples/cpp/csm/csm_greeter_client.cc +++ b/examples/cpp/csm/csm_greeter_client.cc @@ -16,6 +16,9 @@ * */ +#include +#include +#include #include #include @@ -34,10 +37,6 @@ #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/csm/csm_greeter_server.cc b/examples/cpp/csm/csm_greeter_server.cc index 7f66a5cc9a9..0c6a47446b5 100644 --- a/examples/cpp/csm/csm_greeter_server.cc +++ b/examples/cpp/csm/csm_greeter_server.cc @@ -16,6 +16,13 @@ * */ +#include +#include +#include +#include +#include +#include + #include #include #include @@ -27,14 +34,6 @@ #include "opentelemetry/exporters/prometheus/exporter_factory.h" #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/util/gethostname.h" #ifdef BAZEL_BUILD diff --git a/examples/cpp/csm/observability/csm_greeter_client.cc b/examples/cpp/csm/observability/csm_greeter_client.cc index 7040bc13f90..6d08d901e5a 100644 --- a/examples/cpp/csm/observability/csm_greeter_client.cc +++ b/examples/cpp/csm/observability/csm_greeter_client.cc @@ -16,6 +16,9 @@ * */ +#include +#include +#include #include #include @@ -32,10 +35,6 @@ #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include -#include -#include - ABSL_FLAG(std::string, target, "xds:///helloworld:50051", "Target string"); ABSL_FLAG(std::string, prometheus_endpoint, "localhost:9464", "Prometheus exporter endpoint"); diff --git a/examples/cpp/csm/observability/csm_greeter_server.cc b/examples/cpp/csm/observability/csm_greeter_server.cc index a3d7eccd978..cfae25d4c3d 100644 --- a/examples/cpp/csm/observability/csm_greeter_server.cc +++ b/examples/cpp/csm/observability/csm_greeter_server.cc @@ -16,6 +16,13 @@ * */ +#include +#include +#include +#include +#include +#include + #include #include #include @@ -31,13 +38,6 @@ #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include -#include -#include -#include -#include -#include - ABSL_FLAG(int32_t, port, 50051, "Server port for service."); ABSL_FLAG(std::string, prometheus_endpoint, "localhost:9464", "Prometheus exporter endpoint"); diff --git a/examples/cpp/deadline/client.cc b/examples/cpp/deadline/client.cc index 398be745733..7971ab77f45 100644 --- a/examples/cpp/deadline/client.cc +++ b/examples/cpp/deadline/client.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include @@ -23,8 +25,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_cat.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/deadline/server.cc b/examples/cpp/deadline/server.cc index eae5c0e1d08..14f2bfafe8b 100644 --- a/examples/cpp/deadline/server.cc +++ b/examples/cpp/deadline/server.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include @@ -25,8 +27,6 @@ #include "absl/strings/match.h" #include "absl/strings/str_format.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/debugging/crashing_greeter_client.cc b/examples/cpp/debugging/crashing_greeter_client.cc index 732535539f1..490ebcec98e 100644 --- a/examples/cpp/debugging/crashing_greeter_client.cc +++ b/examples/cpp/debugging/crashing_greeter_client.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include @@ -19,8 +21,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/debugging/greeter_callback_server_admin.cc b/examples/cpp/debugging/greeter_callback_server_admin.cc index 397503f4e6d..c2c776fa707 100644 --- a/examples/cpp/debugging/greeter_callback_server_admin.cc +++ b/examples/cpp/debugging/greeter_callback_server_admin.cc @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include +#include + #include #include #include @@ -20,11 +25,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/error_details/greeter_client.cc b/examples/cpp/error_details/greeter_client.cc index a86756d01ec..08e960c6fb5 100644 --- a/examples/cpp/error_details/greeter_client.cc +++ b/examples/cpp/error_details/greeter_client.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include @@ -22,12 +24,9 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #include "google/rpc/error_details.pb.h" - #include "src/proto/grpc/status/status.pb.h" #else #include "error_details.pb.h" diff --git a/examples/cpp/error_details/greeter_server.cc b/examples/cpp/error_details/greeter_server.cc index 41f844ab5c1..30a2c2bdebe 100644 --- a/examples/cpp/error_details/greeter_server.cc +++ b/examples/cpp/error_details/greeter_server.cc @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include @@ -22,14 +26,9 @@ #include "absl/strings/str_format.h" #include "absl/synchronization/mutex.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #include "google/rpc/error_details.pb.h" - #include "src/proto/grpc/status/status.pb.h" #else #include "error_details.pb.h" diff --git a/examples/cpp/error_handling/greeter_client.cc b/examples/cpp/error_handling/greeter_client.cc index 551d8f66607..10824339bf3 100644 --- a/examples/cpp/error_handling/greeter_client.cc +++ b/examples/cpp/error_handling/greeter_client.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include @@ -22,8 +24,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/error_handling/greeter_server.cc b/examples/cpp/error_handling/greeter_server.cc index 79a527a516b..701530b1fa4 100644 --- a/examples/cpp/error_handling/greeter_server.cc +++ b/examples/cpp/error_handling/greeter_server.cc @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include @@ -22,10 +26,6 @@ #include "absl/strings/str_format.h" #include "absl/synchronization/mutex.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/flow_control/client_flow_control_client.cc b/examples/cpp/flow_control/client_flow_control_client.cc index 933489d7d04..053a0c120f4 100644 --- a/examples/cpp/flow_control/client_flow_control_client.cc +++ b/examples/cpp/flow_control/client_flow_control_client.cc @@ -16,6 +16,10 @@ * */ +#include +#include +#include + #include #include #include @@ -23,10 +27,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/flow_control/client_flow_control_server.cc b/examples/cpp/flow_control/client_flow_control_server.cc index 31de9275d7c..c19e40693fb 100644 --- a/examples/cpp/flow_control/client_flow_control_server.cc +++ b/examples/cpp/flow_control/client_flow_control_server.cc @@ -16,6 +16,10 @@ * */ +#include +#include +#include + #include #include #include @@ -25,10 +29,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/flow_control/server_flow_control_client.cc b/examples/cpp/flow_control/server_flow_control_client.cc index 2c9b5938a48..82df2dc463b 100644 --- a/examples/cpp/flow_control/server_flow_control_client.cc +++ b/examples/cpp/flow_control/server_flow_control_client.cc @@ -16,16 +16,16 @@ * */ +#include +#include +#include + #include #include #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/flow_control/server_flow_control_server.cc b/examples/cpp/flow_control/server_flow_control_server.cc index 75b71eb1e1a..f04a84e1969 100644 --- a/examples/cpp/flow_control/server_flow_control_server.cc +++ b/examples/cpp/flow_control/server_flow_control_server.cc @@ -15,6 +15,11 @@ * limitations under the License. * */ +#include +#include +#include +#include + #include #include #include @@ -24,11 +29,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_cat.h" -#include -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/gcp_observability/helloworld/greeter_client.cc b/examples/cpp/gcp_observability/helloworld/greeter_client.cc index 7b4d79fab1f..1412cf07cf3 100644 --- a/examples/cpp/gcp_observability/helloworld/greeter_client.cc +++ b/examples/cpp/gcp_observability/helloworld/greeter_client.cc @@ -16,6 +16,9 @@ // // +#include +#include + #include #include #include @@ -25,9 +28,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/gcp_observability/helloworld/greeter_server.cc b/examples/cpp/gcp_observability/helloworld/greeter_server.cc index 5312d68708a..02570a1bfbd 100644 --- a/examples/cpp/gcp_observability/helloworld/greeter_server.cc +++ b/examples/cpp/gcp_observability/helloworld/greeter_server.cc @@ -16,6 +16,11 @@ // // +#include +#include +#include +#include + #include #include #include @@ -27,11 +32,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/generic_api/greeter_client.cc b/examples/cpp/generic_api/greeter_client.cc index 8435ad6c2e3..7afd5377e45 100644 --- a/examples/cpp/generic_api/greeter_client.cc +++ b/examples/cpp/generic_api/greeter_client.cc @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include #include @@ -22,9 +25,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/generic_api/greeter_server.cc b/examples/cpp/generic_api/greeter_server.cc index e2a9b3f8976..d4e9a837829 100644 --- a/examples/cpp/generic_api/greeter_server.cc +++ b/examples/cpp/generic_api/greeter_server.cc @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include #include @@ -22,9 +25,6 @@ #include "absl/strings/str_format.h" #include "absl/synchronization/mutex.h" -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/health/health_client.cc b/examples/cpp/health/health_client.cc index 488dbdf4d31..15e04b84216 100644 --- a/examples/cpp/health/health_client.cc +++ b/examples/cpp/health/health_client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -25,11 +27,8 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" - #include "src/proto/grpc/health/v1/health.grpc.pb.h" #else #include "health.grpc.pb.h" diff --git a/examples/cpp/health/health_server.cc b/examples/cpp/health/health_server.cc index ac78435ea1e..aae879c027b 100644 --- a/examples/cpp/health/health_server.cc +++ b/examples/cpp/health/health_server.cc @@ -16,6 +16,10 @@ * */ +#include +#include +#include + #include #include #include @@ -24,10 +28,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc index 25417269085..e798c92bc0a 100644 --- a/examples/cpp/helloworld/greeter_async_client.cc +++ b/examples/cpp/helloworld/greeter_async_client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -24,8 +26,6 @@ #include "absl/flags/parse.h" #include "absl/log/check.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/helloworld/greeter_async_client2.cc b/examples/cpp/helloworld/greeter_async_client2.cc index 83662761837..fd43fa2bb64 100644 --- a/examples/cpp/helloworld/greeter_async_client2.cc +++ b/examples/cpp/helloworld/greeter_async_client2.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -25,8 +27,6 @@ #include "absl/flags/parse.h" #include "absl/log/check.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/helloworld/greeter_async_server.cc b/examples/cpp/helloworld/greeter_async_server.cc index 9adefedf7d9..72267b3e822 100644 --- a/examples/cpp/helloworld/greeter_async_server.cc +++ b/examples/cpp/helloworld/greeter_async_server.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -26,8 +28,6 @@ #include "absl/log/check.h" #include "absl/strings/str_format.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/helloworld/greeter_callback_client.cc b/examples/cpp/helloworld/greeter_callback_client.cc index ae09066c0f6..547120918c2 100644 --- a/examples/cpp/helloworld/greeter_callback_client.cc +++ b/examples/cpp/helloworld/greeter_callback_client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -25,8 +27,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/helloworld/greeter_callback_server.cc b/examples/cpp/helloworld/greeter_callback_server.cc index 0a1b4ea9318..d8363c8d493 100644 --- a/examples/cpp/helloworld/greeter_callback_server.cc +++ b/examples/cpp/helloworld/greeter_callback_server.cc @@ -16,6 +16,10 @@ * */ +#include +#include +#include + #include #include #include @@ -24,10 +28,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/helloworld/greeter_client.cc b/examples/cpp/helloworld/greeter_client.cc index b97f0bd1da3..a022fa628a4 100644 --- a/examples/cpp/helloworld/greeter_client.cc +++ b/examples/cpp/helloworld/greeter_client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -23,8 +25,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/helloworld/greeter_server.cc b/examples/cpp/helloworld/greeter_server.cc index e35c4ac9eb9..1bdc84acdb3 100644 --- a/examples/cpp/helloworld/greeter_server.cc +++ b/examples/cpp/helloworld/greeter_server.cc @@ -16,6 +16,10 @@ * */ +#include +#include +#include + #include #include #include @@ -24,10 +28,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/helloworld/xds_greeter_client.cc b/examples/cpp/helloworld/xds_greeter_client.cc index 093204ec3e0..455ba5c2de8 100644 --- a/examples/cpp/helloworld/xds_greeter_client.cc +++ b/examples/cpp/helloworld/xds_greeter_client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -23,8 +25,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/helloworld/xds_greeter_server.cc b/examples/cpp/helloworld/xds_greeter_server.cc index c0bed68ff7a..f7266b81581 100644 --- a/examples/cpp/helloworld/xds_greeter_server.cc +++ b/examples/cpp/helloworld/xds_greeter_server.cc @@ -16,6 +16,12 @@ * */ +#include +#include +#include +#include +#include + #include #include #include @@ -25,12 +31,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" -#include -#include -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/interceptors/caching_interceptor.h b/examples/cpp/interceptors/caching_interceptor.h index b461524f6f4..cd979752e8f 100644 --- a/examples/cpp/interceptors/caching_interceptor.h +++ b/examples/cpp/interceptors/caching_interceptor.h @@ -16,12 +16,12 @@ * */ +#include + #include #include "absl/log/check.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/keyvaluestore.grpc.pb.h" #else diff --git a/examples/cpp/interceptors/client.cc b/examples/cpp/interceptors/client.cc index 9c63c86c172..cc815db9698 100644 --- a/examples/cpp/interceptors/client.cc +++ b/examples/cpp/interceptors/client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -25,8 +27,6 @@ #include "caching_interceptor.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/keyvaluestore.grpc.pb.h" #else diff --git a/examples/cpp/interceptors/server.cc b/examples/cpp/interceptors/server.cc index e865bbe02fe..f1d3941c10f 100644 --- a/examples/cpp/interceptors/server.cc +++ b/examples/cpp/interceptors/server.cc @@ -16,14 +16,14 @@ * */ +#include +#include + #include #include #include #include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/keyvaluestore.grpc.pb.h" #else diff --git a/examples/cpp/keepalive/greeter_callback_client.cc b/examples/cpp/keepalive/greeter_callback_client.cc index 3df307b44b0..0e123155815 100644 --- a/examples/cpp/keepalive/greeter_callback_client.cc +++ b/examples/cpp/keepalive/greeter_callback_client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -26,8 +28,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/keepalive/greeter_callback_server.cc b/examples/cpp/keepalive/greeter_callback_server.cc index 17c3c402d75..9a34a5a65ae 100644 --- a/examples/cpp/keepalive/greeter_callback_server.cc +++ b/examples/cpp/keepalive/greeter_callback_server.cc @@ -16,6 +16,10 @@ * */ +#include +#include +#include + #include #include #include @@ -24,10 +28,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/load_balancing/greeter_client.cc b/examples/cpp/load_balancing/greeter_client.cc index 25322dbfc95..f09598f350e 100644 --- a/examples/cpp/load_balancing/greeter_client.cc +++ b/examples/cpp/load_balancing/greeter_client.cc @@ -16,12 +16,12 @@ * */ +#include + #include #include #include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/load_balancing/greeter_server.cc b/examples/cpp/load_balancing/greeter_server.cc index d021b54c4d1..93b8c91e0a0 100644 --- a/examples/cpp/load_balancing/greeter_server.cc +++ b/examples/cpp/load_balancing/greeter_server.cc @@ -16,12 +16,12 @@ * */ +#include + #include #include #include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/metadata/greeter_client.cc b/examples/cpp/metadata/greeter_client.cc index 3784d2fa26a..f7592501f19 100644 --- a/examples/cpp/metadata/greeter_client.cc +++ b/examples/cpp/metadata/greeter_client.cc @@ -16,12 +16,12 @@ * */ +#include + #include #include #include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/metadata/greeter_server.cc b/examples/cpp/metadata/greeter_server.cc index 19d8bb0d01d..d2a742f400f 100644 --- a/examples/cpp/metadata/greeter_server.cc +++ b/examples/cpp/metadata/greeter_server.cc @@ -16,12 +16,12 @@ * */ +#include + #include #include #include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/multiplex/multiplex_client.cc b/examples/cpp/multiplex/multiplex_client.cc index 085d1334a8c..31b125047de 100644 --- a/examples/cpp/multiplex/multiplex_client.cc +++ b/examples/cpp/multiplex/multiplex_client.cc @@ -15,6 +15,8 @@ * limitations under the License. * */ +#include + #include #include #include @@ -25,8 +27,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #include "examples/protos/route_guide.grpc.pb.h" diff --git a/examples/cpp/multiplex/multiplex_server.cc b/examples/cpp/multiplex/multiplex_server.cc index e4cdc54ec1f..7c08e9e8b59 100644 --- a/examples/cpp/multiplex/multiplex_server.cc +++ b/examples/cpp/multiplex/multiplex_server.cc @@ -16,6 +16,10 @@ * */ +#include +#include +#include + #include #include #include @@ -25,10 +29,6 @@ #include "absl/flags/parse.h" #include "absl/strings/str_format.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #include "examples/protos/route_guide.grpc.pb.h" diff --git a/examples/cpp/orca/orca_server.cc b/examples/cpp/orca/orca_server.cc index d05d763a6a5..9feac2636d1 100644 --- a/examples/cpp/orca/orca_server.cc +++ b/examples/cpp/orca/orca_server.cc @@ -15,6 +15,12 @@ * limitations under the License. * */ +#include +#include +#include +#include +#include + #include #include #include @@ -25,12 +31,6 @@ #include "absl/strings/str_format.h" #include "examples/protos/helloworld.grpc.pb.h" -#include -#include -#include -#include -#include - using grpc::CallbackServerContext; using grpc::Server; using grpc::ServerBuilder; diff --git a/examples/cpp/otel/codelab/greeter_callback_client.cc b/examples/cpp/otel/codelab/greeter_callback_client.cc index d9eab4e9edd..2f2f0fa3d27 100644 --- a/examples/cpp/otel/codelab/greeter_callback_client.cc +++ b/examples/cpp/otel/codelab/greeter_callback_client.cc @@ -23,6 +23,9 @@ #define HAVE_ABSEIL #endif +#include +#include + #include #include #include @@ -33,9 +36,6 @@ #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/codelab/util.h" #include "examples/protos/helloworld.grpc.pb.h" diff --git a/examples/cpp/otel/codelab/greeter_callback_client_solution.cc b/examples/cpp/otel/codelab/greeter_callback_client_solution.cc index b7b507c509d..83015949e19 100644 --- a/examples/cpp/otel/codelab/greeter_callback_client_solution.cc +++ b/examples/cpp/otel/codelab/greeter_callback_client_solution.cc @@ -23,6 +23,9 @@ #define HAVE_ABSEIL #endif +#include +#include + #include #include #include @@ -33,9 +36,6 @@ #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/codelab/util.h" #include "examples/protos/helloworld.grpc.pb.h" diff --git a/examples/cpp/otel/codelab/greeter_callback_server.cc b/examples/cpp/otel/codelab/greeter_callback_server.cc index bba7c9ce072..7abd5ff716d 100644 --- a/examples/cpp/otel/codelab/greeter_callback_server.cc +++ b/examples/cpp/otel/codelab/greeter_callback_server.cc @@ -23,6 +23,11 @@ #define HAVE_ABSEIL #endif +#include +#include +#include +#include + #include #include #include @@ -34,11 +39,6 @@ #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/codelab/util.h" #include "examples/protos/helloworld.grpc.pb.h" diff --git a/examples/cpp/otel/codelab/greeter_callback_server_solution.cc b/examples/cpp/otel/codelab/greeter_callback_server_solution.cc index a53ab288af4..8a8373e35db 100644 --- a/examples/cpp/otel/codelab/greeter_callback_server_solution.cc +++ b/examples/cpp/otel/codelab/greeter_callback_server_solution.cc @@ -23,6 +23,11 @@ #define HAVE_ABSEIL #endif +#include +#include +#include +#include + #include #include #include @@ -34,11 +39,6 @@ #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/codelab/util.h" #include "examples/protos/helloworld.grpc.pb.h" diff --git a/examples/cpp/otel/codelab/util.cc b/examples/cpp/otel/codelab/util.cc index a8fcce95663..35a1fe35c8e 100644 --- a/examples/cpp/otel/codelab/util.cc +++ b/examples/cpp/otel/codelab/util.cc @@ -23,12 +23,12 @@ #define HAVE_ABSEIL #endif +#include + #include "opentelemetry/sdk/metrics/view/instrument_selector_factory.h" #include "opentelemetry/sdk/metrics/view/meter_selector_factory.h" #include "opentelemetry/sdk/metrics/view/view_factory.h" -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/codelab/util.h" #include "examples/protos/helloworld.grpc.pb.h" diff --git a/examples/cpp/otel/greeter_callback_client.cc b/examples/cpp/otel/greeter_callback_client.cc index f166bd9f5e6..0e4cf644779 100644 --- a/examples/cpp/otel/greeter_callback_client.cc +++ b/examples/cpp/otel/greeter_callback_client.cc @@ -23,6 +23,8 @@ #define HAVE_ABSEIL #endif +#include + #include #include "absl/flags/flag.h" @@ -31,8 +33,6 @@ #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/util.h" #else diff --git a/examples/cpp/otel/greeter_callback_server.cc b/examples/cpp/otel/greeter_callback_server.cc index 408b52d685d..60fec863a4e 100644 --- a/examples/cpp/otel/greeter_callback_server.cc +++ b/examples/cpp/otel/greeter_callback_server.cc @@ -23,6 +23,8 @@ #define HAVE_ABSEIL #endif +#include + #include #include #include @@ -34,8 +36,6 @@ #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/util.h" #else diff --git a/examples/cpp/otel/ostream/greeter_callback_client.cc b/examples/cpp/otel/ostream/greeter_callback_client.cc index 24e141fd7b5..1437d57e522 100644 --- a/examples/cpp/otel/ostream/greeter_callback_client.cc +++ b/examples/cpp/otel/ostream/greeter_callback_client.cc @@ -23,6 +23,8 @@ #define HAVE_ABSEIL #endif +#include + #include #include "absl/flags/flag.h" @@ -33,8 +35,6 @@ #include "opentelemetry/sdk/metrics/export/periodic_exporting_metric_reader_factory.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/util.h" #else diff --git a/examples/cpp/otel/ostream/greeter_callback_server.cc b/examples/cpp/otel/ostream/greeter_callback_server.cc index ab539efd305..13ae436cbb4 100644 --- a/examples/cpp/otel/ostream/greeter_callback_server.cc +++ b/examples/cpp/otel/ostream/greeter_callback_server.cc @@ -23,6 +23,8 @@ #define HAVE_ABSEIL #endif +#include + #include #include #include @@ -35,8 +37,6 @@ #include "opentelemetry/sdk/metrics/export/periodic_exporting_metric_reader_factory.h" #include "opentelemetry/sdk/metrics/meter_provider.h" -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/util.h" #else diff --git a/examples/cpp/otel/util.cc b/examples/cpp/otel/util.cc index f844a044a6e..e75b4ec4e05 100644 --- a/examples/cpp/otel/util.cc +++ b/examples/cpp/otel/util.cc @@ -23,6 +23,10 @@ #define HAVE_ABSEIL #endif +#include +#include +#include + #include #include @@ -30,10 +34,6 @@ #include "opentelemetry/sdk/metrics/view/meter_selector_factory.h" #include "opentelemetry/sdk/metrics/view/view_factory.h" -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/cpp/otel/util.h" #include "examples/protos/helloworld.grpc.pb.h" diff --git a/examples/cpp/reflection/reflection_server.cc b/examples/cpp/reflection/reflection_server.cc index 8ef327bbee8..1b3a4f2fbe5 100644 --- a/examples/cpp/reflection/reflection_server.cc +++ b/examples/cpp/reflection/reflection_server.cc @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include "absl/flags/flag.h" @@ -19,9 +22,6 @@ #include "absl/strings/str_format.h" #include "examples/protos/helloworld.grpc.pb.h" -#include -#include - using grpc::CallbackServerContext; using grpc::Server; using grpc::ServerBuilder; diff --git a/examples/cpp/retry/client.cc b/examples/cpp/retry/client.cc index 3d490f25d5c..94417f61a70 100644 --- a/examples/cpp/retry/client.cc +++ b/examples/cpp/retry/client.cc @@ -14,15 +14,15 @@ * limitations under the License. */ +#include +#include + #include #include #include #include "absl/strings/string_view.h" -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/retry/server.cc b/examples/cpp/retry/server.cc index f6a8c602473..66d809d7972 100644 --- a/examples/cpp/retry/server.cc +++ b/examples/cpp/retry/server.cc @@ -14,14 +14,14 @@ * limitations under the License. */ -#include -#include -#include - #include #include #include +#include +#include +#include + #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/route_guide/route_guide_callback_client.cc b/examples/cpp/route_guide/route_guide_callback_client.cc index d44e9fae2d3..8e0624fddae 100644 --- a/examples/cpp/route_guide/route_guide_callback_client.cc +++ b/examples/cpp/route_guide/route_guide_callback_client.cc @@ -16,6 +16,13 @@ * */ +#include +#include +#include +#include +#include +#include + #include #include #include @@ -26,13 +33,6 @@ #include #include "helper.h" - -#include -#include -#include -#include -#include -#include #ifdef BAZEL_BUILD #include "examples/protos/route_guide.grpc.pb.h" #else diff --git a/examples/cpp/route_guide/route_guide_callback_server.cc b/examples/cpp/route_guide/route_guide_callback_server.cc index c9ff97c8174..f97884e7b96 100644 --- a/examples/cpp/route_guide/route_guide_callback_server.cc +++ b/examples/cpp/route_guide/route_guide_callback_server.cc @@ -16,6 +16,12 @@ * */ +#include +#include +#include +#include +#include + #include #include #include @@ -29,12 +35,6 @@ #include "absl/log/initialize.h" #include "absl/log/log.h" #include "helper.h" - -#include -#include -#include -#include -#include #ifdef BAZEL_BUILD #include "examples/protos/route_guide.grpc.pb.h" #else diff --git a/examples/cpp/route_guide/route_guide_client.cc b/examples/cpp/route_guide/route_guide_client.cc index fd29a31e373..73983f458d9 100644 --- a/examples/cpp/route_guide/route_guide_client.cc +++ b/examples/cpp/route_guide/route_guide_client.cc @@ -16,6 +16,12 @@ * */ +#include +#include +#include +#include +#include + #include #include #include @@ -24,12 +30,6 @@ #include #include "helper.h" - -#include -#include -#include -#include -#include #ifdef BAZEL_BUILD #include "examples/protos/route_guide.grpc.pb.h" #else diff --git a/examples/cpp/route_guide/route_guide_server.cc b/examples/cpp/route_guide/route_guide_server.cc index 0e29125881f..7a6a1c8ecaa 100644 --- a/examples/cpp/route_guide/route_guide_server.cc +++ b/examples/cpp/route_guide/route_guide_server.cc @@ -16,6 +16,12 @@ * */ +#include +#include +#include +#include +#include + #include #include #include @@ -24,12 +30,6 @@ #include #include "helper.h" - -#include -#include -#include -#include -#include #ifdef BAZEL_BUILD #include "examples/protos/route_guide.grpc.pb.h" #else diff --git a/examples/cpp/systemd_socket_activation/client.cc b/examples/cpp/systemd_socket_activation/client.cc index 46cdb53defe..6d25f4abffe 100644 --- a/examples/cpp/systemd_socket_activation/client.cc +++ b/examples/cpp/systemd_socket_activation/client.cc @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include #include "examples/protos/helloworld.grpc.pb.h" -#include - using grpc::Channel; using grpc::ClientContext; using grpc::Status; diff --git a/examples/cpp/systemd_socket_activation/server.cc b/examples/cpp/systemd_socket_activation/server.cc index 28ec68114a4..bdd19a873f3 100644 --- a/examples/cpp/systemd_socket_activation/server.cc +++ b/examples/cpp/systemd_socket_activation/server.cc @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include #include "examples/protos/helloworld.grpc.pb.h" -#include -#include -#include - using grpc::Server; using grpc::ServerBuilder; using grpc::ServerContext; diff --git a/examples/cpp/unix_abstract_sockets/client.cc b/examples/cpp/unix_abstract_sockets/client.cc index 36f561e7cdb..d86202ec433 100644 --- a/examples/cpp/unix_abstract_sockets/client.cc +++ b/examples/cpp/unix_abstract_sockets/client.cc @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include #include "examples/protos/helloworld.grpc.pb.h" -#include - using grpc::Channel; using grpc::ClientContext; using grpc::Status; diff --git a/examples/cpp/unix_abstract_sockets/server.cc b/examples/cpp/unix_abstract_sockets/server.cc index 6d941a6fcc6..53fe378f9c2 100644 --- a/examples/cpp/unix_abstract_sockets/server.cc +++ b/examples/cpp/unix_abstract_sockets/server.cc @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include #include "examples/protos/helloworld.grpc.pb.h" -#include -#include -#include - using grpc::Server; using grpc::ServerBuilder; using grpc::ServerContext; diff --git a/examples/cpp/wait_for_ready/greeter_callback_client.cc b/examples/cpp/wait_for_ready/greeter_callback_client.cc index 1c7865ed2bf..546a5d7f503 100644 --- a/examples/cpp/wait_for_ready/greeter_callback_client.cc +++ b/examples/cpp/wait_for_ready/greeter_callback_client.cc @@ -16,6 +16,8 @@ // // +#include + #include #include #include @@ -26,8 +28,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/xds/xds_greeter_client.cc b/examples/cpp/xds/xds_greeter_client.cc index 4bf47e1057c..d60e3f17d81 100644 --- a/examples/cpp/xds/xds_greeter_client.cc +++ b/examples/cpp/xds/xds_greeter_client.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -25,8 +27,6 @@ #include "absl/flags/flag.h" #include "absl/flags/parse.h" -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/examples/cpp/xds/xds_greeter_server.cc b/examples/cpp/xds/xds_greeter_server.cc index c35166c819e..1eb65162ac6 100644 --- a/examples/cpp/xds/xds_greeter_server.cc +++ b/examples/cpp/xds/xds_greeter_server.cc @@ -16,6 +16,12 @@ * */ +#include +#include +#include +#include +#include + #include #include #include @@ -25,12 +31,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" -#include -#include -#include -#include -#include - #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" #else diff --git a/include/grpc++/impl/.clang-format b/include/grpc++/impl/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/include/grpc++/impl/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/include/grpc/.clang-format b/include/grpc/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/include/grpc/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/include/grpc/compression.h b/include/grpc/compression.h index 0f07a514b2b..0db81a2593a 100644 --- a/include/grpc/compression.h +++ b/include/grpc/compression.h @@ -19,11 +19,10 @@ #ifndef GRPC_COMPRESSION_H #define GRPC_COMPRESSION_H -#include - #include // IWYU pragma: export #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/credentials.h b/include/grpc/credentials.h index b5814b913c4..8875dd115b6 100644 --- a/include/grpc/credentials.h +++ b/include/grpc/credentials.h @@ -19,11 +19,10 @@ #ifndef GRPC_CREDENTIALS_H #define GRPC_CREDENTIALS_H -#include - #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/event_engine/endpoint_config.h b/include/grpc/event_engine/endpoint_config.h index ea1699afc52..68dae44caee 100644 --- a/include/grpc/event_engine/endpoint_config.h +++ b/include/grpc/event_engine/endpoint_config.h @@ -14,13 +14,13 @@ #ifndef GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H #define GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H +#include + #include #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include - namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/event_engine.h b/include/grpc/event_engine/event_engine.h index 21a0c1c4826..410c109dfc2 100644 --- a/include/grpc/event_engine/event_engine.h +++ b/include/grpc/event_engine/event_engine.h @@ -14,12 +14,6 @@ #ifndef GRPC_EVENT_ENGINE_EVENT_ENGINE_H #define GRPC_EVENT_ENGINE_EVENT_ENGINE_H -#include - -#include "absl/functional/any_invocable.h" -#include "absl/status/status.h" -#include "absl/status/statusor.h" - #include #include #include @@ -27,6 +21,12 @@ #include #include +#include + +#include "absl/functional/any_invocable.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" + // TODO(vigneshbabu): Define the Endpoint::Write metrics collection system namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/extensible.h b/include/grpc/event_engine/extensible.h index 9af4f37682b..2923bb6a077 100644 --- a/include/grpc/event_engine/extensible.h +++ b/include/grpc/event_engine/extensible.h @@ -15,10 +15,10 @@ #ifndef GRPC_EVENT_ENGINE_EXTENSIBLE_H #define GRPC_EVENT_ENGINE_EXTENSIBLE_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" + namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/internal/memory_allocator_impl.h b/include/grpc/event_engine/internal/memory_allocator_impl.h index 91cba5a9491..721da86d0ac 100644 --- a/include/grpc/event_engine/internal/memory_allocator_impl.h +++ b/include/grpc/event_engine/internal/memory_allocator_impl.h @@ -14,15 +14,15 @@ #ifndef GRPC_EVENT_ENGINE_INTERNAL_MEMORY_ALLOCATOR_IMPL_H #define GRPC_EVENT_ENGINE_INTERNAL_MEMORY_ALLOCATOR_IMPL_H +#include +#include +#include + #include #include #include #include -#include -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/memory_allocator.h b/include/grpc/event_engine/memory_allocator.h index 3a347c3b5cf..d50404c71ab 100644 --- a/include/grpc/event_engine/memory_allocator.h +++ b/include/grpc/event_engine/memory_allocator.h @@ -14,6 +14,9 @@ #ifndef GRPC_EVENT_ENGINE_MEMORY_ALLOCATOR_H #define GRPC_EVENT_ENGINE_MEMORY_ALLOCATOR_H +#include +#include +#include #include // for abort() #include @@ -21,10 +24,6 @@ #include #include -#include -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/memory_request.h b/include/grpc/event_engine/memory_request.h index 2ea7bc5c1ab..b705f030c50 100644 --- a/include/grpc/event_engine/memory_request.h +++ b/include/grpc/event_engine/memory_request.h @@ -14,12 +14,11 @@ #ifndef GRPC_EVENT_ENGINE_MEMORY_REQUEST_H #define GRPC_EVENT_ENGINE_MEMORY_REQUEST_H +#include #include #include "absl/strings/string_view.h" -#include - namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/slice.h b/include/grpc/event_engine/slice.h index f4009648dc1..7e4b2f08f7a 100644 --- a/include/grpc/event_engine/slice.h +++ b/include/grpc/event_engine/slice.h @@ -15,6 +15,9 @@ #ifndef GRPC_EVENT_ENGINE_SLICE_H #define GRPC_EVENT_ENGINE_SLICE_H +#include +#include +#include #include #include @@ -23,10 +26,6 @@ #include "absl/strings/string_view.h" -#include -#include -#include - // This public slice definition largely based of the internal grpc_core::Slice // implementation. Changes to this implementation might warrant changes to the // internal grpc_core::Slice type as well. diff --git a/include/grpc/event_engine/slice_buffer.h b/include/grpc/event_engine/slice_buffer.h index 724c3d07292..f6d23d72e09 100644 --- a/include/grpc/event_engine/slice_buffer.h +++ b/include/grpc/event_engine/slice_buffer.h @@ -15,6 +15,12 @@ #ifndef GRPC_EVENT_ENGINE_SLICE_BUFFER_H #define GRPC_EVENT_ENGINE_SLICE_BUFFER_H +#include +#include +#include +#include +#include +#include #include #include @@ -23,13 +29,6 @@ #include "absl/strings/string_view.h" #include "absl/utility/utility.h" -#include -#include -#include -#include -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index d293907eac0..2b681889d10 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -19,8 +19,6 @@ #ifndef GRPC_GRPC_H #define GRPC_GRPC_H -#include - #include #include // IWYU pragma: export #include // IWYU pragma: export @@ -29,6 +27,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/grpc_audit_logging.h b/include/grpc/grpc_audit_logging.h index 4c30593f2fd..229df79165d 100644 --- a/include/grpc/grpc_audit_logging.h +++ b/include/grpc/grpc_audit_logging.h @@ -19,15 +19,15 @@ #ifndef GRPC_GRPC_AUDIT_LOGGING_H #define GRPC_GRPC_AUDIT_LOGGING_H +#include +#include + #include #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include -#include - namespace grpc_core { namespace experimental { diff --git a/include/grpc/grpc_crl_provider.h b/include/grpc/grpc_crl_provider.h index 968d10b0600..e9a6db95cd9 100644 --- a/include/grpc/grpc_crl_provider.h +++ b/include/grpc/grpc_crl_provider.h @@ -19,16 +19,16 @@ #ifndef GRPC_GRPC_CRL_PROVIDER_H #define GRPC_GRPC_CRL_PROVIDER_H +#include +#include +#include + #include #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include -#include -#include - namespace grpc_core { namespace experimental { diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index 3f59a4423d3..864ba979a9e 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -19,11 +19,10 @@ #ifndef GRPC_GRPC_POSIX_H #define GRPC_GRPC_POSIX_H -#include - #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index 11e08a6f4a1..f9a2d9d555d 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -19,12 +19,11 @@ #ifndef GRPC_GRPC_SECURITY_H #define GRPC_GRPC_SECURITY_H -#include - #include #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/impl/call.h b/include/grpc/impl/call.h index ea298f2ef5c..43b44b195f5 100644 --- a/include/grpc/impl/call.h +++ b/include/grpc/impl/call.h @@ -15,11 +15,11 @@ #ifndef GRPC_IMPL_CALL_H #define GRPC_IMPL_CALL_H -#include "absl/functional/any_invocable.h" - #include #include +#include "absl/functional/any_invocable.h" + // Run a callback in the call's EventEngine. // Internal-only void grpc_call_run_in_event_engine(const grpc_call* call, diff --git a/include/grpc/impl/grpc_types.h b/include/grpc/impl/grpc_types.h index b1305114eb1..02c79532939 100644 --- a/include/grpc/impl/grpc_types.h +++ b/include/grpc/impl/grpc_types.h @@ -21,14 +21,13 @@ // IWYU pragma: private, include -#include - #include #include #include #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/impl/slice_type.h b/include/grpc/impl/slice_type.h index 5e35446ef93..6d23f8abf4c 100644 --- a/include/grpc/impl/slice_type.h +++ b/include/grpc/impl/slice_type.h @@ -21,9 +21,8 @@ // IWYU pragma: private, include -#include - #include +#include typedef struct grpc_slice grpc_slice; diff --git a/include/grpc/passive_listener.h b/include/grpc/passive_listener.h index fffc789dba0..234ac5d8364 100644 --- a/include/grpc/passive_listener.h +++ b/include/grpc/passive_listener.h @@ -14,10 +14,10 @@ #ifndef GRPC_PASSIVE_LISTENER_H #define GRPC_PASSIVE_LISTENER_H -#include - #include #include + +#include // #include namespace grpc_core { diff --git a/include/grpc/support/alloc.h b/include/grpc/support/alloc.h index fdfa63c8e88..1ffd1966e7c 100644 --- a/include/grpc/support/alloc.h +++ b/include/grpc/support/alloc.h @@ -19,9 +19,8 @@ #ifndef GRPC_SUPPORT_ALLOC_H #define GRPC_SUPPORT_ALLOC_H -#include - #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/support/json.h b/include/grpc/support/json.h index 7b850e1cc28..2c96a7fb5ab 100644 --- a/include/grpc/support/json.h +++ b/include/grpc/support/json.h @@ -17,6 +17,7 @@ #ifndef GRPC_SUPPORT_JSON_H #define GRPC_SUPPORT_JSON_H +#include #include #include @@ -27,8 +28,6 @@ #include "absl/strings/str_cat.h" #include "absl/types/variant.h" -#include - namespace grpc_core { namespace experimental { diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h index 92a41f0066e..10b3e6ff67a 100644 --- a/include/grpc/support/log.h +++ b/include/grpc/support/log.h @@ -19,11 +19,10 @@ #ifndef GRPC_SUPPORT_LOG_H #define GRPC_SUPPORT_LOG_H +#include #include #include /* for abort() */ -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/include/grpc/support/metrics.h b/include/grpc/support/metrics.h index 829db0a404f..62525756620 100644 --- a/include/grpc/support/metrics.h +++ b/include/grpc/support/metrics.h @@ -15,11 +15,11 @@ #ifndef GRPC_SUPPORT_METRICS_H #define GRPC_SUPPORT_METRICS_H -#include "absl/strings/string_view.h" - #include #include +#include "absl/strings/string_view.h" + namespace grpc_core { namespace experimental { diff --git a/include/grpc/support/sync_posix.h b/include/grpc/support/sync_posix.h index 5348bac951f..18b049d418d 100644 --- a/include/grpc/support/sync_posix.h +++ b/include/grpc/support/sync_posix.h @@ -19,10 +19,9 @@ #ifndef GRPC_SUPPORT_SYNC_POSIX_H #define GRPC_SUPPORT_SYNC_POSIX_H -#include - #include #include +#include #ifdef GRPC_ASAN_ENABLED /* The member |leak_checker| is used to check whether there is a memory leak diff --git a/include/grpc/support/time.h b/include/grpc/support/time.h index 7adbfcedd1f..9fc786d8f41 100644 --- a/include/grpc/support/time.h +++ b/include/grpc/support/time.h @@ -19,11 +19,10 @@ #ifndef GRPC_SUPPORT_TIME_H #define GRPC_SUPPORT_TIME_H +#include #include #include -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/include/grpcpp/.clang-format b/include/grpcpp/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/include/grpcpp/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/include/grpcpp/alarm.h b/include/grpcpp/alarm.h index bace15ec89c..86356909afd 100644 --- a/include/grpcpp/alarm.h +++ b/include/grpcpp/alarm.h @@ -21,8 +21,6 @@ #ifndef GRPCPP_ALARM_H #define GRPCPP_ALARM_H -#include - #include #include #include @@ -30,6 +28,8 @@ #include #include +#include + namespace grpc { /// Trigger a \a CompletionQueue event, or asynchronous callback execution, diff --git a/include/grpcpp/channel.h b/include/grpcpp/channel.h index aef567390d9..dacd27c38a4 100644 --- a/include/grpcpp/channel.h +++ b/include/grpcpp/channel.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_CHANNEL_H #define GRPCPP_CHANNEL_H -#include - #include #include #include @@ -30,6 +28,8 @@ #include #include +#include + struct grpc_channel; namespace grpc { diff --git a/include/grpcpp/client_context.h b/include/grpcpp/client_context.h index af3b533ed1b..7226fce06de 100644 --- a/include/grpcpp/client_context.h +++ b/include/grpcpp/client_context.h @@ -34,12 +34,6 @@ #ifndef GRPCPP_CLIENT_CONTEXT_H #define GRPCPP_CLIENT_CONTEXT_H -#include -#include -#include - -#include "absl/log/absl_check.h" - #include #include #include @@ -54,6 +48,12 @@ #include #include +#include +#include +#include + +#include "absl/log/absl_check.h" + struct census_context; struct grpc_call; diff --git a/include/grpcpp/completion_queue.h b/include/grpcpp/completion_queue.h index 2bb391fccfc..2216dabb096 100644 --- a/include/grpcpp/completion_queue.h +++ b/include/grpcpp/completion_queue.h @@ -32,10 +32,6 @@ #ifndef GRPCPP_COMPLETION_QUEUE_H #define GRPCPP_COMPLETION_QUEUE_H -#include - -#include "absl/log/absl_check.h" - #include #include #include @@ -47,6 +43,10 @@ #include #include +#include + +#include "absl/log/absl_check.h" + struct grpc_completion_queue; namespace grpc { diff --git a/include/grpcpp/create_channel.h b/include/grpcpp/create_channel.h index 83f905e776f..7b765b8966a 100644 --- a/include/grpcpp/create_channel.h +++ b/include/grpcpp/create_channel.h @@ -19,14 +19,14 @@ #ifndef GRPCPP_CREATE_CHANNEL_H #define GRPCPP_CREATE_CHANNEL_H -#include - #include #include #include #include #include +#include + namespace grpc { /// Create a new \a Channel pointing to \a target. /// diff --git a/include/grpcpp/create_channel_binder.h b/include/grpcpp/create_channel_binder.h index 16616f31ca9..f19792a184a 100644 --- a/include/grpcpp/create_channel_binder.h +++ b/include/grpcpp/create_channel_binder.h @@ -19,16 +19,15 @@ #ifdef GPR_ANDROID +#include +#include +#include #include #include #include "absl/strings/string_view.h" -#include -#include -#include - namespace grpc { namespace experimental { diff --git a/include/grpcpp/create_channel_posix.h b/include/grpcpp/create_channel_posix.h index c4eb30c8d87..b6b06e8412a 100644 --- a/include/grpcpp/create_channel_posix.h +++ b/include/grpcpp/create_channel_posix.h @@ -19,12 +19,12 @@ #ifndef GRPCPP_CREATE_CHANNEL_POSIX_H #define GRPCPP_CREATE_CHANNEL_POSIX_H -#include - #include #include #include +#include + namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/include/grpcpp/ext/call_metric_recorder.h b/include/grpcpp/ext/call_metric_recorder.h index 303a35db14d..443f5e4e67e 100644 --- a/include/grpcpp/ext/call_metric_recorder.h +++ b/include/grpcpp/ext/call_metric_recorder.h @@ -19,15 +19,15 @@ #ifndef GRPCPP_EXT_CALL_METRIC_RECORDER_H #define GRPCPP_EXT_CALL_METRIC_RECORDER_H +#include +#include + #include #include #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include -#include - namespace grpc { namespace experimental { diff --git a/include/grpcpp/ext/csm_observability.h b/include/grpcpp/ext/csm_observability.h index af7b42f4d1b..265d91949cd 100644 --- a/include/grpcpp/ext/csm_observability.h +++ b/include/grpcpp/ext/csm_observability.h @@ -19,6 +19,9 @@ #ifndef GRPCPP_EXT_CSM_OBSERVABILITY_H #define GRPCPP_EXT_CSM_OBSERVABILITY_H +#include +#include + #include #include "absl/functional/any_invocable.h" @@ -26,9 +29,6 @@ #include "absl/strings/string_view.h" #include "opentelemetry/metrics/meter_provider.h" -#include -#include - namespace grpc { namespace internal { diff --git a/include/grpcpp/ext/gcp_observability.h b/include/grpcpp/ext/gcp_observability.h index df270bec887..96d1aee2680 100644 --- a/include/grpcpp/ext/gcp_observability.h +++ b/include/grpcpp/ext/gcp_observability.h @@ -17,12 +17,12 @@ #ifndef GRPCPP_EXT_GCP_OBSERVABILITY_H #define GRPCPP_EXT_GCP_OBSERVABILITY_H -#include "absl/status/status.h" -#include "absl/status/statusor.h" - #include #include +#include "absl/status/status.h" +#include "absl/status/statusor.h" + namespace grpc { // GcpObservability objects follow the RAII idiom and help manage the lifetime diff --git a/include/grpcpp/ext/health_check_service_server_builder_option.h b/include/grpcpp/ext/health_check_service_server_builder_option.h index 85b661ee515..e328f434d1f 100644 --- a/include/grpcpp/ext/health_check_service_server_builder_option.h +++ b/include/grpcpp/ext/health_check_service_server_builder_option.h @@ -19,12 +19,12 @@ #ifndef GRPCPP_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H #define GRPCPP_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H -#include - #include #include #include +#include + namespace grpc { class HealthCheckServiceServerBuilderOption : public ServerBuilderOption { diff --git a/include/grpcpp/ext/orca_service.h b/include/grpcpp/ext/orca_service.h index 83a676095dc..3a2dd1a84ae 100644 --- a/include/grpcpp/ext/orca_service.h +++ b/include/grpcpp/ext/orca_service.h @@ -17,12 +17,6 @@ #ifndef GRPCPP_EXT_ORCA_SERVICE_H #define GRPCPP_EXT_ORCA_SERVICE_H -#include -#include - -#include "absl/time/time.h" -#include "absl/types/optional.h" - #include #include #include @@ -30,6 +24,12 @@ #include #include +#include +#include + +#include "absl/time/time.h" +#include "absl/types/optional.h" + namespace grpc { namespace experimental { diff --git a/include/grpcpp/ext/otel_plugin.h b/include/grpcpp/ext/otel_plugin.h index 9de57fbb496..ffd6f6647c4 100644 --- a/include/grpcpp/ext/otel_plugin.h +++ b/include/grpcpp/ext/otel_plugin.h @@ -19,6 +19,10 @@ #ifndef GRPCPP_EXT_OTEL_PLUGIN_H #define GRPCPP_EXT_OTEL_PLUGIN_H +#include +#include +#include +#include #include #include @@ -30,11 +34,6 @@ #include "absl/strings/string_view.h" #include "opentelemetry/metrics/meter_provider.h" -#include -#include -#include -#include - namespace grpc { namespace internal { class OpenTelemetryPluginBuilderImpl; diff --git a/include/grpcpp/ext/proto_server_reflection_plugin.h b/include/grpcpp/ext/proto_server_reflection_plugin.h index b1cbb5a67c2..fd10c3acfbd 100644 --- a/include/grpcpp/ext/proto_server_reflection_plugin.h +++ b/include/grpcpp/ext/proto_server_reflection_plugin.h @@ -19,11 +19,11 @@ #ifndef GRPCPP_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H #define GRPCPP_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H -#include - #include #include +#include + namespace grpc { class ProtoServerReflection; class ProtoServerReflectionBackend; diff --git a/include/grpcpp/ext/server_metric_recorder.h b/include/grpcpp/ext/server_metric_recorder.h index d2ddaae9367..4741572c44c 100644 --- a/include/grpcpp/ext/server_metric_recorder.h +++ b/include/grpcpp/ext/server_metric_recorder.h @@ -19,13 +19,13 @@ #ifndef GRPCPP_EXT_SERVER_METRIC_RECORDER_H #define GRPCPP_EXT_SERVER_METRIC_RECORDER_H +#include +#include + #include #include #include -#include -#include - namespace grpc_core { struct BackendMetricData; } // namespace grpc_core diff --git a/include/grpcpp/impl/.clang-format b/include/grpcpp/impl/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/include/grpcpp/impl/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/include/grpcpp/impl/call_op_set.h b/include/grpcpp/impl/call_op_set.h index 5afa8272aa2..3ed80330e4b 100644 --- a/include/grpcpp/impl/call_op_set.h +++ b/include/grpcpp/impl/call_op_set.h @@ -19,13 +19,6 @@ #ifndef GRPCPP_IMPL_CALL_OP_SET_H #define GRPCPP_IMPL_CALL_OP_SET_H -#include -#include -#include - -#include "absl/log/absl_check.h" -#include "absl/log/absl_log.h" - #include #include #include @@ -45,6 +38,13 @@ #include #include +#include +#include +#include + +#include "absl/log/absl_check.h" +#include "absl/log/absl_log.h" + namespace grpc { namespace internal { diff --git a/include/grpcpp/impl/channel_argument_option.h b/include/grpcpp/impl/channel_argument_option.h index d1bf931c578..b4f411e3c51 100644 --- a/include/grpcpp/impl/channel_argument_option.h +++ b/include/grpcpp/impl/channel_argument_option.h @@ -19,12 +19,12 @@ #ifndef GRPCPP_IMPL_CHANNEL_ARGUMENT_OPTION_H #define GRPCPP_IMPL_CHANNEL_ARGUMENT_OPTION_H -#include -#include - #include #include +#include +#include + namespace grpc { std::unique_ptr MakeChannelArgumentOption( diff --git a/include/grpcpp/impl/codegen/.clang-format b/include/grpcpp/impl/codegen/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/include/grpcpp/impl/codegen/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/include/grpcpp/impl/create_auth_context.h b/include/grpcpp/impl/create_auth_context.h index 10844bec92c..892da261a23 100644 --- a/include/grpcpp/impl/create_auth_context.h +++ b/include/grpcpp/impl/create_auth_context.h @@ -19,11 +19,11 @@ #ifndef GRPCPP_IMPL_CREATE_AUTH_CONTEXT_H #define GRPCPP_IMPL_CREATE_AUTH_CONTEXT_H -#include - #include #include +#include + namespace grpc { /// TODO(ctiller): not sure we want to make this a permanent thing diff --git a/include/grpcpp/impl/delegating_channel.h b/include/grpcpp/impl/delegating_channel.h index 802237f2efd..add88a23bb0 100644 --- a/include/grpcpp/impl/delegating_channel.h +++ b/include/grpcpp/impl/delegating_channel.h @@ -19,10 +19,10 @@ #ifndef GRPCPP_IMPL_DELEGATING_CHANNEL_H #define GRPCPP_IMPL_DELEGATING_CHANNEL_H -#include - #include +#include + namespace grpc { namespace experimental { diff --git a/include/grpcpp/impl/generic_stub_internal.h b/include/grpcpp/impl/generic_stub_internal.h index ba8c929d8fe..efc57417713 100644 --- a/include/grpcpp/impl/generic_stub_internal.h +++ b/include/grpcpp/impl/generic_stub_internal.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_IMPL_GENERIC_STUB_INTERNAL_H #define GRPCPP_IMPL_GENERIC_STUB_INTERNAL_H -#include - #include #include #include @@ -28,6 +26,8 @@ #include #include +#include + namespace grpc { template diff --git a/include/grpcpp/impl/grpc_library.h b/include/grpcpp/impl/grpc_library.h index 6f20d2bf413..728dda84624 100644 --- a/include/grpcpp/impl/grpc_library.h +++ b/include/grpcpp/impl/grpc_library.h @@ -19,11 +19,11 @@ #ifndef GRPCPP_IMPL_GRPC_LIBRARY_H #define GRPCPP_IMPL_GRPC_LIBRARY_H -#include - #include #include +#include + namespace grpc { namespace internal { diff --git a/include/grpcpp/impl/interceptor_common.h b/include/grpcpp/impl/interceptor_common.h index 2d4c56701d2..5686c792b77 100644 --- a/include/grpcpp/impl/interceptor_common.h +++ b/include/grpcpp/impl/interceptor_common.h @@ -19,11 +19,6 @@ #ifndef GRPCPP_IMPL_INTERCEPTOR_COMMON_H #define GRPCPP_IMPL_INTERCEPTOR_COMMON_H -#include -#include - -#include "absl/log/absl_check.h" - #include #include #include @@ -31,6 +26,11 @@ #include #include +#include +#include + +#include "absl/log/absl_check.h" + namespace grpc { namespace internal { diff --git a/include/grpcpp/impl/metadata_map.h b/include/grpcpp/impl/metadata_map.h index 6241df0c259..c6407eaa208 100644 --- a/include/grpcpp/impl/metadata_map.h +++ b/include/grpcpp/impl/metadata_map.h @@ -19,11 +19,11 @@ #ifndef GRPCPP_IMPL_METADATA_MAP_H #define GRPCPP_IMPL_METADATA_MAP_H -#include - #include #include +#include + namespace grpc { namespace internal { diff --git a/include/grpcpp/impl/proto_utils.h b/include/grpcpp/impl/proto_utils.h index d738ff3ab67..4a101ebe113 100644 --- a/include/grpcpp/impl/proto_utils.h +++ b/include/grpcpp/impl/proto_utils.h @@ -19,10 +19,6 @@ #ifndef GRPCPP_IMPL_PROTO_UTILS_H #define GRPCPP_IMPL_PROTO_UTILS_H -#include - -#include "absl/log/absl_check.h" - #include #include #include @@ -34,6 +30,10 @@ #include #include +#include + +#include "absl/log/absl_check.h" + /// This header provides serialization and deserialization between gRPC /// messages serialized using protobuf and the C++ objects they represent. diff --git a/include/grpcpp/impl/rpc_method.h b/include/grpcpp/impl/rpc_method.h index e1dcd003367..bb47f45ec10 100644 --- a/include/grpcpp/impl/rpc_method.h +++ b/include/grpcpp/impl/rpc_method.h @@ -19,10 +19,10 @@ #ifndef GRPCPP_IMPL_RPC_METHOD_H #define GRPCPP_IMPL_RPC_METHOD_H -#include - #include +#include + namespace grpc { namespace internal { /// Descriptor of an RPC method diff --git a/include/grpcpp/impl/rpc_service_method.h b/include/grpcpp/impl/rpc_service_method.h index 6ab92c978e3..1b9911eca41 100644 --- a/include/grpcpp/impl/rpc_service_method.h +++ b/include/grpcpp/impl/rpc_service_method.h @@ -19,6 +19,11 @@ #ifndef GRPCPP_IMPL_RPC_SERVICE_METHOD_H #define GRPCPP_IMPL_RPC_SERVICE_METHOD_H +#include +#include +#include +#include + #include #include #include @@ -28,11 +33,6 @@ #include "absl/log/absl_check.h" #include "absl/log/absl_log.h" -#include -#include -#include -#include - namespace grpc { class ServerContextBase; namespace internal { diff --git a/include/grpcpp/impl/server_builder_option.h b/include/grpcpp/impl/server_builder_option.h index d5745c6fb0c..22a94fd6833 100644 --- a/include/grpcpp/impl/server_builder_option.h +++ b/include/grpcpp/impl/server_builder_option.h @@ -19,12 +19,12 @@ #ifndef GRPCPP_IMPL_SERVER_BUILDER_OPTION_H #define GRPCPP_IMPL_SERVER_BUILDER_OPTION_H -#include -#include - #include #include +#include +#include + namespace grpc { /// Interface to pass an option to a \a ServerBuilder. diff --git a/include/grpcpp/impl/server_builder_plugin.h b/include/grpcpp/impl/server_builder_plugin.h index d7ef0be5c29..bf4397b37ba 100644 --- a/include/grpcpp/impl/server_builder_plugin.h +++ b/include/grpcpp/impl/server_builder_plugin.h @@ -19,11 +19,11 @@ #ifndef GRPCPP_IMPL_SERVER_BUILDER_PLUGIN_H #define GRPCPP_IMPL_SERVER_BUILDER_PLUGIN_H -#include - #include #include +#include + namespace grpc { class ServerBuilder; diff --git a/include/grpcpp/impl/server_callback_handlers.h b/include/grpcpp/impl/server_callback_handlers.h index 7a4b6cf9aef..1c6104a51a8 100644 --- a/include/grpcpp/impl/server_callback_handlers.h +++ b/include/grpcpp/impl/server_callback_handlers.h @@ -18,8 +18,6 @@ #ifndef GRPCPP_IMPL_SERVER_CALLBACK_HANDLERS_H #define GRPCPP_IMPL_SERVER_CALLBACK_HANDLERS_H -#include "absl/log/absl_check.h" - #include #include #include @@ -28,6 +26,8 @@ #include #include +#include "absl/log/absl_check.h" + namespace grpc { namespace internal { diff --git a/include/grpcpp/impl/server_initializer.h b/include/grpcpp/impl/server_initializer.h index c2ad90bd269..2624681d165 100644 --- a/include/grpcpp/impl/server_initializer.h +++ b/include/grpcpp/impl/server_initializer.h @@ -19,11 +19,11 @@ #ifndef GRPCPP_IMPL_SERVER_INITIALIZER_H #define GRPCPP_IMPL_SERVER_INITIALIZER_H +#include + #include #include -#include - namespace grpc { class Server; class Service; diff --git a/include/grpcpp/impl/service_type.h b/include/grpcpp/impl/service_type.h index b6af6e1fc98..f29f499f4e1 100644 --- a/include/grpcpp/impl/service_type.h +++ b/include/grpcpp/impl/service_type.h @@ -19,14 +19,14 @@ #ifndef GRPCPP_IMPL_SERVICE_TYPE_H #define GRPCPP_IMPL_SERVICE_TYPE_H -#include "absl/log/absl_check.h" - #include #include #include #include #include +#include "absl/log/absl_check.h" + namespace grpc { class CompletionQueue; diff --git a/include/grpcpp/impl/sync.h b/include/grpcpp/impl/sync.h index c4aa00bc07d..dcd4dcd1e86 100644 --- a/include/grpcpp/impl/sync.h +++ b/include/grpcpp/impl/sync.h @@ -25,14 +25,14 @@ #include #endif +#include +#include + #include #include "absl/log/absl_check.h" #include "absl/synchronization/mutex.h" -#include -#include - // The core library is not accessible in C++ codegen headers, and vice versa. // Thus, we need to have duplicate headers with similar functionality. // Make sure any change to this file is also reflected in diff --git a/include/grpcpp/security/.clang-format b/include/grpcpp/security/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/include/grpcpp/security/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/include/grpcpp/security/alts_context.h b/include/grpcpp/security/alts_context.h index 2f2de4e8824..04f1a0501c1 100644 --- a/include/grpcpp/security/alts_context.h +++ b/include/grpcpp/security/alts_context.h @@ -19,12 +19,12 @@ #ifndef GRPCPP_SECURITY_ALTS_CONTEXT_H #define GRPCPP_SECURITY_ALTS_CONTEXT_H -#include -#include - #include #include +#include +#include + struct grpc_gcp_AltsContext; namespace grpc { diff --git a/include/grpcpp/security/alts_util.h b/include/grpcpp/security/alts_util.h index c196823d1a8..a3df6474589 100644 --- a/include/grpcpp/security/alts_util.h +++ b/include/grpcpp/security/alts_util.h @@ -19,13 +19,13 @@ #ifndef GRPCPP_SECURITY_ALTS_UTIL_H #define GRPCPP_SECURITY_ALTS_UTIL_H -#include - #include #include #include #include +#include + struct grpc_gcp_AltsContext; namespace grpc { diff --git a/include/grpcpp/security/audit_logging.h b/include/grpcpp/security/audit_logging.h index b29464a6907..cec7aa23c90 100644 --- a/include/grpcpp/security/audit_logging.h +++ b/include/grpcpp/security/audit_logging.h @@ -19,15 +19,15 @@ #ifndef GRPCPP_SECURITY_AUDIT_LOGGING_H #define GRPCPP_SECURITY_AUDIT_LOGGING_H +#include +#include + #include #include #include #include "absl/status/statusor.h" -#include -#include - namespace grpc { namespace experimental { diff --git a/include/grpcpp/security/auth_context.h b/include/grpcpp/security/auth_context.h index f6e3fae481b..90dbb5535fa 100644 --- a/include/grpcpp/security/auth_context.h +++ b/include/grpcpp/security/auth_context.h @@ -19,12 +19,12 @@ #ifndef GRPCPP_SECURITY_AUTH_CONTEXT_H #define GRPCPP_SECURITY_AUTH_CONTEXT_H -#include -#include - #include #include +#include +#include + struct grpc_auth_context; struct grpc_auth_property; struct grpc_auth_property_iterator; diff --git a/include/grpcpp/security/auth_metadata_processor.h b/include/grpcpp/security/auth_metadata_processor.h index c491a13b198..aab59056bab 100644 --- a/include/grpcpp/security/auth_metadata_processor.h +++ b/include/grpcpp/security/auth_metadata_processor.h @@ -19,12 +19,12 @@ #ifndef GRPCPP_SECURITY_AUTH_METADATA_PROCESSOR_H #define GRPCPP_SECURITY_AUTH_METADATA_PROCESSOR_H -#include - #include #include #include +#include + namespace grpc { /// Interface allowing custom server-side authorization based on credentials diff --git a/include/grpcpp/security/authorization_policy_provider.h b/include/grpcpp/security/authorization_policy_provider.h index fe4f2c19f23..9bd916ff4b6 100644 --- a/include/grpcpp/security/authorization_policy_provider.h +++ b/include/grpcpp/security/authorization_policy_provider.h @@ -15,12 +15,12 @@ #ifndef GRPCPP_SECURITY_AUTHORIZATION_POLICY_PROVIDER_H #define GRPCPP_SECURITY_AUTHORIZATION_POLICY_PROVIDER_H -#include - #include #include #include +#include + namespace grpc { namespace experimental { diff --git a/include/grpcpp/security/binder_credentials.h b/include/grpcpp/security/binder_credentials.h index f511837ef2e..3c38b5129d5 100644 --- a/include/grpcpp/security/binder_credentials.h +++ b/include/grpcpp/security/binder_credentials.h @@ -15,11 +15,11 @@ #ifndef GRPCPP_SECURITY_BINDER_CREDENTIALS_H #define GRPCPP_SECURITY_BINDER_CREDENTIALS_H -#include - #include #include +#include + namespace grpc { class ChannelCredentials; diff --git a/include/grpcpp/security/credentials.h b/include/grpcpp/security/credentials.h index d1f8c22846a..d3ff3c830d0 100644 --- a/include/grpcpp/security/credentials.h +++ b/include/grpcpp/security/credentials.h @@ -19,10 +19,6 @@ #ifndef GRPCPP_SECURITY_CREDENTIALS_H #define GRPCPP_SECURITY_CREDENTIALS_H -#include -#include -#include - #include #include #include @@ -33,6 +29,10 @@ #include #include +#include +#include +#include + struct grpc_call; namespace grpc { diff --git a/include/grpcpp/security/server_credentials.h b/include/grpcpp/security/server_credentials.h index aa602cf4e64..d75c62bd648 100644 --- a/include/grpcpp/security/server_credentials.h +++ b/include/grpcpp/security/server_credentials.h @@ -19,15 +19,15 @@ #ifndef GRPCPP_SECURITY_SERVER_CREDENTIALS_H #define GRPCPP_SECURITY_SERVER_CREDENTIALS_H -#include -#include - #include #include #include #include #include +#include +#include + struct grpc_server; namespace grpc { diff --git a/include/grpcpp/security/tls_certificate_provider.h b/include/grpcpp/security/tls_certificate_provider.h index fc34d67a6d5..7912e4ccd26 100644 --- a/include/grpcpp/security/tls_certificate_provider.h +++ b/include/grpcpp/security/tls_certificate_provider.h @@ -17,12 +17,6 @@ #ifndef GRPCPP_SECURITY_TLS_CERTIFICATE_PROVIDER_H #define GRPCPP_SECURITY_TLS_CERTIFICATE_PROVIDER_H -#include -#include -#include - -#include "absl/status/statusor.h" - #include #include #include @@ -30,6 +24,12 @@ #include #include +#include +#include +#include + +#include "absl/status/statusor.h" + namespace grpc { namespace experimental { diff --git a/include/grpcpp/security/tls_certificate_verifier.h b/include/grpcpp/security/tls_certificate_verifier.h index 5b87b1a42c6..34fbd998794 100644 --- a/include/grpcpp/security/tls_certificate_verifier.h +++ b/include/grpcpp/security/tls_certificate_verifier.h @@ -17,12 +17,6 @@ #ifndef GRPCPP_SECURITY_TLS_CERTIFICATE_VERIFIER_H #define GRPCPP_SECURITY_TLS_CERTIFICATE_VERIFIER_H -#include -#include -#include -#include -#include - #include #include #include @@ -31,6 +25,12 @@ #include #include +#include +#include +#include +#include +#include + // TODO(yihuazhang): remove the forward declaration here and include // directly once the insecure builds are cleaned up. typedef struct grpc_tls_custom_verification_check_request diff --git a/include/grpcpp/security/tls_credentials_options.h b/include/grpcpp/security/tls_credentials_options.h index c47f348ccaa..b509af05c69 100644 --- a/include/grpcpp/security/tls_credentials_options.h +++ b/include/grpcpp/security/tls_credentials_options.h @@ -19,9 +19,6 @@ #ifndef GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H #define GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H -#include -#include - #include #include #include @@ -30,6 +27,9 @@ #include #include +#include +#include + namespace grpc { namespace experimental { diff --git a/include/grpcpp/server.h b/include/grpcpp/server.h index 3c56b6a06a2..37f71ff7d62 100644 --- a/include/grpcpp/server.h +++ b/include/grpcpp/server.h @@ -19,10 +19,6 @@ #ifndef GRPCPP_SERVER_H #define GRPCPP_SERVER_H -#include -#include -#include - #include #include #include @@ -39,6 +35,10 @@ #include #include +#include +#include +#include + struct grpc_server; namespace grpc { diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index 787cb20af7d..118861fa063 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -19,11 +19,6 @@ #ifndef GRPCPP_SERVER_BUILDER_H #define GRPCPP_SERVER_BUILDER_H -#include -#include -#include -#include - #include #include #include @@ -40,6 +35,11 @@ #include #include +#include +#include +#include +#include + struct grpc_resource_quota; namespace grpc { diff --git a/include/grpcpp/server_context.h b/include/grpcpp/server_context.h index eb72e36b4af..00a3709f1dc 100644 --- a/include/grpcpp/server_context.h +++ b/include/grpcpp/server_context.h @@ -19,13 +19,6 @@ #ifndef GRPCPP_SERVER_CONTEXT_H #define GRPCPP_SERVER_CONTEXT_H -#include -#include -#include -#include -#include -#include - #include #include #include @@ -47,6 +40,13 @@ #include #include +#include +#include +#include +#include +#include +#include + struct grpc_metadata; struct grpc_call; struct census_context; diff --git a/include/grpcpp/server_interface.h b/include/grpcpp/server_interface.h index 9791ee3589c..3e6680f1767 100644 --- a/include/grpcpp/server_interface.h +++ b/include/grpcpp/server_interface.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_SERVER_INTERFACE_H #define GRPCPP_SERVER_INTERFACE_H -#include "absl/log/absl_check.h" - #include #include #include @@ -33,6 +31,8 @@ #include #include +#include "absl/log/absl_check.h" + namespace grpc { class AsyncGenericService; diff --git a/include/grpcpp/server_posix.h b/include/grpcpp/server_posix.h index 8132c01cf94..0ccf560e063 100644 --- a/include/grpcpp/server_posix.h +++ b/include/grpcpp/server_posix.h @@ -19,11 +19,11 @@ #ifndef GRPCPP_SERVER_POSIX_H #define GRPCPP_SERVER_POSIX_H -#include - #include #include +#include + namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/include/grpcpp/support/.clang-format b/include/grpcpp/support/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/include/grpcpp/support/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/include/grpcpp/support/async_stream.h b/include/grpcpp/support/async_stream.h index c4cbb9dbb43..931d321a982 100644 --- a/include/grpcpp/support/async_stream.h +++ b/include/grpcpp/support/async_stream.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_SUPPORT_ASYNC_STREAM_H #define GRPCPP_SUPPORT_ASYNC_STREAM_H -#include "absl/log/absl_check.h" - #include #include #include @@ -28,6 +26,8 @@ #include #include +#include "absl/log/absl_check.h" + namespace grpc { namespace internal { diff --git a/include/grpcpp/support/async_unary_call.h b/include/grpcpp/support/async_unary_call.h index a03a9b28382..b50798ae7cf 100644 --- a/include/grpcpp/support/async_unary_call.h +++ b/include/grpcpp/support/async_unary_call.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_SUPPORT_ASYNC_UNARY_CALL_H #define GRPCPP_SUPPORT_ASYNC_UNARY_CALL_H -#include "absl/log/absl_check.h" - #include #include #include @@ -31,6 +29,8 @@ #include #include +#include "absl/log/absl_check.h" + namespace grpc { // Forward declaration for use in Helper class diff --git a/include/grpcpp/support/byte_buffer.h b/include/grpcpp/support/byte_buffer.h index 676d3cfad7e..c60326f036a 100644 --- a/include/grpcpp/support/byte_buffer.h +++ b/include/grpcpp/support/byte_buffer.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_SUPPORT_BYTE_BUFFER_H #define GRPCPP_SUPPORT_BYTE_BUFFER_H -#include - #include #include #include @@ -28,6 +26,8 @@ #include #include +#include + namespace grpc { class ServerInterface; diff --git a/include/grpcpp/support/callback_common.h b/include/grpcpp/support/callback_common.h index 49eaa56172a..b4ba1e7baa5 100644 --- a/include/grpcpp/support/callback_common.h +++ b/include/grpcpp/support/callback_common.h @@ -19,10 +19,6 @@ #ifndef GRPCPP_SUPPORT_CALLBACK_COMMON_H #define GRPCPP_SUPPORT_CALLBACK_COMMON_H -#include - -#include "absl/log/absl_check.h" - #include #include #include @@ -32,6 +28,10 @@ #include #include +#include + +#include "absl/log/absl_check.h" + namespace grpc { namespace internal { diff --git a/include/grpcpp/support/channel_arguments.h b/include/grpcpp/support/channel_arguments.h index a149a6d72ba..c0858dbc623 100644 --- a/include/grpcpp/support/channel_arguments.h +++ b/include/grpcpp/support/channel_arguments.h @@ -19,14 +19,14 @@ #ifndef GRPCPP_SUPPORT_CHANNEL_ARGUMENTS_H #define GRPCPP_SUPPORT_CHANNEL_ARGUMENTS_H -#include -#include - #include #include #include #include +#include +#include + namespace grpc { class ChannelCredentials; namespace testing { diff --git a/include/grpcpp/support/client_callback.h b/include/grpcpp/support/client_callback.h index 82a404e2c87..88de62b6d9a 100644 --- a/include/grpcpp/support/client_callback.h +++ b/include/grpcpp/support/client_callback.h @@ -19,11 +19,6 @@ #ifndef GRPCPP_SUPPORT_CLIENT_CALLBACK_H #define GRPCPP_SUPPORT_CLIENT_CALLBACK_H -#include -#include - -#include "absl/log/absl_check.h" - #include #include #include @@ -33,6 +28,11 @@ #include #include +#include +#include + +#include "absl/log/absl_check.h" + namespace grpc { class Channel; class ClientContext; diff --git a/include/grpcpp/support/client_interceptor.h b/include/grpcpp/support/client_interceptor.h index fbf554437bf..b00101f9b5c 100644 --- a/include/grpcpp/support/client_interceptor.h +++ b/include/grpcpp/support/client_interceptor.h @@ -19,15 +19,15 @@ #ifndef GRPCPP_SUPPORT_CLIENT_INTERCEPTOR_H #define GRPCPP_SUPPORT_CLIENT_INTERCEPTOR_H +#include +#include +#include + #include #include #include "absl/log/absl_check.h" -#include -#include -#include - namespace grpc { class Channel; diff --git a/include/grpcpp/support/interceptor.h b/include/grpcpp/support/interceptor.h index 1e4d66610f6..04a4b34c4e2 100644 --- a/include/grpcpp/support/interceptor.h +++ b/include/grpcpp/support/interceptor.h @@ -19,16 +19,16 @@ #ifndef GRPCPP_SUPPORT_INTERCEPTOR_H #define GRPCPP_SUPPORT_INTERCEPTOR_H -#include -#include -#include - #include #include #include #include #include +#include +#include +#include + namespace grpc { class ChannelInterface; diff --git a/include/grpcpp/support/method_handler.h b/include/grpcpp/support/method_handler.h index 081401b187b..a61843bdb86 100644 --- a/include/grpcpp/support/method_handler.h +++ b/include/grpcpp/support/method_handler.h @@ -19,13 +19,13 @@ #ifndef GRPCPP_SUPPORT_METHOD_HANDLER_H #define GRPCPP_SUPPORT_METHOD_HANDLER_H -#include "absl/log/absl_check.h" - #include #include #include #include +#include "absl/log/absl_check.h" + namespace grpc { namespace internal { diff --git a/include/grpcpp/support/proto_buffer_reader.h b/include/grpcpp/support/proto_buffer_reader.h index 7bdf8d13d72..5f5be2cd0d9 100644 --- a/include/grpcpp/support/proto_buffer_reader.h +++ b/include/grpcpp/support/proto_buffer_reader.h @@ -19,11 +19,6 @@ #ifndef GRPCPP_SUPPORT_PROTO_BUFFER_READER_H #define GRPCPP_SUPPORT_PROTO_BUFFER_READER_H -#include - -#include "absl/log/absl_check.h" -#include "absl/strings/cord.h" - #include #include #include @@ -33,6 +28,11 @@ #include #include +#include + +#include "absl/log/absl_check.h" +#include "absl/strings/cord.h" + /// This header provides an object that reads bytes directly from a /// grpc::ByteBuffer, via the ZeroCopyInputStream interface diff --git a/include/grpcpp/support/proto_buffer_writer.h b/include/grpcpp/support/proto_buffer_writer.h index 1417a619911..225c8555fb9 100644 --- a/include/grpcpp/support/proto_buffer_writer.h +++ b/include/grpcpp/support/proto_buffer_writer.h @@ -19,11 +19,6 @@ #ifndef GRPCPP_SUPPORT_PROTO_BUFFER_WRITER_H #define GRPCPP_SUPPORT_PROTO_BUFFER_WRITER_H -#include - -#include "absl/log/absl_check.h" -#include "absl/strings/cord.h" - #include #include #include @@ -33,6 +28,11 @@ #include #include +#include + +#include "absl/log/absl_check.h" +#include "absl/strings/cord.h" + /// This header provides an object that writes bytes directly into a /// grpc::ByteBuffer, via the ZeroCopyOutputStream interface diff --git a/include/grpcpp/support/server_callback.h b/include/grpcpp/support/server_callback.h index e5fd910701a..378e88006bf 100644 --- a/include/grpcpp/support/server_callback.h +++ b/include/grpcpp/support/server_callback.h @@ -19,12 +19,6 @@ #ifndef GRPCPP_SUPPORT_SERVER_CALLBACK_H #define GRPCPP_SUPPORT_SERVER_CALLBACK_H -#include -#include -#include - -#include "absl/functional/any_invocable.h" - #include #include #include @@ -34,6 +28,12 @@ #include #include +#include +#include +#include + +#include "absl/functional/any_invocable.h" + namespace grpc { // Declare base class of all reactors as internal diff --git a/include/grpcpp/support/server_interceptor.h b/include/grpcpp/support/server_interceptor.h index de875a347f1..d705e740334 100644 --- a/include/grpcpp/support/server_interceptor.h +++ b/include/grpcpp/support/server_interceptor.h @@ -19,15 +19,15 @@ #ifndef GRPCPP_SUPPORT_SERVER_INTERCEPTOR_H #define GRPCPP_SUPPORT_SERVER_INTERCEPTOR_H +#include +#include +#include + #include #include #include "absl/log/absl_check.h" -#include -#include -#include - namespace grpc { class ServerContextBase; namespace internal { diff --git a/include/grpcpp/support/string_ref.h b/include/grpcpp/support/string_ref.h index 380ceee2ffb..deb96b90d9f 100644 --- a/include/grpcpp/support/string_ref.h +++ b/include/grpcpp/support/string_ref.h @@ -19,6 +19,7 @@ #ifndef GRPCPP_SUPPORT_STRING_REF_H #define GRPCPP_SUPPORT_STRING_REF_H +#include #include #include @@ -26,8 +27,6 @@ #include #include -#include - namespace grpc { /// This class is a non owning reference to a string. diff --git a/include/grpcpp/support/sync_stream.h b/include/grpcpp/support/sync_stream.h index 7479adb25c1..cacf605a979 100644 --- a/include/grpcpp/support/sync_stream.h +++ b/include/grpcpp/support/sync_stream.h @@ -19,8 +19,6 @@ #ifndef GRPCPP_SUPPORT_SYNC_STREAM_H #define GRPCPP_SUPPORT_SYNC_STREAM_H -#include "absl/log/absl_check.h" - #include #include #include @@ -29,6 +27,8 @@ #include #include +#include "absl/log/absl_check.h" + namespace grpc { namespace internal { diff --git a/include/grpcpp/support/time.h b/include/grpcpp/support/time.h index 5397eb6ba24..41edfb5fd90 100644 --- a/include/grpcpp/support/time.h +++ b/include/grpcpp/support/time.h @@ -19,11 +19,11 @@ #ifndef GRPCPP_SUPPORT_TIME_H #define GRPCPP_SUPPORT_TIME_H -#include - #include #include +#include + namespace grpc { /// If you are trying to use CompletionQueue::AsyncNext with a time class that diff --git a/include/grpcpp/test/client_context_test_peer.h b/include/grpcpp/test/client_context_test_peer.h index 9cb1f683787..632575b6314 100644 --- a/include/grpcpp/test/client_context_test_peer.h +++ b/include/grpcpp/test/client_context_test_peer.h @@ -19,10 +19,10 @@ #ifndef GRPCPP_TEST_CLIENT_CONTEXT_TEST_PEER_H #define GRPCPP_TEST_CLIENT_CONTEXT_TEST_PEER_H -#include - #include +#include + namespace grpc { namespace testing { diff --git a/include/grpcpp/test/mock_stream.h b/include/grpcpp/test/mock_stream.h index 7c39358d949..6ab61ff0dba 100644 --- a/include/grpcpp/test/mock_stream.h +++ b/include/grpcpp/test/mock_stream.h @@ -19,14 +19,12 @@ #ifndef GRPCPP_TEST_MOCK_STREAM_H #define GRPCPP_TEST_MOCK_STREAM_H -#include - #include - #include #include #include #include +#include namespace grpc { namespace testing { diff --git a/include/grpcpp/test/server_context_test_spouse.h b/include/grpcpp/test/server_context_test_spouse.h index 88dc7205588..c68f1a94cc7 100644 --- a/include/grpcpp/test/server_context_test_spouse.h +++ b/include/grpcpp/test/server_context_test_spouse.h @@ -19,10 +19,10 @@ #ifndef GRPCPP_TEST_SERVER_CONTEXT_TEST_SPOUSE_H #define GRPCPP_TEST_SERVER_CONTEXT_TEST_SPOUSE_H -#include - #include +#include + namespace grpc { namespace testing { diff --git a/src/.clang-format b/src/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/compiler/.clang-format b/src/compiler/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/compiler/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index 2a2a9ebc0d2..530dfddedf5 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -18,12 +18,12 @@ #include "src/compiler/objective_c_generator.h" +#include + #include #include #include -#include - #include "src/compiler/config.h" #include "src/compiler/objective_c_generator_helpers.h" diff --git a/src/compiler/objective_c_generator_helpers.h b/src/compiler/objective_c_generator_helpers.h index 8490ecf6a0c..1337863f9dd 100644 --- a/src/compiler/objective_c_generator_helpers.h +++ b/src/compiler/objective_c_generator_helpers.h @@ -19,10 +19,10 @@ #ifndef GRPC_INTERNAL_COMPILER_OBJECTIVE_C_GENERATOR_HELPERS_H #define GRPC_INTERNAL_COMPILER_OBJECTIVE_C_GENERATOR_HELPERS_H -#include - #include +#include + #include "src/compiler/config.h" #include "src/compiler/generator_helpers.h" diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 4b0f2964212..1d886fcf1d5 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -18,10 +18,10 @@ // Generates Objective C gRPC service interface out of Protobuf IDL. -#include - #include +#include + #include "src/compiler/config.h" #include "src/compiler/objective_c_generator.h" #include "src/compiler/objective_c_generator_helpers.h" diff --git a/src/compiler/php_generator.cc b/src/compiler/php_generator.cc index 7ef2891c488..338b5b602cf 100644 --- a/src/compiler/php_generator.cc +++ b/src/compiler/php_generator.cc @@ -16,10 +16,10 @@ * */ -#include - #include +#include + #include "src/compiler/config.h" #include "src/compiler/generator_helpers.h" #include "src/compiler/php_generator_helpers.h" diff --git a/src/core/.clang-format b/src/core/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/core/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/channelz/channel_trace.cc b/src/core/channelz/channel_trace.cc index ee1de5e87c5..78d7e049009 100644 --- a/src/core/channelz/channel_trace.cc +++ b/src/core/channelz/channel_trace.cc @@ -18,15 +18,14 @@ #include "src/core/channelz/channel_trace.h" -#include -#include - -#include "absl/strings/str_cat.h" - #include #include #include +#include +#include + +#include "absl/strings/str_cat.h" #include "src/core/channelz/channelz.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/channelz/channel_trace.h b/src/core/channelz/channel_trace.h index 82ac733e4c7..c9e42094379 100644 --- a/src/core/channelz/channel_trace.h +++ b/src/core/channelz/channel_trace.h @@ -19,15 +19,13 @@ #ifndef GRPC_SRC_CORE_CHANNELZ_CHANNEL_TRACE_H #define GRPC_SRC_CORE_CHANNELZ_CHANNEL_TRACE_H -#include -#include - -#include "absl/base/thread_annotations.h" - #include #include #include +#include +#include +#include "absl/base/thread_annotations.h" #include "src/core/util/json/json.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/sync.h" diff --git a/src/core/channelz/channelz.cc b/src/core/channelz/channelz.cc index ef27e51ffbf..1a8aa222a72 100644 --- a/src/core/channelz/channelz.cc +++ b/src/core/channelz/channelz.cc @@ -18,6 +18,10 @@ #include "src/core/channelz/channelz.h" +#include +#include +#include + #include #include #include @@ -27,11 +31,6 @@ #include "absl/strings/escaping.h" #include "absl/strings/str_cat.h" #include "absl/strings/strip.h" - -#include -#include -#include - #include "src/core/channelz/channelz_registry.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" diff --git a/src/core/channelz/channelz.h b/src/core/channelz/channelz.h index 6938ec99437..316e96fba74 100644 --- a/src/core/channelz/channelz.h +++ b/src/core/channelz/channelz.h @@ -19,6 +19,10 @@ #ifndef GRPC_SRC_CORE_CHANNELZ_CHANNELZ_H #define GRPC_SRC_CORE_CHANNELZ_CHANNELZ_H +#include +#include +#include +#include #include #include @@ -31,12 +35,6 @@ #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/channelz/channel_trace.h" #include "src/core/util/json/json.h" #include "src/core/util/per_cpu.h" diff --git a/src/core/channelz/channelz_registry.cc b/src/core/channelz/channelz_registry.cc index 4393675c831..6db28fa7514 100644 --- a/src/core/channelz/channelz_registry.cc +++ b/src/core/channelz/channelz_registry.cc @@ -18,6 +18,11 @@ #include "src/core/channelz/channelz_registry.h" +#include +#include +#include +#include + #include #include #include @@ -26,12 +31,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/json/json.h" diff --git a/src/core/channelz/channelz_registry.h b/src/core/channelz/channelz_registry.h index f849ac1ac84..eeb6a47d788 100644 --- a/src/core/channelz/channelz_registry.h +++ b/src/core/channelz/channelz_registry.h @@ -19,14 +19,13 @@ #ifndef GRPC_SRC_CORE_CHANNELZ_CHANNELZ_REGISTRY_H #define GRPC_SRC_CORE_CHANNELZ_CHANNELZ_REGISTRY_H +#include + #include #include #include #include "absl/base/thread_annotations.h" - -#include - #include "src/core/channelz/channelz.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/sync.h" diff --git a/src/core/client_channel/.clang-format b/src/core/client_channel/.clang-format deleted file mode 100644 index 64387e9e515..00000000000 --- a/src/core/client_channel/.clang-format +++ /dev/null @@ -1,53 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/client_channel/backup_poller.cc b/src/core/client_channel/backup_poller.cc index 37914688a7e..43b485dc7ef 100644 --- a/src/core/client_channel/backup_poller.cc +++ b/src/core/client_channel/backup_poller.cc @@ -16,18 +16,15 @@ // // -#include - #include "src/core/client_channel/backup_poller.h" +#include +#include +#include #include #include "absl/log/log.h" #include "absl/status/status.h" - -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/client_channel/client_channel.cc b/src/core/client_channel/client_channel.cc index 0d12c4b292a..315befd72ef 100644 --- a/src/core/client_channel/client_channel.cc +++ b/src/core/client_channel/client_channel.cc @@ -12,10 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/client_channel/client_channel.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -38,16 +45,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/client_channel/client_channel_internal.h" #include "src/core/client_channel/client_channel_service_config.h" #include "src/core/client_channel/config_selector.h" diff --git a/src/core/client_channel/client_channel.h b/src/core/client_channel/client_channel.h index a7f7d75c705..662274446ad 100644 --- a/src/core/client_channel/client_channel.h +++ b/src/core/client_channel/client_channel.h @@ -22,7 +22,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - #include "src/core/client_channel/client_channel_factory.h" #include "src/core/client_channel/config_selector.h" #include "src/core/client_channel/subchannel.h" diff --git a/src/core/client_channel/client_channel_factory.cc b/src/core/client_channel/client_channel_factory.cc index 39b5c20e97e..615950a599e 100644 --- a/src/core/client_channel/client_channel_factory.cc +++ b/src/core/client_channel/client_channel_factory.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/client_channel/client_channel_factory.h" +#include + // Channel arg key for client channel factory. #define GRPC_ARG_CLIENT_CHANNEL_FACTORY "grpc.client_channel_factory" diff --git a/src/core/client_channel/client_channel_factory.h b/src/core/client_channel/client_channel_factory.h index fee6cd9f628..9e8ca146e0e 100644 --- a/src/core/client_channel/client_channel_factory.h +++ b/src/core/client_channel/client_channel_factory.h @@ -20,7 +20,6 @@ #include #include "absl/strings/string_view.h" - #include "src/core/client_channel/subchannel.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolved_address.h" diff --git a/src/core/client_channel/client_channel_filter.cc b/src/core/client_channel/client_channel_filter.cc index 82caeb27ffc..6b87eb436c7 100644 --- a/src/core/client_channel/client_channel_filter.cc +++ b/src/core/client_channel/client_channel_filter.cc @@ -14,10 +14,16 @@ // limitations under the License. // -#include - #include "src/core/client_channel/client_channel_filter.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -41,15 +47,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channel_trace.h" #include "src/core/client_channel/backup_poller.h" #include "src/core/client_channel/client_channel_internal.h" diff --git a/src/core/client_channel/client_channel_filter.h b/src/core/client_channel/client_channel_filter.h index 0ca401df455..c2318360fba 100644 --- a/src/core/client_channel/client_channel_filter.h +++ b/src/core/client_channel/client_channel_filter.h @@ -17,8 +17,9 @@ #ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_FILTER_H #define GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_FILTER_H +#include +#include #include - #include #include @@ -33,10 +34,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/client_channel/client_channel_factory.h" #include "src/core/client_channel/config_selector.h" diff --git a/src/core/client_channel/client_channel_internal.h b/src/core/client_channel/client_channel_internal.h index 1806bf057c9..99e045c0047 100644 --- a/src/core/client_channel/client_channel_internal.h +++ b/src/core/client_channel/client_channel_internal.h @@ -23,7 +23,6 @@ #include "absl/functional/any_invocable.h" #include "absl/log/check.h" - #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/transport/call_destination.h" #include "src/core/load_balancing/lb_policy.h" diff --git a/src/core/client_channel/client_channel_plugin.cc b/src/core/client_channel/client_channel_plugin.cc index ccec049b6eb..afb99741950 100644 --- a/src/core/client_channel/client_channel_plugin.cc +++ b/src/core/client_channel/client_channel_plugin.cc @@ -16,12 +16,10 @@ // // +#include #include #include "absl/types/optional.h" - -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/client_channel/client_channel_service_config.h" #include "src/core/client_channel/retry_service_config.h" diff --git a/src/core/client_channel/client_channel_service_config.cc b/src/core/client_channel/client_channel_service_config.cc index af08f54a956..07d34b12d44 100644 --- a/src/core/client_channel/client_channel_service_config.cc +++ b/src/core/client_channel/client_channel_service_config.cc @@ -14,10 +14,10 @@ // limitations under the License. // -#include - #include "src/core/client_channel/client_channel_service_config.h" +#include + #include #include @@ -26,7 +26,6 @@ #include "absl/strings/ascii.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - #include "src/core/load_balancing/lb_policy_registry.h" // As per the retry design, we do not allow more than 5 retry attempts. diff --git a/src/core/client_channel/client_channel_service_config.h b/src/core/client_channel/client_channel_service_config.h index e985b8e92e0..6d33d11b170 100644 --- a/src/core/client_channel/client_channel_service_config.h +++ b/src/core/client_channel/client_channel_service_config.h @@ -18,7 +18,6 @@ #define GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_SERVICE_CONFIG_H #include - #include #include @@ -26,7 +25,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/load_balancing/lb_policy.h" diff --git a/src/core/client_channel/config_selector.h b/src/core/client_channel/config_selector.h index 76572369fe4..2901ee471bd 100644 --- a/src/core/client_channel/config_selector.h +++ b/src/core/client_channel/config_selector.h @@ -17,8 +17,8 @@ #ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_CONFIG_SELECTOR_H #define GRPC_SRC_CORE_CLIENT_CHANNEL_CONFIG_SELECTOR_H +#include #include - #include #include @@ -27,9 +27,6 @@ #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/client_channel/client_channel_internal.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/resource_quota/arena.h" diff --git a/src/core/client_channel/dynamic_filters.cc b/src/core/client_channel/dynamic_filters.cc index c2825925fa4..93a3c49d957 100644 --- a/src/core/client_channel/dynamic_filters.cc +++ b/src/core/client_channel/dynamic_filters.cc @@ -14,10 +14,9 @@ // limitations under the License. // -#include - #include "src/core/client_channel/dynamic_filters.h" +#include #include #include @@ -26,7 +25,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/statusor.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder_impl.h" diff --git a/src/core/client_channel/dynamic_filters.h b/src/core/client_channel/dynamic_filters.h index 30a5354f935..505ca293ead 100644 --- a/src/core/client_channel/dynamic_filters.h +++ b/src/core/client_channel/dynamic_filters.h @@ -17,13 +17,12 @@ #ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_DYNAMIC_FILTERS_H #define GRPC_SRC_CORE_CLIENT_CHANNEL_DYNAMIC_FILTERS_H +#include #include #include #include -#include - #include "src/core/filter/blackboard.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/client_channel/global_subchannel_pool.cc b/src/core/client_channel/global_subchannel_pool.cc index 2f3ecf9faeb..5b6ffe85a22 100644 --- a/src/core/client_channel/global_subchannel_pool.cc +++ b/src/core/client_channel/global_subchannel_pool.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/client_channel/global_subchannel_pool.h" +#include + #include #include "src/core/client_channel/subchannel.h" diff --git a/src/core/client_channel/global_subchannel_pool.h b/src/core/client_channel/global_subchannel_pool.h index 76ef31af385..79ea6672796 100644 --- a/src/core/client_channel/global_subchannel_pool.h +++ b/src/core/client_channel/global_subchannel_pool.h @@ -24,7 +24,6 @@ #include #include "absl/base/thread_annotations.h" - #include "src/core/client_channel/subchannel_pool_interface.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/sync.h" diff --git a/src/core/client_channel/lb_metadata.h b/src/core/client_channel/lb_metadata.h index f1c5e7e429f..f41510120a5 100644 --- a/src/core/client_channel/lb_metadata.h +++ b/src/core/client_channel/lb_metadata.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_LB_METADATA_H #define GRPC_SRC_CORE_CLIENT_CHANNEL_LB_METADATA_H +#include + #include #include #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/transport/metadata_batch.h" #include "src/core/load_balancing/lb_policy.h" diff --git a/src/core/client_channel/load_balanced_call_destination.cc b/src/core/client_channel/load_balanced_call_destination.cc index 5d7c0b3c66c..2415e367ccc 100644 --- a/src/core/client_channel/load_balanced_call_destination.cc +++ b/src/core/client_channel/load_balanced_call_destination.cc @@ -15,7 +15,6 @@ #include "src/core/client_channel/load_balanced_call_destination.h" #include "absl/log/log.h" - #include "src/core/client_channel/client_channel.h" #include "src/core/client_channel/client_channel_internal.h" #include "src/core/client_channel/lb_metadata.h" diff --git a/src/core/client_channel/load_balanced_call_destination.h b/src/core/client_channel/load_balanced_call_destination.h index 2adbdbe3dc3..904ff47e1ec 100644 --- a/src/core/client_channel/load_balanced_call_destination.h +++ b/src/core/client_channel/load_balanced_call_destination.h @@ -16,7 +16,6 @@ #define GRPC_SRC_CORE_CLIENT_CHANNEL_LOAD_BALANCED_CALL_DESTINATION_H #include "absl/functional/any_invocable.h" - #include "src/core/client_channel/client_channel.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/transport/call_destination.h" diff --git a/src/core/client_channel/local_subchannel_pool.cc b/src/core/client_channel/local_subchannel_pool.cc index 878d3547b96..428db14bdf9 100644 --- a/src/core/client_channel/local_subchannel_pool.cc +++ b/src/core/client_channel/local_subchannel_pool.cc @@ -16,14 +16,13 @@ // // -#include - #include "src/core/client_channel/local_subchannel_pool.h" +#include + #include #include "absl/log/check.h" - #include "src/core/client_channel/subchannel.h" namespace grpc_core { diff --git a/src/core/client_channel/retry_filter.cc b/src/core/client_channel/retry_filter.cc index 73de1a4ebe1..f4bf99d5c5c 100644 --- a/src/core/client_channel/retry_filter.cc +++ b/src/core/client_channel/retry_filter.cc @@ -14,18 +14,16 @@ // limitations under the License. // -#include - #include "src/core/client_channel/retry_filter.h" +#include +#include + #include #include "absl/status/statusor.h" #include "absl/strings/strip.h" #include "absl/types/optional.h" - -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/client_channel/retry_filter_legacy_call_data.h" #include "src/core/client_channel/retry_service_config.h" diff --git a/src/core/client_channel/retry_filter.h b/src/core/client_channel/retry_filter.h index 402fa047691..1ed87fbc989 100644 --- a/src/core/client_channel/retry_filter.h +++ b/src/core/client_channel/retry_filter.h @@ -17,8 +17,10 @@ #ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_RETRY_FILTER_H #define GRPC_SRC_CORE_CLIENT_CHANNEL_RETRY_FILTER_H +#include +#include +#include #include - #include #include @@ -26,11 +28,6 @@ #include "absl/log/check.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/client_channel/retry_service_config.h" #include "src/core/client_channel/retry_throttle.h" diff --git a/src/core/client_channel/retry_filter_legacy_call_data.cc b/src/core/client_channel/retry_filter_legacy_call_data.cc index dda37fd4c62..7e3abc4a5a8 100644 --- a/src/core/client_channel/retry_filter_legacy_call_data.cc +++ b/src/core/client_channel/retry_filter_legacy_call_data.cc @@ -12,10 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/client_channel/retry_filter_legacy_call_data.h" +#include #include #include @@ -25,7 +24,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" - #include "src/core/client_channel/client_channel_internal.h" #include "src/core/client_channel/retry_service_config.h" #include "src/core/client_channel/retry_throttle.h" diff --git a/src/core/client_channel/retry_filter_legacy_call_data.h b/src/core/client_channel/retry_filter_legacy_call_data.h index a4336072f1b..b121a8735bc 100644 --- a/src/core/client_channel/retry_filter_legacy_call_data.h +++ b/src/core/client_channel/retry_filter_legacy_call_data.h @@ -15,8 +15,10 @@ #ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_RETRY_FILTER_LEGACY_CALL_DATA_H #define GRPC_SRC_CORE_CLIENT_CHANNEL_RETRY_FILTER_LEGACY_CALL_DATA_H +#include +#include +#include #include - #include #include @@ -25,11 +27,6 @@ #include "absl/container/inlined_vector.h" #include "absl/functional/any_invocable.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/client_channel/retry_filter.h" #include "src/core/client_channel/retry_service_config.h" diff --git a/src/core/client_channel/retry_service_config.cc b/src/core/client_channel/retry_service_config.cc index e0ee89ce140..01e4c867ea9 100644 --- a/src/core/client_channel/retry_service_config.cc +++ b/src/core/client_channel/retry_service_config.cc @@ -14,10 +14,13 @@ // limitations under the License. // -#include - #include "src/core/client_channel/retry_service_config.h" +#include +#include +#include +#include + #include #include #include @@ -27,11 +30,6 @@ #include "absl/strings/numbers.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/client_channel/retry_service_config.h b/src/core/client_channel/retry_service_config.h index 237e3b93bcc..91c6fe52dc9 100644 --- a/src/core/client_channel/retry_service_config.h +++ b/src/core/client_channel/retry_service_config.h @@ -18,7 +18,6 @@ #define GRPC_SRC_CORE_CLIENT_CHANNEL_RETRY_SERVICE_CONFIG_H #include - #include #include @@ -26,7 +25,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/client_channel/retry_throttle.cc b/src/core/client_channel/retry_throttle.cc index c9671832309..a631a8c47dd 100644 --- a/src/core/client_channel/retry_throttle.cc +++ b/src/core/client_channel/retry_throttle.cc @@ -16,16 +16,15 @@ // // -#include - #include "src/core/client_channel/retry_throttle.h" +#include +#include + #include #include #include -#include - namespace grpc_core { namespace internal { diff --git a/src/core/client_channel/retry_throttle.h b/src/core/client_channel/retry_throttle.h index 3cb32604277..fd01471d673 100644 --- a/src/core/client_channel/retry_throttle.h +++ b/src/core/client_channel/retry_throttle.h @@ -19,17 +19,14 @@ #ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_RETRY_THROTTLE_H #define GRPC_SRC_CORE_CLIENT_CHANNEL_RETRY_THROTTLE_H +#include #include - #include #include #include #include "absl/base/thread_annotations.h" - -#include - #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/sync.h" diff --git a/src/core/client_channel/subchannel.cc b/src/core/client_channel/subchannel.cc index 26f76b77709..56918f0f294 100644 --- a/src/core/client_channel/subchannel.cc +++ b/src/core/client_channel/subchannel.cc @@ -14,10 +14,12 @@ // limitations under the License. // -#include - #include "src/core/client_channel/subchannel.h" +#include +#include +#include +#include #include #include @@ -33,11 +35,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/channelz/channel_trace.h" #include "src/core/channelz/channelz.h" #include "src/core/client_channel/client_channel_internal.h" diff --git a/src/core/client_channel/subchannel.h b/src/core/client_channel/subchannel.h index 06a414363b1..41928e95300 100644 --- a/src/core/client_channel/subchannel.h +++ b/src/core/client_channel/subchannel.h @@ -17,8 +17,9 @@ #ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_SUBCHANNEL_H #define GRPC_SRC_CORE_CLIENT_CHANNEL_SUBCHANNEL_H +#include +#include #include - #include #include @@ -27,10 +28,6 @@ #include "absl/base/thread_annotations.h" #include "absl/status/status.h" - -#include -#include - #include "src/core/client_channel/connector.h" #include "src/core/client_channel/subchannel_pool_interface.h" #include "src/core/lib/address_utils/sockaddr_utils.h" diff --git a/src/core/client_channel/subchannel_pool_interface.cc b/src/core/client_channel/subchannel_pool_interface.cc index 7b083a8b47a..bc55e478008 100644 --- a/src/core/client_channel/subchannel_pool_interface.cc +++ b/src/core/client_channel/subchannel_pool_interface.cc @@ -16,16 +16,14 @@ // // -#include - #include "src/core/client_channel/subchannel_pool_interface.h" +#include #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/client_channel/subchannel_pool_interface.h b/src/core/client_channel/subchannel_pool_interface.h index d7cab8f1e99..ca385d1e591 100644 --- a/src/core/client_channel/subchannel_pool_interface.h +++ b/src/core/client_channel/subchannel_pool_interface.h @@ -24,7 +24,6 @@ #include #include "absl/strings/string_view.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/resolved_address.h" diff --git a/src/core/client_channel/subchannel_stream_client.cc b/src/core/client_channel/subchannel_stream_client.cc index a01165e3d11..205daac3d96 100644 --- a/src/core/client_channel/subchannel_stream_client.cc +++ b/src/core/client_channel/subchannel_stream_client.cc @@ -14,10 +14,10 @@ // limitations under the License. // -#include - #include "src/core/client_channel/subchannel_stream_client.h" +#include +#include #include #include @@ -25,9 +25,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/src/core/client_channel/subchannel_stream_client.h b/src/core/client_channel/subchannel_stream_client.h index f50314e0ace..0f530c17f36 100644 --- a/src/core/client_channel/subchannel_stream_client.h +++ b/src/core/client_channel/subchannel_stream_client.h @@ -17,6 +17,10 @@ #ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_SUBCHANNEL_STREAM_CLIENT_H #define GRPC_SRC_CORE_CLIENT_CHANNEL_SUBCHANNEL_STREAM_CLIENT_H +#include +#include +#include +#include #include #include @@ -26,12 +30,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/client_channel/subchannel.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/ext/.clang-format b/src/core/ext/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/core/ext/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/ext/filters/.clang-format b/src/core/ext/filters/.clang-format deleted file mode 100644 index 64387e9e515..00000000000 --- a/src/core/ext/filters/.clang-format +++ /dev/null @@ -1,53 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc index da589a303b7..8d5e559e7a5 100644 --- a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +++ b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/ext/filters/backend_metrics/backend_metric_filter.h" +#include +#include #include #include @@ -26,12 +26,6 @@ #include "absl/log/log.h" #include "absl/strings/string_view.h" -#include "upb/base/string_view.h" -#include "upb/mem/arena.hpp" -#include "xds/data/orca/v3/orca_load_report.upb.h" - -#include - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" @@ -44,6 +38,9 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/util/latent_see.h" +#include "upb/base/string_view.h" +#include "upb/mem/arena.hpp" +#include "xds/data/orca/v3/orca_load_report.upb.h" namespace grpc_core { diff --git a/src/core/ext/filters/backend_metrics/backend_metric_filter.h b/src/core/ext/filters/backend_metrics/backend_metric_filter.h index 02ee8611dce..c2d630a155a 100644 --- a/src/core/ext/filters/backend_metrics/backend_metric_filter.h +++ b/src/core/ext/filters/backend_metrics/backend_metric_filter.h @@ -21,7 +21,6 @@ #include "absl/status/statusor.h" #include "absl/types/optional.h" - #include "src/core/ext/filters/backend_metrics/backend_metric_provider.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/ext/filters/census/grpc_context.cc b/src/core/ext/filters/census/grpc_context.cc index 77965df7ecd..42d72df6523 100644 --- a/src/core/ext/filters/census/grpc_context.cc +++ b/src/core/ext/filters/census/grpc_context.cc @@ -16,10 +16,9 @@ // // -#include - #include #include +#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/surface/call.h" diff --git a/src/core/ext/filters/channel_idle/idle_filter_state.cc b/src/core/ext/filters/channel_idle/idle_filter_state.cc index 72b5448a1e5..2fbc8365067 100644 --- a/src/core/ext/filters/channel_idle/idle_filter_state.cc +++ b/src/core/ext/filters/channel_idle/idle_filter_state.cc @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/ext/filters/channel_idle/idle_filter_state.h" #include +#include namespace grpc_core { diff --git a/src/core/ext/filters/channel_idle/idle_filter_state.h b/src/core/ext/filters/channel_idle/idle_filter_state.h index f921e082fcd..772d4a0b6c3 100644 --- a/src/core/ext/filters/channel_idle/idle_filter_state.h +++ b/src/core/ext/filters/channel_idle/idle_filter_state.h @@ -16,7 +16,6 @@ #define GRPC_SRC_CORE_EXT_FILTERS_CHANNEL_IDLE_IDLE_FILTER_STATE_H #include - #include #include diff --git a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc index bc4e834a10d..968386bec8a 100644 --- a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +++ b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc @@ -15,10 +15,11 @@ // TODO(ctiller): Add a unit test suite for these filters once it's practical to // mock transport operations. -#include - #include "src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h" +#include +#include + #include #include @@ -27,9 +28,6 @@ #include "absl/random/random.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h index b4b61f10bb3..b903b41f766 100644 --- a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h +++ b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h @@ -15,15 +15,13 @@ #ifndef GRPC_SRC_CORE_EXT_FILTERS_CHANNEL_IDLE_LEGACY_CHANNEL_IDLE_FILTER_H #define GRPC_SRC_CORE_EXT_FILTERS_CHANNEL_IDLE_LEGACY_CHANNEL_IDLE_FILTER_H +#include #include #include #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/ext/filters/channel_idle/idle_filter_state.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/ext/filters/fault_injection/fault_injection_filter.cc b/src/core/ext/filters/fault_injection/fault_injection_filter.cc index e0e4d3e031b..72429fea9d6 100644 --- a/src/core/ext/filters/fault_injection/fault_injection_filter.cc +++ b/src/core/ext/filters/fault_injection/fault_injection_filter.cc @@ -14,10 +14,10 @@ // limitations under the License. // -#include - #include "src/core/ext/filters/fault_injection/fault_injection_filter.h" +#include +#include #include #include @@ -35,9 +35,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/status_util.h" diff --git a/src/core/ext/filters/fault_injection/fault_injection_filter.h b/src/core/ext/filters/fault_injection/fault_injection_filter.h index 40b839c1033..c7e04a470fd 100644 --- a/src/core/ext/filters/fault_injection/fault_injection_filter.h +++ b/src/core/ext/filters/fault_injection/fault_injection_filter.h @@ -18,7 +18,6 @@ #define GRPC_SRC_CORE_EXT_FILTERS_FAULT_INJECTION_FAULT_INJECTION_FILTER_H #include - #include #include @@ -26,7 +25,6 @@ #include "absl/base/thread_annotations.h" #include "absl/random/random.h" #include "absl/status/statusor.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc b/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc index 9e12ce0b093..6ecb24f856b 100644 --- a/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc +++ b/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc @@ -14,14 +14,13 @@ // limitations under the License. // -#include - #include "src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h" +#include + #include #include "absl/types/optional.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/status_util.h" diff --git a/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h b/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h index 0016c552c8e..f2c4769ccc6 100644 --- a/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h +++ b/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h @@ -17,8 +17,8 @@ #ifndef GRPC_SRC_CORE_EXT_FILTERS_FAULT_INJECTION_FAULT_INJECTION_SERVICE_CONFIG_PARSER_H #define GRPC_SRC_CORE_EXT_FILTERS_FAULT_INJECTION_FAULT_INJECTION_SERVICE_CONFIG_PARSER_H +#include #include - #include #include @@ -28,9 +28,6 @@ #include #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/service_config/service_config_parser.h" diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc index e301ed62154..61a6a84a64e 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc @@ -22,7 +22,6 @@ #include "absl/log/check.h" #include "absl/strings/str_cat.h" - #include "src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h index a3136ebd460..66f8d13d4da 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h @@ -23,7 +23,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - #include "src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h" #include "src/core/filter/blackboard.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.cc b/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.cc index 4af33e528f7..2fb9fd2f55c 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.cc +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.cc @@ -14,14 +14,13 @@ // limitations under the License. // -#include - #include "src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h" +#include + #include #include "absl/types/optional.h" - #include "src/core/lib/channel/channel_args.h" namespace grpc_core { diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h b/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h index 2c64a694485..36637d580b3 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h @@ -25,7 +25,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/service_config/service_config_parser.h" diff --git a/src/core/ext/filters/http/client/http_client_filter.cc b/src/core/ext/filters/http/client/http_client_filter.cc index f46b3641b61..cd91e931e56 100644 --- a/src/core/ext/filters/http/client/http_client_filter.cc +++ b/src/core/ext/filters/http/client/http_client_filter.cc @@ -15,10 +15,13 @@ // // -#include - #include "src/core/ext/filters/http/client/http_client_filter.h" +#include +#include +#include +#include + #include #include #include @@ -33,11 +36,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/promise/context.h" diff --git a/src/core/ext/filters/http/client/http_client_filter.h b/src/core/ext/filters/http/client/http_client_filter.h index 0b319cec303..05f6c14fe90 100644 --- a/src/core/ext/filters/http/client/http_client_filter.h +++ b/src/core/ext/filters/http/client/http_client_filter.h @@ -21,7 +21,6 @@ #include #include "absl/status/statusor.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/ext/filters/http/client_authority_filter.cc b/src/core/ext/filters/http/client_authority_filter.cc index b43e6a65b2b..924a54d469f 100644 --- a/src/core/ext/filters/http/client_authority_filter.cc +++ b/src/core/ext/filters/http/client_authority_filter.cc @@ -16,19 +16,17 @@ // // -#include - #include "src/core/ext/filters/http/client_authority_filter.h" +#include +#include + #include #include #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/security/transport/auth_filters.h" diff --git a/src/core/ext/filters/http/client_authority_filter.h b/src/core/ext/filters/http/client_authority_filter.h index c3b817527c1..0137c21bc62 100644 --- a/src/core/ext/filters/http/client_authority_filter.h +++ b/src/core/ext/filters/http/client_authority_filter.h @@ -24,7 +24,6 @@ #include #include "absl/status/statusor.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/ext/filters/http/http_filters_plugin.cc b/src/core/ext/filters/http/http_filters_plugin.cc index b662737ebae..b791e454b33 100644 --- a/src/core/ext/filters/http/http_filters_plugin.cc +++ b/src/core/ext/filters/http/http_filters_plugin.cc @@ -19,7 +19,6 @@ #include #include "absl/strings/match.h" - #include "src/core/ext/filters/http/client/http_client_filter.h" #include "src/core/ext/filters/http/message_compress/compression_filter.h" #include "src/core/ext/filters/http/server/http_server_filter.h" diff --git a/src/core/ext/filters/http/message_compress/compression_filter.cc b/src/core/ext/filters/http/message_compress/compression_filter.cc index 85a67690206..fe7123db78f 100644 --- a/src/core/ext/filters/http/message_compress/compression_filter.cc +++ b/src/core/ext/filters/http/message_compress/compression_filter.cc @@ -12,10 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/ext/filters/http/message_compress/compression_filter.h" +#include +#include +#include +#include +#include #include #include @@ -27,12 +30,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/ext/filters/message_size/message_size_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/ext/filters/http/message_compress/compression_filter.h b/src/core/ext/filters/http/message_compress/compression_filter.h index ae3a9ee317e..fbd28d309f7 100644 --- a/src/core/ext/filters/http/message_compress/compression_filter.h +++ b/src/core/ext/filters/http/message_compress/compression_filter.h @@ -19,17 +19,14 @@ #ifndef GRPC_SRC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_COMPRESSION_FILTER_H #define GRPC_SRC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_COMPRESSION_FILTER_H +#include #include - #include #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/ext/filters/http/server/http_server_filter.cc b/src/core/ext/filters/http/server/http_server_filter.cc index 92e541775e5..35c73ba7be7 100644 --- a/src/core/ext/filters/http/server/http_server_filter.cc +++ b/src/core/ext/filters/http/server/http_server_filter.cc @@ -16,10 +16,12 @@ // // -#include - #include "src/core/ext/filters/http/server/http_server_filter.h" +#include +#include +#include + #include #include #include @@ -28,10 +30,6 @@ #include "absl/log/log.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/ext/filters/http/server/http_server_filter.h b/src/core/ext/filters/http/server/http_server_filter.h index 8f933865d7d..c84e619bfb4 100644 --- a/src/core/ext/filters/http/server/http_server_filter.h +++ b/src/core/ext/filters/http/server/http_server_filter.h @@ -22,7 +22,6 @@ #include #include "absl/status/statusor.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/ext/filters/load_reporting/registered_opencensus_objects.h b/src/core/ext/filters/load_reporting/registered_opencensus_objects.h index cb17a04109d..0df3ce181fc 100644 --- a/src/core/ext/filters/load_reporting/registered_opencensus_objects.h +++ b/src/core/ext/filters/load_reporting/registered_opencensus_objects.h @@ -23,7 +23,6 @@ #include "opencensus/stats/stats.h" #include "opencensus/tags/tag_key.h" - #include "src/cpp/server/load_reporter/constants.h" namespace grpc { diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc index 48cb742e505..a7d9eeccdd9 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc @@ -16,10 +16,13 @@ // // -#include - #include "src/core/ext/filters/load_reporting/server_load_reporting_filter.h" +#include +#include +#include +#include +#include #include #include @@ -38,12 +41,6 @@ #include "absl/types/optional.h" #include "opencensus/stats/stats.h" #include "opencensus/tags/tag_key.h" - -#include -#include -#include -#include - #include "src/core/ext/filters/load_reporting/registered_opencensus_objects.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/call_finalization.h" diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.h b/src/core/ext/filters/load_reporting/server_load_reporting_filter.h index 41f66ec948d..d5a5eb96bf5 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.h +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.h @@ -20,13 +20,11 @@ #define GRPC_SRC_CORE_EXT_FILTERS_LOAD_REPORTING_SERVER_LOAD_REPORTING_FILTER_H #include - #include #include #include "absl/status/statusor.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/promise/arena_promise.h" diff --git a/src/core/ext/filters/logging/logging_filter.cc b/src/core/ext/filters/logging/logging_filter.cc index cf12d8bb6ac..b8563872eb4 100644 --- a/src/core/ext/filters/logging/logging_filter.cc +++ b/src/core/ext/filters/logging/logging_filter.cc @@ -16,10 +16,12 @@ // // -#include - #include "src/core/ext/filters/logging/logging_filter.h" +#include +#include +#include +#include #include #include @@ -42,11 +44,6 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/ext/filters/logging/logging_sink.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/ext/filters/logging/logging_filter.h b/src/core/ext/filters/logging/logging_filter.h index 5d8b77752cd..9acc80e99c2 100644 --- a/src/core/ext/filters/logging/logging_filter.h +++ b/src/core/ext/filters/logging/logging_filter.h @@ -25,7 +25,6 @@ #include #include "absl/status/statusor.h" - #include "src/core/ext/filters/logging/logging_sink.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/ext/filters/logging/logging_sink.h b/src/core/ext/filters/logging/logging_sink.h index 71720799e4d..8b7914e0110 100644 --- a/src/core/ext/filters/logging/logging_sink.h +++ b/src/core/ext/filters/logging/logging_sink.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CORE_EXT_FILTERS_LOGGING_LOGGING_SINK_H #include - #include #include @@ -29,7 +28,6 @@ #include "absl/numeric/int128.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - #include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index 01cc9a3a9d7..813cd04dbf3 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -14,10 +14,11 @@ // limitations under the License. // -#include - #include "src/core/ext/filters/message_size/message_size_filter.h" +#include +#include +#include #include #include @@ -25,10 +26,6 @@ #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h index 2bc36cfde31..ff6dc5837df 100644 --- a/src/core/ext/filters/message_size/message_size_filter.h +++ b/src/core/ext/filters/message_size/message_size_filter.h @@ -18,7 +18,6 @@ #define GRPC_SRC_CORE_EXT_FILTERS_MESSAGE_SIZE_MESSAGE_SIZE_FILTER_H #include - #include #include @@ -27,7 +26,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/ext/filters/rbac/rbac_filter.cc b/src/core/ext/filters/rbac/rbac_filter.cc index c7a8d139b17..0385b865c7c 100644 --- a/src/core/ext/filters/rbac/rbac_filter.cc +++ b/src/core/ext/filters/rbac/rbac_filter.cc @@ -14,18 +14,16 @@ // limitations under the License. // -#include - #include "src/core/ext/filters/rbac/rbac_filter.h" +#include +#include + #include #include #include #include "absl/status/status.h" - -#include - #include "src/core/ext/filters/rbac/rbac_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/ext/filters/rbac/rbac_filter.h b/src/core/ext/filters/rbac/rbac_filter.h index f41e8490ccf..16489f47f02 100644 --- a/src/core/ext/filters/rbac/rbac_filter.h +++ b/src/core/ext/filters/rbac/rbac_filter.h @@ -18,11 +18,9 @@ #define GRPC_SRC_CORE_EXT_FILTERS_RBAC_RBAC_FILTER_H #include - #include #include "absl/status/statusor.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/ext/filters/rbac/rbac_service_config_parser.cc b/src/core/ext/filters/rbac/rbac_service_config_parser.cc index 56195fe4625..5c1fce9748c 100644 --- a/src/core/ext/filters/rbac/rbac_service_config_parser.cc +++ b/src/core/ext/filters/rbac/rbac_service_config_parser.cc @@ -14,10 +14,11 @@ // limitations under the License. // -#include - #include "src/core/ext/filters/rbac/rbac_service_config_parser.h" +#include +#include + #include #include #include @@ -27,9 +28,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/util/json/json_args.h" diff --git a/src/core/ext/filters/rbac/rbac_service_config_parser.h b/src/core/ext/filters/rbac/rbac_service_config_parser.h index f9a4c29c34e..0bd3bc465e6 100644 --- a/src/core/ext/filters/rbac/rbac_service_config_parser.h +++ b/src/core/ext/filters/rbac/rbac_service_config_parser.h @@ -18,7 +18,6 @@ #define GRPC_SRC_CORE_EXT_FILTERS_RBAC_RBAC_SERVICE_CONFIG_PARSER_H #include - #include #include @@ -27,7 +26,6 @@ #include #include "absl/strings/string_view.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/security/authorization/grpc_authorization_engine.h" diff --git a/src/core/ext/filters/stateful_session/stateful_session_filter.cc b/src/core/ext/filters/stateful_session/stateful_session_filter.cc index 3852c7155bb..22b3177c08f 100644 --- a/src/core/ext/filters/stateful_session/stateful_session_filter.cc +++ b/src/core/ext/filters/stateful_session/stateful_session_filter.cc @@ -14,10 +14,9 @@ // limitations under the License. // -#include - #include "src/core/ext/filters/stateful_session/stateful_session_filter.h" +#include #include #include @@ -36,7 +35,6 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/types/optional.h" - #include "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/ext/filters/stateful_session/stateful_session_filter.h b/src/core/ext/filters/stateful_session/stateful_session_filter.h index b7bde679c17..ce4e1dc801e 100644 --- a/src/core/ext/filters/stateful_session/stateful_session_filter.h +++ b/src/core/ext/filters/stateful_session/stateful_session_filter.h @@ -18,14 +18,12 @@ #define GRPC_SRC_CORE_EXT_FILTERS_STATEFUL_SESSION_STATEFUL_SESSION_FILTER_H #include - #include #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - #include "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc b/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc index 3be9785ac7c..1dc24ac99ce 100644 --- a/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc +++ b/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc @@ -14,14 +14,13 @@ // limitations under the License. // -#include - #include "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h" +#include + #include #include "absl/types/optional.h" - #include "src/core/lib/channel/channel_args.h" namespace grpc_core { diff --git a/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h b/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h index edf6f55a79d..59ee3bd7069 100644 --- a/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h +++ b/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h @@ -18,7 +18,6 @@ #define GRPC_SRC_CORE_EXT_FILTERS_STATEFUL_SESSION_STATEFUL_SESSION_SERVICE_CONFIG_PARSER_H #include - #include #include @@ -27,7 +26,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/service_config/service_config_parser.h" diff --git a/src/core/ext/transport/.clang-format b/src/core/ext/transport/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/core/ext/transport/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/ext/transport/binder/.clang-format b/src/core/ext/transport/binder/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/core/ext/transport/binder/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/ext/transport/binder/client/binder_connector.cc b/src/core/ext/transport/binder/client/binder_connector.cc index 725c5ad8a39..1317219a173 100644 --- a/src/core/ext/transport/binder/client/binder_connector.cc +++ b/src/core/ext/transport/binder/client/binder_connector.cc @@ -30,14 +30,13 @@ #endif // GPR_WINDOWS #endif +#include + #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/client_channel/connector.h" #include "src/core/client_channel/subchannel.h" #include "src/core/ext/transport/binder/client/endpoint_binder_pool.h" diff --git a/src/core/ext/transport/binder/client/binder_connector.h b/src/core/ext/transport/binder/client/binder_connector.h index e054e3555c5..5ce6d86e583 100644 --- a/src/core/ext/transport/binder/client/binder_connector.h +++ b/src/core/ext/transport/binder/client/binder_connector.h @@ -15,17 +15,16 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_BINDER_CONNECTOR_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_BINDER_CONNECTOR_H -#include -#include - -#include "absl/strings/string_view.h" -#include "absl/strings/strip.h" - #include #include #include #include +#include +#include + +#include "absl/strings/string_view.h" +#include "absl/strings/strip.h" #include "src/core/client_channel/client_channel_factory.h" #include "src/core/client_channel/client_channel_filter.h" diff --git a/src/core/ext/transport/binder/client/channel_create.cc b/src/core/ext/transport/binder/client/channel_create.cc index 6ccf25f5b9b..483d488afaa 100644 --- a/src/core/ext/transport/binder/client/channel_create.cc +++ b/src/core/ext/transport/binder/client/channel_create.cc @@ -33,16 +33,15 @@ #ifdef GPR_SUPPORT_BINDER_TRANSPORT +#include +#include + #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/memory/memory.h" #include "absl/strings/substitute.h" #include "absl/time/clock.h" #include "absl/time/time.h" - -#include -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/ext/transport/binder/client/channel_create_impl.h" #include "src/core/ext/transport/binder/client/connection_id_generator.h" diff --git a/src/core/ext/transport/binder/client/channel_create_impl.cc b/src/core/ext/transport/binder/client/channel_create_impl.cc index cf3a0caab69..1234c7c80fc 100644 --- a/src/core/ext/transport/binder/client/channel_create_impl.cc +++ b/src/core/ext/transport/binder/client/channel_create_impl.cc @@ -22,7 +22,6 @@ #include #include "absl/log/check.h" - #include "src/core/ext/transport/binder/client/binder_connector.h" #include "src/core/ext/transport/binder/transport/binder_transport.h" #include "src/core/ext/transport/binder/wire_format/binder.h" diff --git a/src/core/ext/transport/binder/client/connection_id_generator.h b/src/core/ext/transport/binder/client/connection_id_generator.h index fbe945cfb74..6e2b98d4ea1 100644 --- a/src/core/ext/transport/binder/client/connection_id_generator.h +++ b/src/core/ext/transport/binder/client/connection_id_generator.h @@ -15,12 +15,11 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CONNECTION_ID_GENERATOR_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CONNECTION_ID_GENERATOR_H +#include + #include #include "absl/strings/string_view.h" - -#include - #include "src/core/util/sync.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/client/endpoint_binder_pool.cc b/src/core/ext/transport/binder/client/endpoint_binder_pool.cc index 012d7f03063..b64436acb5a 100644 --- a/src/core/ext/transport/binder/client/endpoint_binder_pool.cc +++ b/src/core/ext/transport/binder/client/endpoint_binder_pool.cc @@ -14,11 +14,11 @@ #include "src/core/ext/transport/binder/client/endpoint_binder_pool.h" +#include + #include "absl/log/check.h" #include "absl/log/log.h" -#include - #ifndef GRPC_NO_BINDER #include "src/core/ext/transport/binder/client/jni_utils.h" diff --git a/src/core/ext/transport/binder/client/endpoint_binder_pool.h b/src/core/ext/transport/binder/client/endpoint_binder_pool.h index 4f9ac233219..997c36e76a6 100644 --- a/src/core/ext/transport/binder/client/endpoint_binder_pool.h +++ b/src/core/ext/transport/binder/client/endpoint_binder_pool.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_ENDPOINT_BINDER_POOL_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_ENDPOINT_BINDER_POOL_H +#include + #include #include #include "absl/container/flat_hash_map.h" - -#include - #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/util/sync.h" diff --git a/src/core/ext/transport/binder/client/jni_utils.cc b/src/core/ext/transport/binder/client/jni_utils.cc index 8fc4f629c3c..3f13e269b0c 100644 --- a/src/core/ext/transport/binder/client/jni_utils.cc +++ b/src/core/ext/transport/binder/client/jni_utils.cc @@ -14,11 +14,11 @@ #include "src/core/ext/transport/binder/client/jni_utils.h" +#include + #include "absl/log/check.h" #include "absl/log/log.h" -#include - #ifndef GRPC_NO_BINDER #include "src/core/util/crash.h" diff --git a/src/core/ext/transport/binder/client/jni_utils.h b/src/core/ext/transport/binder/client/jni_utils.h index 1c809b127c8..c83949d3bf0 100644 --- a/src/core/ext/transport/binder/client/jni_utils.h +++ b/src/core/ext/transport/binder/client/jni_utils.h @@ -17,6 +17,7 @@ #if defined(ANDROID) || defined(__ANDROID__) +#include #include #include @@ -24,8 +25,6 @@ #include "absl/strings/string_view.h" -#include - namespace grpc_binder { // Finds NativeConnectionHelper Java class and caches it. This is useful because diff --git a/src/core/ext/transport/binder/client/security_policy_setting.cc b/src/core/ext/transport/binder/client/security_policy_setting.cc index 318b434e6fa..c08a83324c3 100644 --- a/src/core/ext/transport/binder/client/security_policy_setting.cc +++ b/src/core/ext/transport/binder/client/security_policy_setting.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "absl/log/check.h" - #include +#include "absl/log/check.h" + #ifndef GRPC_NO_BINDER #include "src/core/ext/transport/binder/client/security_policy_setting.h" diff --git a/src/core/ext/transport/binder/client/security_policy_setting.h b/src/core/ext/transport/binder/client/security_policy_setting.h index 46fb000246a..cd386693408 100644 --- a/src/core/ext/transport/binder/client/security_policy_setting.h +++ b/src/core/ext/transport/binder/client/security_policy_setting.h @@ -15,12 +15,11 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_SECURITY_POLICY_SETTING_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_SECURITY_POLICY_SETTING_H -#include "absl/container/flat_hash_map.h" -#include "absl/strings/string_view.h" - #include #include +#include "absl/container/flat_hash_map.h" +#include "absl/strings/string_view.h" #include "src/core/util/sync.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/security_policy/binder_security_policy.cc b/src/core/ext/transport/binder/security_policy/binder_security_policy.cc index 4fe4ee4d159..8126d4c6db7 100644 --- a/src/core/ext/transport/binder/security_policy/binder_security_policy.cc +++ b/src/core/ext/transport/binder/security_policy/binder_security_policy.cc @@ -25,7 +25,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/core/ext/transport/binder/client/jni_utils.h" #include "src/core/util/crash.h" diff --git a/src/core/ext/transport/binder/server/binder_server.cc b/src/core/ext/transport/binder/server/binder_server.cc index 3d84b95a8d5..65d70c2fdb7 100644 --- a/src/core/ext/transport/binder/server/binder_server.cc +++ b/src/core/ext/transport/binder/server/binder_server.cc @@ -18,6 +18,8 @@ #ifndef GRPC_NO_BINDER +#include + #include #include #include @@ -25,9 +27,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/memory/memory.h" - -#include - #include "src/core/ext/transport/binder/transport/binder_transport.h" #include "src/core/ext/transport/binder/utils/ndk_binder.h" #include "src/core/ext/transport/binder/wire_format/binder_android.h" diff --git a/src/core/ext/transport/binder/server/binder_server.h b/src/core/ext/transport/binder/server/binder_server.h index 34f25090c59..889a2555438 100644 --- a/src/core/ext/transport/binder/server/binder_server.h +++ b/src/core/ext/transport/binder/server/binder_server.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_H +#include +#include + #include #include "absl/container/flat_hash_map.h" #include "absl/status/status.h" - -#include -#include - #include "src/core/ext/transport/binder/transport/binder_transport.h" #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/binder/server/binder_server_credentials.cc b/src/core/ext/transport/binder/server/binder_server_credentials.cc index 0d8f3dd63af..aea85fd82a6 100644 --- a/src/core/ext/transport/binder/server/binder_server_credentials.cc +++ b/src/core/ext/transport/binder/server/binder_server_credentials.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "absl/log/check.h" - #include +#include "absl/log/check.h" + #ifndef GRPC_NO_BINDER #include diff --git a/src/core/ext/transport/binder/transport/binder_transport.cc b/src/core/ext/transport/binder/transport/binder_transport.cc index 06ed2da8798..aa0990f9ba2 100644 --- a/src/core/ext/transport/binder/transport/binder_transport.cc +++ b/src/core/ext/transport/binder/transport/binder_transport.cc @@ -28,7 +28,6 @@ #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" #include "absl/strings/substitute.h" - #include "src/core/ext/transport/binder/transport/binder_stream.h" #include "src/core/ext/transport/binder/utils/transport_stream_receiver.h" #include "src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h" diff --git a/src/core/ext/transport/binder/transport/binder_transport.h b/src/core/ext/transport/binder/transport/binder_transport.h index 108926f25df..1e5446c3fc1 100644 --- a/src/core/ext/transport/binder/transport/binder_transport.h +++ b/src/core/ext/transport/binder/transport/binder_transport.h @@ -15,6 +15,9 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_TRANSPORT_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_TRANSPORT_H +#include +#include + #include #include #include @@ -24,10 +27,6 @@ #include "absl/container/flat_hash_map.h" #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/ext/transport/binder/utils/transport_stream_receiver.h" #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_reader.h" diff --git a/src/core/ext/transport/binder/utils/ndk_binder.cc b/src/core/ext/transport/binder/utils/ndk_binder.cc index 95b52789803..8997255d7d7 100644 --- a/src/core/ext/transport/binder/utils/ndk_binder.cc +++ b/src/core/ext/transport/binder/utils/ndk_binder.cc @@ -24,7 +24,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/core/util/crash.h" #include "src/core/util/sync.h" diff --git a/src/core/ext/transport/binder/utils/transport_stream_receiver.h b/src/core/ext/transport/binder/utils/transport_stream_receiver.h index fa7dd21472d..a7f22d40c59 100644 --- a/src/core/ext/transport/binder/utils/transport_stream_receiver.h +++ b/src/core/ext/transport/binder/utils/transport_stream_receiver.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_H +#include + #include #include #include #include "absl/status/statusor.h" - -#include - #include "src/core/ext/transport/binder/wire_format/transaction.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc b/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc index 5a3cc10cb27..af1f4071104 100644 --- a/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc +++ b/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc @@ -24,7 +24,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/core/util/crash.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h b/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h index a671a5e8233..a5548aba89c 100644 --- a/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h +++ b/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_IMPL_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_IMPL_H +#include + #include #include #include @@ -22,8 +24,6 @@ #include #include -#include - #include "src/core/ext/transport/binder/utils/transport_stream_receiver.h" #include "src/core/util/sync.h" diff --git a/src/core/ext/transport/binder/wire_format/binder.h b/src/core/ext/transport/binder/wire_format/binder.h index 7936fbb65ce..77ab16597e8 100644 --- a/src/core/ext/transport/binder/wire_format/binder.h +++ b/src/core/ext/transport/binder/wire_format/binder.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_H +#include + #include #include #include @@ -22,9 +24,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/ext/transport/binder/wire_format/binder_constants.h" #include "src/core/util/orphanable.h" diff --git a/src/core/ext/transport/binder/wire_format/binder_android.cc b/src/core/ext/transport/binder/wire_format/binder_android.cc index e2a55df6b01..bc808e09bca 100644 --- a/src/core/ext/transport/binder/wire_format/binder_android.cc +++ b/src/core/ext/transport/binder/wire_format/binder_android.cc @@ -24,7 +24,6 @@ #include "absl/log/log.h" #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" - #include "src/core/ext/transport/binder/wire_format/binder_android.h" #include "src/core/util/crash.h" #include "src/core/util/sync.h" diff --git a/src/core/ext/transport/binder/wire_format/binder_android.h b/src/core/ext/transport/binder/wire_format/binder_android.h index a11b9bb8957..7d59a5fa00d 100644 --- a/src/core/ext/transport/binder/wire_format/binder_android.h +++ b/src/core/ext/transport/binder/wire_format/binder_android.h @@ -24,7 +24,6 @@ #include #include "absl/memory/memory.h" - #include "src/core/ext/transport/binder/utils/binder_auto_utils.h" #include "src/core/ext/transport/binder/utils/ndk_binder.h" #include "src/core/ext/transport/binder/wire_format/binder.h" diff --git a/src/core/ext/transport/binder/wire_format/binder_constants.h b/src/core/ext/transport/binder/wire_format/binder_constants.h index 562f248ec0d..0dacaa742c0 100644 --- a/src/core/ext/transport/binder/wire_format/binder_constants.h +++ b/src/core/ext/transport/binder/wire_format/binder_constants.h @@ -15,12 +15,12 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_CONSTANTS_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_CONSTANTS_H +#include + #include #include "absl/base/attributes.h" -#include - using transaction_code_t = uint32_t; ABSL_CONST_INIT extern const int FIRST_CALL_TRANSACTION; diff --git a/src/core/ext/transport/binder/wire_format/transaction.h b/src/core/ext/transport/binder/wire_format/transaction.h index eda30d093a5..0b22f8a60e9 100644 --- a/src/core/ext/transport/binder/wire_format/transaction.h +++ b/src/core/ext/transport/binder/wire_format/transaction.h @@ -15,15 +15,14 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_TRANSACTION_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_TRANSACTION_H +#include + #include #include #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/util/crash.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/wire_format/wire_reader.h b/src/core/ext/transport/binder/wire_format/wire_reader.h index 570f99ac683..e446342af62 100644 --- a/src/core/ext/transport/binder/wire_format/wire_reader.h +++ b/src/core/ext/transport/binder/wire_format/wire_reader.h @@ -15,11 +15,11 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_H +#include + #include #include -#include - #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_writer.h" #include "src/core/util/orphanable.h" diff --git a/src/core/ext/transport/binder/wire_format/wire_reader_impl.cc b/src/core/ext/transport/binder/wire_format/wire_reader_impl.cc index d877b9cd9c1..5d8144650ac 100644 --- a/src/core/ext/transport/binder/wire_format/wire_reader_impl.cc +++ b/src/core/ext/transport/binder/wire_format/wire_reader_impl.cc @@ -29,7 +29,6 @@ #include "absl/log/log.h" #include "absl/memory/memory.h" #include "absl/status/statusor.h" - #include "src/core/ext/transport/binder/utils/transport_stream_receiver.h" #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_writer.h" diff --git a/src/core/ext/transport/binder/wire_format/wire_reader_impl.h b/src/core/ext/transport/binder/wire_format/wire_reader_impl.h index a08cb6f4985..8c8c4e939f7 100644 --- a/src/core/ext/transport/binder/wire_format/wire_reader_impl.h +++ b/src/core/ext/transport/binder/wire_format/wire_reader_impl.h @@ -15,16 +15,15 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_IMPL_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_IMPL_H +#include +#include + #include #include #include #include "absl/container/flat_hash_map.h" #include "absl/functional/any_invocable.h" - -#include -#include - #include "src/core/ext/transport/binder/utils/transport_stream_receiver.h" #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_reader.h" diff --git a/src/core/ext/transport/binder/wire_format/wire_writer.cc b/src/core/ext/transport/binder/wire_format/wire_writer.cc index 1cefd1bd5f2..948f16d2ee9 100644 --- a/src/core/ext/transport/binder/wire_format/wire_writer.cc +++ b/src/core/ext/transport/binder/wire_format/wire_writer.cc @@ -24,7 +24,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/types/variant.h" - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/util/crash.h" diff --git a/src/core/ext/transport/binder/wire_format/wire_writer.h b/src/core/ext/transport/binder/wire_format/wire_writer.h index 81041c68c02..81848296323 100644 --- a/src/core/ext/transport/binder/wire_format/wire_writer.h +++ b/src/core/ext/transport/binder/wire_format/wire_writer.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_WRITER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_WRITER_H +#include + #include #include #include #include "absl/container/flat_hash_map.h" - -#include - #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/transaction.h" #include "src/core/lib/iomgr/combiner.h" diff --git a/src/core/ext/transport/chaotic_good/chaotic_good_transport.h b/src/core/ext/transport/chaotic_good/chaotic_good_transport.h index b3df1ceb1e6..3616797a3bb 100644 --- a/src/core/ext/transport/chaotic_good/chaotic_good_transport.h +++ b/src/core/ext/transport/chaotic_good/chaotic_good_transport.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_CHAOTIC_GOOD_TRANSPORT_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_CHAOTIC_GOOD_TRANSPORT_H +#include + #include #include #include "absl/log/log.h" #include "absl/random/random.h" - -#include - #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" diff --git a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc index d8743703a04..ae9317e3b89 100644 --- a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc +++ b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc @@ -14,6 +14,9 @@ #include "src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h" +#include +#include + #include #include #include @@ -23,10 +26,6 @@ #include "absl/random/bit_gen_ref.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include - #include "src/core/client_channel/client_channel_factory.h" #include "src/core/client_channel/client_channel_filter.h" #include "src/core/ext/transport/chaotic_good/client_transport.h" diff --git a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h index 59ef8fd4376..963c8da55be 100644 --- a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h +++ b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h @@ -15,16 +15,15 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_CLIENT_CHAOTIC_GOOD_CONNECTOR_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_CLIENT_CHAOTIC_GOOD_CONNECTOR_H +#include +#include + #include #include #include #include "absl/random/random.h" #include "absl/status/statusor.h" - -#include -#include - #include "src/core/client_channel/connector.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" diff --git a/src/core/ext/transport/chaotic_good/client_transport.cc b/src/core/ext/transport/chaotic_good/client_transport.cc index 29a39c1fbac..3d585191bca 100644 --- a/src/core/ext/transport/chaotic_good/client_transport.cc +++ b/src/core/ext/transport/chaotic_good/client_transport.cc @@ -14,6 +14,10 @@ #include "src/core/ext/transport/chaotic_good/client_transport.h" +#include +#include +#include + #include #include #include @@ -27,11 +31,6 @@ #include "absl/random/random.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include -#include - #include "src/core/ext/transport/chaotic_good/chaotic_good_transport.h" #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/ext/transport/chaotic_good/frame_header.h" diff --git a/src/core/ext/transport/chaotic_good/client_transport.h b/src/core/ext/transport/chaotic_good/client_transport.h index f223c551002..997f03d6120 100644 --- a/src/core/ext/transport/chaotic_good/client_transport.h +++ b/src/core/ext/transport/chaotic_good/client_transport.h @@ -15,6 +15,10 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_CLIENT_TRANSPORT_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_CLIENT_TRANSPORT_H +#include +#include +#include +#include #include #include @@ -32,12 +36,6 @@ #include "absl/status/status.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include -#include - #include "src/core/ext/transport/chaotic_good/chaotic_good_transport.h" #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/ext/transport/chaotic_good/frame_header.h" diff --git a/src/core/ext/transport/chaotic_good/frame.cc b/src/core/ext/transport/chaotic_good/frame.cc index dccdf7f0dc5..5fbb51d070b 100644 --- a/src/core/ext/transport/chaotic_good/frame.cc +++ b/src/core/ext/transport/chaotic_good/frame.cc @@ -14,6 +14,8 @@ #include "src/core/ext/transport/chaotic_good/frame.h" +#include +#include #include #include @@ -23,10 +25,6 @@ #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include - #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/arena.h" diff --git a/src/core/ext/transport/chaotic_good/frame.h b/src/core/ext/transport/chaotic_good/frame.h index a328c3c80ce..d29545e87c8 100644 --- a/src/core/ext/transport/chaotic_good/frame.h +++ b/src/core/ext/transport/chaotic_good/frame.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_FRAME_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_FRAME_H +#include + #include #include #include @@ -22,9 +24,6 @@ #include "absl/random/bit_gen_ref.h" #include "absl/status/status.h" #include "absl/types/variant.h" - -#include - #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" diff --git a/src/core/ext/transport/chaotic_good/frame_header.cc b/src/core/ext/transport/chaotic_good/frame_header.cc index 903e4646419..7cc9a0d7b91 100644 --- a/src/core/ext/transport/chaotic_good/frame_header.cc +++ b/src/core/ext/transport/chaotic_good/frame_header.cc @@ -14,13 +14,13 @@ #include "src/core/ext/transport/chaotic_good/frame_header.h" +#include + #include #include "absl/status/status.h" #include "absl/strings/str_cat.h" -#include - namespace grpc_core { namespace chaotic_good { diff --git a/src/core/ext/transport/chaotic_good/frame_header.h b/src/core/ext/transport/chaotic_good/frame_header.h index 91a83eed4a8..202e8387441 100644 --- a/src/core/ext/transport/chaotic_good/frame_header.h +++ b/src/core/ext/transport/chaotic_good/frame_header.h @@ -15,14 +15,12 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_FRAME_HEADER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_FRAME_HEADER_H +#include #include #include #include "absl/status/statusor.h" - -#include - #include "src/core/util/bitset.h" namespace grpc_core { diff --git a/src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc b/src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc index f5c8dc2d685..749a27155bd 100644 --- a/src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc +++ b/src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc @@ -14,6 +14,11 @@ #include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h" +#include +#include +#include +#include + #include #include #include @@ -26,12 +31,6 @@ #include "absl/random/bit_gen_ref.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include - #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chaotic_good/server_transport.h" diff --git a/src/core/ext/transport/chaotic_good/server/chaotic_good_server.h b/src/core/ext/transport/chaotic_good/server/chaotic_good_server.h index 167da14458d..8b555264aab 100644 --- a/src/core/ext/transport/chaotic_good/server/chaotic_good_server.h +++ b/src/core/ext/transport/chaotic_good/server/chaotic_good_server.h @@ -15,6 +15,9 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_SERVER_CHAOTIC_GOOD_SERVER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_SERVER_CHAOTIC_GOOD_SERVER_H +#include +#include + #include #include #include @@ -25,10 +28,6 @@ #include "absl/random/random.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" diff --git a/src/core/ext/transport/chaotic_good/server_transport.cc b/src/core/ext/transport/chaotic_good/server_transport.cc index 492dee5c843..b166d79380f 100644 --- a/src/core/ext/transport/chaotic_good/server_transport.cc +++ b/src/core/ext/transport/chaotic_good/server_transport.cc @@ -14,6 +14,11 @@ #include "src/core/ext/transport/chaotic_good/server_transport.h" +#include +#include +#include +#include + #include #include #include @@ -24,12 +29,6 @@ #include "absl/random/random.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include - #include "src/core/ext/transport/chaotic_good/chaotic_good_transport.h" #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/ext/transport/chaotic_good/frame_header.h" diff --git a/src/core/ext/transport/chaotic_good/server_transport.h b/src/core/ext/transport/chaotic_good/server_transport.h index d8244ab32fe..49fd5ae015f 100644 --- a/src/core/ext/transport/chaotic_good/server_transport.h +++ b/src/core/ext/transport/chaotic_good/server_transport.h @@ -15,6 +15,11 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_SERVER_TRANSPORT_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_SERVER_TRANSPORT_H +#include +#include +#include +#include +#include #include #include @@ -37,13 +42,6 @@ #include "absl/status/statusor.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chaotic_good/chaotic_good_transport.h" #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/ext/transport/chaotic_good/frame_header.h" diff --git a/src/core/ext/transport/chaotic_good/settings_metadata.cc b/src/core/ext/transport/chaotic_good/settings_metadata.cc index 3d952be719a..a3b8c5642d3 100644 --- a/src/core/ext/transport/chaotic_good/settings_metadata.cc +++ b/src/core/ext/transport/chaotic_good/settings_metadata.cc @@ -14,10 +14,9 @@ #include "src/core/ext/transport/chaotic_good/settings_metadata.h" -#include "absl/status/status.h" - #include +#include "absl/status/status.h" #include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/ext/transport/chaotic_good/settings_metadata.h b/src/core/ext/transport/chaotic_good/settings_metadata.h index fab73696446..81b5fca4f21 100644 --- a/src/core/ext/transport/chaotic_good/settings_metadata.h +++ b/src/core/ext/transport/chaotic_good/settings_metadata.h @@ -15,10 +15,9 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_SETTINGS_METADATA_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_SETTINGS_METADATA_H -#include "absl/types/optional.h" - #include +#include "absl/types/optional.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/ext/transport/chttp2/alpn/alpn.cc b/src/core/ext/transport/chttp2/alpn/alpn.cc index 75f17402335..cd6119f4782 100644 --- a/src/core/ext/transport/chttp2/alpn/alpn.cc +++ b/src/core/ext/transport/chttp2/alpn/alpn.cc @@ -18,10 +18,9 @@ #include "src/core/ext/transport/chttp2/alpn/alpn.h" -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "src/core/util/useful.h" // in order of preference diff --git a/src/core/ext/transport/chttp2/alpn/alpn.h b/src/core/ext/transport/chttp2/alpn/alpn.h index 9c381f8b3b2..09135e90ae2 100644 --- a/src/core/ext/transport/chttp2/alpn/alpn.h +++ b/src/core/ext/transport/chttp2/alpn/alpn.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_ALPN_ALPN_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_ALPN_ALPN_H -#include - #include +#include // Returns 1 if the version is supported, 0 otherwise. int grpc_chttp2_is_alpn_version_supported(const char* version, size_t size); diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.cc b/src/core/ext/transport/chttp2/client/chttp2_connector.cc index 2f6e070ae6a..0223539a450 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.cc +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.cc @@ -18,6 +18,14 @@ #include "src/core/ext/transport/chttp2/client/chttp2_connector.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -29,16 +37,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/client_channel/client_channel_factory.h" #include "src/core/client_channel/client_channel_filter.h" diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.h b/src/core/ext/transport/chttp2/client/chttp2_connector.h index 4c7eaa614da..800e08a8ec1 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.h +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.h @@ -19,12 +19,11 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H -#include "absl/base/thread_annotations.h" -#include "absl/types/optional.h" - #include #include +#include "absl/base/thread_annotations.h" +#include "absl/types/optional.h" #include "src/core/client_channel/connector.h" #include "src/core/handshaker/handshaker.h" #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index ac0562c4117..0486f7e3bf5 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -18,6 +18,14 @@ #include "src/core/ext/transport/chttp2/server/chttp2_server.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -38,16 +46,6 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h index 25d38236aed..0ecbf39e745 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.h +++ b/src/core/ext/transport/chttp2/server/chttp2_server.h @@ -19,11 +19,11 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H -#include - #include #include +#include + #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/server/server.h" diff --git a/src/core/ext/transport/chttp2/transport/.clang-format b/src/core/ext/transport/chttp2/transport/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/core/ext/transport/chttp2/transport/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.cc b/src/core/ext/transport/chttp2/transport/bin_decoder.cc index 8d00da86e59..d996de7315e 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.cc +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.cc @@ -18,13 +18,12 @@ #include "src/core/ext/transport/chttp2/transport/bin_decoder.h" -#include "absl/base/attributes.h" -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include +#include "absl/base/attributes.h" +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/slice/slice.h" static uint8_t decode_table[] = { diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index fc87450d365..4af97f54907 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H -#include -#include - #include #include +#include +#include struct grpc_base64_decode_context { // input/output: diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.cc b/src/core/ext/transport/chttp2/transport/bin_encoder.cc index 4063d1d5491..8a6b3670ce1 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.cc +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.cc @@ -18,13 +18,11 @@ #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include #include #include #include "absl/log/check.h" - -#include - #include "src/core/ext/transport/chttp2/transport/huffsyms.h" static const char alphabet[] = diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h index fbada017abc..5e561036f8f 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H -#include - #include #include +#include // base64 encode a slice. Returns a new slice, does not take ownership of the // input diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 4087efcf6dd..61c560e0d21 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -16,6 +16,15 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -45,17 +54,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/context_list_entry.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h index c832da4ed9e..011eeae1a0c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.h +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h @@ -19,14 +19,13 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H +#include +#include + #include #include #include "absl/types/optional.h" - -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/ext/transport/chttp2/transport/context_list_entry.h b/src/core/ext/transport/chttp2/transport/context_list_entry.h index 8d64b321aef..583e8ed522f 100644 --- a/src/core/ext/transport/chttp2/transport/context_list_entry.h +++ b/src/core/ext/transport/chttp2/transport/context_list_entry.h @@ -19,6 +19,7 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_ENTRY_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_ENTRY_H +#include #include #include @@ -26,8 +27,6 @@ #include #include -#include - #include "src/core/telemetry/tcp_tracer.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/decode_huff.h b/src/core/ext/transport/chttp2/transport/decode_huff.h index 2562f9d0d97..21f087585c0 100644 --- a/src/core/ext/transport/chttp2/transport/decode_huff.h +++ b/src/core/ext/transport/chttp2/transport/decode_huff.h @@ -17,10 +17,10 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_DECODE_HUFF_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_DECODE_HUFF_H +#include + #include #include - -#include namespace grpc_core { class HuffDecoderCommon { protected: diff --git a/src/core/ext/transport/chttp2/transport/flow_control.cc b/src/core/ext/transport/chttp2/transport/flow_control.cc index c80fdd83073..b65ab0e12a5 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.cc +++ b/src/core/ext/transport/chttp2/transport/flow_control.cc @@ -18,6 +18,7 @@ #include "src/core/ext/transport/chttp2/transport/flow_control.h" +#include #include #include @@ -32,9 +33,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - -#include - #include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/resource_quota/memory_quota.h" diff --git a/src/core/ext/transport/chttp2/transport/flow_control.h b/src/core/ext/transport/chttp2/transport/flow_control.h index d3f1202a217..c7050b99daf 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.h +++ b/src/core/ext/transport/chttp2/transport/flow_control.h @@ -19,6 +19,7 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FLOW_CONTROL_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FLOW_CONTROL_H +#include #include #include @@ -31,9 +32,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/resource_quota/memory_quota.h" diff --git a/src/core/ext/transport/chttp2/transport/frame.cc b/src/core/ext/transport/chttp2/transport/frame.cc index 65bb1660248..cd9093f94a9 100644 --- a/src/core/ext/transport/chttp2/transport/frame.cc +++ b/src/core/ext/transport/chttp2/transport/frame.cc @@ -14,6 +14,7 @@ #include "src/core/ext/transport/chttp2/transport/frame.h" +#include #include #include @@ -22,9 +23,6 @@ #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h index ac6b9e771dd..ccefc083f92 100644 --- a/src/core/ext/transport/chttp2/transport/frame.h +++ b/src/core/ext/transport/chttp2/transport/frame.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H +#include + #include #include #include @@ -23,9 +25,6 @@ #include "absl/strings/string_view.h" #include "absl/types/span.h" #include "absl/types/variant.h" - -#include - #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_data.cc b/src/core/ext/transport/chttp2/transport/frame_data.cc index b5bd13d2fc0..d03e47fa71d 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.cc +++ b/src/core/ext/transport/chttp2/transport/frame_data.cc @@ -18,15 +18,13 @@ #include "src/core/ext/transport/chttp2/transport/frame_data.h" +#include +#include #include #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/experiments/experiments.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h index eae1f439c3d..e107b740f89 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.h +++ b/src/core/ext/transport/chttp2/transport/frame_data.h @@ -21,13 +21,11 @@ // Parser for GRPC streams embedded in DATA frames -#include - -#include "absl/status/status.h" - #include #include +#include +#include "absl/status/status.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.cc b/src/core/ext/transport/chttp2/transport/frame_goaway.cc index 31e7c76ba39..36873e862e3 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.cc +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.cc @@ -18,6 +18,9 @@ #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" +#include +#include +#include #include #include "absl/base/attributes.h" @@ -25,11 +28,6 @@ #include "absl/status/status.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/ext/transport/chttp2/transport/internal.h" void grpc_chttp2_goaway_parser_init(grpc_chttp2_goaway_parser* p) { diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index 40f132721e7..a455f06c24f 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H -#include - #include #include +#include #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.cc b/src/core/ext/transport/chttp2/transport/frame_ping.cc index 7b7b080e320..2db29ee7ef6 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.cc +++ b/src/core/ext/transport/chttp2/transport/frame_ping.cc @@ -18,6 +18,8 @@ #include "src/core/ext/transport/chttp2/transport/frame_ping.h" +#include +#include #include #include @@ -28,10 +30,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/ping_abuse_policy.h" #include "src/core/ext/transport/chttp2/transport/ping_callbacks.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h index 6f4cd55ff41..a785a9dfa35 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.h +++ b/src/core/ext/transport/chttp2/transport/frame_ping.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H -#include - #include #include +#include #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc index 0e38b36c05c..0378d6773c0 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc @@ -18,6 +18,8 @@ #include "src/core/ext/transport/chttp2/transport/frame_rst_stream.h" +#include +#include #include #include "absl/log/check.h" @@ -26,10 +28,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index 0e8e74b62a2..d55ab2831d0 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H -#include - #include #include +#include #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.cc b/src/core/ext/transport/chttp2/transport/frame_settings.cc index 817097a57b2..84dafd73827 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.cc +++ b/src/core/ext/transport/chttp2/transport/frame_settings.cc @@ -18,6 +18,8 @@ #include "src/core/ext/transport/chttp2/transport/frame_settings.h" +#include +#include #include #include @@ -26,10 +28,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" #include "src/core/ext/transport/chttp2/transport/http2_settings.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index 011862f5888..b5480b64029 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H -#include -#include - #include #include +#include +#include #include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.cc b/src/core/ext/transport/chttp2/transport/frame_window_update.cc index 5209ab2899a..47db0a03941 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.cc +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.cc @@ -18,15 +18,13 @@ #include "src/core/ext/transport/chttp2/transport/frame_window_update.h" +#include #include #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index 53c5f41d3db..c1c8f6e8251 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H -#include - #include #include +#include #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_constants.h b/src/core/ext/transport/chttp2/transport/hpack_constants.h index 739c57ba3e3..d709e0ba278 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_constants.h +++ b/src/core/ext/transport/chttp2/transport/hpack_constants.h @@ -15,11 +15,11 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_CONSTANTS_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_CONSTANTS_H +#include + #include #include -#include - namespace grpc_core { namespace hpack_constants { // Per entry overhead bytes as per the spec diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc index 5c573a0beb6..1ae3db3d609 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc @@ -18,16 +18,15 @@ #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" +#include +#include +#include + #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder_table.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index 1dab0871ff2..4695089b01a 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H +#include +#include #include #include @@ -29,10 +31,6 @@ #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder_table.h" #include "src/core/lib/slice/slice.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc b/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc index 143781dca32..2947587c7a6 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc @@ -14,12 +14,12 @@ #include "src/core/ext/transport/chttp2/transport/hpack_encoder_table.h" +#include + #include #include "absl/log/check.h" -#include - namespace grpc_core { uint32_t HPackEncoderTable::AllocateIndex(size_t element_size) { diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h b/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h index 1bde664d0fd..f68e2995b2b 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_TABLE_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_TABLE_H +#include #include #include #include #include -#include - #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc b/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc index aa4b69623ad..ffead9117a9 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc @@ -14,13 +14,11 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parse_result.h" +#include #include #include "absl/log/check.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_parse_result.h b/src/core/ext/transport/chttp2/transport/hpack_parse_result.h index 628b3327f5b..6aea73bc5b7 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parse_result.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSE_RESULT_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSE_RESULT_H +#include #include #include @@ -26,9 +27,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/util/crash.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc index fb2e9b301a9..82d249f2ce0 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc @@ -18,6 +18,8 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include +#include #include #include @@ -36,10 +38,6 @@ #include "absl/types/optional.h" #include "absl/types/span.h" #include "absl/types/variant.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/decode_huff.h" #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" #include "src/core/ext/transport/chttp2/transport/hpack_parse_result.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h index af2c1a9c7f0..5417c9e0213 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H +#include +#include #include #include @@ -32,10 +34,6 @@ #include "absl/types/optional.h" #include "absl/types/span.h" #include "absl/types/variant.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/hpack_parse_result.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser_table.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc b/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc index 7a0b7bd8498..b258e6ead09 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc @@ -18,6 +18,7 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser_table.h" +#include #include #include @@ -30,9 +31,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" #include "src/core/ext/transport/chttp2/transport/hpack_parse_result.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser_table.h b/src/core/ext/transport/chttp2/transport/hpack_parser_table.h index 2d790bb2e21..1ccb0808c43 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser_table.h @@ -19,6 +19,7 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_TABLE_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_TABLE_H +#include #include #include @@ -28,9 +29,6 @@ #include #include "absl/functional/function_ref.h" - -#include - #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" #include "src/core/ext/transport/chttp2/transport/hpack_parse_result.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/ext/transport/chttp2/transport/http2_settings.cc b/src/core/ext/transport/chttp2/transport/http2_settings.cc index ac9c1553301..83bf6e5c5d8 100644 --- a/src/core/ext/transport/chttp2/transport/http2_settings.cc +++ b/src/core/ext/transport/chttp2/transport/http2_settings.cc @@ -20,10 +20,9 @@ #include "src/core/ext/transport/chttp2/transport/http2_settings.h" -#include "absl/strings/str_cat.h" - #include +#include "absl/strings/str_cat.h" #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/transport/http2_errors.h" #include "src/core/util/useful.h" diff --git a/src/core/ext/transport/chttp2/transport/http2_settings.h b/src/core/ext/transport/chttp2/transport/http2_settings.h index b5debf96c7e..44ed672d123 100644 --- a/src/core/ext/transport/chttp2/transport/http2_settings.h +++ b/src/core/ext/transport/chttp2/transport/http2_settings.h @@ -17,6 +17,7 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H +#include #include #include @@ -24,9 +25,6 @@ #include "absl/functional/function_ref.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/transport/http2_errors.h" #include "src/core/util/useful.h" diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 76deea4f043..afe319b81a2 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -19,6 +19,12 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H +#include +#include +#include +#include +#include +#include #include #include @@ -32,14 +38,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/context_list_entry.h" diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc index e9d746d8e24..7fa290db466 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.cc +++ b/src/core/ext/transport/chttp2/transport/parsing.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include +#include #include #include @@ -36,12 +40,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "absl/types/variant.h" - -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" diff --git a/src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc b/src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc index d1f371537f7..e2652964058 100644 --- a/src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc +++ b/src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc @@ -14,14 +14,14 @@ #include "src/core/ext/transport/chttp2/transport/ping_abuse_policy.h" +#include +#include + #include #include "absl/strings/str_cat.h" #include "absl/types/optional.h" -#include -#include - namespace grpc_core { namespace { diff --git a/src/core/ext/transport/chttp2/transport/ping_abuse_policy.h b/src/core/ext/transport/chttp2/transport/ping_abuse_policy.h index bff04089822..22e6b03b778 100644 --- a/src/core/ext/transport/chttp2/transport/ping_abuse_policy.h +++ b/src/core/ext/transport/chttp2/transport/ping_abuse_policy.h @@ -15,10 +15,10 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_ABUSE_POLICY_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_ABUSE_POLICY_H -#include - #include +#include + #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" diff --git a/src/core/ext/transport/chttp2/transport/ping_callbacks.cc b/src/core/ext/transport/chttp2/transport/ping_callbacks.cc index 4bd16e1fbb4..ff473e59630 100644 --- a/src/core/ext/transport/chttp2/transport/ping_callbacks.cc +++ b/src/core/ext/transport/chttp2/transport/ping_callbacks.cc @@ -14,14 +14,14 @@ #include "src/core/ext/transport/chttp2/transport/ping_callbacks.h" +#include + #include #include "absl/log/check.h" #include "absl/meta/type_traits.h" #include "absl/random/distributions.h" -#include - namespace grpc_core { void Chttp2PingCallbacks::OnPing(Callback on_start, Callback on_ack) { diff --git a/src/core/ext/transport/chttp2/transport/ping_callbacks.h b/src/core/ext/transport/chttp2/transport/ping_callbacks.h index 1e558eda836..deae3da479f 100644 --- a/src/core/ext/transport/chttp2/transport/ping_callbacks.h +++ b/src/core/ext/transport/chttp2/transport/ping_callbacks.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_CALLBACKS_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_CALLBACKS_H +#include +#include #include #include @@ -26,10 +28,6 @@ #include "absl/hash/hash.h" #include "absl/random/bit_gen_ref.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/util/time.h" diff --git a/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc b/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc index 6f329735306..b895e518202 100644 --- a/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +++ b/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc @@ -14,15 +14,14 @@ #include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h" +#include +#include + #include #include #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/experiments/experiments.h" #include "src/core/util/match.h" diff --git a/src/core/ext/transport/chttp2/transport/ping_rate_policy.h b/src/core/ext/transport/chttp2/transport/ping_rate_policy.h index df16b3813bc..b49d5323a43 100644 --- a/src/core/ext/transport/chttp2/transport/ping_rate_policy.h +++ b/src/core/ext/transport/chttp2/transport/ping_rate_policy.h @@ -15,15 +15,13 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_RATE_POLICY_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_RATE_POLICY_H +#include #include #include #include #include "absl/types/variant.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.cc b/src/core/ext/transport/chttp2/transport/stream_lists.cc index 14039a614b7..2bf7daa04f7 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.cc +++ b/src/core/ext/transport/chttp2/transport/stream_lists.cc @@ -18,11 +18,10 @@ #include "src/core/ext/transport/chttp2/transport/stream_lists.h" -#include "absl/log/check.h" -#include "absl/log/log.h" - #include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/ext/transport/chttp2/transport/varint.cc b/src/core/ext/transport/chttp2/transport/varint.cc index 7af77e772be..1db7d67c06f 100644 --- a/src/core/ext/transport/chttp2/transport/varint.cc +++ b/src/core/ext/transport/chttp2/transport/varint.cc @@ -18,10 +18,10 @@ #include "src/core/ext/transport/chttp2/transport/varint.h" -#include "absl/base/attributes.h" - #include +#include "absl/base/attributes.h" + namespace grpc_core { size_t VarintLength(size_t tail_value) { diff --git a/src/core/ext/transport/chttp2/transport/varint.h b/src/core/ext/transport/chttp2/transport/varint.h index 3dcf32aa609..e84f1b6ee21 100644 --- a/src/core/ext/transport/chttp2/transport/varint.h +++ b/src/core/ext/transport/chttp2/transport/varint.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_VARINT_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_VARINT_H +#include #include #include #include "absl/log/check.h" -#include - // Helpers for hpack varint encoding namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/write_size_policy.cc b/src/core/ext/transport/chttp2/transport/write_size_policy.cc index 63e8d2b7e25..b843205de70 100644 --- a/src/core/ext/transport/chttp2/transport/write_size_policy.cc +++ b/src/core/ext/transport/chttp2/transport/write_size_policy.cc @@ -14,12 +14,12 @@ #include "src/core/ext/transport/chttp2/transport/write_size_policy.h" +#include + #include #include "absl/log/check.h" -#include - namespace grpc_core { size_t Chttp2WriteSizePolicy::WriteTargetSize() { return current_target_; } diff --git a/src/core/ext/transport/chttp2/transport/write_size_policy.h b/src/core/ext/transport/chttp2/transport/write_size_policy.h index fdeeda0763a..6f0098e69b1 100644 --- a/src/core/ext/transport/chttp2/transport/write_size_policy.h +++ b/src/core/ext/transport/chttp2/transport/write_size_policy.h @@ -15,11 +15,10 @@ #ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_WRITE_SIZE_POLICY_H #define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_WRITE_SIZE_POLICY_H +#include #include #include -#include - #include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc index 583d9eaa03d..8aa306ab680 100644 --- a/src/core/ext/transport/chttp2/transport/writing.cc +++ b/src/core/ext/transport/chttp2/transport/writing.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include +#include #include #include @@ -30,12 +34,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc index a7c59b26d94..538c6aa2ee0 100644 --- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc +++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc @@ -18,12 +18,11 @@ #include "src/core/ext/transport/cronet/client/secure/cronet_channel_create.h" -#include "absl/log/log.h" -#include "absl/status/statusor.h" - #include #include +#include "absl/log/log.h" +#include "absl/status/statusor.h" #include "src/core/ext/transport/cronet/transport/cronet_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" diff --git a/src/core/ext/transport/cronet/transport/cronet_api_phony.cc b/src/core/ext/transport/cronet/transport/cronet_api_phony.cc index f0befc2faa1..25b80945e5b 100644 --- a/src/core/ext/transport/cronet/transport/cronet_api_phony.cc +++ b/src/core/ext/transport/cronet/transport/cronet_api_phony.cc @@ -19,11 +19,11 @@ // This file has empty implementation of all the functions exposed by the cronet // library, so we can build it in all environments +#include + #include "absl/log/check.h" #include "third_party/objective_c/Cronet/bidirectional_stream_c.h" -#include - #ifdef GRPC_COMPILE_WITH_CRONET // link with the real CRONET library in the build system #else diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index 4d47895f9bb..1e1ad321bb8 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -18,6 +18,12 @@ #include "src/core/ext/transport/cronet/transport/cronet_transport.h" +#include +#include +#include +#include +#include +#include #include #include #include @@ -34,15 +40,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "third_party/objective_c/Cronet/bidirectional_stream_c.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chttp2/transport/bin_decoder.h" #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/ext/transport/cronet/transport/cronet_status.h" @@ -61,6 +58,7 @@ #include "src/core/util/crash.h" #include "src/core/util/debug_location.h" #include "src/core/util/status_helper.h" +#include "third_party/objective_c/Cronet/bidirectional_stream_c.h" // IWYU pragma: no_include diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index a656d8b7fde..16846ac1960 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -14,16 +14,15 @@ #include "src/core/ext/transport/inproc/inproc_transport.h" +#include +#include + #include #include #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/status.h" - -#include -#include - #include "src/core/ext/transport/inproc/legacy_inproc_transport.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/event_engine_context.h" diff --git a/src/core/ext/transport/inproc/legacy_inproc_transport.cc b/src/core/ext/transport/inproc/legacy_inproc_transport.cc index b93fc97a160..fd7fc3f99b6 100644 --- a/src/core/ext/transport/inproc/legacy_inproc_transport.cc +++ b/src/core/ext/transport/inproc/legacy_inproc_transport.cc @@ -18,6 +18,13 @@ #include "src/core/ext/transport/inproc/legacy_inproc_transport.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,15 +41,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" diff --git a/src/core/filter/blackboard.h b/src/core/filter/blackboard.h index 972758162f0..19f08be382b 100644 --- a/src/core/filter/blackboard.h +++ b/src/core/filter/blackboard.h @@ -22,7 +22,6 @@ #include "absl/container/flat_hash_map.h" #include "absl/strings/string_view.h" - #include "src/core/resolver/endpoint_addresses.h" #include "src/core/util/debug_location.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc b/src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc index 151f4e8c9d4..b6037bfe7cb 100644 --- a/src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc +++ b/src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc @@ -16,14 +16,13 @@ #include "src/core/handshaker/endpoint_info/endpoint_info_handshaker.h" +#include + #include #include #include "absl/functional/any_invocable.h" #include "absl/status/status.h" - -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/handshaker_factory.h" #include "src/core/handshaker/handshaker_registry.h" diff --git a/src/core/handshaker/handshaker.cc b/src/core/handshaker/handshaker.cc index b476e550f75..241d656da80 100644 --- a/src/core/handshaker/handshaker.cc +++ b/src/core/handshaker/handshaker.cc @@ -18,6 +18,11 @@ #include "src/core/handshaker/handshaker.h" +#include +#include +#include +#include +#include #include #include @@ -29,13 +34,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/endpoint.h" diff --git a/src/core/handshaker/handshaker.h b/src/core/handshaker/handshaker.h index 12ea2b4b8bf..251ec6bf7cc 100644 --- a/src/core/handshaker/handshaker.h +++ b/src/core/handshaker/handshaker.h @@ -19,17 +19,15 @@ #ifndef GRPC_SRC_CORE_HANDSHAKER_HANDSHAKER_H #define GRPC_SRC_CORE_HANDSHAKER_HANDSHAKER_H +#include +#include +#include #include #include #include "absl/base/thread_annotations.h" #include "absl/container/inlined_vector.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" diff --git a/src/core/handshaker/handshaker_registry.cc b/src/core/handshaker/handshaker_registry.cc index 750fdabfdc0..e4e2380b46f 100644 --- a/src/core/handshaker/handshaker_registry.cc +++ b/src/core/handshaker/handshaker_registry.cc @@ -18,13 +18,12 @@ #include "src/core/handshaker/handshaker_registry.h" +#include #include #include #include -#include - namespace grpc_core { void HandshakerRegistry::Builder::RegisterHandshakerFactory( diff --git a/src/core/handshaker/handshaker_registry.h b/src/core/handshaker/handshaker_registry.h index 1357686c6fb..b9ccba03fd8 100644 --- a/src/core/handshaker/handshaker_registry.h +++ b/src/core/handshaker/handshaker_registry.h @@ -19,11 +19,11 @@ #ifndef GRPC_SRC_CORE_HANDSHAKER_HANDSHAKER_REGISTRY_H #define GRPC_SRC_CORE_HANDSHAKER_HANDSHAKER_REGISTRY_H +#include + #include #include -#include - #include "src/core/handshaker/handshaker_factory.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/iomgr_fwd.h" diff --git a/src/core/handshaker/http_connect/http_connect_handshaker.cc b/src/core/handshaker/http_connect/http_connect_handshaker.cc index 3ec778ed4b1..68ca9ab73c7 100644 --- a/src/core/handshaker/http_connect/http_connect_handshaker.cc +++ b/src/core/handshaker/http_connect/http_connect_handshaker.cc @@ -18,6 +18,10 @@ #include "src/core/handshaker/http_connect/http_connect_handshaker.h" +#include +#include +#include +#include #include #include @@ -31,12 +35,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/handshaker_factory.h" #include "src/core/handshaker/handshaker_registry.h" diff --git a/src/core/handshaker/http_connect/http_proxy_mapper.cc b/src/core/handshaker/http_connect/http_proxy_mapper.cc index f22e6d67423..4bd1e16ee50 100644 --- a/src/core/handshaker/http_connect/http_proxy_mapper.cc +++ b/src/core/handshaker/http_connect/http_proxy_mapper.cc @@ -18,6 +18,9 @@ #include "src/core/handshaker/http_connect/http_proxy_mapper.h" +#include +#include +#include #include #include @@ -38,11 +41,6 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/handshaker/http_connect/http_connect_handshaker.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" diff --git a/src/core/handshaker/http_connect/http_proxy_mapper.h b/src/core/handshaker/http_connect/http_proxy_mapper.h index 2a283833bd4..50fb2919c96 100644 --- a/src/core/handshaker/http_connect/http_proxy_mapper.h +++ b/src/core/handshaker/http_connect/http_proxy_mapper.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_HANDSHAKER_HTTP_CONNECT_HTTP_PROXY_MAPPER_H #define GRPC_SRC_CORE_HANDSHAKER_HTTP_CONNECT_HTTP_PROXY_MAPPER_H +#include + #include #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/handshaker/proxy_mapper.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/handshaker/proxy_mapper.h b/src/core/handshaker/proxy_mapper.h index 8ba3f740394..6ffe9467670 100644 --- a/src/core/handshaker/proxy_mapper.h +++ b/src/core/handshaker/proxy_mapper.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_HANDSHAKER_PROXY_MAPPER_H #define GRPC_SRC_CORE_HANDSHAKER_PROXY_MAPPER_H +#include + #include #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolved_address.h" diff --git a/src/core/handshaker/proxy_mapper_registry.cc b/src/core/handshaker/proxy_mapper_registry.cc index f13e07cc334..c02cac376c6 100644 --- a/src/core/handshaker/proxy_mapper_registry.cc +++ b/src/core/handshaker/proxy_mapper_registry.cc @@ -18,6 +18,8 @@ #include "src/core/handshaker/proxy_mapper_registry.h" +#include + #include #include #include @@ -25,8 +27,6 @@ #include "absl/types/optional.h" -#include - namespace grpc_core { void ProxyMapperRegistry::Builder::Register( diff --git a/src/core/handshaker/proxy_mapper_registry.h b/src/core/handshaker/proxy_mapper_registry.h index fbc09f6152d..3c604ef9e0c 100644 --- a/src/core/handshaker/proxy_mapper_registry.h +++ b/src/core/handshaker/proxy_mapper_registry.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CORE_HANDSHAKER_PROXY_MAPPER_REGISTRY_H #define GRPC_SRC_CORE_HANDSHAKER_PROXY_MAPPER_REGISTRY_H +#include + #include #include #include @@ -26,9 +28,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/handshaker/proxy_mapper.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolved_address.h" diff --git a/src/core/handshaker/security/secure_endpoint.cc b/src/core/handshaker/security/secure_endpoint.cc index c57b56b4d26..02c39865a3f 100644 --- a/src/core/handshaker/security/secure_endpoint.cc +++ b/src/core/handshaker/security/secure_endpoint.cc @@ -18,6 +18,14 @@ #include "src/core/handshaker/security/secure_endpoint.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -31,16 +39,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" diff --git a/src/core/handshaker/security/secure_endpoint.h b/src/core/handshaker/security/secure_endpoint.h index 0d81fec090b..cb036d25766 100644 --- a/src/core/handshaker/security/secure_endpoint.h +++ b/src/core/handshaker/security/secure_endpoint.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_HANDSHAKER_SECURITY_SECURE_ENDPOINT_H #define GRPC_SRC_CORE_HANDSHAKER_SECURITY_SECURE_ENDPOINT_H -#include - #include #include #include +#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/endpoint.h" diff --git a/src/core/handshaker/security/security_handshaker.cc b/src/core/handshaker/security/security_handshaker.cc index 82756fc8723..1e1102846df 100644 --- a/src/core/handshaker/security/security_handshaker.cc +++ b/src/core/handshaker/security/security_handshaker.cc @@ -18,6 +18,13 @@ #include "src/core/handshaker/security/security_handshaker.h" +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -34,15 +41,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/handshaker_factory.h" diff --git a/src/core/handshaker/security/security_handshaker.h b/src/core/handshaker/security/security_handshaker.h index 3e6096d6c47..23c10b94fac 100644 --- a/src/core/handshaker/security/security_handshaker.h +++ b/src/core/handshaker/security/security_handshaker.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_HANDSHAKER_SECURITY_SECURITY_HANDSHAKER_H #define GRPC_SRC_CORE_HANDSHAKER_SECURITY_SECURITY_HANDSHAKER_H -#include "absl/status/statusor.h" - #include #include +#include "absl/status/statusor.h" #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc b/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc index a02ccfa8cc3..8dd1ff89d44 100644 --- a/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +++ b/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc @@ -18,6 +18,11 @@ #include "src/core/handshaker/tcp_connect/tcp_connect_handshaker.h" +#include +#include +#include +#include + #include #include @@ -27,12 +32,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/handshaker_factory.h" #include "src/core/handshaker/handshaker_registry.h" diff --git a/src/core/lib/address_utils/parse_address.cc b/src/core/lib/address_utils/parse_address.cc index ce75321ce31..8a3c270a3d1 100644 --- a/src/core/lib/address_utils/parse_address.cc +++ b/src/core/lib/address_utils/parse_address.cc @@ -46,7 +46,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/strip.h" - #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" #include "src/core/util/grpc_if_nametoindex.h" diff --git a/src/core/lib/address_utils/parse_address.h b/src/core/lib/address_utils/parse_address.h index c11789885ab..840d0c260bc 100644 --- a/src/core/lib/address_utils/parse_address.h +++ b/src/core/lib/address_utils/parse_address.h @@ -19,13 +19,11 @@ #ifndef GRPC_SRC_CORE_LIB_ADDRESS_UTILS_PARSE_ADDRESS_H #define GRPC_SRC_CORE_LIB_ADDRESS_UTILS_PARSE_ADDRESS_H +#include #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/util/uri.h" diff --git a/src/core/lib/address_utils/sockaddr_utils.cc b/src/core/lib/address_utils/sockaddr_utils.cc index 41564ba5242..b52491637c0 100644 --- a/src/core/lib/address_utils/sockaddr_utils.cc +++ b/src/core/lib/address_utils/sockaddr_utils.cc @@ -19,11 +19,10 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include +#include #include #include "absl/log/check.h" - -#include #ifdef GRPC_HAVE_VSOCK #include #endif @@ -36,7 +35,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" diff --git a/src/core/lib/address_utils/sockaddr_utils.h b/src/core/lib/address_utils/sockaddr_utils.h index 9837afd930b..c76aa64908a 100644 --- a/src/core/lib/address_utils/sockaddr_utils.h +++ b/src/core/lib/address_utils/sockaddr_utils.h @@ -19,14 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_ADDRESS_UTILS_SOCKADDR_UTILS_H #define GRPC_SRC_CORE_LIB_ADDRESS_UTILS_SOCKADDR_UTILS_H +#include #include #include #include "absl/status/statusor.h" - -#include - #include "src/core/lib/iomgr/resolved_address.h" // Returns true if addr is an IPv4-mapped IPv6 address within the diff --git a/src/core/lib/channel/call_finalization.h b/src/core/lib/channel/call_finalization.h index 9e083e350a0..a3076677826 100644 --- a/src/core/lib/channel/call_finalization.h +++ b/src/core/lib/channel/call_finalization.h @@ -15,10 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_CHANNEL_CALL_FINALIZATION_H #define GRPC_SRC_CORE_LIB_CHANNEL_CALL_FINALIZATION_H -#include - #include +#include + #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/transport/call_final_info.h" diff --git a/src/core/lib/channel/channel_args.cc b/src/core/lib/channel/channel_args.cc index 1c66f414350..72802910ea0 100644 --- a/src/core/lib/channel/channel_args.cc +++ b/src/core/lib/channel/channel_args.cc @@ -18,6 +18,10 @@ #include "src/core/lib/channel/channel_args.h" +#include +#include +#include +#include #include #include #include @@ -34,12 +38,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - -#include -#include -#include -#include - #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 9274c453988..9a49c3dd3fd 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -19,6 +19,9 @@ #ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H #define GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H +#include +#include +#include #include #include @@ -32,11 +35,6 @@ #include "absl/meta/type_traits.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/util/avl.h" #include "src/core/util/debug_location.h" diff --git a/src/core/lib/channel/channel_args_preconditioning.cc b/src/core/lib/channel/channel_args_preconditioning.cc index 92a94535d30..bb83515839d 100644 --- a/src/core/lib/channel/channel_args_preconditioning.cc +++ b/src/core/lib/channel/channel_args_preconditioning.cc @@ -14,10 +14,10 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" -#include - #include +#include + namespace grpc_core { void ChannelArgsPreconditioning::Builder::RegisterStage(Stage stage) { diff --git a/src/core/lib/channel/channel_args_preconditioning.h b/src/core/lib/channel/channel_args_preconditioning.h index 69f64accd34..ff4b43fc54b 100644 --- a/src/core/lib/channel/channel_args_preconditioning.h +++ b/src/core/lib/channel/channel_args_preconditioning.h @@ -15,12 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_ARGS_PRECONDITIONING_H #define GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_ARGS_PRECONDITIONING_H -#include -#include - #include #include +#include +#include + #include "src/core/lib/channel/channel_args.h" namespace grpc_core { diff --git a/src/core/lib/channel/channel_stack.cc b/src/core/lib/channel/channel_stack.cc index 14e618a7fd8..0b0b0345538 100644 --- a/src/core/lib/channel/channel_stack.cc +++ b/src/core/lib/channel/channel_stack.cc @@ -18,6 +18,7 @@ #include "src/core/lib/channel/channel_stack.h" +#include #include #include @@ -25,9 +26,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/surface/channel_init.h" diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 56bcb62f900..855354970b6 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -37,17 +37,16 @@ // it can have an effect on the call status. // -#include - -#include -#include - #include #include #include #include #include #include +#include + +#include +#include #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/lib/channel/channel_stack_builder.cc b/src/core/lib/channel/channel_stack_builder.cc index 69c4fff4fe9..307176e08e1 100644 --- a/src/core/lib/channel/channel_stack_builder.cc +++ b/src/core/lib/channel/channel_stack_builder.cc @@ -18,10 +18,10 @@ #include "src/core/lib/channel/channel_stack_builder.h" -#include - #include +#include + #include "src/core/lib/channel/channel_args.h" namespace grpc_core { diff --git a/src/core/lib/channel/channel_stack_builder.h b/src/core/lib/channel/channel_stack_builder.h index 6b3155fcbdb..b1e72116765 100644 --- a/src/core/lib/channel/channel_stack_builder.h +++ b/src/core/lib/channel/channel_stack_builder.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_H #define GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_H +#include + #include #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/surface/channel_stack_type.h" diff --git a/src/core/lib/channel/channel_stack_builder_impl.cc b/src/core/lib/channel/channel_stack_builder_impl.cc index 360cd7aa7db..2d7bfc2fc47 100644 --- a/src/core/lib/channel/channel_stack_builder_impl.cc +++ b/src/core/lib/channel/channel_stack_builder_impl.cc @@ -18,6 +18,8 @@ #include "src/core/lib/channel/channel_stack_builder_impl.h" +#include +#include #include #include @@ -31,10 +33,6 @@ #include "absl/container/flat_hash_map.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" - -#include -#include - #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/channel/channel_stack_builder_impl.h b/src/core/lib/channel/channel_stack_builder_impl.h index 78df9809c90..6de06ebba73 100644 --- a/src/core/lib/channel/channel_stack_builder_impl.h +++ b/src/core/lib/channel/channel_stack_builder_impl.h @@ -15,10 +15,9 @@ #ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_IMPL_H #define GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_IMPL_H -#include "absl/status/statusor.h" - #include +#include "absl/status/statusor.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/lib/channel/connected_channel.cc b/src/core/lib/channel/connected_channel.cc index f65f5f74f29..6f8b1bb2913 100644 --- a/src/core/lib/channel/connected_channel.cc +++ b/src/core/lib/channel/connected_channel.cc @@ -18,6 +18,10 @@ #include "src/core/lib/channel/connected_channel.h" +#include +#include +#include +#include #include #include @@ -30,12 +34,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/call_finalization.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/lib/channel/promise_based_filter.cc b/src/core/lib/channel/promise_based_filter.cc index a0fc813ad5c..4488a56b680 100644 --- a/src/core/lib/channel/promise_based_filter.cc +++ b/src/core/lib/channel/promise_based_filter.cc @@ -14,6 +14,9 @@ #include "src/core/lib/channel/promise_based_filter.h" +#include +#include + #include #include #include @@ -28,10 +31,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - -#include -#include - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/lib/channel/promise_based_filter.h b/src/core/lib/channel/promise_based_filter.h index 1a31b901052..d18809dca6b 100644 --- a/src/core/lib/channel/promise_based_filter.h +++ b/src/core/lib/channel/promise_based_filter.h @@ -19,6 +19,9 @@ // promise-style. Most of this will be removed once the promises conversion is // completed. +#include +#include +#include #include #include @@ -37,11 +40,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/filter/blackboard.h" #include "src/core/lib/channel/call_finalization.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/lib/channel/status_util.cc b/src/core/lib/channel/status_util.cc index 7c78ac5504a..2caa7da563a 100644 --- a/src/core/lib/channel/status_util.cc +++ b/src/core/lib/channel/status_util.cc @@ -18,15 +18,13 @@ #include "src/core/lib/channel/status_util.h" +#include #include #include #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" - -#include - #include "src/core/util/useful.h" struct status_string_entry { diff --git a/src/core/lib/channel/status_util.h b/src/core/lib/channel/status_util.h index cc46bd4feb0..fe6d47e4a70 100644 --- a/src/core/lib/channel/status_util.h +++ b/src/core/lib/channel/status_util.h @@ -19,14 +19,14 @@ #ifndef GRPC_SRC_CORE_LIB_CHANNEL_STATUS_UTIL_H #define GRPC_SRC_CORE_LIB_CHANNEL_STATUS_UTIL_H +#include +#include + #include #include "absl/status/status.h" #include "absl/strings/string_view.h" -#include -#include - /// If \a status_str is a valid status string, sets \a status to the /// corresponding status value and returns true. bool grpc_status_code_from_string(const char* status_str, diff --git a/src/core/lib/compression/compression.cc b/src/core/lib/compression/compression.cc index 018e92a379a..1a6e1e81dc4 100644 --- a/src/core/lib/compression/compression.cc +++ b/src/core/lib/compression/compression.cc @@ -16,16 +16,14 @@ // // -#include -#include - -#include "absl/types/optional.h" - #include #include #include #include +#include +#include +#include "absl/types/optional.h" #include "src/core/lib/compression/compression_internal.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/lib/compression/compression_internal.cc b/src/core/lib/compression/compression_internal.cc index 3bb8a7f2882..d81670a3d1d 100644 --- a/src/core/lib/compression/compression_internal.cc +++ b/src/core/lib/compression/compression_internal.cc @@ -18,6 +18,8 @@ #include "src/core/lib/compression/compression_internal.h" +#include +#include #include #include @@ -27,10 +29,6 @@ #include "absl/strings/ascii.h" #include "absl/strings/str_format.h" #include "absl/strings/str_split.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/compression/compression_internal.h b/src/core/lib/compression/compression_internal.h index 45a24faa998..6f417feaf95 100644 --- a/src/core/lib/compression/compression_internal.h +++ b/src/core/lib/compression/compression_internal.h @@ -19,16 +19,14 @@ #ifndef GRPC_SRC_CORE_LIB_COMPRESSION_COMPRESSION_INTERNAL_H #define GRPC_SRC_CORE_LIB_COMPRESSION_COMPRESSION_INTERNAL_H +#include +#include #include #include #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/slice/slice.h" #include "src/core/util/bitset.h" diff --git a/src/core/lib/compression/message_compress.cc b/src/core/lib/compression/message_compress.cc index 9fb7a7956ac..7a731495e4a 100644 --- a/src/core/lib/compression/message_compress.cc +++ b/src/core/lib/compression/message_compress.cc @@ -18,18 +18,15 @@ #include "src/core/lib/compression/message_compress.h" +#include +#include +#include #include - #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/lib/slice/slice.h" #define OUTPUT_BLOCK_SIZE 1024 diff --git a/src/core/lib/config/config_vars.cc b/src/core/lib/config/config_vars.cc index e0db62f5d09..6aa9f551d71 100644 --- a/src/core/lib/config/config_vars.cc +++ b/src/core/lib/config/config_vars.cc @@ -18,11 +18,10 @@ #include "src/core/lib/config/config_vars.h" -#include "absl/flags/flag.h" -#include "absl/strings/escaping.h" - #include +#include "absl/flags/flag.h" +#include "absl/strings/escaping.h" #include "src/core/lib/config/load_config.h" #ifndef GPR_DEFAULT_LOG_VERBOSITY_STRING diff --git a/src/core/lib/config/config_vars.h b/src/core/lib/config/config_vars.h index 32220cd1f17..b7ea541ad92 100644 --- a/src/core/lib/config/config_vars.h +++ b/src/core/lib/config/config_vars.h @@ -19,6 +19,7 @@ #ifndef GRPC_SRC_CORE_LIB_CONFIG_CONFIG_VARS_H #define GRPC_SRC_CORE_LIB_CONFIG_CONFIG_VARS_H +#include #include #include @@ -27,8 +28,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include - namespace grpc_core { class GPR_DLL ConfigVars { diff --git a/src/core/lib/config/config_vars_non_generated.cc b/src/core/lib/config/config_vars_non_generated.cc index 2f86246f2b7..78af08c1d8d 100644 --- a/src/core/lib/config/config_vars_non_generated.cc +++ b/src/core/lib/config/config_vars_non_generated.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include -#include - #include "src/core/lib/config/config_vars.h" namespace grpc_core { diff --git a/src/core/lib/config/core_configuration.cc b/src/core/lib/config/core_configuration.cc index 474ec3b56c4..3623ac53d8f 100644 --- a/src/core/lib/config/core_configuration.cc +++ b/src/core/lib/config/core_configuration.cc @@ -14,14 +14,14 @@ #include "src/core/lib/config/core_configuration.h" +#include + #include #include #include #include "absl/log/check.h" -#include - namespace grpc_core { std::atomic CoreConfiguration::config_{nullptr}; diff --git a/src/core/lib/config/core_configuration.h b/src/core/lib/config/core_configuration.h index 400278bd5ea..aa2f79c64fe 100644 --- a/src/core/lib/config/core_configuration.h +++ b/src/core/lib/config/core_configuration.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_CONFIG_CORE_CONFIGURATION_H #define GRPC_SRC_CORE_LIB_CONFIG_CORE_CONFIGURATION_H +#include + #include #include "absl/functional/any_invocable.h" #include "absl/log/check.h" - -#include - #include "src/core/handshaker/handshaker_registry.h" #include "src/core/handshaker/proxy_mapper_registry.h" #include "src/core/lib/channel/channel_args_preconditioning.h" diff --git a/src/core/lib/config/load_config.cc b/src/core/lib/config/load_config.cc index 3d52fc4db03..afceacc7e4f 100644 --- a/src/core/lib/config/load_config.cc +++ b/src/core/lib/config/load_config.cc @@ -14,6 +14,7 @@ #include "src/core/lib/config/load_config.h" +#include #include #include "absl/flags/marshalling.h" @@ -21,9 +22,6 @@ #include "absl/strings/numbers.h" #include "absl/strings/str_join.h" #include "absl/types/optional.h" - -#include - #include "src/core/util/env.h" namespace grpc_core { diff --git a/src/core/lib/config/load_config.h b/src/core/lib/config/load_config.h index a668174193f..c0a1fe486cd 100644 --- a/src/core/lib/config/load_config.h +++ b/src/core/lib/config/load_config.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_CONFIG_LOAD_CONFIG_H #define GRPC_SRC_CORE_LIB_CONFIG_LOAD_CONFIG_H +#include #include #include @@ -24,8 +25,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include - namespace grpc_core { std::string LoadConfigFromEnv(absl::string_view environment_variable, diff --git a/src/core/lib/debug/trace.cc b/src/core/lib/debug/trace.cc index 920c5d491c9..3eb004ec232 100644 --- a/src/core/lib/debug/trace.cc +++ b/src/core/lib/debug/trace.cc @@ -18,6 +18,9 @@ #include "src/core/lib/debug/trace.h" +#include +#include + #include #include #include @@ -28,10 +31,6 @@ #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "absl/strings/strip.h" - -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/util/glob.h" diff --git a/src/core/lib/debug/trace_flags.cc b/src/core/lib/debug/trace_flags.cc index 03bfe06312c..29963b4c1f6 100644 --- a/src/core/lib/debug/trace_flags.cc +++ b/src/core/lib/debug/trace_flags.cc @@ -17,7 +17,6 @@ // #include "absl/container/flat_hash_map.h" - #include "src/core/lib/debug/trace.h" #include "src/core/util/no_destruct.h" diff --git a/src/core/lib/debug/trace_impl.h b/src/core/lib/debug/trace_impl.h index 4d91c374d02..5d43e103433 100644 --- a/src/core/lib/debug/trace_impl.h +++ b/src/core/lib/debug/trace_impl.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_DEBUG_TRACE_IMPL_H #define GRPC_SRC_CORE_LIB_DEBUG_TRACE_IMPL_H +#include + #include #include #include @@ -23,8 +25,6 @@ #include "absl/log/log.h" #include "absl/strings/string_view.h" -#include - #ifdef _WIN32 #undef ERROR #endif diff --git a/src/core/lib/event_engine/ares_resolver.cc b/src/core/lib/event_engine/ares_resolver.cc index f1faf409241..1d38e9b827b 100644 --- a/src/core/lib/event_engine/ares_resolver.cc +++ b/src/core/lib/event_engine/ares_resolver.cc @@ -13,11 +13,11 @@ // limitations under the License. #include "src/core/lib/event_engine/ares_resolver.h" +#include + #include #include -#include - #include "src/core/lib/iomgr/port.h" // IWYU pragma: no_include @@ -42,6 +42,7 @@ #include "src/core/lib/event_engine/nameser.h" // IWYU pragma: keep #endif +#include #include #include @@ -59,9 +60,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/config/config_vars.h" diff --git a/src/core/lib/event_engine/ares_resolver.h b/src/core/lib/event_engine/ares_resolver.h index 331e533b35f..e9ca598d82e 100644 --- a/src/core/lib/event_engine/ares_resolver.h +++ b/src/core/lib/event_engine/ares_resolver.h @@ -14,30 +14,27 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_ARES_RESOLVER_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_ARES_RESOLVER_H +#include + #include #include "absl/status/status.h" - -#include - #include "src/core/lib/debug/trace.h" #if GRPC_ARES == 1 +#include +#include + #include #include -#include - #include "absl/base/thread_annotations.h" #include "absl/container/flat_hash_map.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include - #include "src/core/lib/event_engine/grpc_polled_fd.h" #include "src/core/lib/event_engine/ref_counted_dns_resolver_interface.h" #include "src/core/util/orphanable.h" diff --git a/src/core/lib/event_engine/cf_engine/cf_engine.cc b/src/core/lib/event_engine/cf_engine/cf_engine.cc index cc80e9977b6..a4c61521a29 100644 --- a/src/core/lib/event_engine/cf_engine/cf_engine.cc +++ b/src/core/lib/event_engine/cf_engine/cf_engine.cc @@ -19,12 +19,10 @@ #ifdef AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER #include +#include #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/event_engine/cf_engine/cf_engine.h" #include "src/core/lib/event_engine/cf_engine/cfstream_endpoint.h" #include "src/core/lib/event_engine/cf_engine/dns_service_resolver.h" diff --git a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc index 7a5f15b4208..9f7235aaa00 100644 --- a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +++ b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc @@ -21,7 +21,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - #include "src/core/lib/event_engine/cf_engine/cfstream_endpoint.h" #include "src/core/util/strerror.h" diff --git a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h index 8623dc888f0..04d8f8bf640 100644 --- a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +++ b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h @@ -20,11 +20,9 @@ #ifdef AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER #include - -#include "absl/strings/str_format.h" - #include +#include "absl/strings/str_format.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/cf_engine/cf_engine.h" #include "src/core/lib/event_engine/cf_engine/cftype_unique_ref.h" diff --git a/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc b/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc index a4fd9758ae5..c75b62b8f98 100644 --- a/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc +++ b/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc @@ -21,7 +21,6 @@ #include "absl/log/check.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/event_engine/cf_engine/dns_service_resolver.h" #include "src/core/lib/event_engine/posix_engine/lockfree_event.h" diff --git a/src/core/lib/event_engine/cf_engine/dns_service_resolver.h b/src/core/lib/event_engine/cf_engine/dns_service_resolver.h index e9c464029b3..01d69b95cc8 100644 --- a/src/core/lib/event_engine/cf_engine/dns_service_resolver.h +++ b/src/core/lib/event_engine/cf_engine/dns_service_resolver.h @@ -21,12 +21,10 @@ #include #include +#include #include "absl/container/flat_hash_map.h" #include "absl/log/check.h" - -#include - #include "src/core/lib/event_engine/cf_engine/cf_engine.h" #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/lib/event_engine/channel_args_endpoint_config.cc b/src/core/lib/event_engine/channel_args_endpoint_config.cc index 6cc79a7028a..41dd385080e 100644 --- a/src/core/lib/event_engine/channel_args_endpoint_config.cc +++ b/src/core/lib/event_engine/channel_args_endpoint_config.cc @@ -13,13 +13,12 @@ // limitations under the License. #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include - -#include "absl/types/optional.h" - #include #include +#include + +#include "absl/types/optional.h" #include "src/core/lib/channel/channel_args.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/channel_args_endpoint_config.h b/src/core/lib/event_engine/channel_args_endpoint_config.h index c14735e3376..91000223bf2 100644 --- a/src/core/lib/event_engine/channel_args_endpoint_config.h +++ b/src/core/lib/event_engine/channel_args_endpoint_config.h @@ -14,12 +14,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_CHANNEL_ARGS_ENDPOINT_CONFIG_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_CHANNEL_ARGS_ENDPOINT_CONFIG_H -#include "absl/strings/string_view.h" -#include "absl/types/optional.h" - #include #include +#include "absl/strings/string_view.h" +#include "absl/types/optional.h" #include "src/core/lib/channel/channel_args.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/common_closures.h b/src/core/lib/event_engine/common_closures.h index 007f352cbb8..52a8477be17 100644 --- a/src/core/lib/event_engine/common_closures.h +++ b/src/core/lib/event_engine/common_closures.h @@ -15,13 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_COMMON_CLOSURES_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_COMMON_CLOSURES_H +#include +#include + #include #include "absl/functional/any_invocable.h" -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/default_event_engine.cc b/src/core/lib/event_engine/default_event_engine.cc index 24282e7921b..7b005d02d8e 100644 --- a/src/core/lib/event_engine/default_event_engine.cc +++ b/src/core/lib/event_engine/default_event_engine.cc @@ -13,15 +13,14 @@ // limitations under the License. #include "src/core/lib/event_engine/default_event_engine.h" +#include +#include + #include #include #include #include "absl/functional/any_invocable.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/event_engine/default_event_engine.h b/src/core/lib/event_engine/default_event_engine.h index 2f7c982ab4c..2a254d49586 100644 --- a/src/core/lib/event_engine/default_event_engine.h +++ b/src/core/lib/event_engine/default_event_engine.h @@ -15,11 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_DEFAULT_EVENT_ENGINE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_DEFAULT_EVENT_ENGINE_H -#include - #include #include +#include + #include "src/core/lib/config/core_configuration.h" #include "src/core/util/debug_location.h" diff --git a/src/core/lib/event_engine/default_event_engine_factory.cc b/src/core/lib/event_engine/default_event_engine_factory.cc index d48aa2fba03..8f91ad64431 100644 --- a/src/core/lib/event_engine/default_event_engine_factory.cc +++ b/src/core/lib/event_engine/default_event_engine_factory.cc @@ -14,11 +14,11 @@ #include "src/core/lib/event_engine/default_event_engine_factory.h" -#include - #include #include +#include + #if defined(GPR_WINDOWS) #include "src/core/lib/event_engine/windows/windows_engine.h" diff --git a/src/core/lib/event_engine/default_event_engine_factory.h b/src/core/lib/event_engine/default_event_engine_factory.h index a32f04ff6be..3e97c4e480b 100644 --- a/src/core/lib/event_engine/default_event_engine_factory.h +++ b/src/core/lib/event_engine/default_event_engine_factory.h @@ -15,11 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_DEFAULT_EVENT_ENGINE_FACTORY_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_DEFAULT_EVENT_ENGINE_FACTORY_H -#include - #include #include +#include + namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/event_engine.cc b/src/core/lib/event_engine/event_engine.cc index 5a162f871a1..0a16cba4dbc 100644 --- a/src/core/lib/event_engine/event_engine.cc +++ b/src/core/lib/event_engine/event_engine.cc @@ -11,11 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include "absl/strings/str_cat.h" - #include #include +#include "absl/strings/str_cat.h" + namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/extensions/can_track_errors.h b/src/core/lib/event_engine/extensions/can_track_errors.h index 8a6f9df046c..d3042acbb2a 100644 --- a/src/core/lib/event_engine/extensions/can_track_errors.h +++ b/src/core/lib/event_engine/extensions/can_track_errors.h @@ -15,10 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_EXTENSIONS_CAN_TRACK_ERRORS_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_EXTENSIONS_CAN_TRACK_ERRORS_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" + namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/extensions/chaotic_good_extension.h b/src/core/lib/event_engine/extensions/chaotic_good_extension.h index 9610f4ed720..e787712e266 100644 --- a/src/core/lib/event_engine/extensions/chaotic_good_extension.h +++ b/src/core/lib/event_engine/extensions/chaotic_good_extension.h @@ -15,10 +15,9 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_EXTENSIONS_CHAOTIC_GOOD_EXTENSION_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_EXTENSIONS_CHAOTIC_GOOD_EXTENSION_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" #include "src/core/lib/resource_quota/memory_quota.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/extensions/supports_fd.h b/src/core/lib/event_engine/extensions/supports_fd.h index 30f0d2ad0e6..c7a1bfdcd4f 100644 --- a/src/core/lib/event_engine/extensions/supports_fd.h +++ b/src/core/lib/event_engine/extensions/supports_fd.h @@ -15,13 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_EXTENSIONS_SUPPORTS_FD_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_EXTENSIONS_SUPPORTS_FD_H +#include +#include + #include "absl/functional/any_invocable.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/extensions/tcp_trace.h b/src/core/lib/event_engine/extensions/tcp_trace.h index e5d66a45860..4e5efa712f7 100644 --- a/src/core/lib/event_engine/extensions/tcp_trace.h +++ b/src/core/lib/event_engine/extensions/tcp_trace.h @@ -18,7 +18,6 @@ #include #include "absl/strings/string_view.h" - #include "src/core/telemetry/tcp_tracer.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/forkable.cc b/src/core/lib/event_engine/forkable.cc index 0034cbbd92e..e83c8105dee 100644 --- a/src/core/lib/event_engine/forkable.cc +++ b/src/core/lib/event_engine/forkable.cc @@ -14,10 +14,10 @@ #include "src/core/lib/event_engine/forkable.h" -#include "absl/log/check.h" - #include +#include "absl/log/check.h" + #ifdef GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK #include #endif diff --git a/src/core/lib/event_engine/forkable.h b/src/core/lib/event_engine/forkable.h index 414947b7515..38a3637ecae 100644 --- a/src/core/lib/event_engine/forkable.h +++ b/src/core/lib/event_engine/forkable.h @@ -14,11 +14,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_FORKABLE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_FORKABLE_H +#include + #include #include -#include - #include "src/core/lib/debug/trace.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/grpc_polled_fd.h b/src/core/lib/event_engine/grpc_polled_fd.h index d1e6dc3b20c..65ce8cbb176 100644 --- a/src/core/lib/event_engine/grpc_polled_fd.h +++ b/src/core/lib/event_engine/grpc_polled_fd.h @@ -15,18 +15,17 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_GRPC_POLLED_FD_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_GRPC_POLLED_FD_H -#include - #include #include +#include + #if GRPC_ARES == 1 #include #include "absl/functional/any_invocable.h" #include "absl/status/status.h" - #include "src/core/util/sync.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/handle_containers.h b/src/core/lib/event_engine/handle_containers.h index 2a4cd766f18..5772de7476d 100644 --- a/src/core/lib/event_engine/handle_containers.h +++ b/src/core/lib/event_engine/handle_containers.h @@ -14,6 +14,8 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_HANDLE_CONTAINERS_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_HANDLE_CONTAINERS_H +#include +#include #include #include @@ -22,9 +24,6 @@ #include "absl/container/flat_hash_set.h" #include "absl/hash/hash.h" -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/memory_allocator_factory.h b/src/core/lib/event_engine/memory_allocator_factory.h index 88e61908ef3..8283c415970 100644 --- a/src/core/lib/event_engine/memory_allocator_factory.h +++ b/src/core/lib/event_engine/memory_allocator_factory.h @@ -13,14 +13,13 @@ // limitations under the License. #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_MEMORY_ALLOCATOR_FACTORY_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_MEMORY_ALLOCATOR_FACTORY_H +#include +#include + #include #include #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/resource_quota/memory_quota.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/poller.h b/src/core/lib/event_engine/poller.h index 26333e798fa..550ce2b24f2 100644 --- a/src/core/lib/event_engine/poller.h +++ b/src/core/lib/event_engine/poller.h @@ -14,11 +14,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POLLER_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POLLER_H -#include "absl/functional/function_ref.h" - #include #include +#include "absl/functional/function_ref.h" + namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/.clang-format b/src/core/lib/event_engine/posix_engine/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/core/lib/event_engine/posix_engine/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc index f59c6616bd9..e8abcaf471d 100644 --- a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +++ b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc @@ -13,6 +13,10 @@ // limitations under the License. #include "src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h" +#include +#include +#include +#include #include #include @@ -23,12 +27,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include - #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/time_util.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h index 42c61446659..de850dc671f 100644 --- a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +++ b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h @@ -14,6 +14,9 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_EV_EPOLL1_LINUX_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_EV_EPOLL1_LINUX_H +#include +#include + #include #include #include @@ -22,10 +25,6 @@ #include "absl/container/inlined_vector.h" #include "absl/functional/function_ref.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/internal_errqueue.h" diff --git a/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc b/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc index c62c9e1a8e2..9bc6ba27553 100644 --- a/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +++ b/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc @@ -14,6 +14,11 @@ #include "src/core/lib/event_engine/posix_engine/ev_poll_posix.h" +#include +#include +#include +#include +#include #include #include @@ -27,13 +32,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" @@ -43,13 +41,12 @@ #ifdef GRPC_POSIX_SOCKET_EV_POLL #include +#include #include #include #include #include -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h" diff --git a/src/core/lib/event_engine/posix_engine/ev_poll_posix.h b/src/core/lib/event_engine/posix_engine/ev_poll_posix.h index d3e139eb0c8..d296eb58e50 100644 --- a/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +++ b/src/core/lib/event_engine/posix_engine/ev_poll_posix.h @@ -15,16 +15,15 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_EV_POLL_POSIX_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_EV_POLL_POSIX_H +#include +#include + #include #include #include "absl/base/thread_annotations.h" #include "absl/functional/function_ref.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" diff --git a/src/core/lib/event_engine/posix_engine/event_poller.h b/src/core/lib/event_engine/posix_engine/event_poller.h index 49cf7769364..3553ae6ca3f 100644 --- a/src/core/lib/event_engine/posix_engine/event_poller.h +++ b/src/core/lib/event_engine/posix_engine/event_poller.h @@ -14,15 +14,14 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_EVENT_POLLER_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_EVENT_POLLER_H +#include +#include + #include #include "absl/functional/any_invocable.h" #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/event_engine/forkable.h" #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" diff --git a/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc b/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc index 7f11bbb05a0..7d22bcaf503 100644 --- a/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc +++ b/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/forkable.h" #include "src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h" diff --git a/src/core/lib/event_engine/posix_engine/event_poller_posix_default.h b/src/core/lib/event_engine/posix_engine/event_poller_posix_default.h index f1ec8c39d9e..bfde1904d9c 100644 --- a/src/core/lib/event_engine/posix_engine/event_poller_posix_default.h +++ b/src/core/lib/event_engine/posix_engine/event_poller_posix_default.h @@ -15,10 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_EVENT_POLLER_POSIX_DEFAULT_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_EVENT_POLLER_POSIX_DEFAULT_H -#include - #include +#include + namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h b/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h index 7c9f8a5f742..0dba5c5d11b 100644 --- a/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +++ b/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h @@ -15,11 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_GRPC_POLLED_FD_POSIX_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_GRPC_POLLED_FD_POSIX_H -#include - #include #include +#include + #include "src/core/lib/iomgr/port.h" #include "src/core/util/sync.h" @@ -27,6 +27,7 @@ // IWYU pragma: no_include +#include #include #include #include @@ -36,12 +37,9 @@ #include #include -#include - #include "absl/functional/any_invocable.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" - #include "src/core/lib/event_engine/grpc_polled_fd.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" diff --git a/src/core/lib/event_engine/posix_engine/internal_errqueue.cc b/src/core/lib/event_engine/posix_engine/internal_errqueue.cc index dd4d3711f9d..878b5ba4022 100644 --- a/src/core/lib/event_engine/posix_engine/internal_errqueue.cc +++ b/src/core/lib/event_engine/posix_engine/internal_errqueue.cc @@ -14,10 +14,9 @@ #include "src/core/lib/event_engine/posix_engine/internal_errqueue.h" -#include "absl/log/log.h" - #include +#include "absl/log/log.h" #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET_TCP diff --git a/src/core/lib/event_engine/posix_engine/internal_errqueue.h b/src/core/lib/event_engine/posix_engine/internal_errqueue.h index c779af8106d..e2c1460d050 100644 --- a/src/core/lib/event_engine/posix_engine/internal_errqueue.h +++ b/src/core/lib/event_engine/posix_engine/internal_errqueue.h @@ -15,9 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_INTERNAL_ERRQUEUE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_INTERNAL_ERRQUEUE_H -#include - #include +#include #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/event_engine/posix_engine/lockfree_event.cc b/src/core/lib/event_engine/posix_engine/lockfree_event.cc index e0cb157b922..6a904cd36db 100644 --- a/src/core/lib/event_engine/posix_engine/lockfree_event.cc +++ b/src/core/lib/event_engine/posix_engine/lockfree_event.cc @@ -13,15 +13,14 @@ // limitations under the License. #include "src/core/lib/event_engine/posix_engine/lockfree_event.h" +#include +#include + #include #include #include "absl/log/check.h" #include "absl/status/status.h" - -#include -#include - #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/event_engine/posix_engine/lockfree_event.h b/src/core/lib/event_engine/posix_engine/lockfree_event.h index a9c2635cc91..fb05ae450cb 100644 --- a/src/core/lib/event_engine/posix_engine/lockfree_event.h +++ b/src/core/lib/event_engine/posix_engine/lockfree_event.h @@ -14,13 +14,12 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_LOCKFREE_EVENT_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_LOCKFREE_EVENT_H +#include + #include #include #include "absl/status/status.h" - -#include - #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc b/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc index 7d4c7a0ac7b..44f23efb71e 100644 --- a/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc +++ b/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc @@ -32,7 +32,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - #include "src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.h" #include "src/core/util/host_port.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.h b/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.h index 693a70fbb43..138f89ac73e 100644 --- a/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.h +++ b/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.h @@ -15,12 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_NATIVE_POSIX_DNS_RESOLVER_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_NATIVE_POSIX_DNS_RESOLVER_H +#include + #include #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET_RESOLVE_ADDRESS diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc index bf6a78bb23c..ab1e61fbf65 100644 --- a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc @@ -14,6 +14,11 @@ #include "src/core/lib/event_engine/posix_engine/posix_endpoint.h" #include +#include +#include +#include +#include +#include #include #include @@ -32,13 +37,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/internal_errqueue.h" diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.h b/src/core/lib/event_engine/posix_engine/posix_endpoint.h index 81ec03c7f0f..98d0e169c8a 100644 --- a/src/core/lib/event_engine/posix_engine/posix_endpoint.h +++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.h @@ -19,6 +19,11 @@ // IWYU pragma: no_include +#include +#include +#include +#include + #include #include #include @@ -33,12 +38,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include - #include "src/core/lib/event_engine/extensions/supports_fd.h" #include "src/core/lib/event_engine/posix.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" diff --git a/src/core/lib/event_engine/posix_engine/posix_engine.cc b/src/core/lib/event_engine/posix_engine/posix_engine.cc index d0683677795..f2275975b0d 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine.cc +++ b/src/core/lib/event_engine/posix_engine/posix_engine.cc @@ -13,6 +13,12 @@ // limitations under the License. #include "src/core/lib/event_engine/posix_engine/posix_engine.h" +#include +#include +#include +#include +#include + #include #include #include @@ -30,13 +36,6 @@ #include "absl/status/status.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/ares_resolver.h" #include "src/core/lib/event_engine/forkable.h" diff --git a/src/core/lib/event_engine/posix_engine/posix_engine.h b/src/core/lib/event_engine/posix_engine/posix_engine.h index f2483d11653..82be0bdd0e5 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine.h +++ b/src/core/lib/event_engine/posix_engine/posix_engine.h @@ -13,6 +13,11 @@ // limitations under the License. #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_POSIX_ENGINE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_POSIX_ENGINE_H +#include +#include +#include +#include + #include #include #include @@ -27,12 +32,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include - #include "src/core/lib/event_engine/handle_containers.h" #include "src/core/lib/event_engine/posix.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" diff --git a/src/core/lib/event_engine/posix_engine/posix_engine_closure.h b/src/core/lib/event_engine/posix_engine/posix_engine_closure.h index 084b096c14a..46d06f9c024 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine_closure.h +++ b/src/core/lib/event_engine/posix_engine/posix_engine_closure.h @@ -14,14 +14,14 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_POSIX_ENGINE_CLOSURE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_POSIX_ENGINE_CLOSURE_H +#include +#include + #include #include "absl/functional/any_invocable.h" #include "absl/status/status.h" -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc b/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc index d8b40ab2f71..ce95139e6e8 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +++ b/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc @@ -20,7 +20,9 @@ #ifdef GRPC_POSIX_SOCKET_TCP -#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include +#include #include // IWYU pragma: keep #include // IWYU pragma: keep @@ -36,10 +38,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/posix_endpoint.h" diff --git a/src/core/lib/event_engine/posix_engine/posix_engine_listener.h b/src/core/lib/event_engine/posix_engine/posix_engine_listener.h index 40c43de8c12..1ddbe1b3fb9 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +++ b/src/core/lib/event_engine/posix_engine/posix_engine_listener.h @@ -14,6 +14,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_POSIX_ENGINE_LISTENER_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_POSIX_ENGINE_LISTENER_H +#include +#include +#include +#include +#include #include #include @@ -26,13 +31,6 @@ #include "absl/functional/any_invocable.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/posix.h" #include "src/core/lib/iomgr/port.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc b/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc index b3532e2d860..f8db2f28df9 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +++ b/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc @@ -14,6 +14,8 @@ #include "src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h" +#include +#include #include #include #include @@ -27,10 +29,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_replace.h" - -#include -#include - #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h b/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h index e5a9684545a..2fe3f68161c 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +++ b/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h @@ -14,11 +14,10 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_POSIX_ENGINE_LISTENER_UTILS_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_POSIX_ENGINE_LISTENER_UTILS_H -#include "absl/status/statusor.h" - #include #include +#include "absl/status/statusor.h" #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc index fad1a7f6730..2631b9926ef 100644 --- a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +++ b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc @@ -15,18 +15,16 @@ #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include +#include +#include +#include +#include #include #include "absl/cleanup/cleanup.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/iomgr/port.h" #include "src/core/util/crash.h" // IWYU pragma: keep #include "src/core/util/time.h" @@ -51,7 +49,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/status.h" - #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/util/status_helper.h" #include "src/core/util/strerror.h" diff --git a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h index 07bd3308d1d..5a11675cbec 100644 --- a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +++ b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h @@ -15,6 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TCP_SOCKET_UTILS_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TCP_SOCKET_UTILS_H +#include +#include +#include +#include +#include + #include #include #include @@ -22,13 +28,6 @@ #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/socket_mutator.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/src/core/lib/event_engine/posix_engine/timer.cc b/src/core/lib/event_engine/posix_engine/timer.cc index 8e77e251bcc..4f4c303721d 100644 --- a/src/core/lib/event_engine/posix_engine/timer.cc +++ b/src/core/lib/event_engine/posix_engine/timer.cc @@ -18,14 +18,14 @@ #include "src/core/lib/event_engine/posix_engine/timer.h" +#include +#include + #include #include #include #include -#include -#include - #include "src/core/lib/event_engine/posix_engine/timer_heap.h" #include "src/core/util/time.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/event_engine/posix_engine/timer.h b/src/core/lib/event_engine/posix_engine/timer.h index 54f753b91cf..7528ca89c1e 100644 --- a/src/core/lib/event_engine/posix_engine/timer.h +++ b/src/core/lib/event_engine/posix_engine/timer.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TIMER_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TIMER_H +#include +#include #include #include @@ -28,10 +30,6 @@ #include "absl/base/thread_annotations.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/event_engine/posix_engine/timer_heap.h" #include "src/core/util/sync.h" #include "src/core/util/time.h" diff --git a/src/core/lib/event_engine/posix_engine/timer_heap.cc b/src/core/lib/event_engine/posix_engine/timer_heap.cc index c3e560ba5cc..85fbdb9e01d 100644 --- a/src/core/lib/event_engine/posix_engine/timer_heap.cc +++ b/src/core/lib/event_engine/posix_engine/timer_heap.cc @@ -18,12 +18,11 @@ #include "src/core/lib/event_engine/posix_engine/timer_heap.h" +#include #include #include -#include - #include "src/core/lib/event_engine/posix_engine/timer.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/posix_engine/timer_heap.h b/src/core/lib/event_engine/posix_engine/timer_heap.h index a13bc206cba..b59eb9b127f 100644 --- a/src/core/lib/event_engine/posix_engine/timer_heap.h +++ b/src/core/lib/event_engine/posix_engine/timer_heap.h @@ -19,11 +19,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TIMER_HEAP_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TIMER_HEAP_H +#include + #include #include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/timer_manager.cc b/src/core/lib/event_engine/posix_engine/timer_manager.cc index 8a0373cf86b..4b2097e8b81 100644 --- a/src/core/lib/event_engine/posix_engine/timer_manager.cc +++ b/src/core/lib/event_engine/posix_engine/timer_manager.cc @@ -18,6 +18,9 @@ #include "src/core/lib/event_engine/posix_engine/timer_manager.h" +#include +#include + #include #include @@ -25,10 +28,6 @@ #include "absl/log/log.h" #include "absl/time/time.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/debug/trace.h" static thread_local bool g_timer_thread; diff --git a/src/core/lib/event_engine/posix_engine/timer_manager.h b/src/core/lib/event_engine/posix_engine/timer_manager.h index 3650a06dfce..c7616db7c62 100644 --- a/src/core/lib/event_engine/posix_engine/timer_manager.h +++ b/src/core/lib/event_engine/posix_engine/timer_manager.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TIMER_MANAGER_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TIMER_MANAGER_H +#include +#include #include #include @@ -26,10 +28,6 @@ #include "absl/base/thread_annotations.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/event_engine/forkable.h" #include "src/core/lib/event_engine/posix_engine/timer.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" diff --git a/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc b/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc index d908ca76943..2bc411b9d6e 100644 --- a/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc +++ b/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc @@ -14,6 +14,8 @@ #include "src/core/lib/event_engine/posix_engine/traced_buffer_list.h" +#include +#include #include #include #include @@ -23,10 +25,6 @@ #include "absl/functional/any_invocable.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/iomgr/port.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/event_engine/posix_engine/traced_buffer_list.h b/src/core/lib/event_engine/posix_engine/traced_buffer_list.h index 1df29a14243..bd77ea81139 100644 --- a/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +++ b/src/core/lib/event_engine/posix_engine/traced_buffer_list.h @@ -15,15 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TRACED_BUFFER_LIST_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_TRACED_BUFFER_LIST_H +#include +#include #include #include "absl/functional/any_invocable.h" #include "absl/status/status.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/event_engine/posix_engine/internal_errqueue.h" #include "src/core/lib/iomgr/port.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc b/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc index d6efbd26671..e23df12cdfa 100644 --- a/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc +++ b/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/iomgr/port.h" #include "src/core/util/crash.h" // IWYU pragma: keep diff --git a/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h b/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h index 6ab9a6eaeb4..62d5c658240 100644 --- a/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h +++ b/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h @@ -14,13 +14,12 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_WAKEUP_FD_EVENTFD_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_WAKEUP_FD_EVENTFD_H +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc b/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc index 9f2a0959df3..9aa1ba317c5 100644 --- a/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +++ b/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/iomgr/port.h" #include "src/core/util/crash.h" // IWYU pragma: keep diff --git a/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h b/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h index 7676d6cf57b..9884363907c 100644 --- a/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h +++ b/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h @@ -14,13 +14,12 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_WAKEUP_FD_PIPE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_WAKEUP_FD_PIPE_H +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h b/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h index 119dab7ecfb..2e7f1574280 100644 --- a/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h +++ b/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h @@ -42,10 +42,10 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_WAKEUP_FD_POSIX_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_WAKEUP_FD_POSIX_H -#include "absl/status/status.h" - #include +#include "absl/status/status.h" + namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc b/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc index 35768988b65..71caee017bd 100644 --- a/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc +++ b/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc @@ -11,13 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" diff --git a/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h b/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h index 40e9381576a..51f766fe760 100644 --- a/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h +++ b/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h @@ -14,12 +14,12 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_WAKEUP_FD_POSIX_DEFAULT_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_WAKEUP_FD_POSIX_DEFAULT_H +#include + #include #include "absl/status/statusor.h" -#include - namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/query_extensions.h b/src/core/lib/event_engine/query_extensions.h index 2b39214e635..a9c7e7b8fff 100644 --- a/src/core/lib/event_engine/query_extensions.h +++ b/src/core/lib/event_engine/query_extensions.h @@ -14,11 +14,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_QUERY_EXTENSIONS_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_QUERY_EXTENSIONS_H -#include "absl/strings/string_view.h" - #include #include +#include "absl/strings/string_view.h" + namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h b/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h index 107ba10f75b..3de70e7cd38 100644 --- a/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h +++ b/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h @@ -15,13 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_REF_COUNTED_DNS_RESOLVER_INTERFACE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_REF_COUNTED_DNS_RESOLVER_INTERFACE_H -#include - -#include "absl/strings/string_view.h" - #include #include +#include +#include "absl/strings/string_view.h" #include "src/core/util/orphanable.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/resolved_address.cc b/src/core/lib/event_engine/resolved_address.cc index 95c37586ae2..1a41663bedd 100644 --- a/src/core/lib/event_engine/resolved_address.cc +++ b/src/core/lib/event_engine/resolved_address.cc @@ -14,13 +14,11 @@ #include "src/core/lib/iomgr/resolved_address.h" -#include - -#include "absl/log/check.h" - #include #include +#include +#include "absl/log/check.h" #include "src/core/lib/event_engine/resolved_address_internal.h" // IWYU pragma: no_include diff --git a/src/core/lib/event_engine/slice.cc b/src/core/lib/event_engine/slice.cc index 7d4a6c4a051..ea6994631ac 100644 --- a/src/core/lib/event_engine/slice.cc +++ b/src/core/lib/event_engine/slice.cc @@ -14,17 +14,15 @@ #include "src/core/lib/slice/slice.h" +#include +#include +#include #include #include #include #include "absl/log/check.h" - -#include -#include -#include - #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_refcount.h" diff --git a/src/core/lib/event_engine/slice_buffer.cc b/src/core/lib/event_engine/slice_buffer.cc index 4a1aa804837..5b8ad807ad7 100644 --- a/src/core/lib/event_engine/slice_buffer.cc +++ b/src/core/lib/event_engine/slice_buffer.cc @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include +#include #include "src/core/lib/slice/slice.h" diff --git a/src/core/lib/event_engine/tcp_socket_utils.cc b/src/core/lib/event_engine/tcp_socket_utils.cc index 1353249817d..d4ef7a8bb48 100644 --- a/src/core/lib/event_engine/tcp_socket_utils.cc +++ b/src/core/lib/event_engine/tcp_socket_utils.cc @@ -58,7 +58,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/util/host_port.h" #include "src/core/util/status_helper.h" diff --git a/src/core/lib/event_engine/tcp_socket_utils.h b/src/core/lib/event_engine/tcp_socket_utils.h index d048a124b06..c8f25fe45fb 100644 --- a/src/core/lib/event_engine/tcp_socket_utils.h +++ b/src/core/lib/event_engine/tcp_socket_utils.h @@ -14,14 +14,14 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_TCP_SOCKET_UTILS_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_TCP_SOCKET_UTILS_H +#include +#include + #include #include "absl/status/statusor.h" #include "absl/types/optional.h" -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/thread_pool/thread_count.cc b/src/core/lib/event_engine/thread_pool/thread_count.cc index faeffe1f896..c2010a2a448 100644 --- a/src/core/lib/event_engine/thread_pool/thread_count.cc +++ b/src/core/lib/event_engine/thread_pool/thread_count.cc @@ -13,6 +13,7 @@ // limitations under the License. #include "src/core/lib/event_engine/thread_pool/thread_count.h" +#include #include #include @@ -22,9 +23,6 @@ #include "absl/strings/str_format.h" #include "absl/time/clock.h" #include "absl/time/time.h" - -#include - #include "src/core/util/time.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/thread_pool/thread_count.h b/src/core/lib/event_engine/thread_pool/thread_count.h index 7bca370e9e1..cbd10fcfd71 100644 --- a/src/core/lib/event_engine/thread_pool/thread_count.h +++ b/src/core/lib/event_engine/thread_pool/thread_count.h @@ -14,6 +14,9 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_THREAD_POOL_THREAD_COUNT_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_THREAD_POOL_THREAD_COUNT_H +#include +#include + #include #include #include @@ -22,10 +25,6 @@ #include #include "absl/base/thread_annotations.h" - -#include -#include - #include "src/core/util/sync.h" #include "src/core/util/time.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/event_engine/thread_pool/thread_pool.h b/src/core/lib/event_engine/thread_pool/thread_pool.h index 2590d891a30..e4648d1dbd3 100644 --- a/src/core/lib/event_engine/thread_pool/thread_pool.h +++ b/src/core/lib/event_engine/thread_pool/thread_pool.h @@ -13,15 +13,13 @@ // limitations under the License. #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_THREAD_POOL_THREAD_POOL_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_THREAD_POOL_THREAD_POOL_H +#include +#include #include #include #include "absl/functional/any_invocable.h" - -#include -#include - #include "src/core/lib/event_engine/forkable.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc b/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc index bea6d8d526c..e3a3799b6a4 100644 --- a/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +++ b/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc @@ -11,12 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - #include "src/core/lib/event_engine/forkable.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h" diff --git a/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc b/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc index 852cf0f3915..a8f35bb1cfd 100644 --- a/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +++ b/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc @@ -17,6 +17,8 @@ // #include "src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h" +#include +#include #include #include @@ -31,10 +33,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/thread_local.h" diff --git a/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h b/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h index 69beaa7cddd..a0c79f64da0 100644 --- a/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +++ b/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h @@ -18,6 +18,9 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_THREAD_POOL_WORK_STEALING_THREAD_POOL_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_THREAD_POOL_WORK_STEALING_THREAD_POOL_H +#include +#include +#include #include #include @@ -27,11 +30,6 @@ #include "absl/base/thread_annotations.h" #include "absl/container/flat_hash_set.h" #include "absl/functional/any_invocable.h" - -#include -#include -#include - #include "src/core/lib/event_engine/thread_pool/thread_count.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" diff --git a/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc b/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc index 5475f2e45a0..94b53e9081b 100644 --- a/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc +++ b/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc @@ -14,13 +14,13 @@ #include "src/core/lib/event_engine/thready_event_engine/thready_event_engine.h" +#include + #include #include #include #include -#include - #include "src/core/util/crash.h" #include "src/core/util/sync.h" #include "src/core/util/thd.h" diff --git a/src/core/lib/event_engine/thready_event_engine/thready_event_engine.h b/src/core/lib/event_engine/thready_event_engine/thready_event_engine.h index 8b87d90a757..02f90c7a771 100644 --- a/src/core/lib/event_engine/thready_event_engine/thready_event_engine.h +++ b/src/core/lib/event_engine/thready_event_engine/thready_event_engine.h @@ -15,6 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_THREADY_EVENT_ENGINE_THREADY_EVENT_ENGINE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_THREADY_EVENT_ENGINE_THREADY_EVENT_ENGINE_H +#include +#include +#include +#include + #include #include @@ -23,11 +28,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include -#include -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/time_util.cc b/src/core/lib/event_engine/time_util.cc index d7b663581d1..ab542b1e258 100644 --- a/src/core/lib/event_engine/time_util.cc +++ b/src/core/lib/event_engine/time_util.cc @@ -13,11 +13,11 @@ // limitations under the License. #include "src/core/lib/event_engine/time_util.h" -#include - #include #include +#include + namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/time_util.h b/src/core/lib/event_engine/time_util.h index 813b6cda8f8..14ec99ab5d1 100644 --- a/src/core/lib/event_engine/time_util.h +++ b/src/core/lib/event_engine/time_util.h @@ -14,10 +14,9 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_TIME_UTIL_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_TIME_UTIL_H -#include - #include #include +#include namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/utils.cc b/src/core/lib/event_engine/utils.cc index d0d1b436c5d..f2a202315ce 100644 --- a/src/core/lib/event_engine/utils.cc +++ b/src/core/lib/event_engine/utils.cc @@ -13,15 +13,13 @@ // limitations under the License. #include "src/core/lib/event_engine/utils.h" +#include +#include #include #include #include "absl/strings/str_cat.h" - -#include -#include - #include "src/core/util/time.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/utils.h b/src/core/lib/event_engine/utils.h index 5edfcd890f0..45675ee8d88 100644 --- a/src/core/lib/event_engine/utils.h +++ b/src/core/lib/event_engine/utils.h @@ -14,13 +14,12 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_UTILS_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_UTILS_H +#include +#include #include #include -#include -#include - #include "src/core/util/time.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/windows/.clang-format b/src/core/lib/event_engine/windows/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/core/lib/event_engine/windows/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc index 3723b3463ed..3bfd15537e6 100644 --- a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +++ b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc @@ -18,17 +18,14 @@ #if GRPC_ARES == 1 && defined(GRPC_WINDOWS_SOCKET_ARES_EV_DRIVER) -#include - #include +#include +#include #include "absl/functional/any_invocable.h" #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/ares_resolver.h" #include "src/core/lib/event_engine/grpc_polled_fd.h" diff --git a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h index e16c8e80e9e..f0efeaccfcc 100644 --- a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h +++ b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h @@ -21,15 +21,13 @@ #if GRPC_ARES == 1 && defined(GRPC_WINDOWS_SOCKET_ARES_EV_DRIVER) -#include - #include +#include + +#include #include "absl/functional/any_invocable.h" #include "absl/status/status.h" - -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/grpc_polled_fd.h" #include "src/core/lib/event_engine/windows/iocp.h" diff --git a/src/core/lib/event_engine/windows/iocp.cc b/src/core/lib/event_engine/windows/iocp.cc index 74d875ba2ab..b3458b3e05a 100644 --- a/src/core/lib/event_engine/windows/iocp.cc +++ b/src/core/lib/event_engine/windows/iocp.cc @@ -15,14 +15,13 @@ #ifdef GPR_WINDOWS +#include +#include + #include #include "absl/log/check.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/time_util.h" #include "src/core/lib/event_engine/windows/iocp.h" diff --git a/src/core/lib/event_engine/windows/iocp.h b/src/core/lib/event_engine/windows/iocp.h index 9c972ed0f92..812f773b85c 100644 --- a/src/core/lib/event_engine/windows/iocp.h +++ b/src/core/lib/event_engine/windows/iocp.h @@ -18,10 +18,9 @@ #ifdef GPR_WINDOWS -#include "absl/status/status.h" - #include +#include "absl/status/status.h" #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/win_socket.h" diff --git a/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc b/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc index d8114497b11..6a1caaf9116 100644 --- a/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc +++ b/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc @@ -14,6 +14,7 @@ #include #ifdef GPR_WINDOWS +#include #include #include #include @@ -22,9 +23,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/lib/event_engine/windows/native_windows_dns_resolver.h" #include "src/core/lib/iomgr/error.h" #include "src/core/util/host_port.h" diff --git a/src/core/lib/event_engine/windows/win_socket.cc b/src/core/lib/event_engine/windows/win_socket.cc index 79fc2bec4fe..482d4bb06f7 100644 --- a/src/core/lib/event_engine/windows/win_socket.cc +++ b/src/core/lib/event_engine/windows/win_socket.cc @@ -14,12 +14,11 @@ #include #ifdef GPR_WINDOWS -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/win_socket.h" diff --git a/src/core/lib/event_engine/windows/win_socket.h b/src/core/lib/event_engine/windows/win_socket.h index 4256179c070..6300279efe6 100644 --- a/src/core/lib/event_engine/windows/win_socket.h +++ b/src/core/lib/event_engine/windows/win_socket.h @@ -18,11 +18,10 @@ #ifdef GPR_WINDOWS -#include "absl/base/thread_annotations.h" -#include "absl/functional/any_invocable.h" - #include +#include "absl/base/thread_annotations.h" +#include "absl/functional/any_invocable.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/util/debug_location.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/event_engine/windows/windows_endpoint.cc b/src/core/lib/event_engine/windows/windows_endpoint.cc index ec4118c7fd2..3b16c060de6 100644 --- a/src/core/lib/event_engine/windows/windows_endpoint.cc +++ b/src/core/lib/event_engine/windows/windows_endpoint.cc @@ -15,16 +15,15 @@ #ifdef GPR_WINDOWS +#include +#include + #include "absl/cleanup/cleanup.h" #include "absl/functional/any_invocable.h" #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/windows_endpoint.h" diff --git a/src/core/lib/event_engine/windows/windows_engine.cc b/src/core/lib/event_engine/windows/windows_engine.cc index 31e2eb03569..6a1fb634fe5 100644 --- a/src/core/lib/event_engine/windows/windows_engine.cc +++ b/src/core/lib/event_engine/windows/windows_engine.cc @@ -15,6 +15,12 @@ #ifdef GPR_WINDOWS +#include +#include +#include +#include +#include + #include #include @@ -23,13 +29,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/handle_containers.h" diff --git a/src/core/lib/event_engine/windows/windows_engine.h b/src/core/lib/event_engine/windows/windows_engine.h index 98ca81e1a52..c9a597b5713 100644 --- a/src/core/lib/event_engine/windows/windows_engine.h +++ b/src/core/lib/event_engine/windows/windows_engine.h @@ -20,17 +20,16 @@ #ifdef GPR_WINDOWS -#include - -#include "absl/status/status.h" -#include "absl/status/statusor.h" -#include "absl/strings/string_view.h" - #include #include #include #include +#include + +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/strings/string_view.h" #include "src/core/lib/event_engine/ares_resolver.h" #include "src/core/lib/event_engine/handle_containers.h" #include "src/core/lib/event_engine/posix_engine/timer_manager.h" diff --git a/src/core/lib/event_engine/windows/windows_listener.cc b/src/core/lib/event_engine/windows/windows_listener.cc index 2bba1a6e818..63b973cf213 100644 --- a/src/core/lib/event_engine/windows/windows_listener.cc +++ b/src/core/lib/event_engine/windows/windows_listener.cc @@ -19,7 +19,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/str_format.h" - #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/windows/iocp.h" #include "src/core/lib/event_engine/windows/win_socket.h" diff --git a/src/core/lib/event_engine/windows/windows_listener.h b/src/core/lib/event_engine/windows/windows_listener.h index 8e0a5bd0f95..4dd254d7d10 100644 --- a/src/core/lib/event_engine/windows/windows_listener.h +++ b/src/core/lib/event_engine/windows/windows_listener.h @@ -18,14 +18,13 @@ #ifdef GPR_WINDOWS +#include +#include + #include #include "absl/base/thread_annotations.h" #include "absl/status/statusor.h" - -#include -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/iocp.h" diff --git a/src/core/lib/event_engine/work_queue/basic_work_queue.cc b/src/core/lib/event_engine/work_queue/basic_work_queue.cc index 40bfcf7cd5d..629debf2bc8 100644 --- a/src/core/lib/event_engine/work_queue/basic_work_queue.cc +++ b/src/core/lib/event_engine/work_queue/basic_work_queue.cc @@ -13,10 +13,10 @@ // limitations under the License. #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" -#include - #include +#include + #include "src/core/lib/event_engine/common_closures.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/event_engine/work_queue/basic_work_queue.h b/src/core/lib/event_engine/work_queue/basic_work_queue.h index 93ac366831e..20da2977742 100644 --- a/src/core/lib/event_engine/work_queue/basic_work_queue.h +++ b/src/core/lib/event_engine/work_queue/basic_work_queue.h @@ -13,16 +13,14 @@ // limitations under the License. #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_WORK_QUEUE_BASIC_WORK_QUEUE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_WORK_QUEUE_BASIC_WORK_QUEUE_H +#include +#include #include #include #include "absl/base/thread_annotations.h" #include "absl/functional/any_invocable.h" - -#include -#include - #include "src/core/lib/event_engine/work_queue/work_queue.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/event_engine/work_queue/work_queue.h b/src/core/lib/event_engine/work_queue/work_queue.h index 73c6a74ab21..393a1bce6a0 100644 --- a/src/core/lib/event_engine/work_queue/work_queue.h +++ b/src/core/lib/event_engine/work_queue/work_queue.h @@ -14,13 +14,12 @@ #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_WORK_QUEUE_WORK_QUEUE_H #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_WORK_QUEUE_WORK_QUEUE_H +#include +#include #include #include "absl/functional/any_invocable.h" -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/experiments/config.cc b/src/core/lib/experiments/config.cc index cab35e0f04a..f2ec5d1a0db 100644 --- a/src/core/lib/experiments/config.cc +++ b/src/core/lib/experiments/config.cc @@ -14,6 +14,7 @@ #include "src/core/lib/experiments/config.h" +#include #include #include @@ -30,9 +31,6 @@ #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "absl/strings/strip.h" - -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/util/crash.h" // IWYU pragma: keep diff --git a/src/core/lib/experiments/config.h b/src/core/lib/experiments/config.h index 921875b99bb..e74f7c6b716 100644 --- a/src/core/lib/experiments/config.h +++ b/src/core/lib/experiments/config.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_EXPERIMENTS_CONFIG_H #define GRPC_SRC_CORE_LIB_EXPERIMENTS_CONFIG_H +#include #include #include @@ -23,8 +24,6 @@ #include "absl/functional/any_invocable.h" #include "absl/strings/string_view.h" -#include - // #define GRPC_EXPERIMENTS_ARE_FINAL namespace grpc_core { diff --git a/src/core/lib/iomgr/buffer_list.cc b/src/core/lib/iomgr/buffer_list.cc index 91bfc45a021..1cc2cbb4e9c 100644 --- a/src/core/lib/iomgr/buffer_list.cc +++ b/src/core/lib/iomgr/buffer_list.cc @@ -18,11 +18,10 @@ #include "src/core/lib/iomgr/buffer_list.h" -#include "absl/log/log.h" - #include #include +#include "absl/log/log.h" #include "src/core/lib/iomgr/port.h" #include "src/core/util/crash.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/iomgr/buffer_list.h b/src/core/lib/iomgr/buffer_list.h index 6805c53c08d..47d390354a8 100644 --- a/src/core/lib/iomgr/buffer_list.h +++ b/src/core/lib/iomgr/buffer_list.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_BUFFER_LIST_H #define GRPC_SRC_CORE_LIB_IOMGR_BUFFER_LIST_H -#include "absl/types/optional.h" - #include #include +#include "absl/types/optional.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/internal_errqueue.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/call_combiner.cc b/src/core/lib/iomgr/call_combiner.cc index e20cc0a0986..8459f415157 100644 --- a/src/core/lib/iomgr/call_combiner.cc +++ b/src/core/lib/iomgr/call_combiner.cc @@ -18,13 +18,11 @@ #include "src/core/lib/iomgr/call_combiner.h" +#include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/iomgr/call_combiner.h b/src/core/lib/iomgr/call_combiner.h index 23488f51cfc..8e4b7189798 100644 --- a/src/core/lib/iomgr/call_combiner.h +++ b/src/core/lib/iomgr/call_combiner.h @@ -19,14 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_CALL_COMBINER_H #define GRPC_SRC_CORE_LIB_IOMGR_CALL_COMBINER_H +#include +#include #include #include "absl/container/inlined_vector.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/dynamic_annotations.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/iomgr/cfstream_handle.cc b/src/core/lib/iomgr/cfstream_handle.cc index e70393f6abd..0b64b87f3dd 100644 --- a/src/core/lib/iomgr/cfstream_handle.cc +++ b/src/core/lib/iomgr/cfstream_handle.cc @@ -23,13 +23,11 @@ #ifdef GRPC_CFSTREAM #import - -#include "absl/log/log.h" - #include #include #include +#include "absl/log/log.h" #include "src/core/lib/debug/trace.h" #import "src/core/lib/iomgr/cfstream_handle.h" #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/lib/iomgr/closure.cc b/src/core/lib/iomgr/closure.cc index 12ff26a9156..bbc81f8445e 100644 --- a/src/core/lib/iomgr/closure.cc +++ b/src/core/lib/iomgr/closure.cc @@ -14,10 +14,10 @@ #include "src/core/lib/iomgr/closure.h" -#include "absl/strings/str_format.h" - #include +#include "absl/strings/str_format.h" + std::string grpc_closure::DebugString() const { #ifdef NDEBUG return absl::StrFormat("%p", this); diff --git a/src/core/lib/iomgr/closure.h b/src/core/lib/iomgr/closure.h index cb08c23e7c7..cf01653e9d8 100644 --- a/src/core/lib/iomgr/closure.h +++ b/src/core/lib/iomgr/closure.h @@ -20,14 +20,12 @@ #define GRPC_SRC_CORE_LIB_IOMGR_CLOSURE_H #include +#include +#include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/util/crash.h" #include "src/core/util/debug_location.h" diff --git a/src/core/lib/iomgr/combiner.cc b/src/core/lib/iomgr/combiner.cc index 31f7b204af9..81f33c70a2b 100644 --- a/src/core/lib/iomgr/combiner.cc +++ b/src/core/lib/iomgr/combiner.cc @@ -19,15 +19,13 @@ #include "src/core/lib/iomgr/combiner.h" #include +#include +#include #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr_internal.h" diff --git a/src/core/lib/iomgr/combiner.h b/src/core/lib/iomgr/combiner.h index af15e83af29..f7fd6bd6955 100644 --- a/src/core/lib/iomgr/combiner.h +++ b/src/core/lib/iomgr/combiner.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_COMBINER_H #define GRPC_SRC_CORE_LIB_IOMGR_COMBINER_H -#include - #include #include +#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index c4b70abe4f3..9825d21a6b5 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_ENDPOINT_H #define GRPC_SRC_CORE_LIB_IOMGR_ENDPOINT_H -#include "absl/strings/string_view.h" - #include #include #include #include +#include "absl/strings/string_view.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/src/core/lib/iomgr/endpoint_cfstream.cc b/src/core/lib/iomgr/endpoint_cfstream.cc index c542c6ae6bc..3177567e948 100644 --- a/src/core/lib/iomgr/endpoint_cfstream.cc +++ b/src/core/lib/iomgr/endpoint_cfstream.cc @@ -23,14 +23,12 @@ #ifdef GRPC_CFSTREAM_ENDPOINT #import - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/cfstream_handle.h" #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/lib/iomgr/endpoint_pair_posix.cc b/src/core/lib/iomgr/endpoint_pair_posix.cc index 85fb3849f29..04c574560c0 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.cc +++ b/src/core/lib/iomgr/endpoint_pair_posix.cc @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -32,9 +33,6 @@ #include "absl/log/check.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/socket_utils_posix.h" diff --git a/src/core/lib/iomgr/endpoint_pair_windows.cc b/src/core/lib/iomgr/endpoint_pair_windows.cc index f8a746624e6..f30f691323d 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.cc +++ b/src/core/lib/iomgr/endpoint_pair_windows.cc @@ -27,7 +27,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc index d637ab6d20c..90f535bcf5e 100644 --- a/src/core/lib/iomgr/error.cc +++ b/src/core/lib/iomgr/error.cc @@ -17,6 +17,10 @@ // #include "src/core/lib/iomgr/error.h" +#include +#include +#include +#include #include #include @@ -24,12 +28,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include - #include "src/core/util/crash.h" #ifdef GPR_WINDOWS diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index e1fb98107c1..0171c504811 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -19,17 +19,15 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_ERROR_H #define GRPC_SRC_CORE_LIB_IOMGR_ERROR_H -#include -#include - -#include "absl/log/check.h" -#include "absl/status/status.h" - #include #include #include #include +#include +#include +#include "absl/log/check.h" +#include "absl/status/status.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/iomgr/error_cfstream.cc b/src/core/lib/iomgr/error_cfstream.cc index 49f5b0aaddf..b9f7cdf1992 100644 --- a/src/core/lib/iomgr/error_cfstream.cc +++ b/src/core/lib/iomgr/error_cfstream.cc @@ -20,13 +20,11 @@ #ifdef GRPC_CFSTREAM #include +#include #include #include "absl/strings/str_format.h" - -#include - #include "src/core/lib/iomgr/error.h" #define MAX_ERROR_DESCRIPTION 256 diff --git a/src/core/lib/iomgr/ev_apple.cc b/src/core/lib/iomgr/ev_apple.cc index 73ded9294d7..e20f05e5185 100644 --- a/src/core/lib/iomgr/ev_apple.cc +++ b/src/core/lib/iomgr/ev_apple.cc @@ -34,7 +34,6 @@ #include #include "absl/time/time.h" - #include "src/core/lib/iomgr/ev_apple.h" #include "src/core/util/thd.h" #include "src/core/util/time_util.h" diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index ff347ac69d6..a290c3d1bdc 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include #include #include @@ -43,10 +45,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - -#include -#include - #include "src/core/lib/iomgr/block_annotate.h" #include "src/core/lib/iomgr/ev_epoll1_linux.h" #include "src/core/lib/iomgr/ev_posix.h" diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc index 9e955d8c094..32d42c36e27 100644 --- a/src/core/lib/iomgr/ev_poll_posix.cc +++ b/src/core/lib/iomgr/ev_poll_posix.cc @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -37,9 +38,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/lib/iomgr/block_annotate.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/iomgr/iomgr_internal.h" diff --git a/src/core/lib/iomgr/ev_posix.cc b/src/core/lib/iomgr/ev_posix.cc index e195c940d87..055ca6efb5e 100644 --- a/src/core/lib/iomgr/ev_posix.cc +++ b/src/core/lib/iomgr/ev_posix.cc @@ -23,15 +23,13 @@ #ifdef GRPC_POSIX_SOCKET_EV +#include +#include #include #include "absl/log/log.h" #include "absl/strings/str_format.h" #include "absl/strings/str_split.h" - -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/ev_epoll1_linux.h" diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 8573f0568bc..1e40d81f020 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -23,9 +23,8 @@ #ifdef GRPC_POSIX_SOCKET_EV -#include - #include +#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/iomgr/event_engine_shims/closure.cc b/src/core/lib/iomgr/event_engine_shims/closure.cc index 8a362210b80..921401941cf 100644 --- a/src/core/lib/iomgr/event_engine_shims/closure.cc +++ b/src/core/lib/iomgr/event_engine_shims/closure.cc @@ -13,13 +13,12 @@ // limitations under the License. #include "src/core/lib/iomgr/event_engine_shims/closure.h" -#include "absl/functional/any_invocable.h" -#include "absl/log/log.h" -#include "absl/status/status.h" - #include #include +#include "absl/functional/any_invocable.h" +#include "absl/log/log.h" +#include "absl/status/status.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/error_utils.h" diff --git a/src/core/lib/iomgr/event_engine_shims/closure.h b/src/core/lib/iomgr/event_engine_shims/closure.h index 87b4e60bee1..2272f68fed7 100644 --- a/src/core/lib/iomgr/event_engine_shims/closure.h +++ b/src/core/lib/iomgr/event_engine_shims/closure.h @@ -14,11 +14,10 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_EVENT_ENGINE_SHIMS_CLOSURE_H #define GRPC_SRC_CORE_LIB_IOMGR_EVENT_ENGINE_SHIMS_CLOSURE_H -#include "absl/functional/any_invocable.h" - #include #include +#include "absl/functional/any_invocable.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/lib/iomgr/event_engine_shims/endpoint.cc b/src/core/lib/iomgr/event_engine_shims/endpoint.cc index 28b1ef42bf1..5fec956179e 100644 --- a/src/core/lib/iomgr/event_engine_shims/endpoint.cc +++ b/src/core/lib/iomgr/event_engine_shims/endpoint.cc @@ -13,6 +13,13 @@ // limitations under the License. #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" +#include +#include +#include +#include +#include +#include + #include #include #include @@ -23,14 +30,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/extensions/can_track_errors.h" #include "src/core/lib/event_engine/extensions/supports_fd.h" diff --git a/src/core/lib/iomgr/event_engine_shims/endpoint.h b/src/core/lib/iomgr/event_engine_shims/endpoint.h index 2ff27081503..5e59157aa68 100644 --- a/src/core/lib/iomgr/event_engine_shims/endpoint.h +++ b/src/core/lib/iomgr/event_engine_shims/endpoint.h @@ -13,11 +13,11 @@ // limitations under the License. #ifndef GRPC_SRC_CORE_LIB_IOMGR_EVENT_ENGINE_SHIMS_ENDPOINT_H #define GRPC_SRC_CORE_LIB_IOMGR_EVENT_ENGINE_SHIMS_ENDPOINT_H -#include - #include #include +#include + #include "src/core/lib/iomgr/endpoint.h" namespace grpc_event_engine { diff --git a/src/core/lib/iomgr/event_engine_shims/tcp_client.cc b/src/core/lib/iomgr/event_engine_shims/tcp_client.cc index 2880415e192..16d27f005a2 100644 --- a/src/core/lib/iomgr/event_engine_shims/tcp_client.cc +++ b/src/core/lib/iomgr/event_engine_shims/tcp_client.cc @@ -13,13 +13,12 @@ // limitations under the License. #include "src/core/lib/iomgr/event_engine_shims/tcp_client.h" -#include "absl/status/status.h" -#include "absl/status/statusor.h" - #include #include #include +#include "absl/status/status.h" +#include "absl/status/statusor.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/default_event_engine.h" diff --git a/src/core/lib/iomgr/exec_ctx.cc b/src/core/lib/iomgr/exec_ctx.cc index 6bb16390008..23d4248eaa9 100644 --- a/src/core/lib/iomgr/exec_ctx.cc +++ b/src/core/lib/iomgr/exec_ctx.cc @@ -18,13 +18,12 @@ #include "src/core/lib/iomgr/exec_ctx.h" -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/strings/str_format.h" - #include #include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/str_format.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/error.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 0bda1d9af88..2b608ca9a4d 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -19,22 +19,21 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_EXEC_CTX_H #define GRPC_SRC_CORE_LIB_IOMGR_EXEC_CTX_H -#include - #include +#include + #if __APPLE__ // Provides TARGET_OS_IPHONE #include #endif -#include "absl/log/check.h" - #include #include #include #include +#include "absl/log/check.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/util/debug_location.h" diff --git a/src/core/lib/iomgr/executor.cc b/src/core/lib/iomgr/executor.cc index 9c427b6fd12..b9ff3a5f78f 100644 --- a/src/core/lib/iomgr/executor.cc +++ b/src/core/lib/iomgr/executor.cc @@ -18,17 +18,15 @@ #include "src/core/lib/iomgr/executor.h" -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/strings/str_format.h" - #include #include #include #include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/str_format.h" #include "src/core/lib/debug/trace_impl.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_internal.h" diff --git a/src/core/lib/iomgr/fork_posix.cc b/src/core/lib/iomgr/fork_posix.cc index 37059aaa815..0d784ea53cc 100644 --- a/src/core/lib/iomgr/fork_posix.cc +++ b/src/core/lib/iomgr/fork_posix.cc @@ -26,13 +26,11 @@ #include #endif -#include - -#include "absl/log/log.h" - #include #include +#include +#include "absl/log/log.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/timer_manager.h" diff --git a/src/core/lib/iomgr/fork_windows.cc b/src/core/lib/iomgr/fork_windows.cc index 84d0609e2a0..baf9e212469 100644 --- a/src/core/lib/iomgr/fork_windows.cc +++ b/src/core/lib/iomgr/fork_windows.cc @@ -22,10 +22,10 @@ #ifndef GRPC_POSIX_FORK -#include "absl/log/log.h" - #include +#include "absl/log/log.h" + // // NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK // AROUND VERY SPECIFIC USE CASES. diff --git a/src/core/lib/iomgr/internal_errqueue.cc b/src/core/lib/iomgr/internal_errqueue.cc index 65199cd8e35..d5386498a53 100644 --- a/src/core/lib/iomgr/internal_errqueue.cc +++ b/src/core/lib/iomgr/internal_errqueue.cc @@ -14,10 +14,9 @@ #include "src/core/lib/iomgr/internal_errqueue.h" -#include "absl/log/log.h" - #include +#include "absl/log/log.h" #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET_TCP diff --git a/src/core/lib/iomgr/iocp_windows.cc b/src/core/lib/iomgr/iocp_windows.cc index 51eae975fbc..12b8cb31c63 100644 --- a/src/core/lib/iomgr/iocp_windows.cc +++ b/src/core/lib/iomgr/iocp_windows.cc @@ -22,16 +22,14 @@ #ifdef GRPC_WINSOCK_SOCKET +#include +#include #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/socket_windows.h" diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc index a4fce10be34..39e0504d0d7 100644 --- a/src/core/lib/iomgr/iomgr.cc +++ b/src/core/lib/iomgr/iomgr.cc @@ -18,17 +18,15 @@ #include "src/core/lib/iomgr/iomgr.h" -#include -#include -#include - -#include "absl/log/log.h" - #include #include #include #include +#include +#include +#include +#include "absl/log/log.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/buffer_list.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/iomgr/iomgr.h b/src/core/lib/iomgr/iomgr.h index 3c4a5987f19..280471fae87 100644 --- a/src/core/lib/iomgr/iomgr.h +++ b/src/core/lib/iomgr/iomgr.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_IOMGR_H #define GRPC_SRC_CORE_LIB_IOMGR_IOMGR_H -#include - #include +#include #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/iomgr_internal.cc b/src/core/lib/iomgr/iomgr_internal.cc index 81c1b829247..f5bb42e53d5 100644 --- a/src/core/lib/iomgr/iomgr_internal.cc +++ b/src/core/lib/iomgr/iomgr_internal.cc @@ -18,9 +18,8 @@ #include "src/core/lib/iomgr/iomgr_internal.h" -#include - #include +#include static grpc_iomgr_platform_vtable* iomgr_platform_vtable = nullptr; diff --git a/src/core/lib/iomgr/iomgr_internal.h b/src/core/lib/iomgr/iomgr_internal.h index a3a8ceb178a..c0d34a9d0a5 100644 --- a/src/core/lib/iomgr/iomgr_internal.h +++ b/src/core/lib/iomgr/iomgr_internal.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H #define GRPC_SRC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H -#include - #include +#include #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/lib/iomgr/iomgr_windows.cc b/src/core/lib/iomgr/iomgr_windows.cc index fe1d24a3492..2d8716c54ee 100644 --- a/src/core/lib/iomgr/iomgr_windows.cc +++ b/src/core/lib/iomgr/iomgr_windows.cc @@ -23,7 +23,6 @@ #ifdef GRPC_WINSOCK_SOCKET #include "absl/log/check.h" - #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr.h" diff --git a/src/core/lib/iomgr/lockfree_event.cc b/src/core/lib/iomgr/lockfree_event.cc index 53700d13749..42023ef4615 100644 --- a/src/core/lib/iomgr/lockfree_event.cc +++ b/src/core/lib/iomgr/lockfree_event.cc @@ -18,11 +18,10 @@ #include "src/core/lib/iomgr/lockfree_event.h" -#include "absl/log/check.h" -#include "absl/log/log.h" - #include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/iomgr/polling_entity.cc b/src/core/lib/iomgr/polling_entity.cc index 918af4a7f65..8a5ad277f24 100644 --- a/src/core/lib/iomgr/polling_entity.cc +++ b/src/core/lib/iomgr/polling_entity.cc @@ -18,12 +18,11 @@ #include "src/core/lib/iomgr/polling_entity.h" -#include "absl/log/check.h" -#include "absl/strings/str_format.h" - #include #include +#include "absl/log/check.h" +#include "absl/strings/str_format.h" #include "src/core/util/crash.h" grpc_polling_entity grpc_polling_entity_create_from_pollset_set( diff --git a/src/core/lib/iomgr/pollset_set_windows.cc b/src/core/lib/iomgr/pollset_set_windows.cc index 46dd8d20977..c40eccf95e4 100644 --- a/src/core/lib/iomgr/pollset_set_windows.cc +++ b/src/core/lib/iomgr/pollset_set_windows.cc @@ -16,9 +16,8 @@ // // -#include - #include +#include #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/resolve_address.cc b/src/core/lib/iomgr/resolve_address.cc index a6130701fec..3a0d1b106e1 100644 --- a/src/core/lib/iomgr/resolve_address.cc +++ b/src/core/lib/iomgr/resolve_address.cc @@ -17,12 +17,11 @@ // #include "src/core/lib/iomgr/resolve_address.h" -#include "absl/strings/str_cat.h" - #include #include #include +#include "absl/strings/str_cat.h" #include "src/core/util/crash.h" #include "src/core/util/no_destruct.h" diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h index c8c94b00c0b..5a8279ae9c4 100644 --- a/src/core/lib/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -19,14 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H #define GRPC_SRC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H +#include +#include #include #include "absl/container/flat_hash_set.h" #include "absl/status/statusor.h" - -#include -#include - #include "src/core/lib/event_engine/handle_containers.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/resolve_address_impl.h b/src/core/lib/iomgr/resolve_address_impl.h index a6e072dd919..4c3cbe0d92b 100644 --- a/src/core/lib/iomgr/resolve_address_impl.h +++ b/src/core/lib/iomgr/resolve_address_impl.h @@ -17,9 +17,8 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_IMPL_H #define GRPC_SRC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_IMPL_H -#include - #include +#include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/resolve_address_posix.cc b/src/core/lib/iomgr/resolve_address_posix.cc index 0dd2e449575..fe1d4c99a93 100644 --- a/src/core/lib/iomgr/resolve_address_posix.cc +++ b/src/core/lib/iomgr/resolve_address_posix.cc @@ -21,12 +21,11 @@ #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET_RESOLVE_ADDRESS -#include -#include - #include #include #include +#include +#include #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/block_annotate.h" diff --git a/src/core/lib/iomgr/resolve_address_posix.h b/src/core/lib/iomgr/resolve_address_posix.h index 15986358e80..cb37cbc9a75 100644 --- a/src/core/lib/iomgr/resolve_address_posix.h +++ b/src/core/lib/iomgr/resolve_address_posix.h @@ -17,10 +17,10 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_POSIX_H #define GRPC_SRC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_POSIX_H -#include - #include +#include + #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/resolve_address_windows.cc b/src/core/lib/iomgr/resolve_address_windows.cc index 9db5b689954..1dc7ee3d1fc 100644 --- a/src/core/lib/iomgr/resolve_address_windows.cc +++ b/src/core/lib/iomgr/resolve_address_windows.cc @@ -19,6 +19,10 @@ #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET +#include +#include +#include +#include #include #include #include @@ -26,12 +30,6 @@ #include #include "absl/strings/str_format.h" - -#include -#include -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/block_annotate.h" diff --git a/src/core/lib/iomgr/resolve_address_windows.h b/src/core/lib/iomgr/resolve_address_windows.h index eea5c44111e..6d608efd2e8 100644 --- a/src/core/lib/iomgr/resolve_address_windows.h +++ b/src/core/lib/iomgr/resolve_address_windows.h @@ -17,10 +17,10 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_WINDOWS_H #define GRPC_SRC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_WINDOWS_H -#include - #include +#include + #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/resolved_address.h b/src/core/lib/iomgr/resolved_address.h index e16f7fc27f9..c622bdb5126 100644 --- a/src/core/lib/iomgr/resolved_address.h +++ b/src/core/lib/iomgr/resolved_address.h @@ -15,9 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_RESOLVED_ADDRESS_H #define GRPC_SRC_CORE_LIB_IOMGR_RESOLVED_ADDRESS_H -#include - #include +#include #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/sockaddr_utils_posix.cc b/src/core/lib/iomgr/sockaddr_utils_posix.cc index 8fc4d5a186e..a522df8aecd 100644 --- a/src/core/lib/iomgr/sockaddr_utils_posix.cc +++ b/src/core/lib/iomgr/sockaddr_utils_posix.cc @@ -30,6 +30,8 @@ #else #include #endif +#include +#include #include #include #include @@ -38,10 +40,6 @@ #include #include "absl/log/check.h" - -#include -#include - #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/iomgr/socket_mutator.h b/src/core/lib/iomgr/socket_mutator.h index e919d3caaa4..9ce180b3452 100644 --- a/src/core/lib/iomgr/socket_mutator.h +++ b/src/core/lib/iomgr/socket_mutator.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_SOCKET_MUTATOR_H #define GRPC_SRC_CORE_LIB_IOMGR_SOCKET_MUTATOR_H -#include - #include #include #include +#include /// How is an fd to be used? typedef enum { diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index 75d3082677d..f6c4c27d6de 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_SOCKET_UTILS_H #define GRPC_SRC_CORE_LIB_IOMGR_SOCKET_UTILS_H -#include - #include +#include // TODO(juanlishen): The following functions might be simple enough to implement // ourselves, so that they don't cause any portability hassle. diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc index 49b1c349795..8b1af9db729 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.cc +++ b/src/core/lib/iomgr/socket_utils_common_posix.cc @@ -35,6 +35,9 @@ #else #include #endif +#include +#include +#include #include #include #include @@ -46,11 +49,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/iomgr/socket_utils_posix.cc b/src/core/lib/iomgr/socket_utils_posix.cc index ebd2d586069..aa356e591c8 100644 --- a/src/core/lib/iomgr/socket_utils_posix.cc +++ b/src/core/lib/iomgr/socket_utils_posix.cc @@ -16,19 +16,17 @@ // // -#include "absl/types/optional.h" - #include +#include "absl/types/optional.h" #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKETUTILS #include +#include #include #include -#include - #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/iomgr/socket_windows.cc b/src/core/lib/iomgr/socket_windows.cc index 6ace1af6bc4..8ec4eaa1366 100644 --- a/src/core/lib/iomgr/socket_windows.cc +++ b/src/core/lib/iomgr/socket_windows.cc @@ -25,15 +25,13 @@ #include // must be included after winsock2.h +#include +#include #include #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/pollset.h" diff --git a/src/core/lib/iomgr/socket_windows.h b/src/core/lib/iomgr/socket_windows.h index 418685a5d3d..3c272b72c6e 100644 --- a/src/core/lib/iomgr/socket_windows.h +++ b/src/core/lib/iomgr/socket_windows.h @@ -24,10 +24,9 @@ #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET -#include - #include #include +#include #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/iomgr_internal.h" diff --git a/src/core/lib/iomgr/tcp_client_cfstream.cc b/src/core/lib/iomgr/tcp_client_cfstream.cc index c091737b96c..141a9c76f52 100644 --- a/src/core/lib/iomgr/tcp_client_cfstream.cc +++ b/src/core/lib/iomgr/tcp_client_cfstream.cc @@ -24,15 +24,13 @@ #ifdef GRPC_CFSTREAM_CLIENT #include -#include -#include - -#include "absl/log/log.h" - #include #include #include +#include +#include +#include "absl/log/log.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/shim.h" #include "src/core/lib/iomgr/cfstream_handle.h" diff --git a/src/core/lib/iomgr/tcp_client_posix.cc b/src/core/lib/iomgr/tcp_client_posix.cc index a66807cf111..9394ec75783 100644 --- a/src/core/lib/iomgr/tcp_client_posix.cc +++ b/src/core/lib/iomgr/tcp_client_posix.cc @@ -24,6 +24,8 @@ #ifdef GRPC_POSIX_SOCKET_TCP_CLIENT #include +#include +#include #include #include #include @@ -32,10 +34,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/resolved_address_internal.h" #include "src/core/lib/event_engine/shim.h" diff --git a/src/core/lib/iomgr/tcp_client_windows.cc b/src/core/lib/iomgr/tcp_client_windows.cc index c19e81d8131..5cc135d809d 100644 --- a/src/core/lib/iomgr/tcp_client_windows.cc +++ b/src/core/lib/iomgr/tcp_client_windows.cc @@ -16,21 +16,19 @@ // // -#include - #include +#include #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET -#include "absl/log/check.h" - #include #include #include #include +#include "absl/log/check.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/shim.h" #include "src/core/lib/iomgr/event_engine_shims/tcp_client.h" diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index a53d983db33..1b45c36efff 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -16,21 +16,25 @@ // // +#include +#include + #include "absl/base/thread_annotations.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET_TCP #include +#include +#include +#include +#include +#include #include #include #include @@ -47,13 +51,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h index 8b1feece209..5f5197bbc4f 100644 --- a/src/core/lib/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -19,13 +19,13 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_TCP_SERVER_H #define GRPC_SRC_CORE_LIB_IOMGR_TCP_SERVER_H -#include - #include #include #include #include +#include + #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/tcp_server_posix.cc b/src/core/lib/iomgr/tcp_server_posix.cc index fdd3d96c63e..357412fa9ee 100644 --- a/src/core/lib/iomgr/tcp_server_posix.cc +++ b/src/core/lib/iomgr/tcp_server_posix.cc @@ -16,11 +16,11 @@ // // -#include - #include #include +#include + // FIXME: "posix" files shouldn't be depending on _GNU_SOURCE #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -32,6 +32,12 @@ #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -47,14 +53,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/memory_allocator_factory.h" diff --git a/src/core/lib/iomgr/tcp_server_utils_posix.h b/src/core/lib/iomgr/tcp_server_utils_posix.h index fcf97da7926..a726c750279 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix.h +++ b/src/core/lib/iomgr/tcp_server_utils_posix.h @@ -19,12 +19,11 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_TCP_SERVER_UTILS_POSIX_H #define GRPC_SRC_CORE_LIB_IOMGR_TCP_SERVER_UTILS_POSIX_H +#include + #include #include "absl/container/flat_hash_map.h" - -#include - #include "src/core/lib/event_engine/posix.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc index 7ec14525002..638e3221614 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc @@ -24,6 +24,8 @@ #ifdef GRPC_POSIX_SOCKET_TCP_SERVER_UTILS_COMMON #include +#include +#include #include #include #include @@ -34,10 +36,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc index 89c69d8beb2..2dad0bb1be4 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc @@ -23,6 +23,7 @@ #ifdef GRPC_HAVE_IFADDRS #include +#include #include #include #include @@ -33,9 +34,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/lib/iomgr/tcp_server_windows.cc b/src/core/lib/iomgr/tcp_server_windows.cc index ed32fcb25b0..e5fcac64277 100644 --- a/src/core/lib/iomgr/tcp_server_windows.cc +++ b/src/core/lib/iomgr/tcp_server_windows.cc @@ -22,15 +22,6 @@ #ifdef GRPC_WINSOCK_SOCKET -#include -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/strings/str_cat.h" - #include #include #include @@ -39,7 +30,14 @@ #include #include #include +#include +#include + +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/str_cat.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/memory_allocator_factory.h" #include "src/core/lib/event_engine/resolved_address_internal.h" diff --git a/src/core/lib/iomgr/tcp_windows.cc b/src/core/lib/iomgr/tcp_windows.cc index 9574531c57d..e52ca28089f 100644 --- a/src/core/lib/iomgr/tcp_windows.cc +++ b/src/core/lib/iomgr/tcp_windows.cc @@ -22,15 +22,13 @@ #ifdef GRPC_WINSOCK_SOCKET -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/lib/iomgr/timer.h b/src/core/lib/iomgr/timer.h index 299331f0320..5d84066f942 100644 --- a/src/core/lib/iomgr/timer.h +++ b/src/core/lib/iomgr/timer.h @@ -19,12 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_TIMER_H #define GRPC_SRC_CORE_LIB_IOMGR_TIMER_H -#include - #include #include #include +#include + #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/timer_generic.cc b/src/core/lib/iomgr/timer_generic.cc index 4d940942c47..3e5f604603a 100644 --- a/src/core/lib/iomgr/timer_generic.cc +++ b/src/core/lib/iomgr/timer_generic.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include +#include #include #include @@ -24,12 +28,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/port.h" diff --git a/src/core/lib/iomgr/timer_heap.cc b/src/core/lib/iomgr/timer_heap.cc index 8f7d950e699..617f76ade0f 100644 --- a/src/core/lib/iomgr/timer_heap.cc +++ b/src/core/lib/iomgr/timer_heap.cc @@ -18,10 +18,9 @@ #include "src/core/lib/iomgr/timer_heap.h" -#include - #include #include +#include #include "src/core/lib/iomgr/port.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc index 5d2015ef50c..9a3362e0ef4 100644 --- a/src/core/lib/iomgr/timer_manager.cc +++ b/src/core/lib/iomgr/timer_manager.cc @@ -18,14 +18,12 @@ #include "src/core/lib/iomgr/timer_manager.h" +#include +#include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/iomgr/timer_manager.h b/src/core/lib/iomgr/timer_manager.h index c2e662b4943..47b6c132bdc 100644 --- a/src/core/lib/iomgr/timer_manager.h +++ b/src/core/lib/iomgr/timer_manager.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_TIMER_MANAGER_H #define GRPC_SRC_CORE_LIB_IOMGR_TIMER_MANAGER_H -#include - #include +#include // Timer Manager tries to keep only one thread waiting for the next timeout at // all times, and thus effectively preventing the thundering herd problem. diff --git a/src/core/lib/iomgr/unix_sockets_posix.cc b/src/core/lib/iomgr/unix_sockets_posix.cc index 01a18602ff6..90ae7817d78 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.cc +++ b/src/core/lib/iomgr/unix_sockets_posix.cc @@ -33,11 +33,10 @@ #include #endif // GPR_WINDOWS -#include "absl/log/check.h" -#include "absl/strings/str_cat.h" - #include +#include "absl/log/check.h" +#include "absl/strings/str_cat.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h index d63a56e8d00..f6e6418a312 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.h +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H #define GRPC_SRC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H -#include - -#include "absl/strings/string_view.h" - #include #include +#include + +#include "absl/strings/string_view.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/vsock.cc b/src/core/lib/iomgr/vsock.cc index 45a769998bf..a830668cf4c 100644 --- a/src/core/lib/iomgr/vsock.cc +++ b/src/core/lib/iomgr/vsock.cc @@ -21,14 +21,12 @@ #ifdef GRPC_HAVE_VSOCK +#include #include #include #include #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/transport/error_utils.h" diff --git a/src/core/lib/iomgr/vsock.h b/src/core/lib/iomgr/vsock.h index 08280c32a0a..1bd3a2c71fe 100644 --- a/src/core/lib/iomgr/vsock.h +++ b/src/core/lib/iomgr/vsock.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_IOMGR_VSOCK_H #define GRPC_SRC_CORE_LIB_IOMGR_VSOCK_H -#include - -#include "absl/strings/string_view.h" - #include #include +#include + +#include "absl/strings/string_view.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.cc b/src/core/lib/iomgr/wakeup_fd_pipe.cc index e2640d263c9..9fc196e18a6 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.cc +++ b/src/core/lib/iomgr/wakeup_fd_pipe.cc @@ -27,7 +27,6 @@ #include #include "absl/log/log.h" - #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/wakeup_fd_pipe.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" diff --git a/src/core/lib/promise/activity.cc b/src/core/lib/promise/activity.cc index 7f495ddb1b3..1a0a52d7b64 100644 --- a/src/core/lib/promise/activity.cc +++ b/src/core/lib/promise/activity.cc @@ -14,6 +14,7 @@ #include "src/core/lib/promise/activity.h" +#include #include #include @@ -22,9 +23,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - -#include - #include "src/core/util/atomic_utils.h" namespace grpc_core { diff --git a/src/core/lib/promise/activity.h b/src/core/lib/promise/activity.h index b84fc473b62..1bb57bb3f78 100644 --- a/src/core/lib/promise/activity.h +++ b/src/core/lib/promise/activity.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_ACTIVITY_H #define GRPC_SRC_CORE_LIB_PROMISE_ACTIVITY_H +#include #include #include @@ -28,9 +29,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/detail/promise_factory.h" diff --git a/src/core/lib/promise/all_ok.h b/src/core/lib/promise/all_ok.h index 63abaf754d1..72d9d3815b3 100644 --- a/src/core/lib/promise/all_ok.h +++ b/src/core/lib/promise/all_ok.h @@ -15,15 +15,14 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_ALL_OK_H #define GRPC_SRC_CORE_LIB_PROMISE_ALL_OK_H +#include + #include #include #include "absl/meta/type_traits.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/lib/promise/detail/join_state.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/arena_promise.h b/src/core/lib/promise/arena_promise.h index 7f4bb0de563..e03d6280829 100644 --- a/src/core/lib/promise/arena_promise.h +++ b/src/core/lib/promise/arena_promise.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_ARENA_PROMISE_H #define GRPC_SRC_CORE_LIB_PROMISE_ARENA_PROMISE_H +#include #include #include @@ -23,9 +24,6 @@ #include #include "absl/meta/type_traits.h" - -#include - #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/resource_quota/arena.h" diff --git a/src/core/lib/promise/context.h b/src/core/lib/promise/context.h index c720dfe35b1..a0eed9396e8 100644 --- a/src/core/lib/promise/context.h +++ b/src/core/lib/promise/context.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_CONTEXT_H #define GRPC_SRC_CORE_LIB_PROMISE_CONTEXT_H +#include + #include #include "absl/log/check.h" #include "absl/meta/type_traits.h" - -#include - #include "src/core/util/down_cast.h" namespace grpc_core { diff --git a/src/core/lib/promise/detail/join_state.h b/src/core/lib/promise/detail/join_state.h index 032f6b304f0..767ca8d787d 100644 --- a/src/core/lib/promise/detail/join_state.h +++ b/src/core/lib/promise/detail/join_state.h @@ -17,15 +17,14 @@ // This file is generated by tools/codegen/core/gen_join.py +#include + #include #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/detail/promise_factory.h b/src/core/lib/promise/detail/promise_factory.h index 1e507743929..49dc25c3301 100644 --- a/src/core/lib/promise/detail/promise_factory.h +++ b/src/core/lib/promise/detail/promise_factory.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_DETAIL_PROMISE_FACTORY_H #define GRPC_SRC_CORE_LIB_PROMISE_DETAIL_PROMISE_FACTORY_H +#include + #include #include #include #include "absl/meta/type_traits.h" - -#include - #include "src/core/lib/promise/detail/promise_like.h" // PromiseFactory is an adaptor class. diff --git a/src/core/lib/promise/detail/promise_like.h b/src/core/lib/promise/detail/promise_like.h index 60a7fcc26b0..8515e8b46fb 100644 --- a/src/core/lib/promise/detail/promise_like.h +++ b/src/core/lib/promise/detail/promise_like.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_DETAIL_PROMISE_LIKE_H #define GRPC_SRC_CORE_LIB_PROMISE_DETAIL_PROMISE_LIKE_H +#include + #include #include "absl/functional/any_invocable.h" #include "absl/meta/type_traits.h" - -#include - #include "src/core/lib/promise/poll.h" // A Promise is a callable object that returns Poll for some T. diff --git a/src/core/lib/promise/detail/seq_state.h b/src/core/lib/promise/detail/seq_state.h index 47810f19141..da9880044ce 100644 --- a/src/core/lib/promise/detail/seq_state.h +++ b/src/core/lib/promise/detail/seq_state.h @@ -17,6 +17,7 @@ // This file is generated by tools/codegen/core/gen_seq.py +#include #include #include @@ -25,9 +26,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/detail/promise_like.h" diff --git a/src/core/lib/promise/detail/status.h b/src/core/lib/promise/detail/status.h index 42847c6ba6d..d33c32644cf 100644 --- a/src/core/lib/promise/detail/status.h +++ b/src/core/lib/promise/detail/status.h @@ -15,14 +15,14 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_DETAIL_STATUS_H #define GRPC_SRC_CORE_LIB_PROMISE_DETAIL_STATUS_H +#include + #include #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/status/statusor.h" -#include - // Helpers for dealing with absl::Status/StatusOr generically namespace grpc_core { diff --git a/src/core/lib/promise/event_engine_wakeup_scheduler.h b/src/core/lib/promise/event_engine_wakeup_scheduler.h index eedd48357c3..3e494beaa6f 100644 --- a/src/core/lib/promise/event_engine_wakeup_scheduler.h +++ b/src/core/lib/promise/event_engine_wakeup_scheduler.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_EVENT_ENGINE_WAKEUP_SCHEDULER_H #define GRPC_SRC_CORE_LIB_PROMISE_EVENT_ENGINE_WAKEUP_SCHEDULER_H +#include +#include + #include #include #include "absl/log/check.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" namespace grpc_core { diff --git a/src/core/lib/promise/exec_ctx_wakeup_scheduler.h b/src/core/lib/promise/exec_ctx_wakeup_scheduler.h index cc36e1ff747..c66fc233b21 100644 --- a/src/core/lib/promise/exec_ctx_wakeup_scheduler.h +++ b/src/core/lib/promise/exec_ctx_wakeup_scheduler.h @@ -15,10 +15,9 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_EXEC_CTX_WAKEUP_SCHEDULER_H #define GRPC_SRC_CORE_LIB_PROMISE_EXEC_CTX_WAKEUP_SCHEDULER_H -#include "absl/status/status.h" - #include +#include "absl/status/status.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/promise/for_each.h b/src/core/lib/promise/for_each.h index 5fcaf0094a0..c990f249845 100644 --- a/src/core/lib/promise/for_each.h +++ b/src/core/lib/promise/for_each.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_FOR_EACH_H #define GRPC_SRC_CORE_LIB_PROMISE_FOR_EACH_H +#include #include #include @@ -24,9 +25,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/detail/promise_factory.h" diff --git a/src/core/lib/promise/if.h b/src/core/lib/promise/if.h index d75aec9a5ff..55d18aa74c7 100644 --- a/src/core/lib/promise/if.h +++ b/src/core/lib/promise/if.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_IF_H #define GRPC_SRC_CORE_LIB_PROMISE_IF_H +#include + #include #include #include "absl/status/statusor.h" #include "absl/types/variant.h" - -#include - #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/inter_activity_latch.h b/src/core/lib/promise/inter_activity_latch.h index c5e89626505..a5a614dcf9f 100644 --- a/src/core/lib/promise/inter_activity_latch.h +++ b/src/core/lib/promise/inter_activity_latch.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_INTER_ACTIVITY_LATCH_H #define GRPC_SRC_CORE_LIB_PROMISE_INTER_ACTIVITY_LATCH_H +#include #include #include @@ -22,9 +23,6 @@ #include "absl/base/thread_annotations.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/inter_activity_pipe.h b/src/core/lib/promise/inter_activity_pipe.h index f6a2144dadb..08e71608e31 100644 --- a/src/core/lib/promise/inter_activity_pipe.h +++ b/src/core/lib/promise/inter_activity_pipe.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_INTER_ACTIVITY_PIPE_H #define GRPC_SRC_CORE_LIB_PROMISE_INTER_ACTIVITY_PIPE_H +#include #include #include @@ -22,9 +23,6 @@ #include "absl/base/thread_annotations.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/lib/promise/interceptor_list.h b/src/core/lib/promise/interceptor_list.h index d75e6452892..a36f90d1142 100644 --- a/src/core/lib/promise/interceptor_list.h +++ b/src/core/lib/promise/interceptor_list.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_INTERCEPTOR_LIST_H #define GRPC_SRC_CORE_LIB_PROMISE_INTERCEPTOR_LIST_H +#include #include #include @@ -27,9 +28,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/join.h b/src/core/lib/promise/join.h index 0206baabccc..81619e33142 100644 --- a/src/core/lib/promise/join.h +++ b/src/core/lib/promise/join.h @@ -15,14 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_JOIN_H #define GRPC_SRC_CORE_LIB_PROMISE_JOIN_H +#include #include #include #include "absl/meta/type_traits.h" - -#include - #include "src/core/lib/promise/detail/join_state.h" #include "src/core/lib/promise/map.h" diff --git a/src/core/lib/promise/latch.h b/src/core/lib/promise/latch.h index 10f4776117f..63e298016b8 100644 --- a/src/core/lib/promise/latch.h +++ b/src/core/lib/promise/latch.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_LATCH_H #define GRPC_SRC_CORE_LIB_PROMISE_LATCH_H +#include #include #include @@ -24,9 +25,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/loop.h b/src/core/lib/promise/loop.h index a7e4195cdea..768746f7b60 100644 --- a/src/core/lib/promise/loop.h +++ b/src/core/lib/promise/loop.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_LOOP_H #define GRPC_SRC_CORE_LIB_PROMISE_LOOP_H +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/types/variant.h" - -#include - #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/poll.h" #include "src/core/util/construct_destruct.h" diff --git a/src/core/lib/promise/map.h b/src/core/lib/promise/map.h index 3ba8c19c2f6..52023fd2dc7 100644 --- a/src/core/lib/promise/map.h +++ b/src/core/lib/promise/map.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_MAP_H #define GRPC_SRC_CORE_LIB_PROMISE_MAP_H +#include #include #include #include -#include - #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/map_pipe.h b/src/core/lib/promise/map_pipe.h index 2915a9376b5..1888100fbb5 100644 --- a/src/core/lib/promise/map_pipe.h +++ b/src/core/lib/promise/map_pipe.h @@ -15,11 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_MAP_PIPE_H #define GRPC_SRC_CORE_LIB_PROMISE_MAP_PIPE_H -#include "absl/log/log.h" -#include "absl/status/status.h" - #include +#include "absl/log/log.h" +#include "absl/status/status.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/for_each.h" #include "src/core/lib/promise/map.h" diff --git a/src/core/lib/promise/mpsc.h b/src/core/lib/promise/mpsc.h index 02c8d2f97a4..fa77ecb03fb 100644 --- a/src/core/lib/promise/mpsc.h +++ b/src/core/lib/promise/mpsc.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_MPSC_H #define GRPC_SRC_CORE_LIB_PROMISE_MPSC_H +#include #include #include @@ -25,9 +26,6 @@ #include "absl/base/thread_annotations.h" #include "absl/log/check.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/promise/wait_set.h" diff --git a/src/core/lib/promise/observable.h b/src/core/lib/promise/observable.h index 0f500d66317..671348ff9a2 100644 --- a/src/core/lib/promise/observable.h +++ b/src/core/lib/promise/observable.h @@ -15,12 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_OBSERVABLE_H #define GRPC_SRC_CORE_LIB_PROMISE_OBSERVABLE_H +#include + #include "absl/container/flat_hash_set.h" #include "absl/functional/any_invocable.h" #include "absl/log/check.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/promise/party.cc b/src/core/lib/promise/party.cc index 79c310c9806..ed0e3af639b 100644 --- a/src/core/lib/promise/party.cc +++ b/src/core/lib/promise/party.cc @@ -14,6 +14,8 @@ #include "src/core/lib/promise/party.h" +#include + #include #include @@ -21,9 +23,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" diff --git a/src/core/lib/promise/party.h b/src/core/lib/promise/party.h index d2051aa6083..9066c3a7de3 100644 --- a/src/core/lib/promise/party.h +++ b/src/core/lib/promise/party.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_PARTY_H #define GRPC_SRC_CORE_LIB_PROMISE_PARTY_H +#include +#include #include #include @@ -27,10 +29,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/context.h" diff --git a/src/core/lib/promise/pipe.h b/src/core/lib/promise/pipe.h index f3dac4532af..71ce810b704 100644 --- a/src/core/lib/promise/pipe.h +++ b/src/core/lib/promise/pipe.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_PIPE_H #define GRPC_SRC_CORE_LIB_PROMISE_PIPE_H +#include #include #include @@ -27,9 +28,6 @@ #include "absl/strings/str_cat.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/if.h" diff --git a/src/core/lib/promise/poll.h b/src/core/lib/promise/poll.h index 9b895cea032..879a5f42335 100644 --- a/src/core/lib/promise/poll.h +++ b/src/core/lib/promise/poll.h @@ -15,15 +15,14 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_POLL_H #define GRPC_SRC_CORE_LIB_PROMISE_POLL_H +#include + #include #include #include "absl/log/check.h" #include "absl/strings/str_format.h" #include "absl/types/optional.h" - -#include - #include "src/core/util/construct_destruct.h" namespace grpc_core { diff --git a/src/core/lib/promise/prioritized_race.h b/src/core/lib/promise/prioritized_race.h index bd179c33313..166c4d2dad1 100644 --- a/src/core/lib/promise/prioritized_race.h +++ b/src/core/lib/promise/prioritized_race.h @@ -15,10 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_PRIORITIZED_RACE_H #define GRPC_SRC_CORE_LIB_PROMISE_PRIORITIZED_RACE_H -#include - #include +#include + namespace grpc_core { namespace promise_detail { diff --git a/src/core/lib/promise/promise.h b/src/core/lib/promise/promise.h index cb26a165071..b5ac75d73d2 100644 --- a/src/core/lib/promise/promise.h +++ b/src/core/lib/promise/promise.h @@ -15,15 +15,14 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_PROMISE_H #define GRPC_SRC_CORE_LIB_PROMISE_PROMISE_H +#include + #include #include "absl/functional/any_invocable.h" #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/promise_mutex.h b/src/core/lib/promise/promise_mutex.h index b7014da2494..c17750ff066 100644 --- a/src/core/lib/promise/promise_mutex.h +++ b/src/core/lib/promise/promise_mutex.h @@ -15,12 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_PROMISE_MUTEX_H #define GRPC_SRC_CORE_LIB_PROMISE_PROMISE_MUTEX_H +#include + #include #include "absl/log/check.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/race.h b/src/core/lib/promise/race.h index 83de1a617d7..a17fc074b7d 100644 --- a/src/core/lib/promise/race.h +++ b/src/core/lib/promise/race.h @@ -15,10 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_RACE_H #define GRPC_SRC_CORE_LIB_PROMISE_RACE_H -#include - #include +#include + namespace grpc_core { namespace promise_detail { diff --git a/src/core/lib/promise/seq.h b/src/core/lib/promise/seq.h index 40051ae4939..80cd2981308 100644 --- a/src/core/lib/promise/seq.h +++ b/src/core/lib/promise/seq.h @@ -15,12 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_SEQ_H #define GRPC_SRC_CORE_LIB_PROMISE_SEQ_H +#include #include #include -#include - #include "src/core/lib/promise/detail/basic_seq.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/detail/seq_state.h" diff --git a/src/core/lib/promise/sleep.cc b/src/core/lib/promise/sleep.cc index d31e2a82595..53ae975660f 100644 --- a/src/core/lib/promise/sleep.cc +++ b/src/core/lib/promise/sleep.cc @@ -14,11 +14,11 @@ #include "src/core/lib/promise/sleep.h" -#include - #include #include +#include + #include "src/core/lib/event_engine/event_engine_context.h" // IWYU pragma: keep #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" diff --git a/src/core/lib/promise/sleep.h b/src/core/lib/promise/sleep.h index 0ae4232d7b7..83885a07790 100644 --- a/src/core/lib/promise/sleep.h +++ b/src/core/lib/promise/sleep.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_SLEEP_H #define GRPC_SRC_CORE_LIB_PROMISE_SLEEP_H +#include +#include + #include #include #include "absl/status/status.h" - -#include -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/util/time.h" diff --git a/src/core/lib/promise/status_flag.h b/src/core/lib/promise/status_flag.h index 250dce50504..1152694b1f0 100644 --- a/src/core/lib/promise/status_flag.h +++ b/src/core/lib/promise/status_flag.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_STATUS_FLAG_H #define GRPC_SRC_CORE_LIB_PROMISE_STATUS_FLAG_H +#include + #include #include "absl/log/check.h" @@ -22,9 +24,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/promise/detail/status.h" namespace grpc_core { diff --git a/src/core/lib/promise/switch.h b/src/core/lib/promise/switch.h index eed6e89928b..1bb05507ef2 100644 --- a/src/core/lib/promise/switch.h +++ b/src/core/lib/promise/switch.h @@ -15,11 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_SWITCH_H #define GRPC_SRC_CORE_LIB_PROMISE_SWITCH_H +#include + #include #include -#include - #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/if.h" diff --git a/src/core/lib/promise/try_join.h b/src/core/lib/promise/try_join.h index 5cde944fe41..e80eaee9a89 100644 --- a/src/core/lib/promise/try_join.h +++ b/src/core/lib/promise/try_join.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_TRY_JOIN_H #define GRPC_SRC_CORE_LIB_PROMISE_TRY_JOIN_H +#include + #include #include @@ -22,9 +24,6 @@ #include "absl/meta/type_traits.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/lib/promise/detail/join_state.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/promise/try_seq.h b/src/core/lib/promise/try_seq.h index 7cda223ac67..e7a09b4ab7d 100644 --- a/src/core/lib/promise/try_seq.h +++ b/src/core/lib/promise/try_seq.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_TRY_SEQ_H #define GRPC_SRC_CORE_LIB_PROMISE_TRY_SEQ_H +#include #include #include @@ -24,9 +25,6 @@ #include "absl/meta/type_traits.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/lib/promise/detail/basic_seq.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/detail/seq_state.h" diff --git a/src/core/lib/promise/wait_for_callback.h b/src/core/lib/promise/wait_for_callback.h index 6aabfe57970..cdebb5f085a 100644 --- a/src/core/lib/promise/wait_for_callback.h +++ b/src/core/lib/promise/wait_for_callback.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_WAIT_FOR_CALLBACK_H #define GRPC_SRC_CORE_LIB_PROMISE_WAIT_FOR_CALLBACK_H +#include + #include #include #include "absl/base/thread_annotations.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/promise/wait_set.h b/src/core/lib/promise/wait_set.h index d58788a057c..a625f01433b 100644 --- a/src/core/lib/promise/wait_set.h +++ b/src/core/lib/promise/wait_set.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_PROMISE_WAIT_SET_H #define GRPC_SRC_CORE_LIB_PROMISE_WAIT_SET_H +#include + #include #include "absl/container/flat_hash_set.h" #include "absl/hash/hash.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/resource_quota/api.cc b/src/core/lib/resource_quota/api.cc index 113685e08f4..8438fdc35f5 100644 --- a/src/core/lib/resource_quota/api.cc +++ b/src/core/lib/resource_quota/api.cc @@ -14,6 +14,9 @@ #include "src/core/lib/resource_quota/api.h" +#include +#include +#include #include #include @@ -22,11 +25,6 @@ #include #include "absl/strings/str_cat.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" diff --git a/src/core/lib/resource_quota/api.h b/src/core/lib/resource_quota/api.h index f1a60fb3772..9d80d576afb 100644 --- a/src/core/lib/resource_quota/api.h +++ b/src/core/lib/resource_quota/api.h @@ -15,11 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_API_H #define GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_API_H -#include - #include #include #include +#include #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/src/core/lib/resource_quota/arena.cc b/src/core/lib/resource_quota/arena.cc index 4fb33b266f7..e3b24dc739b 100644 --- a/src/core/lib/resource_quota/arena.cc +++ b/src/core/lib/resource_quota/arena.cc @@ -18,14 +18,13 @@ #include "src/core/lib/resource_quota/arena.h" +#include +#include + #include #include #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/alloc.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/arena.h b/src/core/lib/resource_quota/arena.h index fd962df93a8..fa46c07c664 100644 --- a/src/core/lib/resource_quota/arena.h +++ b/src/core/lib/resource_quota/arena.h @@ -25,6 +25,8 @@ #ifndef GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_ARENA_H #define GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_ARENA_H +#include +#include #include #include @@ -32,9 +34,6 @@ #include #include -#include -#include - #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/util/alloc.h" diff --git a/src/core/lib/resource_quota/connection_quota.cc b/src/core/lib/resource_quota/connection_quota.cc index 846883f78c3..021628c3695 100644 --- a/src/core/lib/resource_quota/connection_quota.cc +++ b/src/core/lib/resource_quota/connection_quota.cc @@ -14,13 +14,13 @@ #include "src/core/lib/resource_quota/connection_quota.h" +#include + #include #include #include "absl/log/check.h" -#include - namespace grpc_core { ConnectionQuota::ConnectionQuota() = default; diff --git a/src/core/lib/resource_quota/connection_quota.h b/src/core/lib/resource_quota/connection_quota.h index ac0aa6cdb29..4181a1878a1 100644 --- a/src/core/lib/resource_quota/connection_quota.h +++ b/src/core/lib/resource_quota/connection_quota.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_CONNECTION_QUOTA_H #define GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_CONNECTION_QUOTA_H +#include + #include #include #include "absl/base/thread_annotations.h" - -#include - #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/lib/resource_quota/memory_quota.cc b/src/core/lib/resource_quota/memory_quota.cc index ee785e62adf..a69792a7d10 100644 --- a/src/core/lib/resource_quota/memory_quota.cc +++ b/src/core/lib/resource_quota/memory_quota.cc @@ -14,6 +14,9 @@ #include "src/core/lib/resource_quota/memory_quota.h" +#include +#include +#include #include #include @@ -29,11 +32,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" - -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" #include "src/core/lib/promise/loop.h" diff --git a/src/core/lib/resource_quota/memory_quota.h b/src/core/lib/resource_quota/memory_quota.h index 39c7d83a48a..85395b448d3 100644 --- a/src/core/lib/resource_quota/memory_quota.h +++ b/src/core/lib/resource_quota/memory_quota.h @@ -15,6 +15,9 @@ #ifndef GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_MEMORY_QUOTA_H #define GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_MEMORY_QUOTA_H +#include +#include +#include #include #include @@ -32,11 +35,6 @@ #include "absl/log/log.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/promise/activity.h" diff --git a/src/core/lib/resource_quota/periodic_update.cc b/src/core/lib/resource_quota/periodic_update.cc index b7f9e9b9c03..f75cddc041a 100644 --- a/src/core/lib/resource_quota/periodic_update.cc +++ b/src/core/lib/resource_quota/periodic_update.cc @@ -14,10 +14,10 @@ #include "src/core/lib/resource_quota/periodic_update.h" -#include - #include +#include + #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/periodic_update.h b/src/core/lib/resource_quota/periodic_update.h index 7a91510ef77..950df574815 100644 --- a/src/core/lib/resource_quota/periodic_update.h +++ b/src/core/lib/resource_quota/periodic_update.h @@ -15,14 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_PERIODIC_UPDATE_H #define GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_PERIODIC_UPDATE_H +#include #include #include #include "absl/functional/function_ref.h" - -#include - #include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/resource_quota.h b/src/core/lib/resource_quota/resource_quota.h index 0704a162eef..ffe61903255 100644 --- a/src/core/lib/resource_quota/resource_quota.h +++ b/src/core/lib/resource_quota/resource_quota.h @@ -15,15 +15,14 @@ #ifndef GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_RESOURCE_QUOTA_H #define GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_RESOURCE_QUOTA_H -#include -#include - -#include "absl/strings/string_view.h" - #include #include #include +#include +#include + +#include "absl/strings/string_view.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/thread_quota.h" #include "src/core/util/cpp_impl_of.h" diff --git a/src/core/lib/resource_quota/thread_quota.cc b/src/core/lib/resource_quota/thread_quota.cc index 73e8b224402..381375427e2 100644 --- a/src/core/lib/resource_quota/thread_quota.cc +++ b/src/core/lib/resource_quota/thread_quota.cc @@ -14,10 +14,10 @@ #include "src/core/lib/resource_quota/thread_quota.h" -#include "absl/log/check.h" - #include +#include "absl/log/check.h" + namespace grpc_core { ThreadQuota::ThreadQuota() = default; diff --git a/src/core/lib/resource_quota/thread_quota.h b/src/core/lib/resource_quota/thread_quota.h index 965436f20df..18a6e13e7f1 100644 --- a/src/core/lib/resource_quota/thread_quota.h +++ b/src/core/lib/resource_quota/thread_quota.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_THREAD_QUOTA_H #define GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_THREAD_QUOTA_H +#include + #include #include #include "absl/base/thread_annotations.h" - -#include - #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/security/authorization/audit_logging.cc b/src/core/lib/security/authorization/audit_logging.cc index 2f8ac055c1c..4a6b8b97b25 100644 --- a/src/core/lib/security/authorization/audit_logging.cc +++ b/src/core/lib/security/authorization/audit_logging.cc @@ -18,6 +18,10 @@ #include "src/core/lib/security/authorization/audit_logging.h" +#include +#include +#include + #include #include #include @@ -27,11 +31,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/security/authorization/stdout_logger.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/security/authorization/audit_logging.h b/src/core/lib/security/authorization/audit_logging.h index 1f97120cd60..899e0dcc131 100644 --- a/src/core/lib/security/authorization/audit_logging.h +++ b/src/core/lib/security/authorization/audit_logging.h @@ -19,17 +19,16 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_AUDIT_LOGGING_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_AUDIT_LOGGING_H +#include +#include +#include + #include #include #include "absl/base/thread_annotations.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/authorization_engine.h b/src/core/lib/security/authorization/authorization_engine.h index 4dca42bea85..dcd8ec5d4fe 100644 --- a/src/core/lib/security/authorization/authorization_engine.h +++ b/src/core/lib/security/authorization/authorization_engine.h @@ -15,10 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_AUTHORIZATION_ENGINE_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_AUTHORIZATION_ENGINE_H -#include - #include +#include + #include "src/core/lib/security/authorization/evaluate_args.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/lib/security/authorization/authorization_policy_provider.h b/src/core/lib/security/authorization/authorization_policy_provider.h index 6dfdc8fb875..ce0a9c7604f 100644 --- a/src/core/lib/security/authorization/authorization_policy_provider.h +++ b/src/core/lib/security/authorization/authorization_policy_provider.h @@ -15,12 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_AUTHORIZATION_POLICY_PROVIDER_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_AUTHORIZATION_POLICY_PROVIDER_H -#include "absl/strings/string_view.h" - #include #include #include +#include "absl/strings/string_view.h" #include "src/core/lib/security/authorization/authorization_engine.h" #include "src/core/util/dual_ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/lib/security/authorization/cel_authorization_engine.cc b/src/core/lib/security/authorization/cel_authorization_engine.cc index d2d14ebbb8b..47d8f37a007 100644 --- a/src/core/lib/security/authorization/cel_authorization_engine.cc +++ b/src/core/lib/security/authorization/cel_authorization_engine.cc @@ -14,6 +14,7 @@ #include "src/core/lib/security/authorization/cel_authorization_engine.h" +#include #include #include @@ -26,8 +27,6 @@ #include "upb/base/string_view.h" #include "upb/message/map.h" -#include - namespace grpc_core { namespace { diff --git a/src/core/lib/security/authorization/cel_authorization_engine.h b/src/core/lib/security/authorization/cel_authorization_engine.h index 5122b96cab5..03ea185d0bb 100644 --- a/src/core/lib/security/authorization/cel_authorization_engine.h +++ b/src/core/lib/security/authorization/cel_authorization_engine.h @@ -16,6 +16,8 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_CEL_AUTHORIZATION_ENGINE_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_CEL_AUTHORIZATION_ENGINE_H +#include + #include #include #include @@ -24,13 +26,10 @@ #include "absl/container/flat_hash_set.h" #include "envoy/config/rbac/v3/rbac.upb.h" #include "google/api/expr/v1alpha1/syntax.upb.h" -#include "upb/mem/arena.hpp" - -#include - #include "src/core/lib/security/authorization/evaluate_args.h" #include "src/core/lib/security/authorization/mock_cel/activation.h" #include "src/core/lib/security/authorization/mock_cel/cel_value.h" +#include "upb/mem/arena.hpp" namespace grpc_core { diff --git a/src/core/lib/security/authorization/evaluate_args.cc b/src/core/lib/security/authorization/evaluate_args.cc index 0a4e23d1923..ca572e13d45 100644 --- a/src/core/lib/security/authorization/evaluate_args.cc +++ b/src/core/lib/security/authorization/evaluate_args.cc @@ -14,6 +14,8 @@ #include "src/core/lib/security/authorization/evaluate_args.h" +#include +#include #include #include "absl/log/log.h" @@ -21,10 +23,6 @@ #include "absl/status/statusor.h" #include "absl/strings/match.h" #include "absl/strings/numbers.h" - -#include -#include - #include "src/core/handshaker/endpoint_info/endpoint_info_handshaker.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/security/credentials/tls/tls_utils.h" diff --git a/src/core/lib/security/authorization/evaluate_args.h b/src/core/lib/security/authorization/evaluate_args.h index 69cf2ac4ee8..226df0aac8d 100644 --- a/src/core/lib/security/authorization/evaluate_args.h +++ b/src/core/lib/security/authorization/evaluate_args.h @@ -15,15 +15,14 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_EVALUATE_ARGS_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_EVALUATE_ARGS_H +#include +#include + #include #include #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/lib/security/authorization/grpc_authorization_engine.cc b/src/core/lib/security/authorization/grpc_authorization_engine.cc index 4fed6af4fed..a2b38af3d39 100644 --- a/src/core/lib/security/authorization/grpc_authorization_engine.cc +++ b/src/core/lib/security/authorization/grpc_authorization_engine.cc @@ -14,14 +14,13 @@ #include "src/core/lib/security/authorization/grpc_authorization_engine.h" +#include + #include #include #include #include "absl/log/check.h" - -#include - #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/lib/security/authorization/authorization_engine.h" diff --git a/src/core/lib/security/authorization/grpc_authorization_engine.h b/src/core/lib/security/authorization/grpc_authorization_engine.h index 1ac877a5f4c..514d5343b04 100644 --- a/src/core/lib/security/authorization/grpc_authorization_engine.h +++ b/src/core/lib/security/authorization/grpc_authorization_engine.h @@ -15,15 +15,14 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_GRPC_AUTHORIZATION_ENGINE_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_GRPC_AUTHORIZATION_ENGINE_H +#include +#include #include #include #include #include -#include -#include - #include "src/core/lib/security/authorization/authorization_engine.h" #include "src/core/lib/security/authorization/evaluate_args.h" #include "src/core/lib/security/authorization/matchers.h" diff --git a/src/core/lib/security/authorization/grpc_authorization_policy_provider.cc b/src/core/lib/security/authorization/grpc_authorization_policy_provider.cc index 171fd61b3f1..8830bf5e599 100644 --- a/src/core/lib/security/authorization/grpc_authorization_policy_provider.cc +++ b/src/core/lib/security/authorization/grpc_authorization_policy_provider.cc @@ -14,21 +14,19 @@ #include "src/core/lib/security/authorization/grpc_authorization_policy_provider.h" -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/types/optional.h" - #include #include #include #include #include #include +#include + +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/types/optional.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/authorization/grpc_authorization_engine.h" diff --git a/src/core/lib/security/authorization/grpc_authorization_policy_provider.h b/src/core/lib/security/authorization/grpc_authorization_policy_provider.h index f7e6aff40d7..bac11102126 100644 --- a/src/core/lib/security/authorization/grpc_authorization_policy_provider.h +++ b/src/core/lib/security/authorization/grpc_authorization_policy_provider.h @@ -15,6 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_GRPC_AUTHORIZATION_POLICY_PROVIDER_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_GRPC_AUTHORIZATION_POLICY_PROVIDER_H +#include +#include +#include + #include #include #include @@ -23,11 +27,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/security/authorization/authorization_engine.h" #include "src/core/lib/security/authorization/authorization_policy_provider.h" #include "src/core/lib/security/authorization/rbac_translator.h" diff --git a/src/core/lib/security/authorization/grpc_server_authz_filter.cc b/src/core/lib/security/authorization/grpc_server_authz_filter.cc index 540b2af1f67..8e3c1e2f276 100644 --- a/src/core/lib/security/authorization/grpc_server_authz_filter.cc +++ b/src/core/lib/security/authorization/grpc_server_authz_filter.cc @@ -14,6 +14,8 @@ #include "src/core/lib/security/authorization/grpc_server_authz_filter.h" +#include + #include #include #include @@ -22,9 +24,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/str_join.h" - -#include - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/security/authorization/grpc_server_authz_filter.h b/src/core/lib/security/authorization/grpc_server_authz_filter.h index 733142cfca3..10ad7281059 100644 --- a/src/core/lib/security/authorization/grpc_server_authz_filter.h +++ b/src/core/lib/security/authorization/grpc_server_authz_filter.h @@ -15,11 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_GRPC_SERVER_AUTHZ_FILTER_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_GRPC_SERVER_AUTHZ_FILTER_H -#include "absl/status/statusor.h" - #include #include +#include "absl/status/statusor.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/lib/security/authorization/matchers.cc b/src/core/lib/security/authorization/matchers.cc index 887f74e79ed..c113514f233 100644 --- a/src/core/lib/security/authorization/matchers.cc +++ b/src/core/lib/security/authorization/matchers.cc @@ -14,6 +14,8 @@ #include "src/core/lib/security/authorization/matchers.h" +#include +#include #include #include @@ -22,10 +24,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" diff --git a/src/core/lib/security/authorization/matchers.h b/src/core/lib/security/authorization/matchers.h index eaadd07b4e7..ce413534ef5 100644 --- a/src/core/lib/security/authorization/matchers.h +++ b/src/core/lib/security/authorization/matchers.h @@ -15,6 +15,7 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MATCHERS_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MATCHERS_H +#include #include #include @@ -22,9 +23,6 @@ #include #include "absl/types/optional.h" - -#include - #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/security/authorization/evaluate_args.h" #include "src/core/lib/security/authorization/rbac_policy.h" diff --git a/src/core/lib/security/authorization/mock_cel/activation.h b/src/core/lib/security/authorization/mock_cel/activation.h index 174aeac91e7..ca3cb392a25 100644 --- a/src/core/lib/security/authorization/mock_cel/activation.h +++ b/src/core/lib/security/authorization/mock_cel/activation.h @@ -15,10 +15,9 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_ACTIVATION_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_ACTIVATION_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" #include "src/core/lib/security/authorization/mock_cel/cel_value.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h b/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h index 873d085ffe8..b9f94b15523 100644 --- a/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h +++ b/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h @@ -15,10 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_CEL_EXPR_BUILDER_FACTORY_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_CEL_EXPR_BUILDER_FACTORY_H -#include - #include +#include + #include "src/core/lib/security/authorization/mock_cel/cel_expression.h" #include "src/core/lib/security/authorization/mock_cel/flat_expr_builder.h" diff --git a/src/core/lib/security/authorization/mock_cel/cel_expression.h b/src/core/lib/security/authorization/mock_cel/cel_expression.h index 8e4a8b0c042..63da5c943b9 100644 --- a/src/core/lib/security/authorization/mock_cel/cel_expression.h +++ b/src/core/lib/security/authorization/mock_cel/cel_expression.h @@ -15,15 +15,14 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_CEL_EXPRESSION_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_CEL_EXPRESSION_H +#include + #include #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "google/api/expr/v1alpha1/syntax.upb.h" - -#include - #include "src/core/lib/security/authorization/mock_cel/activation.h" #include "src/core/lib/security/authorization/mock_cel/cel_value.h" diff --git a/src/core/lib/security/authorization/mock_cel/cel_value.h b/src/core/lib/security/authorization/mock_cel/cel_value.h index 5a7531121aa..2137595fe4f 100644 --- a/src/core/lib/security/authorization/mock_cel/cel_value.h +++ b/src/core/lib/security/authorization/mock_cel/cel_value.h @@ -30,6 +30,7 @@ // std::string* msg("test"); // CelValue value = CelValue::CreateString(msg); +#include #include #include @@ -39,8 +40,6 @@ #include "absl/strings/string_view.h" #include "absl/types/span.h" -#include - namespace grpc_core { namespace mock_cel { diff --git a/src/core/lib/security/authorization/mock_cel/evaluator_core.h b/src/core/lib/security/authorization/mock_cel/evaluator_core.h index 09f0add6c81..232db020d66 100644 --- a/src/core/lib/security/authorization/mock_cel/evaluator_core.h +++ b/src/core/lib/security/authorization/mock_cel/evaluator_core.h @@ -15,14 +15,13 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_EVALUATOR_CORE_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_EVALUATOR_CORE_H +#include + #include #include #include "absl/status/statusor.h" #include "google/api/expr/v1alpha1/syntax.upb.h" - -#include - #include "src/core/lib/security/authorization/mock_cel/activation.h" #include "src/core/lib/security/authorization/mock_cel/cel_expression.h" #include "src/core/lib/security/authorization/mock_cel/cel_value.h" diff --git a/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h b/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h index 608d9d9cfa1..bd4993e3917 100644 --- a/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h +++ b/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_FLAT_EXPR_BUILDER_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_FLAT_EXPR_BUILDER_H +#include + #include #include #include @@ -23,9 +25,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "google/api/expr/v1alpha1/syntax.upb.h" - -#include - #include "src/core/lib/security/authorization/mock_cel/cel_expression.h" #include "src/core/lib/security/authorization/mock_cel/evaluator_core.h" diff --git a/src/core/lib/security/authorization/rbac_policy.cc b/src/core/lib/security/authorization/rbac_policy.cc index 6dfa7b3e3cf..de2ade9f16f 100644 --- a/src/core/lib/security/authorization/rbac_policy.cc +++ b/src/core/lib/security/authorization/rbac_policy.cc @@ -14,14 +14,14 @@ #include "src/core/lib/security/authorization/rbac_policy.h" +#include + #include #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" -#include - namespace grpc_core { // diff --git a/src/core/lib/security/authorization/rbac_policy.h b/src/core/lib/security/authorization/rbac_policy.h index 03b4e283cde..9ad0bb0bca7 100644 --- a/src/core/lib/security/authorization/rbac_policy.h +++ b/src/core/lib/security/authorization/rbac_policy.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_RBAC_POLICY_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_RBAC_POLICY_H +#include +#include #include #include @@ -23,10 +25,6 @@ #include #include "absl/types/optional.h" - -#include -#include - #include "src/core/util/matchers.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/rbac_translator.cc b/src/core/lib/security/authorization/rbac_translator.cc index 342f9248371..7c3863e6824 100644 --- a/src/core/lib/security/authorization/rbac_translator.cc +++ b/src/core/lib/security/authorization/rbac_translator.cc @@ -14,6 +14,9 @@ #include "src/core/lib/security/authorization/rbac_translator.h" +#include +#include +#include #include #include @@ -31,11 +34,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "absl/strings/strip.h" - -#include -#include -#include - #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/authorization/rbac_translator.h b/src/core/lib/security/authorization/rbac_translator.h index 18c1fed3b99..446583452a0 100644 --- a/src/core/lib/security/authorization/rbac_translator.h +++ b/src/core/lib/security/authorization/rbac_translator.h @@ -15,12 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_RBAC_TRANSLATOR_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_RBAC_TRANSLATOR_H +#include + #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/security/authorization/rbac_policy.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/stdout_logger.cc b/src/core/lib/security/authorization/stdout_logger.cc index 9314d21a0e6..f2fc5eaa6a6 100644 --- a/src/core/lib/security/authorization/stdout_logger.cc +++ b/src/core/lib/security/authorization/stdout_logger.cc @@ -14,6 +14,10 @@ #include "src/core/lib/security/authorization/stdout_logger.h" +#include +#include +#include + #include #include #include @@ -25,10 +29,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" -#include -#include -#include - namespace grpc_core { namespace experimental { diff --git a/src/core/lib/security/authorization/stdout_logger.h b/src/core/lib/security/authorization/stdout_logger.h index a2186af7fb0..cc03d3a3252 100644 --- a/src/core/lib/security/authorization/stdout_logger.h +++ b/src/core/lib/security/authorization/stdout_logger.h @@ -15,16 +15,16 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_STDOUT_LOGGER_H #define GRPC_SRC_CORE_LIB_SECURITY_AUTHORIZATION_STDOUT_LOGGER_H +#include +#include +#include + #include #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include -#include -#include - namespace grpc_core { namespace experimental { diff --git a/src/core/lib/security/certificate_provider/certificate_provider_factory.h b/src/core/lib/security/certificate_provider/certificate_provider_factory.h index 9da32e9233f..72412caa4e5 100644 --- a/src/core/lib/security/certificate_provider/certificate_provider_factory.h +++ b/src/core/lib/security/certificate_provider/certificate_provider_factory.h @@ -19,14 +19,13 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_FACTORY_H #define GRPC_SRC_CORE_LIB_SECURITY_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_FACTORY_H -#include - -#include "absl/strings/string_view.h" - #include #include #include +#include + +#include "absl/strings/string_view.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/lib/security/certificate_provider/certificate_provider_registry.cc b/src/core/lib/security/certificate_provider/certificate_provider_registry.cc index 7a213fdc884..40b9a6a90c9 100644 --- a/src/core/lib/security/certificate_provider/certificate_provider_registry.cc +++ b/src/core/lib/security/certificate_provider/certificate_provider_registry.cc @@ -18,14 +18,14 @@ #include "src/core/lib/security/certificate_provider/certificate_provider_registry.h" +#include + #include #include #include "absl/log/check.h" #include "absl/log/log.h" -#include - namespace grpc_core { void CertificateProviderRegistry::Builder::RegisterCertificateProviderFactory( diff --git a/src/core/lib/security/certificate_provider/certificate_provider_registry.h b/src/core/lib/security/certificate_provider/certificate_provider_registry.h index 84eee65d392..636884528d6 100644 --- a/src/core/lib/security/certificate_provider/certificate_provider_registry.h +++ b/src/core/lib/security/certificate_provider/certificate_provider_registry.h @@ -19,14 +19,13 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_REGISTRY_H #define GRPC_SRC_CORE_LIB_SECURITY_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_REGISTRY_H +#include + #include #include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/security/certificate_provider/certificate_provider_factory.h" namespace grpc_core { diff --git a/src/core/lib/security/context/security_context.cc b/src/core/lib/security/context/security_context.cc index 67a219d9038..46fe754b728 100644 --- a/src/core/lib/security/context/security_context.cc +++ b/src/core/lib/security/context/security_context.cc @@ -18,19 +18,17 @@ #include "src/core/lib/security/context/security_context.h" -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include #include #include +#include + +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/security/context/security_context.h b/src/core/lib/security/context/security_context.h index cc3b21620a5..1a5b7afa320 100644 --- a/src/core/lib/security/context/security_context.h +++ b/src/core/lib/security/context/security_context.h @@ -19,19 +19,17 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H #define GRPC_SRC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H -#include - -#include -#include - -#include "absl/strings/string_view.h" - #include #include #include #include #include +#include + +#include +#include +#include "absl/strings/string_view.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/security/credentials/credentials.h" // IWYU pragma: keep diff --git a/src/core/lib/security/credentials/alts/alts_credentials.cc b/src/core/lib/security/credentials/alts/alts_credentials.cc index 45888d0e808..1e58abcf215 100644 --- a/src/core/lib/security/credentials/alts/alts_credentials.cc +++ b/src/core/lib/security/credentials/alts/alts_credentials.cc @@ -18,13 +18,13 @@ #include "src/core/lib/security/credentials/alts/alts_credentials.h" -#include - #include #include #include #include +#include + #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" #include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h" #include "src/core/lib/security/security_connector/alts/alts_security_connector.h" diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment.cc b/src/core/lib/security/credentials/alts/check_gcp_environment.cc index 864620c9a5a..37628d18321 100644 --- a/src/core/lib/security/credentials/alts/check_gcp_environment.cc +++ b/src/core/lib/security/credentials/alts/check_gcp_environment.cc @@ -19,14 +19,13 @@ #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" #include +#include +#include #include #include #include "absl/log/log.h" -#include -#include - const size_t kBiosDataBufferSize = 256; static char* trim(const char* src) { diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc index c4d767a3d2b..47bb4b73c4d 100644 --- a/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc +++ b/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc @@ -20,10 +20,9 @@ #ifdef GPR_LINUX -#include - #include #include +#include #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc index 4de3a24eae6..bf64fe60a36 100644 --- a/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc +++ b/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc @@ -21,7 +21,6 @@ #if !defined(GPR_LINUX) && !defined(GPR_WINDOWS) #include "absl/log/log.h" - #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc index df6a6240974..462ba6bcb31 100644 --- a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +++ b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc @@ -20,14 +20,13 @@ #ifdef GPR_WINDOWS +#include +#include #include #include #include #include -#include -#include - #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc b/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc index a6053a5d810..37a1856713a 100644 --- a/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc +++ b/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc @@ -16,13 +16,12 @@ // // -#include "absl/log/log.h" - #include #include #include #include +#include "absl/log/log.h" #include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h" #include "src/core/tsi/alts/handshaker/transport_security_common_api.h" diff --git a/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc b/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc index 6b11ab3f623..a52dfe96173 100644 --- a/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc +++ b/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc @@ -18,11 +18,11 @@ #include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h" -#include "absl/log/log.h" - #include #include +#include "absl/log/log.h" + grpc_alts_credentials_options* grpc_alts_credentials_options_copy( const grpc_alts_credentials_options* options) { if (options != nullptr && options->vtable != nullptr && diff --git a/src/core/lib/security/credentials/call_creds_util.cc b/src/core/lib/security/credentials/call_creds_util.cc index 3acc0708f62..e97ba305f17 100644 --- a/src/core/lib/security/credentials/call_creds_util.cc +++ b/src/core/lib/security/credentials/call_creds_util.cc @@ -16,16 +16,14 @@ #include "src/core/lib/security/credentials/call_creds_util.h" +#include +#include #include #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/lib/security/credentials/call_creds_util.h b/src/core/lib/security/credentials/call_creds_util.h index 6e95f100f94..62fd38a5df7 100644 --- a/src/core/lib/security/credentials/call_creds_util.h +++ b/src/core/lib/security/credentials/call_creds_util.h @@ -17,12 +17,12 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_CALL_CREDS_UTIL_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_CALL_CREDS_UTIL_H -#include - #include #include #include +#include + #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/lib/security/credentials/channel_creds_registry.h b/src/core/lib/security/credentials/channel_creds_registry.h index 17771ff8d9e..881bb607792 100644 --- a/src/core/lib/security/credentials/channel_creds_registry.h +++ b/src/core/lib/security/credentials/channel_creds_registry.h @@ -17,15 +17,14 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_CHANNEL_CREDS_REGISTRY_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_CHANNEL_CREDS_REGISTRY_H +#include + #include #include #include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/lib/security/credentials/channel_creds_registry_init.cc b/src/core/lib/security/credentials/channel_creds_registry_init.cc index de2f7d143b9..cf55ff2da64 100644 --- a/src/core/lib/security/credentials/channel_creds_registry_init.cc +++ b/src/core/lib/security/credentials/channel_creds_registry_init.cc @@ -16,13 +16,6 @@ // // -#include -#include -#include -#include - -#include "absl/strings/string_view.h" - #include #include #include @@ -30,6 +23,12 @@ #include #include +#include +#include +#include +#include + +#include "absl/strings/string_view.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/security/credentials/channel_creds_registry.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/composite/composite_credentials.cc b/src/core/lib/security/credentials/composite/composite_credentials.cc index d5d8c76baf4..81b6463421f 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.cc +++ b/src/core/lib/security/credentials/composite/composite_credentials.cc @@ -18,6 +18,8 @@ #include "src/core/lib/security/credentials/composite/composite_credentials.h" +#include + #include #include #include @@ -25,9 +27,6 @@ #include "absl/log/check.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/try_seq.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index 64b05de2cf1..ff2728f0b4a 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -19,19 +19,18 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H -#include -#include -#include -#include - -#include "absl/status/statusor.h" - #include #include #include #include #include +#include +#include +#include +#include + +#include "absl/status/statusor.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/credentials.cc b/src/core/lib/security/credentials/credentials.cc index 6f43677d8f0..69a0180b93c 100644 --- a/src/core/lib/security/credentials/credentials.cc +++ b/src/core/lib/security/credentials/credentials.cc @@ -18,14 +18,12 @@ #include "src/core/lib/security/credentials/credentials.h" +#include #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 57f0eaaa62b..2daef3c6b00 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -19,14 +19,6 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/status/statusor.h" -#include "absl/strings/string_view.h" - #include #include #include @@ -34,6 +26,13 @@ #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/status/statusor.h" +#include "absl/strings/string_view.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/security_connector/security_connector.h" diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc index 3348e3c5aba..13a46dadda1 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc @@ -15,6 +15,13 @@ // #include "src/core/lib/security/credentials/external/aws_external_account_credentials.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -28,15 +35,6 @@ #include "absl/strings/str_replace.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/util/env.h" diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.h b/src/core/lib/security/credentials/external/aws_external_account_credentials.h index 3ccac92ad7a..a8a2f19ae47 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.h @@ -17,15 +17,14 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_EXTERNAL_ACCOUNT_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_EXTERNAL_ACCOUNT_CREDENTIALS_H +#include + #include #include #include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/aws_request_signer.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" diff --git a/src/core/lib/security/credentials/external/aws_request_signer.cc b/src/core/lib/security/credentials/external/aws_request_signer.cc index 87ca4b37918..82fb3fc814d 100644 --- a/src/core/lib/security/credentials/external/aws_request_signer.cc +++ b/src/core/lib/security/credentials/external/aws_request_signer.cc @@ -15,14 +15,15 @@ // #include "src/core/lib/security/credentials/external/aws_request_signer.h" -#include -#include - +#include #include #include #include #include +#include +#include + #include "absl/status/statusor.h" #include "absl/strings/ascii.h" #include "absl/strings/escaping.h" @@ -34,8 +35,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" -#include - namespace grpc_core { namespace { diff --git a/src/core/lib/security/credentials/external/aws_request_signer.h b/src/core/lib/security/credentials/external/aws_request_signer.h index 59a5390f795..12ef21342b9 100644 --- a/src/core/lib/security/credentials/external/aws_request_signer.h +++ b/src/core/lib/security/credentials/external/aws_request_signer.h @@ -17,11 +17,11 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_REQUEST_SIGNER_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_REQUEST_SIGNER_H +#include + #include #include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/util/uri.h" diff --git a/src/core/lib/security/credentials/external/external_account_credentials.cc b/src/core/lib/security/credentials/external/external_account_credentials.cc index 7c4955bc09d..9f240d9b051 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/external_account_credentials.cc @@ -15,6 +15,13 @@ #include "src/core/lib/security/credentials/external/external_account_credentials.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -36,15 +43,6 @@ #include "absl/strings/strip.h" #include "absl/time/clock.h" #include "absl/time/time.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/external/aws_external_account_credentials.h" #include "src/core/lib/security/credentials/external/file_external_account_credentials.h" diff --git a/src/core/lib/security/credentials/external/external_account_credentials.h b/src/core/lib/security/credentials/external/external_account_credentials.h index 3323d21bbf0..bf6a5f1df81 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.h +++ b/src/core/lib/security/credentials/external/external_account_credentials.h @@ -17,6 +17,8 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_EXTERNAL_ACCOUNT_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_EXTERNAL_ACCOUNT_CREDENTIALS_H +#include +#include #include #include @@ -25,10 +27,6 @@ #include #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" diff --git a/src/core/lib/security/credentials/external/file_external_account_credentials.cc b/src/core/lib/security/credentials/external/file_external_account_credentials.cc index 6c8e1f06062..a02fb698c37 100644 --- a/src/core/lib/security/credentials/external/file_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/file_external_account_credentials.cc @@ -15,17 +15,16 @@ // #include "src/core/lib/security/credentials/external/file_external_account_credentials.h" +#include +#include +#include + #include #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/json/json.h" diff --git a/src/core/lib/security/credentials/external/file_external_account_credentials.h b/src/core/lib/security/credentials/external/file_external_account_credentials.h index 093f0a02809..2428f92d21a 100644 --- a/src/core/lib/security/credentials/external/file_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/file_external_account_credentials.h @@ -17,14 +17,13 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_FILE_EXTERNAL_ACCOUNT_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_FILE_EXTERNAL_ACCOUNT_CREDENTIALS_H +#include + #include #include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.cc b/src/core/lib/security/credentials/external/url_external_account_credentials.cc index 39efb91d8f3..502700a4d64 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.cc @@ -15,6 +15,13 @@ // #include "src/core/lib/security/credentials/external/url_external_account_credentials.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -27,15 +34,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/transport/error_utils.h" diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.h b/src/core/lib/security/credentials/external/url_external_account_credentials.h index d7a28777d2d..6d9e2c7fa97 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.h @@ -17,15 +17,14 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_URL_EXTERNAL_ACCOUNT_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_URL_EXTERNAL_ACCOUNT_CREDENTIALS_H +#include + #include #include #include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" #include "src/core/util/http_client/httpcli.h" diff --git a/src/core/lib/security/credentials/fake/fake_credentials.cc b/src/core/lib/security/credentials/fake/fake_credentials.cc index 1e0f6f33eb4..aa61a12b68c 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.cc +++ b/src/core/lib/security/credentials/fake/fake_credentials.cc @@ -18,15 +18,13 @@ #include "src/core/lib/security/credentials/fake/fake_credentials.h" +#include #include #include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/security/security_connector/fake/fake_security_connector.h" diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h index fe4fb414593..77fe27268f9 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.h +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -19,16 +19,15 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H -#include - -#include "absl/status/statusor.h" - #include #include #include #include #include +#include + +#include "absl/status/statusor.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.cc b/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.cc index 8b3c8c8701d..31d00e7bfd3 100644 --- a/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +++ b/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.cc @@ -16,6 +16,8 @@ #include "src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h" +#include + #include "absl/functional/any_invocable.h" #include "absl/status/status.h" #include "absl/status/statusor.h" @@ -23,9 +25,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/status_conversion.h" diff --git a/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h b/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h index 2e75547c402..7e3dfaa2abb 100644 --- a/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h +++ b/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h @@ -17,12 +17,12 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_GCP_SERVICE_ACCOUNT_IDENTITY_GCP_SERVICE_ACCOUNT_IDENTITY_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_GCP_SERVICE_ACCOUNT_IDENTITY_GCP_SERVICE_ACCOUNT_IDENTITY_CREDENTIALS_H -#include -#include - #include #include +#include +#include + #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/google_default/credentials_generic.cc b/src/core/lib/security/credentials/google_default/credentials_generic.cc index f09e5681c88..f07616d85ba 100644 --- a/src/core/lib/security/credentials/google_default/credentials_generic.cc +++ b/src/core/lib/security/credentials/google_default/credentials_generic.cc @@ -16,14 +16,13 @@ // // +#include + #include #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/google_default/google_default_credentials.h" #include "src/core/util/env.h" diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index 6581194e911..71999011093 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -18,6 +18,14 @@ #include "src/core/lib/security/credentials/google_default/google_default_credentials.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -30,16 +38,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index 889aebde57b..f9dc94e960e 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -18,13 +18,13 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H -#include - #include #include #include #include +#include + #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" diff --git a/src/core/lib/security/credentials/iam/iam_credentials.cc b/src/core/lib/security/credentials/iam/iam_credentials.cc index 8d855978676..15a7cd653ce 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.cc +++ b/src/core/lib/security/credentials/iam/iam_credentials.cc @@ -18,6 +18,7 @@ #include "src/core/lib/security/credentials/iam/iam_credentials.h" +#include #include #include @@ -26,9 +27,6 @@ #include "absl/log/check.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/promise.h" diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h index aa8426048f1..837892211d0 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.h +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -19,15 +19,14 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_IAM_IAM_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_IAM_IAM_CREDENTIALS_H -#include - -#include "absl/status/statusor.h" -#include "absl/types/optional.h" - #include #include #include +#include + +#include "absl/status/statusor.h" +#include "absl/types/optional.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/slice.h" diff --git a/src/core/lib/security/credentials/insecure/insecure_credentials.cc b/src/core/lib/security/credentials/insecure/insecure_credentials.cc index a4900ff3281..e9960725cc5 100644 --- a/src/core/lib/security/credentials/insecure/insecure_credentials.cc +++ b/src/core/lib/security/credentials/insecure/insecure_credentials.cc @@ -18,10 +18,10 @@ #include "src/core/lib/security/credentials/insecure/insecure_credentials.h" -#include - #include +#include + #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/security_connector/insecure/insecure_security_connector.h" diff --git a/src/core/lib/security/credentials/jwt/json_token.cc b/src/core/lib/security/credentials/jwt/json_token.cc index 64c0f425985..eac638a1283 100644 --- a/src/core/lib/security/credentials/jwt/json_token.cc +++ b/src/core/lib/security/credentials/jwt/json_token.cc @@ -18,31 +18,28 @@ #include "src/core/lib/security/credentials/jwt/json_token.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/escaping.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/util/json_util.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/jwt/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h index 5576b643ce1..ab4544dbf52 100644 --- a/src/core/lib/security/credentials/jwt/json_token.h +++ b/src/core/lib/security/credentials/jwt/json_token.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H -#include - #include #include +#include #include "src/core/util/json/json.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.cc b/src/core/lib/security/credentials/jwt/jwt_credentials.cc index ab3cb4af773..c6239b7bc71 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.cc +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.cc @@ -17,6 +17,12 @@ #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" +#include +#include +#include +#include +#include +#include #include #include @@ -28,14 +34,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/str_cat.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/promise.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index 26dfa169ad4..e666bfac489 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -19,6 +19,11 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H +#include +#include +#include +#include +#include #include #include @@ -28,13 +33,6 @@ #include "absl/strings/string_view.h" #include "absl/time/time.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/jwt/json_token.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc index 5f45ece8056..4d34a06d0dc 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc @@ -18,16 +18,8 @@ #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" +#include #include -#include -#include - -#include -#include -#include -#include -#include - #include #include #include @@ -35,25 +27,30 @@ #include #include #include +#include +#include -#include +#include +#include +#include +#include +#include #if OPENSSL_VERSION_NUMBER >= 0x30000000L #include #endif -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/status/status.h" -#include "absl/status/statusor.h" -#include "absl/strings/escaping.h" -#include "absl/strings/string_view.h" - #include #include #include #include #include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/strings/escaping.h" +#include "absl/strings/string_view.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h index 9ff8ca53831..955e7efed72 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_VERIFIER_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_VERIFIER_H -#include - #include #include +#include #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/util/json/json.h" diff --git a/src/core/lib/security/credentials/local/local_credentials.cc b/src/core/lib/security/credentials/local/local_credentials.cc index 94f975d6d7d..21495ff55d0 100644 --- a/src/core/lib/security/credentials/local/local_credentials.cc +++ b/src/core/lib/security/credentials/local/local_credentials.cc @@ -18,11 +18,11 @@ #include "src/core/lib/security/credentials/local/local_credentials.h" -#include - #include #include +#include + #include "src/core/lib/security/security_connector/local/local_security_connector.h" grpc_core::RefCountedPtr diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 216c038cbf2..0e7f7eb33cf 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -18,6 +18,15 @@ #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,17 +43,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index bb91c8a524f..5cba69234d6 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -19,6 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H +#include +#include +#include +#include +#include + #include #include #include @@ -26,13 +32,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc index 8fa2bcc6575..1e0bae22f94 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc @@ -18,6 +18,9 @@ #include "src/core/lib/security/credentials/plugin/plugin_credentials.h" +#include +#include + #include #include @@ -26,10 +29,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/promise.h" diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h index 113955240c1..2c25fae8f22 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.h +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h @@ -19,6 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_PLUGIN_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_PLUGIN_CREDENTIALS_H +#include +#include +#include +#include +#include +#include #include #include @@ -27,14 +33,6 @@ #include "absl/container/inlined_vector.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/arena_promise.h" diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.cc b/src/core/lib/security/credentials/ssl/ssl_credentials.cc index 86eb4518c8e..c434cb73678 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.cc +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.cc @@ -18,6 +18,10 @@ #include "src/core/lib/security/credentials/ssl/ssl_credentials.h" +#include +#include +#include +#include #include #include @@ -26,12 +30,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/security/security_connector/ssl_utils.h" diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.h b/src/core/lib/security/credentials/ssl/ssl_credentials.h index ab4c9a12767..d0f947a537c 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.h +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.h @@ -18,16 +18,14 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H -#include - -#include "absl/log/check.h" - #include #include #include #include #include +#include +#include "absl/log/check.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc b/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc index 2472244f2c5..23ec403f16e 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc @@ -16,13 +16,13 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" -#include "absl/log/check.h" -#include "absl/status/status.h" - #include #include #include +#include "absl/log/check.h" +#include "absl/status/status.h" + void grpc_tls_certificate_distributor::SetKeyMaterials( const std::string& cert_name, absl::optional pem_root_certs, absl::optional pem_key_cert_pairs) { diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h b/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h index f34e664d581..dd295d1cab7 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h @@ -17,6 +17,8 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CERTIFICATE_DISTRIBUTOR_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CERTIFICATE_DISTRIBUTOR_H +#include + #include #include #include @@ -27,9 +29,6 @@ #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_match.cc b/src/core/lib/security/credentials/tls/grpc_tls_certificate_match.cc index a7ebb6cbdb2..f7a9a05c42c 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_match.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_match.cc @@ -14,6 +14,7 @@ // limitations under the License. // +#include #include #include #include @@ -23,9 +24,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc b/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc index 0bcabaa6505..db6c5bf98a5 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc @@ -16,6 +16,10 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" +#include +#include +#include +#include #include #include @@ -27,12 +31,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h b/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h index cca18a1baeb..56f227d5ad4 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h @@ -17,6 +17,9 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CERTIFICATE_PROVIDER_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CERTIFICATE_PROVIDER_H +#include +#include +#include #include #include @@ -27,11 +30,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc b/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc index 1be015dcba7..47447ed536c 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc @@ -16,6 +16,9 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h" +#include +#include +#include #include #include @@ -23,11 +26,6 @@ #include "absl/log/check.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/security/credentials/tls/tls_utils.h" diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h b/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h index 5e021948d2f..3b80d9bc852 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h @@ -17,18 +17,17 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CERTIFICATE_VERIFIER_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CERTIFICATE_VERIFIER_H +#include +#include +#include +#include + #include #include #include "absl/base/thread_annotations.h" #include "absl/log/check.h" #include "absl/status/status.h" - -#include -#include -#include -#include - #include "src/core/util/ref_counted.h" #include "src/core/util/sync.h" #include "src/core/util/unique_type_name.h" diff --git a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc index 3176dc10caa..69f73476cae 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc @@ -18,14 +18,13 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h" +#include +#include + #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/tsi/ssl_transport_security.h" diff --git a/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc b/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc index ce1fc4dd1d0..72a113cd592 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc @@ -18,9 +18,8 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h" -#include - #include +#include // IWYU pragma: no_include #include @@ -41,7 +40,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" #include "absl/types/span.h" - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice.h" diff --git a/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h b/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h index b9188740c5e..109d1aa4c41 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h @@ -19,6 +19,11 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CRL_PROVIDER_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CRL_PROVIDER_H +#include +#include +#include +#include + #include #include #include @@ -26,19 +31,12 @@ #include #include -#include - #include "absl/base/thread_annotations.h" #include "absl/container/flat_hash_map.h" #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/util/directory_reader.h" #include "src/core/util/sync.h" #include "src/core/util/time.h" diff --git a/src/core/lib/security/credentials/tls/tls_credentials.cc b/src/core/lib/security/credentials/tls/tls_credentials.cc index 5fd5abf419e..acb0d0154ee 100644 --- a/src/core/lib/security/credentials/tls/tls_credentials.cc +++ b/src/core/lib/security/credentials/tls/tls_credentials.cc @@ -18,18 +18,17 @@ #include "src/core/lib/security/credentials/tls/tls_credentials.h" +#include +#include +#include +#include + #include #include #include #include "absl/log/log.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h" #include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h" diff --git a/src/core/lib/security/credentials/tls/tls_utils.cc b/src/core/lib/security/credentials/tls/tls_utils.cc index 3b17ad3f7f2..296839a8aea 100644 --- a/src/core/lib/security/credentials/tls/tls_utils.cc +++ b/src/core/lib/security/credentials/tls/tls_utils.cc @@ -18,6 +18,7 @@ #include "src/core/lib/security/credentials/tls/tls_utils.h" +#include #include #include @@ -27,8 +28,6 @@ #include "absl/strings/match.h" #include "absl/strings/str_cat.h" -#include - namespace grpc_core { // Based on diff --git a/src/core/lib/security/credentials/tls/tls_utils.h b/src/core/lib/security/credentials/tls/tls_utils.h index c26f4e38bbd..d5d2f640a7b 100644 --- a/src/core/lib/security/credentials/tls/tls_utils.h +++ b/src/core/lib/security/credentials/tls/tls_utils.h @@ -19,14 +19,14 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_TLS_UTILS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TLS_TLS_UTILS_H +#include +#include + #include #include #include "absl/strings/string_view.h" -#include -#include - namespace grpc_core { // Matches \a subject_alternative_name with \a matcher. Returns true if there diff --git a/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h b/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h index 6283c044be8..94359e3727a 100644 --- a/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h +++ b/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h @@ -17,6 +17,8 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TOKEN_FETCHER_TOKEN_FETCHER_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_TOKEN_FETCHER_TOKEN_FETCHER_CREDENTIALS_H +#include + #include #include #include @@ -25,9 +27,6 @@ #include "absl/functional/any_invocable.h" #include "absl/status/statusor.h" #include "absl/types/variant.h" - -#include - #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/xds/xds_credentials.cc b/src/core/lib/security/credentials/xds/xds_credentials.cc index a0e017498e2..2a98d0ec6e5 100644 --- a/src/core/lib/security/credentials/xds/xds_credentials.cc +++ b/src/core/lib/security/credentials/xds/xds_credentials.cc @@ -18,13 +18,12 @@ #include "src/core/lib/security/credentials/xds/xds_credentials.h" -#include "absl/log/check.h" -#include "absl/types/optional.h" - #include #include #include +#include "absl/log/check.h" +#include "absl/types/optional.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h" diff --git a/src/core/lib/security/credentials/xds/xds_credentials.h b/src/core/lib/security/credentials/xds/xds_credentials.h index 554d7a57f26..53c16afcbcd 100644 --- a/src/core/lib/security/credentials/xds/xds_credentials.h +++ b/src/core/lib/security/credentials/xds/xds_credentials.h @@ -19,6 +19,10 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_XDS_XDS_CREDENTIALS_H #define GRPC_SRC_CORE_LIB_SECURITY_CREDENTIALS_XDS_XDS_CREDENTIALS_H +#include +#include +#include +#include #include #include @@ -27,12 +31,6 @@ #include #include "absl/status/status.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h" diff --git a/src/core/lib/security/security_connector/alts/alts_security_connector.cc b/src/core/lib/security/security_connector/alts/alts_security_connector.cc index f30cecdd01a..a026a72f7f7 100644 --- a/src/core/lib/security/security_connector/alts/alts_security_connector.cc +++ b/src/core/lib/security/security_connector/alts/alts_security_connector.cc @@ -18,6 +18,13 @@ #include "src/core/lib/security/security_connector/alts/alts_security_connector.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -28,15 +35,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/lib/security/security_connector/fake/fake_security_connector.cc b/src/core/lib/security/security_connector/fake/fake_security_connector.cc index 20425dc2c91..b0373236168 100644 --- a/src/core/lib/security/security_connector/fake/fake_security_connector.cc +++ b/src/core/lib/security/security_connector/fake/fake_security_connector.cc @@ -18,6 +18,11 @@ #include "src/core/lib/security/security_connector/fake/fake_security_connector.h" +#include +#include +#include +#include +#include #include #include @@ -31,13 +36,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc b/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc index 79ea0cd337c..da250fea598 100644 --- a/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +++ b/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc @@ -18,13 +18,11 @@ #include "src/core/lib/security/security_connector/insecure/insecure_security_connector.h" -#include - -#include "absl/log/check.h" - #include #include +#include +#include "absl/log/check.h" #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/security/security_connector/insecure/insecure_security_connector.h b/src/core/lib/security/security_connector/insecure/insecure_security_connector.h index 9fc962b92ca..018689e5f78 100644 --- a/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +++ b/src/core/lib/security/security_connector/insecure/insecure_security_connector.h @@ -19,16 +19,15 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_INSECURE_INSECURE_SECURITY_CONNECTOR_H #define GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_INSECURE_INSECURE_SECURITY_CONNECTOR_H -#include - -#include "absl/status/status.h" -#include "absl/strings/string_view.h" - #include #include #include #include +#include + +#include "absl/status/status.h" +#include "absl/strings/string_view.h" #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/lib/security/security_connector/load_system_roots_supported.cc b/src/core/lib/security/security_connector/load_system_roots_supported.cc index 52b657185a6..11a9c3f4957 100644 --- a/src/core/lib/security/security_connector/load_system_roots_supported.cc +++ b/src/core/lib/security/security_connector/load_system_roots_supported.cc @@ -16,26 +16,24 @@ // // +#include + #include #include #include -#include - #if defined(GPR_LINUX) || defined(GPR_ANDROID) || defined(GPR_FREEBSD) || \ defined(GPR_APPLE) #include #include +#include #include #include #include #include #include "absl/log/log.h" - -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/security_connector/load_system_roots.h" diff --git a/src/core/lib/security/security_connector/load_system_roots_windows.cc b/src/core/lib/security/security_connector/load_system_roots_windows.cc index 118f013c323..86fd628682c 100644 --- a/src/core/lib/security/security_connector/load_system_roots_windows.cc +++ b/src/core/lib/security/security_connector/load_system_roots_windows.cc @@ -23,13 +23,12 @@ #pragma comment(lib, "crypt32") #include -#include - -#include - #include #include #include +#include + +#include #include "src/core/lib/security/security_connector/load_system_roots.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/lib/security/security_connector/local/local_security_connector.cc b/src/core/lib/security/security_connector/local/local_security_connector.cc index a61dc6aa4d0..5056494e6b2 100644 --- a/src/core/lib/security/security_connector/local/local_security_connector.cc +++ b/src/core/lib/security/security_connector/local/local_security_connector.cc @@ -18,6 +18,11 @@ #include "src/core/lib/security/security_connector/local/local_security_connector.h" +#include +#include +#include +#include +#include #include #include @@ -30,13 +35,6 @@ #include "absl/strings/match.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/security/security_handshaker.h" diff --git a/src/core/lib/security/security_connector/security_connector.cc b/src/core/lib/security/security_connector/security_connector.cc index d3c9906f8b6..481175c76e0 100644 --- a/src/core/lib/security/security_connector/security_connector.cc +++ b/src/core/lib/security/security_connector/security_connector.cc @@ -18,15 +18,13 @@ #include "src/core/lib/security/security_connector/security_connector.h" +#include #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/util/debug_location.h" diff --git a/src/core/lib/security/security_connector/security_connector.h b/src/core/lib/security/security_connector/security_connector.h index 2e44b14fe00..4c0b788eef4 100644 --- a/src/core/lib/security/security_connector/security_connector.h +++ b/src/core/lib/security/security_connector/security_connector.h @@ -19,16 +19,15 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SECURITY_CONNECTOR_H #define GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SECURITY_CONNECTOR_H -#include - -#include "absl/status/status.h" -#include "absl/strings/string_view.h" - #include #include #include #include +#include + +#include "absl/status/status.h" +#include "absl/strings/string_view.h" #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc index 0ec65282f0c..0c8dc6043f8 100644 --- a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +++ b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc @@ -18,6 +18,8 @@ #include "src/core/lib/security/security_connector/ssl/ssl_security_connector.h" +#include +#include #include #include @@ -30,10 +32,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/lib/security/security_connector/ssl/ssl_security_connector.h b/src/core/lib/security/security_connector/ssl/ssl_security_connector.h index 5362e7503bc..436e2c32913 100644 --- a/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +++ b/src/core/lib/security/security_connector/ssl/ssl_security_connector.h @@ -18,13 +18,12 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SSL_SSL_SECURITY_CONNECTOR_H #define GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SSL_SSL_SECURITY_CONNECTOR_H -#include - #include #include #include #include #include +#include #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/ssl_transport_security.h" diff --git a/src/core/lib/security/security_connector/ssl_utils.cc b/src/core/lib/security/security_connector/ssl_utils.cc index e3078062a89..2fcd67d1e85 100644 --- a/src/core/lib/security/security_connector/ssl_utils.cc +++ b/src/core/lib/security/security_connector/ssl_utils.cc @@ -18,6 +18,14 @@ #include "src/core/lib/security/security_connector/ssl_utils.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -30,16 +38,6 @@ #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chttp2/alpn/alpn.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" diff --git a/src/core/lib/security/security_connector/ssl_utils.h b/src/core/lib/security/security_connector/ssl_utils.h index f60b679c763..08973d5b7fc 100644 --- a/src/core/lib/security/security_connector/ssl_utils.h +++ b/src/core/lib/security/security_connector/ssl_utils.h @@ -19,6 +19,11 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SSL_UTILS_H #define GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SSL_UTILS_H +#include +#include +#include +#include +#include #include #include @@ -28,13 +33,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/ssl/key_logging/ssl_key_logging.h" diff --git a/src/core/lib/security/security_connector/tls/tls_security_connector.cc b/src/core/lib/security/security_connector/tls/tls_security_connector.cc index b6c492fe458..d708ce8abfa 100644 --- a/src/core/lib/security/security_connector/tls/tls_security_connector.cc +++ b/src/core/lib/security/security_connector/tls/tls_security_connector.cc @@ -18,6 +18,11 @@ #include "src/core/lib/security/security_connector/tls/tls_security_connector.h" +#include +#include +#include +#include +#include #include #include @@ -29,13 +34,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include - #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/security/security_connector/tls/tls_security_connector.h b/src/core/lib/security/security_connector/tls/tls_security_connector.h index 3c4e90436dc..27e915a6143 100644 --- a/src/core/lib/security/security_connector/tls/tls_security_connector.h +++ b/src/core/lib/security/security_connector/tls/tls_security_connector.h @@ -19,6 +19,11 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_TLS_TLS_SECURITY_CONNECTOR_H #define GRPC_SRC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_TLS_TLS_SECURITY_CONNECTOR_H +#include +#include +#include +#include + #include #include @@ -26,12 +31,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/lib/security/transport/auth_filters.h b/src/core/lib/security/transport/auth_filters.h index 71834db4403..fe386211bf0 100644 --- a/src/core/lib/security/transport/auth_filters.h +++ b/src/core/lib/security/transport/auth_filters.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H #define GRPC_SRC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H -#include "absl/status/statusor.h" - #include #include #include #include +#include "absl/status/statusor.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc index a5740afcfa2..557f6b14450 100644 --- a/src/core/lib/security/transport/client_auth_filter.cc +++ b/src/core/lib/security/transport/client_auth_filter.cc @@ -16,6 +16,12 @@ // // +#include +#include +#include +#include +#include +#include #include #include @@ -25,14 +31,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/lib/security/transport/server_auth_filter.cc b/src/core/lib/security/transport/server_auth_filter.cc index 45e47aaa214..240e7c9d482 100644 --- a/src/core/lib/security/transport/server_auth_filter.cc +++ b/src/core/lib/security/transport/server_auth_filter.cc @@ -16,6 +16,13 @@ // // +#include +#include +#include +#include +#include +#include + #include #include #include @@ -27,14 +34,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/lib/security/util/json_util.cc b/src/core/lib/security/util/json_util.cc index c0b5a5b36cc..2cbc8ec7574 100644 --- a/src/core/lib/security/util/json_util.cc +++ b/src/core/lib/security/util/json_util.cc @@ -18,16 +18,15 @@ #include "src/core/lib/security/util/json_util.h" +#include +#include +#include + #include #include #include #include "absl/strings/str_cat.h" - -#include -#include -#include - #include "src/core/lib/iomgr/error.h" const char* grpc_json_get_string_property(const grpc_core::Json& json, diff --git a/src/core/lib/slice/percent_encoding.cc b/src/core/lib/slice/percent_encoding.cc index 8b51c4d9059..88af7e0a20f 100644 --- a/src/core/lib/slice/percent_encoding.cc +++ b/src/core/lib/slice/percent_encoding.cc @@ -18,15 +18,13 @@ #include "src/core/lib/slice/percent_encoding.h" +#include #include #include #include #include "absl/log/check.h" - -#include - #include "src/core/util/bitset.h" namespace grpc_core { diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc index a7ff2198d03..52af6a4e288 100644 --- a/src/core/lib/slice/slice.cc +++ b/src/core/lib/slice/slice.cc @@ -18,16 +18,14 @@ #include "src/core/lib/slice/slice.h" +#include +#include +#include #include #include #include "absl/log/check.h" - -#include -#include -#include - #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_refcount.h" #include "src/core/util/memory.h" diff --git a/src/core/lib/slice/slice.h b/src/core/lib/slice/slice.h index 5b70fa4ee52..6a84345d838 100644 --- a/src/core/lib/slice/slice.h +++ b/src/core/lib/slice/slice.h @@ -15,6 +15,10 @@ #ifndef GRPC_SRC_CORE_LIB_SLICE_SLICE_H #define GRPC_SRC_CORE_LIB_SLICE_SLICE_H +#include +#include +#include +#include #include #include @@ -23,12 +27,6 @@ #include "absl/log/check.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include - #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_refcount.h" #include "src/core/util/debug_location.h" diff --git a/src/core/lib/slice/slice_buffer.cc b/src/core/lib/slice/slice_buffer.cc index 3d07c32334b..37be00ec16c 100644 --- a/src/core/lib/slice/slice_buffer.cc +++ b/src/core/lib/slice/slice_buffer.cc @@ -18,17 +18,15 @@ #include "src/core/lib/slice/slice_buffer.h" -#include - -#include - -#include "absl/log/check.h" - #include #include #include #include +#include +#include + +#include "absl/log/check.h" #include "src/core/lib/slice/slice_internal.h" namespace grpc_core { diff --git a/src/core/lib/slice/slice_buffer.h b/src/core/lib/slice/slice_buffer.h index cfd6d53a3bc..ab6c19d4f55 100644 --- a/src/core/lib/slice/slice_buffer.h +++ b/src/core/lib/slice/slice_buffer.h @@ -15,16 +15,15 @@ #ifndef GRPC_SRC_CORE_LIB_SLICE_SLICE_BUFFER_H #define GRPC_SRC_CORE_LIB_SLICE_SLICE_BUFFER_H +#include +#include +#include #include #include #include #include -#include -#include -#include - #include "src/core/lib/slice/slice.h" // Copy the first n bytes of src into memory pointed to by dst. diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h index 093a77ecfb0..9c05f6fdacd 100644 --- a/src/core/lib/slice/slice_internal.h +++ b/src/core/lib/slice/slice_internal.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CORE_LIB_SLICE_SLICE_INTERNAL_H #define GRPC_SRC_CORE_LIB_SLICE_SLICE_INTERNAL_H +#include +#include #include #include @@ -27,10 +29,6 @@ #include "absl/hash/hash.h" #include "absl/log/check.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/util/memory.h" // Returns a pointer to the first slice in the slice buffer without giving diff --git a/src/core/lib/slice/slice_refcount.h b/src/core/lib/slice/slice_refcount.h index c27bb07a8e7..7ee670114a9 100644 --- a/src/core/lib/slice/slice_refcount.h +++ b/src/core/lib/slice/slice_refcount.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_SLICE_SLICE_REFCOUNT_H #define GRPC_SRC_CORE_LIB_SLICE_SLICE_REFCOUNT_H +#include #include #include #include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/util/debug_location.h" diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h index 94680e64c20..ea5805e99a0 100644 --- a/src/core/lib/slice/slice_string_helpers.h +++ b/src/core/lib/slice/slice_string_helpers.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H #define GRPC_SRC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H -#include - #include #include +#include // Calls gpr_dump on a slice. char* grpc_dump_slice(const grpc_slice& slice, uint32_t flags); diff --git a/src/core/lib/surface/byte_buffer.cc b/src/core/lib/surface/byte_buffer.cc index 06e45623332..3a5b5666832 100644 --- a/src/core/lib/surface/byte_buffer.cc +++ b/src/core/lib/surface/byte_buffer.cc @@ -16,8 +16,6 @@ // // -#include - #include #include #include @@ -25,6 +23,7 @@ #include #include #include +#include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice.h" diff --git a/src/core/lib/surface/byte_buffer_reader.cc b/src/core/lib/surface/byte_buffer_reader.cc index 0516b852a90..52bf3795c90 100644 --- a/src/core/lib/surface/byte_buffer_reader.cc +++ b/src/core/lib/surface/byte_buffer_reader.cc @@ -16,17 +16,15 @@ // // -#include -#include - -#include "absl/log/check.h" - #include #include #include #include #include +#include +#include +#include "absl/log/check.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice.h" diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 29c4277d284..95f42cf41f8 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -18,6 +18,19 @@ #include "src/core/lib/surface/call.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -42,21 +55,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/call_finalization.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h index 8c225b7379d..e95d3686663 100644 --- a/src/core/lib/surface/call.h +++ b/src/core/lib/surface/call.h @@ -19,6 +19,10 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_CALL_H #define GRPC_SRC_CORE_LIB_SURFACE_CALL_H +#include +#include +#include +#include #include #include @@ -27,12 +31,6 @@ #include "absl/log/check.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/surface/call_log_batch.cc b/src/core/lib/surface/call_log_batch.cc index 4f6ec2153b6..2162ac2831b 100644 --- a/src/core/lib/surface/call_log_batch.cc +++ b/src/core/lib/surface/call_log_batch.cc @@ -16,6 +16,9 @@ // // +#include +#include +#include #include #include @@ -25,11 +28,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - -#include -#include -#include - #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/surface/call.h" diff --git a/src/core/lib/surface/call_test_only.h b/src/core/lib/surface/call_test_only.h index 2b1f98b1102..217f5dfc40e 100644 --- a/src/core/lib/surface/call_test_only.h +++ b/src/core/lib/surface/call_test_only.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_CALL_TEST_ONLY_H #define GRPC_SRC_CORE_LIB_SURFACE_CALL_TEST_ONLY_H -#include - #include #include #include +#include /// Return the message compression algorithm from \a call. /// diff --git a/src/core/lib/surface/call_utils.cc b/src/core/lib/surface/call_utils.cc index 18a78fb284e..e5949d9d200 100644 --- a/src/core/lib/surface/call_utils.cc +++ b/src/core/lib/surface/call_utils.cc @@ -14,6 +14,19 @@ #include "src/core/lib/surface/call_utils.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -33,21 +46,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/status_util.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" diff --git a/src/core/lib/surface/call_utils.h b/src/core/lib/surface/call_utils.h index de9c928fa74..269e2f25178 100644 --- a/src/core/lib/surface/call_utils.h +++ b/src/core/lib/surface/call_utils.h @@ -15,6 +15,19 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_CALL_UTILS_H #define GRPC_SRC_CORE_LIB_SURFACE_CALL_UTILS_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -31,21 +44,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/cancel_callback.h" #include "src/core/lib/promise/map.h" diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index 577ab734efa..df13bf3e37b 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -16,14 +16,13 @@ #include "src/core/lib/surface/channel.h" -#include "absl/log/check.h" - #include #include #include #include #include +#include "absl/log/check.h" #include "src/core/channelz/channel_trace.h" #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index fa8ac5468c8..f5105257ab4 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -17,6 +17,12 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_CHANNEL_H #define GRPC_SRC_CORE_LIB_SURFACE_CHANNEL_H +#include +#include +#include +#include +#include + #include #include @@ -24,13 +30,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/iomgr_fwd.h" diff --git a/src/core/lib/surface/channel_create.cc b/src/core/lib/surface/channel_create.cc index ef0fd5ba2c6..d8a243ceb27 100644 --- a/src/core/lib/surface/channel_create.cc +++ b/src/core/lib/surface/channel_create.cc @@ -16,12 +16,11 @@ #include "src/core/lib/surface/channel_create.h" -#include "absl/log/check.h" - #include #include #include +#include "absl/log/check.h" #include "src/core/channelz/channelz.h" #include "src/core/client_channel/client_channel.h" #include "src/core/client_channel/direct_channel.h" diff --git a/src/core/lib/surface/channel_create.h b/src/core/lib/surface/channel_create.h index 0295eb92bc3..187748cc2a3 100644 --- a/src/core/lib/surface/channel_create.h +++ b/src/core/lib/surface/channel_create.h @@ -17,12 +17,11 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_CHANNEL_CREATE_H #define GRPC_SRC_CORE_LIB_SURFACE_CHANNEL_CREATE_H +#include + #include #include "absl/status/statusor.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/channel_stack_type.h" diff --git a/src/core/lib/surface/channel_init.cc b/src/core/lib/surface/channel_init.cc index cebe053e34d..28d04651950 100644 --- a/src/core/lib/surface/channel_init.cc +++ b/src/core/lib/surface/channel_init.cc @@ -18,6 +18,7 @@ #include "src/core/lib/surface/channel_init.h" +#include #include #include @@ -33,9 +34,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/surface/channel_init.h b/src/core/lib/surface/channel_init.h index 628620228c5..7374c880a96 100644 --- a/src/core/lib/surface/channel_init.h +++ b/src/core/lib/surface/channel_init.h @@ -19,6 +19,7 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_CHANNEL_INIT_H #define GRPC_SRC_CORE_LIB_SURFACE_CHANNEL_INIT_H +#include #include #include @@ -29,9 +30,6 @@ #include "absl/functional/any_invocable.h" #include "absl/log/check.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack_builder.h" diff --git a/src/core/lib/surface/client_call.cc b/src/core/lib/surface/client_call.cc index 05670b2e1bc..7f96a43b8aa 100644 --- a/src/core/lib/surface/client_call.cc +++ b/src/core/lib/surface/client_call.cc @@ -14,6 +14,19 @@ #include "src/core/lib/surface/client_call.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -29,21 +42,6 @@ #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/promise/all_ok.h" #include "src/core/lib/promise/status_flag.h" diff --git a/src/core/lib/surface/client_call.h b/src/core/lib/surface/client_call.h index 8180c273ba2..d2f86e93d9d 100644 --- a/src/core/lib/surface/client_call.h +++ b/src/core/lib/surface/client_call.h @@ -15,19 +15,6 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_CLIENT_CALL_H #define GRPC_SRC_CORE_LIB_SURFACE_CLIENT_CALL_H -#include -#include -#include -#include - -#include -#include -#include - -#include "absl/status/status.h" -#include "absl/strings/str_format.h" -#include "absl/strings/string_view.h" - #include #include #include @@ -41,7 +28,18 @@ #include #include #include +#include +#include +#include +#include + +#include +#include +#include +#include "absl/status/status.h" +#include "absl/strings/str_format.h" +#include "absl/strings/string_view.h" #include "src/core/lib/promise/status_flag.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/surface/call.h" diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 9d958defc98..5f25576771d 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -17,6 +17,12 @@ // #include "src/core/lib/surface/completion_queue.h" +#include +#include +#include +#include +#include +#include #include #include @@ -32,14 +38,6 @@ #include "absl/status/status.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 33dcb5ed5c1..5b8a634ddb0 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -21,10 +21,9 @@ // Internal API for completion queues -#include - #include #include +#include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" diff --git a/src/core/lib/surface/completion_queue_factory.cc b/src/core/lib/surface/completion_queue_factory.cc index dae6695b712..c88360772aa 100644 --- a/src/core/lib/surface/completion_queue_factory.cc +++ b/src/core/lib/surface/completion_queue_factory.cc @@ -18,11 +18,10 @@ #include "src/core/lib/surface/completion_queue_factory.h" -#include "absl/log/check.h" - #include #include +#include "absl/log/check.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/completion_queue.h" diff --git a/src/core/lib/surface/event_string.cc b/src/core/lib/surface/event_string.cc index eafe18918f5..f0398ba2532 100644 --- a/src/core/lib/surface/event_string.cc +++ b/src/core/lib/surface/event_string.cc @@ -18,14 +18,14 @@ #include "src/core/lib/surface/event_string.h" +#include + #include #include #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" -#include - static void addhdr(grpc_event* ev, std::vector* buf) { buf->push_back(absl::StrFormat("tag:%p", ev->tag)); } diff --git a/src/core/lib/surface/event_string.h b/src/core/lib/surface/event_string.h index 9677aa84f64..d5709e76451 100644 --- a/src/core/lib/surface/event_string.h +++ b/src/core/lib/surface/event_string.h @@ -19,11 +19,11 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_EVENT_STRING_H #define GRPC_SRC_CORE_LIB_SURFACE_EVENT_STRING_H -#include - #include #include +#include + // Returns a string describing an event. Must be later freed with gpr_free() std::string grpc_event_string(grpc_event* ev); diff --git a/src/core/lib/surface/filter_stack_call.cc b/src/core/lib/surface/filter_stack_call.cc index 707d99a59fa..dc6ee088c29 100644 --- a/src/core/lib/surface/filter_stack_call.cc +++ b/src/core/lib/surface/filter_stack_call.cc @@ -14,6 +14,19 @@ #include "src/core/lib/surface/filter_stack_call.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -29,21 +42,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/event_engine/event_engine_context.h" diff --git a/src/core/lib/surface/filter_stack_call.h b/src/core/lib/surface/filter_stack_call.h index b4c304773c9..d9a8866d5e4 100644 --- a/src/core/lib/surface/filter_stack_call.h +++ b/src/core/lib/surface/filter_stack_call.h @@ -15,21 +15,6 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_FILTER_STACK_CALL_H #define GRPC_SRC_CORE_LIB_SURFACE_FILTER_STACK_CALL_H -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/str_join.h" -#include "absl/strings/string_view.h" - #include #include #include @@ -43,7 +28,20 @@ #include #include #include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "absl/log/check.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "absl/strings/string_view.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/polling_entity.h" diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc index 233f6f97d16..3e2aae160ad 100644 --- a/src/core/lib/surface/init.cc +++ b/src/core/lib/surface/init.cc @@ -18,11 +18,6 @@ #include "src/core/lib/surface/init.h" -#include "absl/base/thread_annotations.h" -#include "absl/log/log.h" -#include "absl/time/clock.h" -#include "absl/time/time.h" - #include #include #include @@ -31,6 +26,10 @@ #include #include +#include "absl/base/thread_annotations.h" +#include "absl/log/log.h" +#include "absl/time/clock.h" +#include "absl/time/time.h" #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/surface/init.h b/src/core/lib/surface/init.h index 804b79c5d5b..9f9a4a46880 100644 --- a/src/core/lib/surface/init.h +++ b/src/core/lib/surface/init.h @@ -18,10 +18,10 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_INIT_H #define GRPC_SRC_CORE_LIB_SURFACE_INIT_H -#include "absl/time/time.h" - #include +#include "absl/time/time.h" + void grpc_maybe_wait_for_async_shutdown(void); // Returns false if the timeout expired before fully shut down. diff --git a/src/core/lib/surface/lame_client.cc b/src/core/lib/surface/lame_client.cc index 8acfd80986d..64030cfbbe8 100644 --- a/src/core/lib/surface/lame_client.cc +++ b/src/core/lib/surface/lame_client.cc @@ -18,17 +18,16 @@ #include "src/core/lib/surface/lame_client.h" -#include -#include - -#include "absl/status/status.h" -#include "absl/status/statusor.h" - #include #include #include #include +#include +#include + +#include "absl/status/status.h" +#include "absl/status/statusor.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/src/core/lib/surface/lame_client.h b/src/core/lib/surface/lame_client.h index 970c7630c48..85c4c6e2992 100644 --- a/src/core/lib/surface/lame_client.h +++ b/src/core/lib/surface/lame_client.h @@ -19,15 +19,14 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_LAME_CLIENT_H #define GRPC_SRC_CORE_LIB_SURFACE_LAME_CLIENT_H +#include +#include + #include #include "absl/base/thread_annotations.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/lib/surface/legacy_channel.cc b/src/core/lib/surface/legacy_channel.cc index ba306525f2c..ba9826e5118 100644 --- a/src/core/lib/surface/legacy_channel.cc +++ b/src/core/lib/surface/legacy_channel.cc @@ -18,18 +18,17 @@ #include "src/core/lib/surface/legacy_channel.h" -#include "absl/base/thread_annotations.h" -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/status/status.h" -#include "absl/types/optional.h" - #include #include #include #include #include +#include "absl/base/thread_annotations.h" +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/status.h" +#include "absl/types/optional.h" #include "src/core/channelz/channelz.h" #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/lib/surface/legacy_channel.h b/src/core/lib/surface/legacy_channel.h index 7ca47a6bb22..ee1c3f92c89 100644 --- a/src/core/lib/surface/legacy_channel.h +++ b/src/core/lib/surface/legacy_channel.h @@ -19,15 +19,14 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_LEGACY_CHANNEL_H #define GRPC_SRC_CORE_LIB_SURFACE_LEGACY_CHANNEL_H -#include - -#include "absl/status/statusor.h" -#include "absl/types/optional.h" - #include #include #include +#include + +#include "absl/status/statusor.h" +#include "absl/types/optional.h" #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/lib/surface/metadata_array.cc b/src/core/lib/surface/metadata_array.cc index 666459e6e0a..ba3e8a36460 100644 --- a/src/core/lib/surface/metadata_array.cc +++ b/src/core/lib/surface/metadata_array.cc @@ -16,11 +16,10 @@ // // -#include - #include #include #include +#include #include "src/core/lib/debug/trace.h" diff --git a/src/core/lib/surface/server_call.cc b/src/core/lib/surface/server_call.cc index 32aadc25da9..ed1d0bb8426 100644 --- a/src/core/lib/surface/server_call.cc +++ b/src/core/lib/surface/server_call.cc @@ -14,18 +14,6 @@ #include "src/core/lib/surface/server_call.h" -#include -#include -#include -#include - -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/strings/string_view.h" - #include #include #include @@ -39,7 +27,17 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/strings/string_view.h" #include "src/core/lib/promise/all_ok.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/surface/server_call.h b/src/core/lib/surface/server_call.h index dcc9d86606e..a69673adc55 100644 --- a/src/core/lib/surface/server_call.h +++ b/src/core/lib/surface/server_call.h @@ -15,6 +15,19 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_SERVER_CALL_H #define GRPC_SRC_CORE_LIB_SURFACE_SERVER_CALL_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -30,21 +43,6 @@ #include "absl/status/status.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/promise/poll.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/surface/call.h" diff --git a/src/core/lib/surface/validate_metadata.cc b/src/core/lib/surface/validate_metadata.cc index 3a68a673c04..684cad74e53 100644 --- a/src/core/lib/surface/validate_metadata.cc +++ b/src/core/lib/surface/validate_metadata.cc @@ -18,12 +18,11 @@ #include "src/core/lib/surface/validate_metadata.h" -#include "absl/status/status.h" -#include "absl/strings/string_view.h" - #include #include +#include "absl/status/status.h" +#include "absl/strings/string_view.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/bitset.h" diff --git a/src/core/lib/surface/validate_metadata.h b/src/core/lib/surface/validate_metadata.h index 03d08939894..f4630ea2d48 100644 --- a/src/core/lib/surface/validate_metadata.h +++ b/src/core/lib/surface/validate_metadata.h @@ -19,16 +19,14 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_VALIDATE_METADATA_H #define GRPC_SRC_CORE_LIB_SURFACE_VALIDATE_METADATA_H +#include +#include #include #include #include "absl/log/check.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/iomgr/error.h" namespace grpc_core { diff --git a/src/core/lib/transport/bdp_estimator.cc b/src/core/lib/transport/bdp_estimator.cc index ed2176bea61..90d7cf9429c 100644 --- a/src/core/lib/transport/bdp_estimator.cc +++ b/src/core/lib/transport/bdp_estimator.cc @@ -18,6 +18,7 @@ #include "src/core/lib/transport/bdp_estimator.h" +#include #include #include @@ -26,8 +27,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" -#include - namespace grpc_core { BdpEstimator::BdpEstimator(absl::string_view name) diff --git a/src/core/lib/transport/bdp_estimator.h b/src/core/lib/transport/bdp_estimator.h index 487b04eb35d..c5879d939c3 100644 --- a/src/core/lib/transport/bdp_estimator.h +++ b/src/core/lib/transport/bdp_estimator.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H #define GRPC_SRC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H +#include +#include #include #include @@ -26,10 +28,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/util/time.h" diff --git a/src/core/lib/transport/call_arena_allocator.cc b/src/core/lib/transport/call_arena_allocator.cc index 729b9fe51bb..a9b15cda290 100644 --- a/src/core/lib/transport/call_arena_allocator.cc +++ b/src/core/lib/transport/call_arena_allocator.cc @@ -14,10 +14,10 @@ #include "src/core/lib/transport/call_arena_allocator.h" -#include - #include +#include + namespace grpc_core { void CallArenaAllocator::FinalizeArena(Arena* arena) { diff --git a/src/core/lib/transport/call_arena_allocator.h b/src/core/lib/transport/call_arena_allocator.h index d52bdf4ecf7..074f9a15772 100644 --- a/src/core/lib/transport/call_arena_allocator.h +++ b/src/core/lib/transport/call_arena_allocator.h @@ -15,13 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_ARENA_ALLOCATOR_H #define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_ARENA_ALLOCATOR_H +#include #include #include #include -#include - #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/lib/transport/call_filters.cc b/src/core/lib/transport/call_filters.cc index 822c266b0b3..a4d945f8067 100644 --- a/src/core/lib/transport/call_filters.cc +++ b/src/core/lib/transport/call_filters.cc @@ -14,11 +14,10 @@ #include "src/core/lib/transport/call_filters.h" -#include "absl/log/check.h" -#include "absl/log/log.h" - #include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/transport/metadata.h" #include "src/core/util/crash.h" diff --git a/src/core/lib/transport/call_filters.h b/src/core/lib/transport/call_filters.h index 01d4c7614de..3dabd20e2f6 100644 --- a/src/core/lib/transport/call_filters.h +++ b/src/core/lib/transport/call_filters.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FILTERS_H #define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FILTERS_H +#include + #include #include #include @@ -22,9 +24,6 @@ #include #include "absl/log/check.h" - -#include - #include "src/core/lib/promise/if.h" #include "src/core/lib/promise/latch.h" #include "src/core/lib/promise/map.h" diff --git a/src/core/lib/transport/call_final_info.cc b/src/core/lib/transport/call_final_info.cc index e5bf3a5a8a9..5808135551d 100644 --- a/src/core/lib/transport/call_final_info.cc +++ b/src/core/lib/transport/call_final_info.cc @@ -14,10 +14,10 @@ #include "src/core/lib/transport/call_final_info.h" -#include - #include +#include + static void move64bits(uint64_t* from, uint64_t* to) { *to += *from; *from = 0; diff --git a/src/core/lib/transport/call_final_info.h b/src/core/lib/transport/call_final_info.h index fd407df6de8..2182e9df6b6 100644 --- a/src/core/lib/transport/call_final_info.h +++ b/src/core/lib/transport/call_final_info.h @@ -15,12 +15,12 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FINAL_INFO_H #define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FINAL_INFO_H -#include - #include #include #include +#include + struct grpc_transport_one_way_stats { uint64_t framing_bytes = 0; uint64_t data_bytes = 0; diff --git a/src/core/lib/transport/call_spine.cc b/src/core/lib/transport/call_spine.cc index 29cca71f9a1..93831a87b98 100644 --- a/src/core/lib/transport/call_spine.cc +++ b/src/core/lib/transport/call_spine.cc @@ -14,10 +14,9 @@ #include "src/core/lib/transport/call_spine.h" -#include "absl/functional/any_invocable.h" - #include +#include "absl/functional/any_invocable.h" #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/promise/for_each.h" #include "src/core/lib/promise/try_seq.h" diff --git a/src/core/lib/transport/call_spine.h b/src/core/lib/transport/call_spine.h index c3d5687b971..a962c308f69 100644 --- a/src/core/lib/transport/call_spine.h +++ b/src/core/lib/transport/call_spine.h @@ -15,10 +15,9 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_SPINE_H #define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_SPINE_H -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "src/core/lib/promise/detail/status.h" #include "src/core/lib/promise/if.h" #include "src/core/lib/promise/latch.h" diff --git a/src/core/lib/transport/call_state.h b/src/core/lib/transport/call_state.h index 33eca5e66b4..1c58a9d61a5 100644 --- a/src/core/lib/transport/call_state.h +++ b/src/core/lib/transport/call_state.h @@ -15,10 +15,9 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_STATE_H #define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_STATE_H -#include "absl/types/optional.h" - #include +#include "absl/types/optional.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/transport/connectivity_state.cc b/src/core/lib/transport/connectivity_state.cc index 9239f34f2be..126f4d2535d 100644 --- a/src/core/lib/transport/connectivity_state.cc +++ b/src/core/lib/transport/connectivity_state.cc @@ -18,10 +18,9 @@ #include "src/core/lib/transport/connectivity_state.h" -#include "absl/log/log.h" - #include +#include "absl/log/log.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h index a986c66e9f5..91e64aae485 100644 --- a/src/core/lib/transport/connectivity_state.h +++ b/src/core/lib/transport/connectivity_state.h @@ -19,16 +19,15 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H #define GRPC_SRC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H +#include +#include + #include #include #include #include #include "absl/status/status.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/util/orphanable.h" #include "src/core/util/work_serializer.h" diff --git a/src/core/lib/transport/error_utils.cc b/src/core/lib/transport/error_utils.cc index 4a59efe3deb..ce28fa82c0a 100644 --- a/src/core/lib/transport/error_utils.cc +++ b/src/core/lib/transport/error_utils.cc @@ -18,13 +18,12 @@ #include "src/core/lib/transport/error_utils.h" +#include +#include #include #include -#include -#include - #include "src/core/lib/transport/status_conversion.h" #include "src/core/util/status_helper.h" diff --git a/src/core/lib/transport/error_utils.h b/src/core/lib/transport/error_utils.h index 9510081d004..2abbe7a6f4c 100644 --- a/src/core/lib/transport/error_utils.h +++ b/src/core/lib/transport/error_utils.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_ERROR_UTILS_H #define GRPC_SRC_CORE_LIB_TRANSPORT_ERROR_UTILS_H -#include - -#include "absl/status/status.h" - #include #include +#include + +#include "absl/status/status.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/http2_errors.h" #include "src/core/util/time.h" diff --git a/src/core/lib/transport/interception_chain.cc b/src/core/lib/transport/interception_chain.cc index 317c6cfa93a..14d8c83f793 100644 --- a/src/core/lib/transport/interception_chain.cc +++ b/src/core/lib/transport/interception_chain.cc @@ -14,10 +14,10 @@ #include "src/core/lib/transport/interception_chain.h" -#include - #include +#include + #include "src/core/lib/transport/call_destination.h" #include "src/core/lib/transport/call_filters.h" #include "src/core/lib/transport/call_spine.h" diff --git a/src/core/lib/transport/interception_chain.h b/src/core/lib/transport/interception_chain.h index a204985afc0..db54104dafa 100644 --- a/src/core/lib/transport/interception_chain.h +++ b/src/core/lib/transport/interception_chain.h @@ -15,11 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_INTERCEPTION_CHAIN_H #define GRPC_SRC_CORE_LIB_TRANSPORT_INTERCEPTION_CHAIN_H +#include + #include #include -#include - #include "src/core/lib/transport/call_destination.h" #include "src/core/lib/transport/call_filters.h" #include "src/core/lib/transport/call_spine.h" diff --git a/src/core/lib/transport/message.cc b/src/core/lib/transport/message.cc index a9435911a57..30f1a3088bb 100644 --- a/src/core/lib/transport/message.cc +++ b/src/core/lib/transport/message.cc @@ -14,11 +14,11 @@ #include "src/core/lib/transport/message.h" -#include "absl/strings/str_cat.h" - #include #include +#include "absl/strings/str_cat.h" + namespace grpc_core { std::string Message::DebugString() const { diff --git a/src/core/lib/transport/metadata_batch.cc b/src/core/lib/transport/metadata_batch.cc index 732a17e11ca..6dcbc0ace2b 100644 --- a/src/core/lib/transport/metadata_batch.cc +++ b/src/core/lib/transport/metadata_batch.cc @@ -14,6 +14,7 @@ #include "src/core/lib/transport/metadata_batch.h" +#include #include #include @@ -25,9 +26,6 @@ #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/lib/transport/timeout_encoding.h" namespace grpc_core { diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index 4a2ca21bd27..005139af20b 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -19,6 +19,9 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_BATCH_H #define GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_BATCH_H +#include +#include +#include #include #include @@ -33,11 +36,6 @@ #include "absl/strings/numbers.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/compression/compression_internal.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/promise/poll.h" diff --git a/src/core/lib/transport/metadata_compression_traits.h b/src/core/lib/transport/metadata_compression_traits.h index 05f8a9145f8..baa7e0ee906 100644 --- a/src/core/lib/transport/metadata_compression_traits.h +++ b/src/core/lib/transport/metadata_compression_traits.h @@ -15,9 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_COMPRESSION_TRAITS_H #define GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_COMPRESSION_TRAITS_H -#include - #include +#include namespace grpc_core { diff --git a/src/core/lib/transport/parsed_metadata.h b/src/core/lib/transport/parsed_metadata.h index 1ea9c9a2e4a..ac529c2e609 100644 --- a/src/core/lib/transport/parsed_metadata.h +++ b/src/core/lib/transport/parsed_metadata.h @@ -15,6 +15,8 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_PARSED_METADATA_H #define GRPC_SRC_CORE_LIB_TRANSPORT_PARSED_METADATA_H +#include +#include #include #include @@ -28,10 +30,6 @@ #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/slice/slice.h" #include "src/core/util/time.h" diff --git a/src/core/lib/transport/promise_endpoint.cc b/src/core/lib/transport/promise_endpoint.cc index 90b2e0ce5b8..b151388587f 100644 --- a/src/core/lib/transport/promise_endpoint.cc +++ b/src/core/lib/transport/promise_endpoint.cc @@ -14,6 +14,11 @@ #include "src/core/lib/transport/promise_endpoint.h" +#include +#include +#include +#include + #include #include #include @@ -22,12 +27,6 @@ #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/slice/slice_buffer.h" #include "src/core/util/sync.h" diff --git a/src/core/lib/transport/promise_endpoint.h b/src/core/lib/transport/promise_endpoint.h index 0e69b82f7a1..18af1a763c4 100644 --- a/src/core/lib/transport/promise_endpoint.h +++ b/src/core/lib/transport/promise_endpoint.h @@ -15,6 +15,11 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_PROMISE_ENDPOINT_H #define GRPC_SRC_CORE_LIB_TRANSPORT_PROMISE_ENDPOINT_H +#include +#include +#include +#include +#include #include #include @@ -29,13 +34,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/extensions/chaotic_good_extension.h" #include "src/core/lib/event_engine/query_extensions.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/lib/transport/simple_slice_based_metadata.h b/src/core/lib/transport/simple_slice_based_metadata.h index 01270a645c3..eed4ec06241 100644 --- a/src/core/lib/transport/simple_slice_based_metadata.h +++ b/src/core/lib/transport/simple_slice_based_metadata.h @@ -15,10 +15,9 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_SIMPLE_SLICE_BASED_METADATA_H #define GRPC_SRC_CORE_LIB_TRANSPORT_SIMPLE_SLICE_BASED_METADATA_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/parsed_metadata.h" diff --git a/src/core/lib/transport/timeout_encoding.cc b/src/core/lib/transport/timeout_encoding.cc index 57621d835c0..845dbf7a26f 100644 --- a/src/core/lib/transport/timeout_encoding.cc +++ b/src/core/lib/transport/timeout_encoding.cc @@ -18,14 +18,14 @@ #include "src/core/lib/transport/timeout_encoding.h" +#include +#include + #include #include "absl/base/attributes.h" #include "absl/log/check.h" -#include -#include - namespace grpc_core { namespace { diff --git a/src/core/lib/transport/timeout_encoding.h b/src/core/lib/transport/timeout_encoding.h index 9957640a95b..995650bc5b6 100644 --- a/src/core/lib/transport/timeout_encoding.h +++ b/src/core/lib/transport/timeout_encoding.h @@ -19,12 +19,10 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H #define GRPC_SRC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H +#include #include #include "absl/types/optional.h" - -#include - #include "src/core/lib/slice/slice.h" #include "src/core/util/time.h" diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc index 58d0869cf7e..fb189ff168e 100644 --- a/src/core/lib/transport/transport.cc +++ b/src/core/lib/transport/transport.cc @@ -18,6 +18,9 @@ #include "src/core/lib/transport/transport.h" +#include +#include +#include #include #include @@ -26,11 +29,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/for_each.h" diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 9c34fb1efce..e0ed8b07d3c 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -19,6 +19,11 @@ #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_TRANSPORT_H #define GRPC_SRC_CORE_LIB_TRANSPORT_TRANSPORT_H +#include +#include +#include +#include +#include #include #include #include @@ -32,13 +37,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" diff --git a/src/core/lib/transport/transport_op_string.cc b/src/core/lib/transport/transport_op_string.cc index 7141161ed08..08b5e4656b6 100644 --- a/src/core/lib/transport/transport_op_string.cc +++ b/src/core/lib/transport/transport_op_string.cc @@ -16,14 +16,13 @@ // // +#include + #include #include #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/load_balancing/.clang-format b/src/core/load_balancing/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/core/load_balancing/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/load_balancing/address_filtering.cc b/src/core/load_balancing/address_filtering.cc index fe9834b170d..1a19cfca33a 100644 --- a/src/core/load_balancing/address_filtering.cc +++ b/src/core/load_balancing/address_filtering.cc @@ -16,14 +16,12 @@ #include "src/core/load_balancing/address_filtering.h" +#include #include #include #include "absl/functional/function_ref.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/load_balancing/address_filtering.h b/src/core/load_balancing/address_filtering.h index 7b7fda9ac74..31b45108285 100644 --- a/src/core/load_balancing/address_filtering.h +++ b/src/core/load_balancing/address_filtering.h @@ -17,6 +17,8 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_ADDRESS_FILTERING_H #define GRPC_SRC_CORE_LOAD_BALANCING_ADDRESS_FILTERING_H +#include + #include #include #include @@ -24,9 +26,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/resolver/endpoint_addresses.h" #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_string.h" diff --git a/src/core/load_balancing/backend_metric_data.h b/src/core/load_balancing/backend_metric_data.h index 1f11e61e947..036298681de 100644 --- a/src/core/load_balancing/backend_metric_data.h +++ b/src/core/load_balancing/backend_metric_data.h @@ -17,12 +17,12 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_DATA_H #define GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_DATA_H +#include + #include #include "absl/strings/string_view.h" -#include - namespace grpc_core { // Represents backend metrics reported by the backend to the client. diff --git a/src/core/load_balancing/backend_metric_parser.cc b/src/core/load_balancing/backend_metric_parser.cc index 6dc1275a65e..3b65399136a 100644 --- a/src/core/load_balancing/backend_metric_parser.cc +++ b/src/core/load_balancing/backend_metric_parser.cc @@ -16,6 +16,7 @@ #include "src/core/load_balancing/backend_metric_parser.h" +#include #include #include @@ -26,8 +27,6 @@ #include "upb/message/map.h" #include "xds/data/orca/v3/orca_load_report.upb.h" -#include - namespace grpc_core { namespace { diff --git a/src/core/load_balancing/backend_metric_parser.h b/src/core/load_balancing/backend_metric_parser.h index cd499157d0a..c6bf0b08729 100644 --- a/src/core/load_balancing/backend_metric_parser.h +++ b/src/core/load_balancing/backend_metric_parser.h @@ -17,12 +17,10 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_PARSER_H #define GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_PARSER_H +#include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/load_balancing/backend_metric_data.h" namespace grpc_core { diff --git a/src/core/load_balancing/child_policy_handler.cc b/src/core/load_balancing/child_policy_handler.cc index 4ec9127b555..5f6b545af9d 100644 --- a/src/core/load_balancing/child_policy_handler.cc +++ b/src/core/load_balancing/child_policy_handler.cc @@ -16,6 +16,9 @@ #include "src/core/load_balancing/child_policy_handler.h" +#include +#include + #include #include @@ -24,10 +27,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/src/core/load_balancing/child_policy_handler.h b/src/core/load_balancing/child_policy_handler.h index 79b056a4070..e22da5cb322 100644 --- a/src/core/load_balancing/child_policy_handler.h +++ b/src/core/load_balancing/child_policy_handler.h @@ -16,13 +16,12 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_CHILD_POLICY_HANDLER_H #define GRPC_SRC_CORE_LOAD_BALANCING_CHILD_POLICY_HANDLER_H +#include + #include #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/load_balancing/lb_policy.h" diff --git a/src/core/load_balancing/delegating_helper.h b/src/core/load_balancing/delegating_helper.h index 0852319d8a9..c504797b526 100644 --- a/src/core/load_balancing/delegating_helper.h +++ b/src/core/load_balancing/delegating_helper.h @@ -17,16 +17,15 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_DELEGATING_HELPER_H #define GRPC_SRC_CORE_LOAD_BALANCING_DELEGATING_HELPER_H -#include - -#include "absl/status/status.h" -#include "absl/strings/string_view.h" - #include #include #include #include +#include + +#include "absl/status/status.h" +#include "absl/strings/string_view.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/load_balancing/endpoint_list.cc b/src/core/load_balancing/endpoint_list.cc index 7507aadc5b5..93161132732 100644 --- a/src/core/load_balancing/endpoint_list.cc +++ b/src/core/load_balancing/endpoint_list.cc @@ -16,6 +16,9 @@ #include "src/core/load_balancing/endpoint_list.h" +#include +#include +#include #include #include @@ -27,11 +30,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/src/core/load_balancing/endpoint_list.h b/src/core/load_balancing/endpoint_list.h index eff8663d7e8..4ba3b60753a 100644 --- a/src/core/load_balancing/endpoint_list.h +++ b/src/core/load_balancing/endpoint_list.h @@ -17,6 +17,8 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_ENDPOINT_LIST_H #define GRPC_SRC_CORE_LOAD_BALANCING_ENDPOINT_LIST_H +#include +#include #include #include @@ -26,10 +28,6 @@ #include "absl/functional/function_ref.h" #include "absl/status/status.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/load_balancing/lb_policy.h" diff --git a/src/core/load_balancing/grpclb/client_load_reporting_filter.cc b/src/core/load_balancing/grpclb/client_load_reporting_filter.cc index 4aff5f14580..90b12f05101 100644 --- a/src/core/load_balancing/grpclb/client_load_reporting_filter.cc +++ b/src/core/load_balancing/grpclb/client_load_reporting_filter.cc @@ -18,15 +18,14 @@ #include "src/core/load_balancing/grpclb/client_load_reporting_filter.h" +#include + #include #include #include #include #include "absl/types/optional.h" - -#include - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/map.h" diff --git a/src/core/load_balancing/grpclb/client_load_reporting_filter.h b/src/core/load_balancing/grpclb/client_load_reporting_filter.h index 87fa1fee21b..07e0c43b8c2 100644 --- a/src/core/load_balancing/grpclb/client_load_reporting_filter.h +++ b/src/core/load_balancing/grpclb/client_load_reporting_filter.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H #define GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H -#include "absl/status/statusor.h" - #include +#include "absl/status/statusor.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/core/load_balancing/grpclb/grpclb.cc b/src/core/load_balancing/grpclb/grpclb.cc index d6e82fbb134..a214f92c4db 100644 --- a/src/core/load_balancing/grpclb/grpclb.cc +++ b/src/core/load_balancing/grpclb/grpclb.cc @@ -58,6 +58,14 @@ // IWYU pragma: no_include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -83,17 +91,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" -#include "upb/mem/arena.hpp" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/address_utils/sockaddr_utils.h" @@ -144,6 +141,7 @@ #include "src/core/util/useful.h" #include "src/core/util/validation_errors.h" #include "src/core/util/work_serializer.h" +#include "upb/mem/arena.hpp" #define GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS 1 #define GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER 1.6 diff --git a/src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc b/src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc index a0552c57c70..85b8ff6d6c6 100644 --- a/src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc +++ b/src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc @@ -16,12 +16,11 @@ #include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" +#include #include #include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/useful.h" diff --git a/src/core/load_balancing/grpclb/grpclb_client_stats.cc b/src/core/load_balancing/grpclb/grpclb_client_stats.cc index 6ed75719e9c..2f9f0a9842d 100644 --- a/src/core/load_balancing/grpclb/grpclb_client_stats.cc +++ b/src/core/load_balancing/grpclb/grpclb_client_stats.cc @@ -18,11 +18,10 @@ #include "src/core/load_balancing/grpclb/grpclb_client_stats.h" -#include - #include #include #include +#include #include "src/core/util/sync.h" diff --git a/src/core/load_balancing/grpclb/grpclb_client_stats.h b/src/core/load_balancing/grpclb/grpclb_client_stats.h index d03462038f6..332f942fe52 100644 --- a/src/core/load_balancing/grpclb/grpclb_client_stats.h +++ b/src/core/load_balancing/grpclb/grpclb_client_stats.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_CLIENT_STATS_H #define GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_CLIENT_STATS_H +#include +#include #include #include @@ -26,10 +28,6 @@ #include "absl/base/thread_annotations.h" #include "absl/container/inlined_vector.h" - -#include -#include - #include "src/core/util/memory.h" #include "src/core/util/ref_counted.h" #include "src/core/util/sync.h" diff --git a/src/core/load_balancing/grpclb/load_balancer_api.cc b/src/core/load_balancing/grpclb/load_balancer_api.cc index 8cda3230ed5..6fd1eafd9ff 100644 --- a/src/core/load_balancing/grpclb/load_balancer_api.cc +++ b/src/core/load_balancing/grpclb/load_balancer_api.cc @@ -18,6 +18,8 @@ #include "src/core/load_balancing/grpclb/load_balancer_api.h" +#include +#include #include #include @@ -25,13 +27,9 @@ #include "absl/log/log.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/timestamp.upb.h" -#include "upb/base/string_view.h" - -#include -#include - #include "src/core/util/memory.h" #include "src/proto/grpc/lb/v1/load_balancer.upb.h" +#include "upb/base/string_view.h" namespace grpc_core { diff --git a/src/core/load_balancing/grpclb/load_balancer_api.h b/src/core/load_balancing/grpclb/load_balancer_api.h index ebfdd0c84d6..c2aa2db7713 100644 --- a/src/core/load_balancing/grpclb/load_balancer_api.h +++ b/src/core/load_balancing/grpclb/load_balancer_api.h @@ -18,18 +18,16 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_LOAD_BALANCER_API_H #define GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_LOAD_BALANCER_API_H +#include +#include #include #include #include "absl/strings/string_view.h" -#include "upb/mem/arena.h" - -#include -#include - #include "src/core/load_balancing/grpclb/grpclb_client_stats.h" #include "src/core/util/time.h" +#include "upb/mem/arena.h" #define GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH 128 #define GRPC_GRPCLB_SERVER_IP_ADDRESS_MAX_SIZE 16 diff --git a/src/core/load_balancing/health_check_client.cc b/src/core/load_balancing/health_check_client.cc index b2d3f1ac3a9..0f28c4392ae 100644 --- a/src/core/load_balancing/health_check_client.cc +++ b/src/core/load_balancing/health_check_client.cc @@ -14,6 +14,11 @@ // limitations under the License. // +#include +#include +#include +#include +#include #include #include @@ -31,15 +36,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "upb/base/string_view.h" -#include "upb/mem/arena.hpp" - -#include -#include -#include -#include -#include - #include "src/core/channelz/channel_trace.h" #include "src/core/client_channel/client_channel_internal.h" #include "src/core/client_channel/subchannel.h" @@ -62,6 +58,8 @@ #include "src/core/util/sync.h" #include "src/core/util/work_serializer.h" #include "src/proto/grpc/health/v1/health.upb.h" +#include "upb/base/string_view.h" +#include "upb/mem/arena.hpp" namespace grpc_core { diff --git a/src/core/load_balancing/health_check_client.h b/src/core/load_balancing/health_check_client.h index 9fe4c1cdf17..abe778f503d 100644 --- a/src/core/load_balancing/health_check_client.h +++ b/src/core/load_balancing/health_check_client.h @@ -17,10 +17,10 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_H #define GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_H -#include - #include +#include + #include "src/core/lib/channel/channel_args.h" #include "src/core/load_balancing/subchannel_interface.h" #include "src/core/util/work_serializer.h" diff --git a/src/core/load_balancing/health_check_client_internal.h b/src/core/load_balancing/health_check_client_internal.h index cded2e1df8c..187b3dec0fe 100644 --- a/src/core/load_balancing/health_check_client_internal.h +++ b/src/core/load_balancing/health_check_client_internal.h @@ -17,6 +17,9 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_INTERNAL_H #define GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_INTERNAL_H +#include +#include + #include #include #include @@ -27,10 +30,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_interface_internal.h" #include "src/core/client_channel/subchannel_stream_client.h" diff --git a/src/core/load_balancing/lb_policy.h b/src/core/load_balancing/lb_policy.h index bbfd775b028..d8116d8cb7a 100644 --- a/src/core/load_balancing/lb_policy.h +++ b/src/core/load_balancing/lb_policy.h @@ -17,6 +17,11 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_H #define GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_H +#include +#include +#include +#include +#include #include #include @@ -31,13 +36,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/iomgr_fwd.h" diff --git a/src/core/load_balancing/lb_policy_factory.h b/src/core/load_balancing/lb_policy_factory.h index d05d356b71d..c8b710b1247 100644 --- a/src/core/load_balancing/lb_policy_factory.h +++ b/src/core/load_balancing/lb_policy_factory.h @@ -17,11 +17,10 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_FACTORY_H #define GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_FACTORY_H -#include "absl/status/statusor.h" -#include "absl/strings/string_view.h" - #include +#include "absl/status/statusor.h" +#include "absl/strings/string_view.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/util/json/json.h" #include "src/core/util/orphanable.h" diff --git a/src/core/load_balancing/lb_policy_registry.cc b/src/core/load_balancing/lb_policy_registry.cc index 1aaa2103941..b0b20139f76 100644 --- a/src/core/load_balancing/lb_policy_registry.cc +++ b/src/core/load_balancing/lb_policy_registry.cc @@ -16,6 +16,9 @@ #include "src/core/load_balancing/lb_policy_registry.h" +#include +#include + #include #include #include @@ -29,10 +32,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/load_balancing/lb_policy.h" namespace grpc_core { diff --git a/src/core/load_balancing/lb_policy_registry.h b/src/core/load_balancing/lb_policy_registry.h index e0587f4856a..86bc7ccd2eb 100644 --- a/src/core/load_balancing/lb_policy_registry.h +++ b/src/core/load_balancing/lb_policy_registry.h @@ -17,14 +17,13 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_REGISTRY_H #define GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_REGISTRY_H +#include + #include #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/lb_policy_factory.h" #include "src/core/util/json/json.h" diff --git a/src/core/load_balancing/oob_backend_metric.cc b/src/core/load_balancing/oob_backend_metric.cc index 87e9528379e..4b29bd25847 100644 --- a/src/core/load_balancing/oob_backend_metric.cc +++ b/src/core/load_balancing/oob_backend_metric.cc @@ -16,6 +16,12 @@ #include "src/core/load_balancing/oob_backend_metric.h" +#include +#include +#include +#include +#include +#include #include #include @@ -28,16 +34,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "google/protobuf/duration.upb.h" -#include "upb/mem/arena.hpp" -#include "xds/service/orca/v3/orca.upb.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channel_trace.h" #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_stream_client.h" @@ -56,6 +52,8 @@ #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/sync.h" #include "src/core/util/time.h" +#include "upb/mem/arena.hpp" +#include "xds/service/orca/v3/orca.upb.h" namespace grpc_core { diff --git a/src/core/load_balancing/oob_backend_metric.h b/src/core/load_balancing/oob_backend_metric.h index 1c594d8e93c..1eacc08e54d 100644 --- a/src/core/load_balancing/oob_backend_metric.h +++ b/src/core/load_balancing/oob_backend_metric.h @@ -17,10 +17,10 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_H #define GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_H -#include - #include +#include + #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/load_balancing/subchannel_interface.h" #include "src/core/util/time.h" diff --git a/src/core/load_balancing/oob_backend_metric_internal.h b/src/core/load_balancing/oob_backend_metric_internal.h index f39e852b01f..647f45d7eaa 100644 --- a/src/core/load_balancing/oob_backend_metric_internal.h +++ b/src/core/load_balancing/oob_backend_metric_internal.h @@ -17,16 +17,15 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_INTERNAL_H #define GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_INTERNAL_H +#include +#include + #include #include #include #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_interface_internal.h" #include "src/core/client_channel/subchannel_stream_client.h" diff --git a/src/core/load_balancing/outlier_detection/outlier_detection.cc b/src/core/load_balancing/outlier_detection/outlier_detection.cc index aef81b7363d..448f3da2271 100644 --- a/src/core/load_balancing/outlier_detection/outlier_detection.cc +++ b/src/core/load_balancing/outlier_detection/outlier_detection.cc @@ -16,6 +16,9 @@ #include "src/core/load_balancing/outlier_detection/outlier_detection.h" +#include +#include +#include #include #include @@ -39,11 +42,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/variant.h" - -#include -#include -#include - #include "src/core/client_channel/subchannel_interface_internal.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/load_balancing/outlier_detection/outlier_detection.h b/src/core/load_balancing/outlier_detection/outlier_detection.h index d862941e1fa..c035e45c165 100644 --- a/src/core/load_balancing/outlier_detection/outlier_detection.h +++ b/src/core/load_balancing/outlier_detection/outlier_detection.h @@ -17,12 +17,10 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_OUTLIER_DETECTION_OUTLIER_DETECTION_H #define GRPC_SRC_CORE_LOAD_BALANCING_OUTLIER_DETECTION_OUTLIER_DETECTION_H +#include #include // for uint32_t #include "absl/types/optional.h" - -#include - #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" diff --git a/src/core/load_balancing/pick_first/pick_first.cc b/src/core/load_balancing/pick_first/pick_first.cc index c977a032c5d..c49b8ad2bfb 100644 --- a/src/core/load_balancing/pick_first/pick_first.cc +++ b/src/core/load_balancing/pick_first/pick_first.cc @@ -16,6 +16,10 @@ #include "src/core/load_balancing/pick_first/pick_first.h" +#include +#include +#include +#include #include #include @@ -35,12 +39,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/load_balancing/priority/priority.cc b/src/core/load_balancing/priority/priority.cc index a747c2ce17f..854ea3c4c79 100644 --- a/src/core/load_balancing/priority/priority.cc +++ b/src/core/load_balancing/priority/priority.cc @@ -14,6 +14,10 @@ // limitations under the License. // +#include +#include +#include +#include #include #include @@ -33,12 +37,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/load_balancing/ring_hash/ring_hash.cc b/src/core/load_balancing/ring_hash/ring_hash.cc index 5ca33543983..5613648b1b6 100644 --- a/src/core/load_balancing/ring_hash/ring_hash.cc +++ b/src/core/load_balancing/ring_hash/ring_hash.cc @@ -16,6 +16,10 @@ #include "src/core/load_balancing/ring_hash/ring_hash.h" +#include +#include +#include +#include #include #include @@ -36,12 +40,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/client_channel/client_channel_internal.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/load_balancing/ring_hash/ring_hash.h b/src/core/load_balancing/ring_hash/ring_hash.h index da7e83b215a..95f17cbe81d 100644 --- a/src/core/load_balancing/ring_hash/ring_hash.h +++ b/src/core/load_balancing/ring_hash/ring_hash.h @@ -17,9 +17,8 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_RING_HASH_RING_HASH_H #define GRPC_SRC_CORE_LOAD_BALANCING_RING_HASH_RING_HASH_H -#include - #include +#include #include "src/core/service_config/service_config_call_data.h" #include "src/core/util/json/json.h" diff --git a/src/core/load_balancing/rls/rls.cc b/src/core/load_balancing/rls/rls.cc index a02da17484c..3024ebbef0d 100644 --- a/src/core/load_balancing/rls/rls.cc +++ b/src/core/load_balancing/rls/rls.cc @@ -22,6 +22,17 @@ #include "src/core/load_balancing/rls/rls.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -51,21 +62,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "upb/base/string_view.h" -#include "upb/mem/arena.hpp" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/channel/channel_args.h" @@ -109,6 +105,8 @@ #include "src/core/util/validation_errors.h" #include "src/core/util/work_serializer.h" #include "src/proto/grpc/lookup/v1/rls.upb.h" +#include "upb/base/string_view.h" +#include "upb/mem/arena.hpp" using ::grpc_event_engine::experimental::EventEngine; diff --git a/src/core/load_balancing/round_robin/round_robin.cc b/src/core/load_balancing/round_robin/round_robin.cc index 5c4c23370ed..44fa7f9104c 100644 --- a/src/core/load_balancing/round_robin/round_robin.cc +++ b/src/core/load_balancing/round_robin/round_robin.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include +#include #include #include @@ -33,10 +35,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/load_balancing/subchannel_interface.h b/src/core/load_balancing/subchannel_interface.h index b2d78fad05f..0042a9f0ea2 100644 --- a/src/core/load_balancing/subchannel_interface.h +++ b/src/core/load_balancing/subchannel_interface.h @@ -17,15 +17,14 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_SUBCHANNEL_INTERFACE_H #define GRPC_SRC_CORE_LOAD_BALANCING_SUBCHANNEL_INTERFACE_H +#include +#include + #include #include #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/util/dual_ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc b/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc index 785c0ff22d3..e74714db433 100644 --- a/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc +++ b/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc @@ -16,6 +16,8 @@ #include "src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h" +#include + #include #include #include @@ -25,8 +27,6 @@ #include "absl/functional/any_invocable.h" #include "absl/log/check.h" -#include - namespace grpc_core { namespace { diff --git a/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h b/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h index 7245ca9607a..936033848f7 100644 --- a/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h +++ b/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h @@ -17,6 +17,7 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_WEIGHTED_ROUND_ROBIN_STATIC_STRIDE_SCHEDULER_H #define GRPC_SRC_CORE_LOAD_BALANCING_WEIGHTED_ROUND_ROBIN_STATIC_STRIDE_SCHEDULER_H +#include #include #include @@ -26,8 +27,6 @@ #include "absl/types/optional.h" #include "absl/types/span.h" -#include - namespace grpc_core { // StaticStrideScheduler implements a stride scheduler without the ability to diff --git a/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc b/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc index c0403f84bd1..522b73ece7d 100644 --- a/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +++ b/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc @@ -14,6 +14,9 @@ // limitations under the License. // +#include +#include +#include #include #include @@ -39,11 +42,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/load_balancing/weighted_target/weighted_target.cc b/src/core/load_balancing/weighted_target/weighted_target.cc index 8f5075a3409..bebda9cba0d 100644 --- a/src/core/load_balancing/weighted_target/weighted_target.cc +++ b/src/core/load_balancing/weighted_target/weighted_target.cc @@ -16,6 +16,9 @@ #include "src/core/load_balancing/weighted_target/weighted_target.h" +#include +#include +#include #include #include @@ -37,11 +40,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/load_balancing/xds/cds.cc b/src/core/load_balancing/xds/cds.cc index 98072442af5..358d9c41194 100644 --- a/src/core/load_balancing/xds/cds.cc +++ b/src/core/load_balancing/xds/cds.cc @@ -14,6 +14,11 @@ // limitations under the License. // +#include +#include +#include +#include + #include #include #include @@ -31,12 +36,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/load_balancing/xds/xds_cluster_impl.cc b/src/core/load_balancing/xds/xds_cluster_impl.cc index 380ed7b108a..ba655bfb762 100644 --- a/src/core/load_balancing/xds/xds_cluster_impl.cc +++ b/src/core/load_balancing/xds/xds_cluster_impl.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include +#include #include #include @@ -33,10 +35,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include - #include "src/core/client_channel/client_channel_internal.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/load_balancing/xds/xds_cluster_manager.cc b/src/core/load_balancing/xds/xds_cluster_manager.cc index 4e72ca1170c..96ad1313aeb 100644 --- a/src/core/load_balancing/xds/xds_cluster_manager.cc +++ b/src/core/load_balancing/xds/xds_cluster_manager.cc @@ -14,6 +14,9 @@ // limitations under the License. // +#include +#include +#include #include #include @@ -32,11 +35,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/client_channel/client_channel_internal.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/load_balancing/xds/xds_override_host.cc b/src/core/load_balancing/xds/xds_override_host.cc index 1c64eeb0a13..07d800e8df7 100644 --- a/src/core/load_balancing/xds/xds_override_host.cc +++ b/src/core/load_balancing/xds/xds_override_host.cc @@ -16,6 +16,9 @@ #include "src/core/load_balancing/xds/xds_override_host.h" +#include +#include +#include #include #include @@ -42,11 +45,6 @@ #include "absl/types/optional.h" #include "absl/types/span.h" #include "absl/types/variant.h" - -#include -#include -#include - #include "src/core/client_channel/client_channel_internal.h" #include "src/core/ext/filters/stateful_session/stateful_session_filter.h" #include "src/core/lib/address_utils/parse_address.h" diff --git a/src/core/load_balancing/xds/xds_override_host.h b/src/core/load_balancing/xds/xds_override_host.h index 387a5036491..55317bd4756 100644 --- a/src/core/load_balancing/xds/xds_override_host.h +++ b/src/core/load_balancing/xds/xds_override_host.h @@ -17,10 +17,9 @@ #ifndef GRPC_SRC_CORE_LOAD_BALANCING_XDS_XDS_OVERRIDE_HOST_H #define GRPC_SRC_CORE_LOAD_BALANCING_XDS_XDS_OVERRIDE_HOST_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" diff --git a/src/core/load_balancing/xds/xds_wrr_locality.cc b/src/core/load_balancing/xds/xds_wrr_locality.cc index efdb91844d6..6ac208dc5a8 100644 --- a/src/core/load_balancing/xds/xds_wrr_locality.cc +++ b/src/core/load_balancing/xds/xds_wrr_locality.cc @@ -14,6 +14,10 @@ // limitations under the License. // +#include +#include +#include + #include #include #include @@ -26,11 +30,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/resolver/.clang-format b/src/core/resolver/.clang-format deleted file mode 100644 index 5f150ef6edb..00000000000 --- a/src/core/resolver/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/resolver/binder/binder_resolver.cc b/src/core/resolver/binder/binder_resolver.cc index 30f7e46cc19..326cee10754 100644 --- a/src/core/resolver/binder/binder_resolver.cc +++ b/src/core/resolver/binder/binder_resolver.cc @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include "absl/status/status.h" - -#include - #include "src/core/lib/iomgr/port.h" // IWYU pragma: keep #include "src/core/util/status_helper.h" @@ -42,7 +41,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/strings/strip.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/resolver/dns/c_ares/dns_resolver_ares.cc index 564fa165d8d..7f866dff773 100644 --- a/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +++ b/src/core/resolver/dns/c_ares/dns_resolver_ares.cc @@ -14,6 +14,9 @@ // limitations under the License. // +#include +#include +#include #include #include @@ -31,11 +34,6 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/closure.h" @@ -60,7 +58,6 @@ #include #include "absl/strings/str_cat.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/resolver/dns/c_ares/dns_resolver_ares.h b/src/core/resolver/dns/c_ares/dns_resolver_ares.h index d8ce1c25c6b..0eb98efe38b 100644 --- a/src/core/resolver/dns/c_ares/dns_resolver_ares.h +++ b/src/core/resolver/dns/c_ares/dns_resolver_ares.h @@ -14,10 +14,9 @@ #ifndef GRPC_SRC_CORE_RESOLVER_DNS_C_ARES_DNS_RESOLVER_ARES_H #define GRPC_SRC_CORE_RESOLVER_DNS_C_ARES_DNS_RESOLVER_ARES_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" #include "src/core/lib/config/core_configuration.h" namespace grpc_core { diff --git a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h index 5a75c6c7431..eeaeddf0cdf 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h +++ b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h @@ -19,14 +19,12 @@ #ifndef GRPC_SRC_CORE_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H #define GRPC_SRC_CORE_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H -#include - #include - -#include "absl/base/thread_annotations.h" - #include +#include + +#include "absl/base/thread_annotations.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" diff --git a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc index 634ab525e84..7341ffba639 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +++ b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc @@ -23,6 +23,7 @@ // IWYU pragma: no_include +#include #include #include #include @@ -33,12 +34,9 @@ #include #include -#include - #include "absl/base/thread_annotations.h" #include "absl/log/check.h" #include "absl/strings/str_cat.h" - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/ev_posix.h" diff --git a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc index d7757fb9fc4..6f988c8710d 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +++ b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc @@ -20,23 +20,20 @@ #include "src/core/lib/iomgr/port.h" // IWYU pragma: keep #if GRPC_ARES == 1 && defined(GRPC_WINDOWS_SOCKET_ARES_EV_DRIVER) +#include +#include +#include +#include +#include #include #include #include #include -#include - #include "absl/functional/any_invocable.h" #include "absl/log/check.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/sockaddr_windows.h" diff --git a/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc b/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc index e0efc6075b6..cad4cfa1918 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc +++ b/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/util/status_helper.h" @@ -37,26 +36,23 @@ #if GRPC_ARES == 1 +#include +#include +#include +#include +#include #include #include // IWYU pragma: keep #include #include -#include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include -#include -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h index 5ed2f9cc51e..272ef463ac4 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h +++ b/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h @@ -19,17 +19,14 @@ #ifndef GRPC_SRC_CORE_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H #define GRPC_SRC_CORE_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H +#include +#include #include #include -#include - #include "absl/base/thread_annotations.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/resolver/dns/dns_resolver_plugin.cc b/src/core/resolver/dns/dns_resolver_plugin.cc index 7e9870543b2..c40f628570e 100644 --- a/src/core/resolver/dns/dns_resolver_plugin.cc +++ b/src/core/resolver/dns/dns_resolver_plugin.cc @@ -13,13 +13,12 @@ // limitations under the License. #include "src/core/resolver/dns/dns_resolver_plugin.h" +#include + #include #include "absl/log/log.h" #include "absl/strings/match.h" - -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/resolver/dns/c_ares/dns_resolver_ares.h" diff --git a/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc b/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc index c65b1d506fb..61ed5677943 100644 --- a/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc +++ b/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc @@ -13,6 +13,9 @@ // limitations under the License. #include "src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h" +#include +#include +#include #include #include @@ -33,11 +36,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/strip.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/resolved_address_internal.h" diff --git a/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h b/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h index 555e91fedef..1a4fb852856 100644 --- a/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h +++ b/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h @@ -13,10 +13,9 @@ // limitations under the License. #ifndef GRPC_SRC_CORE_RESOLVER_DNS_EVENT_ENGINE_EVENT_ENGINE_CLIENT_CHANNEL_RESOLVER_H #define GRPC_SRC_CORE_RESOLVER_DNS_EVENT_ENGINE_EVENT_ENGINE_CLIENT_CHANNEL_RESOLVER_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" #include "src/core/util/orphanable.h" diff --git a/src/core/resolver/dns/event_engine/service_config_helper.cc b/src/core/resolver/dns/event_engine/service_config_helper.cc index ba0b910e327..068ff200292 100644 --- a/src/core/resolver/dns/event_engine/service_config_helper.cc +++ b/src/core/resolver/dns/event_engine/service_config_helper.cc @@ -13,6 +13,7 @@ // limitations under the License. #include "src/core/resolver/dns/event_engine/service_config_helper.h" +#include #include #include @@ -20,9 +21,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/util/gethostname.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" diff --git a/src/core/resolver/dns/event_engine/service_config_helper.h b/src/core/resolver/dns/event_engine/service_config_helper.h index 90bc82a96b6..5c89aa5e1e4 100644 --- a/src/core/resolver/dns/event_engine/service_config_helper.h +++ b/src/core/resolver/dns/event_engine/service_config_helper.h @@ -15,13 +15,13 @@ #ifndef GRPC_SRC_CORE_RESOLVER_DNS_EVENT_ENGINE_SERVICE_CONFIG_HELPER_H #define GRPC_SRC_CORE_RESOLVER_DNS_EVENT_ENGINE_SERVICE_CONFIG_HELPER_H +#include + #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include - namespace grpc_core { absl::StatusOr ChooseServiceConfig( diff --git a/src/core/resolver/dns/native/dns_resolver.cc b/src/core/resolver/dns/native/dns_resolver.cc index 8ee4b549f65..9c138bae997 100644 --- a/src/core/resolver/dns/native/dns_resolver.cc +++ b/src/core/resolver/dns/native/dns_resolver.cc @@ -14,6 +14,9 @@ // limitations under the License. // +#include +#include + #include #include #include @@ -27,10 +30,6 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" diff --git a/src/core/resolver/endpoint_addresses.cc b/src/core/resolver/endpoint_addresses.cc index 7fc7d8d3335..aa5f46e3abd 100644 --- a/src/core/resolver/endpoint_addresses.cc +++ b/src/core/resolver/endpoint_addresses.cc @@ -18,6 +18,7 @@ #include "src/core/resolver/endpoint_addresses.h" +#include #include #include @@ -29,9 +30,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" - -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/useful.h" diff --git a/src/core/resolver/endpoint_addresses.h b/src/core/resolver/endpoint_addresses.h index 00a9e659784..bd5c0091be1 100644 --- a/src/core/resolver/endpoint_addresses.h +++ b/src/core/resolver/endpoint_addresses.h @@ -19,15 +19,14 @@ #ifndef GRPC_SRC_CORE_RESOLVER_ENDPOINT_ADDRESSES_H #define GRPC_SRC_CORE_RESOLVER_ENDPOINT_ADDRESSES_H +#include + #include #include #include #include #include "absl/functional/function_ref.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolved_address.h" diff --git a/src/core/resolver/fake/fake_resolver.cc b/src/core/resolver/fake/fake_resolver.cc index b2bbaf26193..a3ff19fb353 100644 --- a/src/core/resolver/fake/fake_resolver.cc +++ b/src/core/resolver/fake/fake_resolver.cc @@ -19,15 +19,14 @@ #include "src/core/resolver/fake/fake_resolver.h" +#include + #include #include #include #include "absl/log/check.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/resolver/resolver_factory.h" diff --git a/src/core/resolver/fake/fake_resolver.h b/src/core/resolver/fake/fake_resolver.h index 5126c741577..c72187bcfc7 100644 --- a/src/core/resolver/fake/fake_resolver.h +++ b/src/core/resolver/fake/fake_resolver.h @@ -17,16 +17,15 @@ #ifndef GRPC_SRC_CORE_RESOLVER_FAKE_FAKE_RESOLVER_H #define GRPC_SRC_CORE_RESOLVER_FAKE_FAKE_RESOLVER_H +#include +#include + #include #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" #include "absl/time/time.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/resolver/resolver.h" #include "src/core/util/notification.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/resolver/google_c2p/google_c2p_resolver.cc b/src/core/resolver/google_c2p/google_c2p_resolver.cc index 42e309f900c..7aa5ee7009c 100644 --- a/src/core/resolver/google_c2p/google_c2p_resolver.cc +++ b/src/core/resolver/google_c2p/google_c2p_resolver.cc @@ -14,6 +14,9 @@ // limitations under the License. // +#include +#include + #include #include #include @@ -28,10 +31,6 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/iomgr/polling_entity.h" diff --git a/src/core/resolver/polling_resolver.cc b/src/core/resolver/polling_resolver.cc index 27806f1e5a9..83642ddd1c5 100644 --- a/src/core/resolver/polling_resolver.cc +++ b/src/core/resolver/polling_resolver.cc @@ -16,6 +16,7 @@ #include "src/core/resolver/polling_resolver.h" +#include #include #include @@ -29,9 +30,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/strip.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/resolver/endpoint_addresses.h" diff --git a/src/core/resolver/polling_resolver.h b/src/core/resolver/polling_resolver.h index fe405c3f1d4..c09ba6653c3 100644 --- a/src/core/resolver/polling_resolver.h +++ b/src/core/resolver/polling_resolver.h @@ -17,15 +17,14 @@ #ifndef GRPC_SRC_CORE_RESOLVER_POLLING_RESOLVER_H #define GRPC_SRC_CORE_RESOLVER_POLLING_RESOLVER_H +#include +#include + #include #include #include "absl/status/status.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/iomgr_fwd.h" diff --git a/src/core/resolver/resolver.h b/src/core/resolver/resolver.h index 389096c3d8f..5cabc99b270 100644 --- a/src/core/resolver/resolver.h +++ b/src/core/resolver/resolver.h @@ -17,14 +17,13 @@ #ifndef GRPC_SRC_CORE_RESOLVER_RESOLVER_H #define GRPC_SRC_CORE_RESOLVER_RESOLVER_H +#include + #include #include #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/resolver/endpoint_addresses.h" diff --git a/src/core/resolver/resolver_factory.h b/src/core/resolver/resolver_factory.h index 831b67c5cfc..41df42060fc 100644 --- a/src/core/resolver/resolver_factory.h +++ b/src/core/resolver/resolver_factory.h @@ -17,14 +17,13 @@ #ifndef GRPC_SRC_CORE_RESOLVER_RESOLVER_FACTORY_H #define GRPC_SRC_CORE_RESOLVER_RESOLVER_FACTORY_H +#include + #include #include #include "absl/strings/string_view.h" #include "absl/strings/strip.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/resolver/resolver.h" diff --git a/src/core/resolver/resolver_registry.cc b/src/core/resolver/resolver_registry.cc index 3033fb6aecb..56a189bf307 100644 --- a/src/core/resolver/resolver_registry.cc +++ b/src/core/resolver/resolver_registry.cc @@ -16,6 +16,8 @@ #include "src/core/resolver/resolver_registry.h" +#include + #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/status.h" @@ -24,8 +26,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include - namespace grpc_core { // diff --git a/src/core/resolver/resolver_registry.h b/src/core/resolver/resolver_registry.h index 5e1d87fbf6b..c25f2524578 100644 --- a/src/core/resolver/resolver_registry.h +++ b/src/core/resolver/resolver_registry.h @@ -17,15 +17,14 @@ #ifndef GRPC_SRC_CORE_RESOLVER_RESOLVER_REGISTRY_H #define GRPC_SRC_CORE_RESOLVER_RESOLVER_REGISTRY_H +#include + #include #include #include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/resolver/resolver.h" diff --git a/src/core/resolver/sockaddr/sockaddr_resolver.cc b/src/core/resolver/sockaddr/sockaddr_resolver.cc index 1cd1ac310cf..6657faa4680 100644 --- a/src/core/resolver/sockaddr/sockaddr_resolver.cc +++ b/src/core/resolver/sockaddr/sockaddr_resolver.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include + #include #include #include @@ -23,9 +25,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/resolver/xds/xds_config.cc b/src/core/resolver/xds/xds_config.cc index 70158b1c365..b9e7f914513 100644 --- a/src/core/resolver/xds/xds_config.cc +++ b/src/core/resolver/xds/xds_config.cc @@ -23,7 +23,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" - #include "src/core/util/match.h" namespace grpc_core { diff --git a/src/core/resolver/xds/xds_config.h b/src/core/resolver/xds/xds_config.h index 784db2fc487..b5fb154663b 100644 --- a/src/core/resolver/xds/xds_config.h +++ b/src/core/resolver/xds/xds_config.h @@ -26,7 +26,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/variant.h" - #include "src/core/util/ref_counted.h" #include "src/core/xds/grpc/xds_cluster.h" #include "src/core/xds/grpc/xds_endpoint.h" diff --git a/src/core/resolver/xds/xds_dependency_manager.cc b/src/core/resolver/xds/xds_dependency_manager.cc index 3ed9fa1da92..ddc0dcdbfd9 100644 --- a/src/core/resolver/xds/xds_dependency_manager.cc +++ b/src/core/resolver/xds/xds_dependency_manager.cc @@ -21,7 +21,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_join.h" - #include "src/core/lib/config/core_configuration.h" #include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/resolver/fake/fake_resolver.h" diff --git a/src/core/resolver/xds/xds_dependency_manager.h b/src/core/resolver/xds/xds_dependency_manager.h index dcb1738b4f1..5e8ea3a00c0 100644 --- a/src/core/resolver/xds/xds_dependency_manager.h +++ b/src/core/resolver/xds/xds_dependency_manager.h @@ -20,7 +20,6 @@ #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" #include "absl/strings/string_view.h" - #include "src/core/resolver/resolver.h" #include "src/core/resolver/xds/xds_config.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/resolver/xds/xds_resolver.cc b/src/core/resolver/xds/xds_resolver.cc index 833468a7b29..fb9d1da293a 100644 --- a/src/core/resolver/xds/xds_resolver.cc +++ b/src/core/resolver/xds/xds_resolver.cc @@ -14,6 +14,10 @@ // limitations under the License. // +#include +#include +#include +#include #include #include @@ -42,12 +46,6 @@ #include "absl/types/optional.h" #include "absl/types/variant.h" #include "re2/re2.h" - -#include -#include -#include -#include - #include "src/core/client_channel/client_channel_internal.h" #include "src/core/client_channel/config_selector.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/resolver/xds/xds_resolver_attributes.h b/src/core/resolver/xds/xds_resolver_attributes.h index 63f2684f2a1..c0d2795afe4 100644 --- a/src/core/resolver/xds/xds_resolver_attributes.h +++ b/src/core/resolver/xds/xds_resolver_attributes.h @@ -17,10 +17,9 @@ #ifndef GRPC_SRC_CORE_RESOLVER_XDS_XDS_RESOLVER_ATTRIBUTES_H #define GRPC_SRC_CORE_RESOLVER_XDS_XDS_RESOLVER_ATTRIBUTES_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" #include "src/core/service_config/service_config_call_data.h" #include "src/core/util/unique_type_name.h" #include "src/core/xds/grpc/xds_route_config.h" diff --git a/src/core/server/server.cc b/src/core/server/server.cc index f88eb5925da..5ec784a5c96 100644 --- a/src/core/server/server.cc +++ b/src/core/server/server.cc @@ -16,6 +16,14 @@ #include "src/core/server/server.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -36,16 +44,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channel_trace.h" #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/server/server.h b/src/core/server/server.h index 4bd2273eac3..8f68c333eba 100644 --- a/src/core/server/server.h +++ b/src/core/server/server.h @@ -17,6 +17,12 @@ #ifndef GRPC_SRC_CORE_SERVER_SERVER_H #define GRPC_SRC_CORE_SERVER_SERVER_H +#include +#include +#include +#include +#include +#include #include #include @@ -37,14 +43,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/server/server_call_tracer_filter.cc b/src/core/server/server_call_tracer_filter.cc index b4fbdafde9c..692915750d3 100644 --- a/src/core/server/server_call_tracer_filter.cc +++ b/src/core/server/server_call_tracer_filter.cc @@ -16,15 +16,14 @@ #include "src/core/server/server_call_tracer_filter.h" +#include + #include #include #include #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/lib/channel/call_finalization.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/server/server_config_selector.h b/src/core/server/server_config_selector.h index 4d766419809..4e2fda33c77 100644 --- a/src/core/server/server_config_selector.h +++ b/src/core/server/server_config_selector.h @@ -17,13 +17,12 @@ #ifndef GRPC_SRC_CORE_SERVER_SERVER_CONFIG_SELECTOR_H #define GRPC_SRC_CORE_SERVER_SERVER_CONFIG_SELECTOR_H +#include + #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/transport/metadata_batch.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_parser.h" diff --git a/src/core/server/server_config_selector_filter.cc b/src/core/server/server_config_selector_filter.cc index 2f221e61426..53cfb0524aa 100644 --- a/src/core/server/server_config_selector_filter.cc +++ b/src/core/server/server_config_selector_filter.cc @@ -14,6 +14,8 @@ #include "src/core/server/server_config_selector_filter.h" +#include + #include #include #include @@ -23,9 +25,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/event_engine/event_engine_context.h" diff --git a/src/core/server/xds_channel_stack_modifier.cc b/src/core/server/xds_channel_stack_modifier.cc index 15d2d3378f3..5a31507b138 100644 --- a/src/core/server/xds_channel_stack_modifier.cc +++ b/src/core/server/xds_channel_stack_modifier.cc @@ -18,12 +18,12 @@ #include "src/core/server/xds_channel_stack_modifier.h" +#include + #include #include #include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/core/server/xds_channel_stack_modifier.h b/src/core/server/xds_channel_stack_modifier.h index 78810478d99..11ec0f06325 100644 --- a/src/core/server/xds_channel_stack_modifier.h +++ b/src/core/server/xds_channel_stack_modifier.h @@ -19,14 +19,13 @@ #ifndef GRPC_SRC_CORE_SERVER_XDS_CHANNEL_STACK_MODIFIER_H #define GRPC_SRC_CORE_SERVER_XDS_CHANNEL_STACK_MODIFIER_H +#include +#include + #include #include #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/util/ref_counted.h" diff --git a/src/core/server/xds_server_config_fetcher.cc b/src/core/server/xds_server_config_fetcher.cc index f8b523a293e..35b64a5e19e 100644 --- a/src/core/server/xds_server_config_fetcher.cc +++ b/src/core/server/xds_server_config_fetcher.cc @@ -16,6 +16,12 @@ // // +#include +#include +#include +#include +#include +#include #include #include @@ -39,14 +45,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/service_config/service_config.h b/src/core/service_config/service_config.h index f9c43c35011..801205ed43e 100644 --- a/src/core/service_config/service_config.h +++ b/src/core/service_config/service_config.h @@ -17,13 +17,11 @@ #ifndef GRPC_SRC_CORE_SERVICE_CONFIG_SERVICE_CONFIG_H #define GRPC_SRC_CORE_SERVICE_CONFIG_SERVICE_CONFIG_H -#include - -#include "absl/strings/string_view.h" - #include #include +#include +#include "absl/strings/string_view.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/ref_counted.h" #include "src/core/util/useful.h" diff --git a/src/core/service_config/service_config_call_data.h b/src/core/service_config/service_config_call_data.h index 7c6bbcd2e39..87ead4b6330 100644 --- a/src/core/service_config/service_config_call_data.h +++ b/src/core/service_config/service_config_call_data.h @@ -17,13 +17,12 @@ #ifndef GRPC_SRC_CORE_SERVICE_CONFIG_SERVICE_CONFIG_CALL_DATA_H #define GRPC_SRC_CORE_SERVICE_CONFIG_SERVICE_CONFIG_CALL_DATA_H +#include #include #include #include -#include - #include "src/core/lib/resource_quota/arena.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_parser.h" diff --git a/src/core/service_config/service_config_channel_arg_filter.cc b/src/core/service_config/service_config_channel_arg_filter.cc index c17fa1a04d6..635dd184ca5 100644 --- a/src/core/service_config/service_config_channel_arg_filter.cc +++ b/src/core/service_config/service_config_channel_arg_filter.cc @@ -17,6 +17,9 @@ // This filter reads GRPC_ARG_SERVICE_CONFIG and populates ServiceConfigCallData // in the call context per call for direct channels. +#include +#include + #include #include #include @@ -26,10 +29,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/ext/filters/message_size/message_size_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/service_config/service_config_impl.cc b/src/core/service_config/service_config_impl.cc index a52442e09ec..f678568957a 100644 --- a/src/core/service_config/service_config_impl.cc +++ b/src/core/service_config/service_config_impl.cc @@ -16,6 +16,7 @@ #include "src/core/service_config/service_config_impl.h" +#include #include #include @@ -25,9 +26,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/service_config/service_config_impl.h b/src/core/service_config/service_config_impl.h index ca1d3d17dfb..9d6ae2a46d3 100644 --- a/src/core/service_config/service_config_impl.h +++ b/src/core/service_config/service_config_impl.h @@ -17,6 +17,8 @@ #ifndef GRPC_SRC_CORE_SERVICE_CONFIG_SERVICE_CONFIG_IMPL_H #define GRPC_SRC_CORE_SERVICE_CONFIG_SERVICE_CONFIG_IMPL_H +#include +#include #include #include @@ -27,10 +29,6 @@ #include "absl/log/check.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/service_config/service_config.h" diff --git a/src/core/service_config/service_config_parser.cc b/src/core/service_config/service_config_parser.cc index e679126375e..b3ff7392514 100644 --- a/src/core/service_config/service_config_parser.cc +++ b/src/core/service_config/service_config_parser.cc @@ -16,14 +16,13 @@ #include "src/core/service_config/service_config_parser.h" +#include #include #include #include "absl/log/log.h" -#include - namespace grpc_core { ServiceConfigParser ServiceConfigParser::Builder::Build() { diff --git a/src/core/service_config/service_config_parser.h b/src/core/service_config/service_config_parser.h index caac10a4bc8..763e7f89785 100644 --- a/src/core/service_config/service_config_parser.h +++ b/src/core/service_config/service_config_parser.h @@ -17,6 +17,7 @@ #ifndef GRPC_SRC_CORE_SERVICE_CONFIG_SERVICE_CONFIG_PARSER_H #define GRPC_SRC_CORE_SERVICE_CONFIG_SERVICE_CONFIG_PARSER_H +#include #include #include @@ -25,9 +26,6 @@ #include #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/json/json.h" #include "src/core/util/validation_errors.h" diff --git a/src/core/telemetry/call_tracer.cc b/src/core/telemetry/call_tracer.cc index 873db2d192b..80191bcbbf3 100644 --- a/src/core/telemetry/call_tracer.cc +++ b/src/core/telemetry/call_tracer.cc @@ -18,14 +18,13 @@ #include "src/core/telemetry/call_tracer.h" +#include + #include #include #include #include "absl/log/check.h" - -#include - #include "src/core/lib/promise/context.h" #include "src/core/telemetry/tcp_tracer.h" diff --git a/src/core/telemetry/call_tracer.h b/src/core/telemetry/call_tracer.h index ab9185e2373..f91fa0b1fe1 100644 --- a/src/core/telemetry/call_tracer.h +++ b/src/core/telemetry/call_tracer.h @@ -19,16 +19,15 @@ #ifndef GRPC_SRC_CORE_TELEMETRY_CALL_TRACER_H #define GRPC_SRC_CORE_TELEMETRY_CALL_TRACER_H +#include +#include + #include #include #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/context.h" diff --git a/src/core/telemetry/histogram_view.h b/src/core/telemetry/histogram_view.h index 62018d8b840..42da4be2690 100644 --- a/src/core/telemetry/histogram_view.h +++ b/src/core/telemetry/histogram_view.h @@ -15,9 +15,8 @@ #ifndef GRPC_SRC_CORE_TELEMETRY_HISTOGRAM_VIEW_H #define GRPC_SRC_CORE_TELEMETRY_HISTOGRAM_VIEW_H -#include - #include +#include namespace grpc_core { diff --git a/src/core/telemetry/metrics.cc b/src/core/telemetry/metrics.cc index 45e2ab64bfc..9194a51d6d0 100644 --- a/src/core/telemetry/metrics.cc +++ b/src/core/telemetry/metrics.cc @@ -14,13 +14,12 @@ #include "src/core/telemetry/metrics.h" +#include + #include #include "absl/log/check.h" #include "absl/types/optional.h" - -#include - #include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/telemetry/metrics.h b/src/core/telemetry/metrics.h index b61e30d1fef..968534b7920 100644 --- a/src/core/telemetry/metrics.h +++ b/src/core/telemetry/metrics.h @@ -15,6 +15,9 @@ #ifndef GRPC_SRC_CORE_TELEMETRY_METRICS_H #define GRPC_SRC_CORE_TELEMETRY_METRICS_H +#include +#include + #include #include #include @@ -24,10 +27,6 @@ #include "absl/functional/function_ref.h" #include "absl/strings/string_view.h" #include "absl/types/span.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/slice/slice.h" #include "src/core/telemetry/call_tracer.h" diff --git a/src/core/telemetry/stats.cc b/src/core/telemetry/stats.cc index c5137e71f85..4fff0f7ec37 100644 --- a/src/core/telemetry/stats.cc +++ b/src/core/telemetry/stats.cc @@ -18,6 +18,7 @@ #include "src/core/telemetry/stats.h" +#include #include #include @@ -26,8 +27,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" -#include - namespace grpc_core { namespace stats_detail { diff --git a/src/core/telemetry/stats.h b/src/core/telemetry/stats.h index 8d783dea5d7..c5b64b429ab 100644 --- a/src/core/telemetry/stats.h +++ b/src/core/telemetry/stats.h @@ -19,6 +19,7 @@ #ifndef GRPC_SRC_CORE_TELEMETRY_STATS_H #define GRPC_SRC_CORE_TELEMETRY_STATS_H +#include #include #include @@ -26,9 +27,6 @@ #include "absl/strings/string_view.h" #include "absl/types/span.h" - -#include - #include "src/core/telemetry/histogram_view.h" #include "src/core/telemetry/stats_data.h" #include "src/core/util/no_destruct.h" diff --git a/src/core/telemetry/stats_data.cc b/src/core/telemetry/stats_data.cc index a357b674844..1b59c68f9c5 100644 --- a/src/core/telemetry/stats_data.cc +++ b/src/core/telemetry/stats_data.cc @@ -16,9 +16,8 @@ #include "src/core/telemetry/stats_data.h" -#include - #include +#include namespace grpc_core { namespace { diff --git a/src/core/telemetry/stats_data.h b/src/core/telemetry/stats_data.h index 1ac7579a994..9961302a868 100644 --- a/src/core/telemetry/stats_data.h +++ b/src/core/telemetry/stats_data.h @@ -17,15 +17,13 @@ #ifndef GRPC_SRC_CORE_TELEMETRY_STATS_DATA_H #define GRPC_SRC_CORE_TELEMETRY_STATS_DATA_H +#include #include #include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/telemetry/histogram_view.h" #include "src/core/util/per_cpu.h" diff --git a/src/core/telemetry/tcp_tracer.h b/src/core/telemetry/tcp_tracer.h index 1068678cab8..ac312d50523 100644 --- a/src/core/telemetry/tcp_tracer.h +++ b/src/core/telemetry/tcp_tracer.h @@ -19,6 +19,7 @@ #ifndef GRPC_SRC_CORE_TELEMETRY_TCP_TRACER_H #define GRPC_SRC_CORE_TELEMETRY_TCP_TRACER_H +#include #include #include @@ -27,8 +28,6 @@ #include "absl/time/time.h" #include "absl/types/optional.h" -#include - namespace grpc_core { // Interface for TCP tracer implementations. Created by CallTracerInterface. diff --git a/src/core/tsi/alts/crypt/aes_gcm.cc b/src/core/tsi/alts/crypt/aes_gcm.cc index a4b908b4bdd..d768f85b216 100644 --- a/src/core/tsi/alts/crypt/aes_gcm.cc +++ b/src/core/tsi/alts/crypt/aes_gcm.cc @@ -16,21 +16,18 @@ // // -#include - -#include - +#include +#include #include #include #include #include #include +#include -#include "absl/types/span.h" - -#include -#include +#include +#include "absl/types/span.h" #include "src/core/tsi/alts/crypt/gsec.h" constexpr size_t kKdfKeyLen = 32; diff --git a/src/core/tsi/alts/crypt/gsec.cc b/src/core/tsi/alts/crypt/gsec.cc index 591ad2bceb5..d8382aa935f 100644 --- a/src/core/tsi/alts/crypt/gsec.cc +++ b/src/core/tsi/alts/crypt/gsec.cc @@ -18,11 +18,10 @@ #include "src/core/tsi/alts/crypt/gsec.h" -#include -#include - #include #include +#include +#include static const char vtable_error_msg[] = "crypter or crypter->vtable has not been initialized properly"; diff --git a/src/core/tsi/alts/crypt/gsec.h b/src/core/tsi/alts/crypt/gsec.h index 0407955d691..726295be26a 100644 --- a/src/core/tsi/alts/crypt/gsec.h +++ b/src/core/tsi/alts/crypt/gsec.h @@ -20,6 +20,9 @@ #define GRPC_SRC_CORE_TSI_ALTS_CRYPT_GSEC_H #include +#include +#include +#include #include #include @@ -28,10 +31,6 @@ #include "absl/types/span.h" -#include -#include -#include - namespace grpc_core { // Provides accessors to all information representing a gsec key. Owns all the diff --git a/src/core/tsi/alts/frame_protector/alts_counter.cc b/src/core/tsi/alts/frame_protector/alts_counter.cc index 5eede6067de..a13887d2a44 100644 --- a/src/core/tsi/alts/frame_protector/alts_counter.cc +++ b/src/core/tsi/alts/frame_protector/alts_counter.cc @@ -18,10 +18,9 @@ #include "src/core/tsi/alts/frame_protector/alts_counter.h" -#include - #include #include +#include static void maybe_copy_error_msg(const char* src, char** dst) { if (dst != nullptr && src != nullptr) { diff --git a/src/core/tsi/alts/frame_protector/alts_counter.h b/src/core/tsi/alts/frame_protector/alts_counter.h index 9ebc0892f73..246d1586653 100644 --- a/src/core/tsi/alts/frame_protector/alts_counter.h +++ b/src/core/tsi/alts/frame_protector/alts_counter.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_COUNTER_H #define GRPC_SRC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_COUNTER_H -#include -#include - #include #include +#include +#include // Main struct for a crypter counter managed within seal/unseal operations. typedef struct alts_counter { diff --git a/src/core/tsi/alts/frame_protector/alts_crypter.cc b/src/core/tsi/alts/frame_protector/alts_crypter.cc index 4938127df89..df767fb8a20 100644 --- a/src/core/tsi/alts/frame_protector/alts_crypter.cc +++ b/src/core/tsi/alts/frame_protector/alts_crypter.cc @@ -18,10 +18,9 @@ #include "src/core/tsi/alts/frame_protector/alts_crypter.h" -#include - #include #include +#include static void maybe_copy_error_msg(const char* src, char** dst) { if (dst != nullptr && src != nullptr) { diff --git a/src/core/tsi/alts/frame_protector/alts_crypter.h b/src/core/tsi/alts/frame_protector/alts_crypter.h index a660b30667c..5964fcbe7d5 100644 --- a/src/core/tsi/alts/frame_protector/alts_crypter.h +++ b/src/core/tsi/alts/frame_protector/alts_crypter.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_CRYPTER_H #define GRPC_SRC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_CRYPTER_H -#include -#include - #include #include +#include +#include #include "src/core/tsi/alts/crypt/gsec.h" diff --git a/src/core/tsi/alts/frame_protector/alts_frame_protector.cc b/src/core/tsi/alts/frame_protector/alts_frame_protector.cc index b8593f225e2..534e8555465 100644 --- a/src/core/tsi/alts/frame_protector/alts_frame_protector.cc +++ b/src/core/tsi/alts/frame_protector/alts_frame_protector.cc @@ -18,6 +18,8 @@ #include "src/core/tsi/alts/frame_protector/alts_frame_protector.h" +#include +#include #include #include @@ -26,10 +28,6 @@ #include "absl/log/log.h" #include "absl/types/span.h" - -#include -#include - #include "src/core/tsi/alts/crypt/gsec.h" #include "src/core/tsi/alts/frame_protector/alts_crypter.h" #include "src/core/tsi/alts/frame_protector/frame_handler.h" diff --git a/src/core/tsi/alts/frame_protector/alts_frame_protector.h b/src/core/tsi/alts/frame_protector/alts_frame_protector.h index e1f7def8164..9ee925243e7 100644 --- a/src/core/tsi/alts/frame_protector/alts_frame_protector.h +++ b/src/core/tsi/alts/frame_protector/alts_frame_protector.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_FRAME_PROTECTOR_H #define GRPC_SRC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_FRAME_PROTECTOR_H -#include - #include +#include #include "src/core/tsi/transport_security_interface.h" diff --git a/src/core/tsi/alts/frame_protector/frame_handler.cc b/src/core/tsi/alts/frame_protector/frame_handler.cc index a4e86f97998..7fcbcce34bb 100644 --- a/src/core/tsi/alts/frame_protector/frame_handler.cc +++ b/src/core/tsi/alts/frame_protector/frame_handler.cc @@ -18,6 +18,8 @@ #include "src/core/tsi/alts/frame_protector/frame_handler.h" +#include +#include #include #include #include @@ -25,10 +27,6 @@ #include #include "absl/log/log.h" - -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/memory.h" diff --git a/src/core/tsi/alts/frame_protector/frame_handler.h b/src/core/tsi/alts/frame_protector/frame_handler.h index f0a32b4409a..62a9bd042a4 100644 --- a/src/core/tsi/alts/frame_protector/frame_handler.h +++ b/src/core/tsi/alts/frame_protector/frame_handler.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CORE_TSI_ALTS_FRAME_PROTECTOR_FRAME_HANDLER_H #define GRPC_SRC_CORE_TSI_ALTS_FRAME_PROTECTOR_FRAME_HANDLER_H +#include #include #include -#include - const size_t kFrameMessageType = 0x06; const size_t kFrameLengthFieldSize = 4; const size_t kFrameMessageTypeFieldSize = 4; diff --git a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc index f5513e574d4..62cbe099c5a 100644 --- a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +++ b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc @@ -18,17 +18,15 @@ #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h" +#include +#include +#include + #include #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/numbers.h" -#include "upb/mem/arena.hpp" - -#include -#include -#include - #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/channel.h" @@ -38,6 +36,7 @@ #include "src/core/util/crash.h" #include "src/core/util/env.h" #include "src/core/util/sync.h" +#include "upb/mem/arena.hpp" #define TSI_ALTS_INITIAL_BUFFER_SIZE 256 diff --git a/src/core/tsi/alts/handshaker/alts_shared_resource.cc b/src/core/tsi/alts/handshaker/alts_shared_resource.cc index 06d4e5e1936..ec1fe812963 100644 --- a/src/core/tsi/alts/handshaker/alts_shared_resource.cc +++ b/src/core/tsi/alts/handshaker/alts_shared_resource.cc @@ -18,10 +18,9 @@ #include "src/core/tsi/alts/handshaker/alts_shared_resource.h" -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h" #include "src/core/util/crash.h" diff --git a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc index 79b497bda7e..b25e14f1d85 100644 --- a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +++ b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc @@ -18,14 +18,6 @@ #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "upb/mem/arena.hpp" - #include #include #include @@ -33,7 +25,12 @@ #include #include #include +#include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/channel.h" @@ -43,6 +40,7 @@ #include "src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h" #include "src/core/util/memory.h" #include "src/core/util/sync.h" +#include "upb/mem/arena.hpp" // Main struct for ALTS TSI handshaker. struct alts_tsi_handshaker { diff --git a/src/core/tsi/alts/handshaker/alts_tsi_utils.cc b/src/core/tsi/alts/handshaker/alts_tsi_utils.cc index 0c4325844bd..cc8f6dc78bd 100644 --- a/src/core/tsi/alts/handshaker/alts_tsi_utils.cc +++ b/src/core/tsi/alts/handshaker/alts_tsi_utils.cc @@ -18,12 +18,11 @@ #include "src/core/tsi/alts/handshaker/alts_tsi_utils.h" -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/tsi/alts/handshaker/transport_security_common_api.cc b/src/core/tsi/alts/handshaker/transport_security_common_api.cc index 9506eaa3b6a..a7881e0d71f 100644 --- a/src/core/tsi/alts/handshaker/transport_security_common_api.cc +++ b/src/core/tsi/alts/handshaker/transport_security_common_api.cc @@ -18,11 +18,11 @@ #include "src/core/tsi/alts/handshaker/transport_security_common_api.h" +#include + #include "absl/log/log.h" #include "upb/mem/arena.hpp" -#include - bool grpc_gcp_rpc_protocol_versions_set_max( grpc_gcp_rpc_protocol_versions* versions, uint32_t max_major, uint32_t max_minor) { diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc index 89c5dcfaa6f..5bde0334f50 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc @@ -18,14 +18,12 @@ #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h" +#include +#include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h" diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h index eb61d2ff2e3..8bf3a661467 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_TSI_ALTS_ZERO_COPY_FRAME_PROTECTOR_ALTS_GRPC_INTEGRITY_ONLY_RECORD_PROTOCOL_H #define GRPC_SRC_CORE_TSI_ALTS_ZERO_COPY_FRAME_PROTECTOR_ALTS_GRPC_INTEGRITY_ONLY_RECORD_PROTOCOL_H -#include - #include +#include #include "src/core/tsi/alts/crypt/gsec.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h" diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc index 2a568cd446e..cc10ddb8eb4 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc @@ -18,11 +18,10 @@ #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h" -#include "absl/log/log.h" - #include #include +#include "absl/log/log.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h" diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h index c4dd9ab152a..0e32bf42570 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_TSI_ALTS_ZERO_COPY_FRAME_PROTECTOR_ALTS_GRPC_PRIVACY_INTEGRITY_RECORD_PROTOCOL_H #define GRPC_SRC_CORE_TSI_ALTS_ZERO_COPY_FRAME_PROTECTOR_ALTS_GRPC_PRIVACY_INTEGRITY_RECORD_PROTOCOL_H -#include - #include +#include #include "src/core/tsi/alts/crypt/gsec.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h" diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc index d4e77898e35..76cf72290cc 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc @@ -18,14 +18,12 @@ #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h" +#include +#include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/crash.h" diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc index 908ed2934fd..68db992e0bf 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc @@ -18,11 +18,10 @@ #include "src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h" -#include -#include - #include #include +#include +#include #include "src/core/tsi/alts/frame_protector/alts_counter.h" #include "src/core/util/crash.h" diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h b/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h index e29ab55b502..858d19f3b88 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_TSI_ALTS_ZERO_COPY_FRAME_PROTECTOR_ALTS_IOVEC_RECORD_PROTOCOL_H #define GRPC_SRC_CORE_TSI_ALTS_ZERO_COPY_FRAME_PROTECTOR_ALTS_IOVEC_RECORD_PROTOCOL_H -#include - #include +#include #include "src/core/tsi/alts/crypt/gsec.h" diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc index fce90b47f48..cbf009e99ab 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc @@ -18,6 +18,8 @@ #include "src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h" +#include +#include #include #include @@ -25,10 +27,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/tsi/alts/crypt/gsec.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h" diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h b/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h index 42c3dee0d35..d5dbd8c4891 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_TSI_ALTS_ZERO_COPY_FRAME_PROTECTOR_ALTS_ZERO_COPY_GRPC_PROTECTOR_H #define GRPC_SRC_CORE_TSI_ALTS_ZERO_COPY_FRAME_PROTECTOR_ALTS_ZERO_COPY_GRPC_PROTECTOR_H -#include - #include +#include #include "src/core/tsi/alts/crypt/gsec.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/src/core/tsi/fake_transport_security.cc b/src/core/tsi/fake_transport_security.cc index e01dce2c687..98c073779b0 100644 --- a/src/core/tsi/fake_transport_security.cc +++ b/src/core/tsi/fake_transport_security.cc @@ -18,15 +18,13 @@ #include "src/core/tsi/fake_transport_security.h" +#include +#include #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/transport_security_grpc.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/src/core/tsi/local_transport_security.cc b/src/core/tsi/local_transport_security.cc index bb25a25db41..ced2ef2baa1 100644 --- a/src/core/tsi/local_transport_security.cc +++ b/src/core/tsi/local_transport_security.cc @@ -18,16 +18,14 @@ #include "src/core/tsi/local_transport_security.h" +#include +#include +#include #include #include #include #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/tsi/transport_security_grpc.h" #include "src/core/util/crash.h" diff --git a/src/core/tsi/ssl/key_logging/ssl_key_logging.cc b/src/core/tsi/ssl/key_logging/ssl_key_logging.cc index 510a55bfc27..b0f961a41c8 100644 --- a/src/core/tsi/ssl/key_logging/ssl_key_logging.cc +++ b/src/core/tsi/ssl/key_logging/ssl_key_logging.cc @@ -14,13 +14,12 @@ #include "src/core/tsi/ssl/key_logging/ssl_key_logging.h" +#include + #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/crash.h" diff --git a/src/core/tsi/ssl/key_logging/ssl_key_logging.h b/src/core/tsi/ssl/key_logging/ssl_key_logging.h index c3752c1e7b0..472ddc70a09 100644 --- a/src/core/tsi/ssl/key_logging/ssl_key_logging.h +++ b/src/core/tsi/ssl/key_logging/ssl_key_logging.h @@ -15,18 +15,16 @@ #ifndef GRPC_SRC_CORE_TSI_SSL_KEY_LOGGING_SSL_KEY_LOGGING_H #define GRPC_SRC_CORE_TSI_SSL_KEY_LOGGING_SSL_KEY_LOGGING_H -#include -#include - -#include - -#include "absl/base/thread_annotations.h" - #include #include #include #include +#include + +#include +#include +#include "absl/base/thread_annotations.h" #include "src/core/util/memory.h" #include "src/core/util/ref_counted.h" #include "src/core/util/sync.h" diff --git a/src/core/tsi/ssl/session_cache/ssl_session.h b/src/core/tsi/ssl/session_cache/ssl_session.h index f990f3dfd52..fa57de48983 100644 --- a/src/core/tsi/ssl/session_cache/ssl_session.h +++ b/src/core/tsi/ssl/session_cache/ssl_session.h @@ -19,12 +19,11 @@ #ifndef GRPC_SRC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_H #define GRPC_SRC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_H -#include - -#include - #include #include +#include + +#include #include "src/core/util/ref_counted.h" diff --git a/src/core/tsi/ssl/session_cache/ssl_session_cache.cc b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc index 7c27f36e2ab..6e107c066c5 100644 --- a/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +++ b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc @@ -18,12 +18,11 @@ #include "src/core/tsi/ssl/session_cache/ssl_session_cache.h" -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/ssl/session_cache/ssl_session.h" #include "src/core/util/crash.h" diff --git a/src/core/tsi/ssl/session_cache/ssl_session_cache.h b/src/core/tsi/ssl/session_cache/ssl_session_cache.h index 024262c9c90..b33b53aebf1 100644 --- a/src/core/tsi/ssl/session_cache/ssl_session_cache.h +++ b/src/core/tsi/ssl/session_cache/ssl_session_cache.h @@ -19,14 +19,13 @@ #ifndef GRPC_SRC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_CACHE_H #define GRPC_SRC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_CACHE_H -#include - -#include - #include #include #include #include +#include + +#include #include "src/core/tsi/ssl/session_cache/ssl_session.h" #include "src/core/util/cpp_impl_of.h" diff --git a/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc b/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc index ad78488415b..f44b4cb7335 100644 --- a/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +++ b/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc @@ -15,17 +15,15 @@ // limitations under the License. // // -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "src/core/tsi/ssl/session_cache/ssl_session.h" #include "src/core/util/crash.h" #ifndef OPENSSL_IS_BORINGSSL #include "absl/memory/memory.h" - #include "src/core/lib/slice/slice.h" // OpenSSL invalidates SSL_SESSION on SSL destruction making it pointless diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 47184174351..dbc47f85f72 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -18,13 +18,12 @@ #include "src/core/tsi/ssl_transport_security.h" +#include #include #include #include -#include - #include "src/core/lib/surface/init.h" #include "src/core/tsi/transport_security_interface.h" @@ -38,9 +37,12 @@ #include #endif -#include -#include - +#include +#include +#include +#include +#include +#include #include #include // For OPENSSL_free #include @@ -50,19 +52,14 @@ #include #include +#include +#include + #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h" #include "src/core/tsi/ssl/key_logging/ssl_key_logging.h" #include "src/core/tsi/ssl/session_cache/ssl_session_cache.h" diff --git a/src/core/tsi/ssl_transport_security.h b/src/core/tsi/ssl_transport_security.h index da3b260adbd..39e07011a22 100644 --- a/src/core/tsi/ssl_transport_security.h +++ b/src/core/tsi/ssl_transport_security.h @@ -19,16 +19,14 @@ #ifndef GRPC_SRC_CORE_TSI_SSL_TRANSPORT_SECURITY_H #define GRPC_SRC_CORE_TSI_SSL_TRANSPORT_SECURITY_H -#include - -#include - -#include "absl/strings/string_view.h" - #include #include #include +#include +#include + +#include "absl/strings/string_view.h" #include "src/core/tsi/ssl/key_logging/ssl_key_logging.h" #include "src/core/tsi/ssl_transport_security_utils.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/src/core/tsi/ssl_transport_security_utils.cc b/src/core/tsi/ssl_transport_security_utils.cc index d35baf4e618..5c3b828751e 100644 --- a/src/core/tsi/ssl_transport_security_utils.cc +++ b/src/core/tsi/ssl_transport_security_utils.cc @@ -18,6 +18,7 @@ #include "src/core/tsi/ssl_transport_security_utils.h" +#include #include #include #include @@ -33,9 +34,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include - #include "src/core/tsi/transport_security_interface.h" namespace grpc_core { diff --git a/src/core/tsi/ssl_transport_security_utils.h b/src/core/tsi/ssl_transport_security_utils.h index 5676d8ff3a9..a718627e6a1 100644 --- a/src/core/tsi/ssl_transport_security_utils.h +++ b/src/core/tsi/ssl_transport_security_utils.h @@ -19,16 +19,14 @@ #ifndef GRPC_SRC_CORE_TSI_SSL_TRANSPORT_SECURITY_UTILS_H #define GRPC_SRC_CORE_TSI_SSL_TRANSPORT_SECURITY_UTILS_H +#include +#include #include #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/tsi/ssl/key_logging/ssl_key_logging.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/src/core/tsi/ssl_types.h b/src/core/tsi/ssl_types.h index 221636859d1..9fb89952358 100644 --- a/src/core/tsi/ssl_types.h +++ b/src/core/tsi/ssl_types.h @@ -27,9 +27,8 @@ // function // -#include - #include +#include #ifdef OPENSSL_IS_BORINGSSL #define TSI_INT_AS_SIZE(x) ((size_t)(x)) diff --git a/src/core/tsi/transport_security.cc b/src/core/tsi/transport_security.cc index 72ad63df90e..ccbf3664e93 100644 --- a/src/core/tsi/transport_security.cc +++ b/src/core/tsi/transport_security.cc @@ -18,12 +18,11 @@ #include "src/core/tsi/transport_security.h" -#include -#include - #include #include #include +#include +#include // --- tsi_result common implementation. --- diff --git a/src/core/tsi/transport_security.h b/src/core/tsi/transport_security.h index 5fce3e15768..9f4524af212 100644 --- a/src/core/tsi/transport_security.h +++ b/src/core/tsi/transport_security.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_TSI_TRANSPORT_SECURITY_H #define GRPC_SRC_CORE_TSI_TRANSPORT_SECURITY_H -#include - #include +#include #include "src/core/lib/debug/trace.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/src/core/tsi/transport_security_interface.h b/src/core/tsi/transport_security_interface.h index d0b2e03386a..a0c0ad7865f 100644 --- a/src/core/tsi/transport_security_interface.h +++ b/src/core/tsi/transport_security_interface.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H #define GRPC_SRC_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H +#include #include #include #include -#include - #include "src/core/lib/debug/trace.h" // --- tsi result --- diff --git a/src/core/util/.clang-format b/src/core/util/.clang-format deleted file mode 100644 index 64387e9e515..00000000000 --- a/src/core/util/.clang-format +++ /dev/null @@ -1,53 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/util/alloc.cc b/src/core/util/alloc.cc index b89d49ff102..2ce94f9db78 100644 --- a/src/core/util/alloc.cc +++ b/src/core/util/alloc.cc @@ -16,15 +16,12 @@ // // +#include #include - #include #include #include "absl/log/check.h" - -#include - #include "src/core/util/crash.h" void* gpr_malloc(size_t size) { diff --git a/src/core/util/atm.cc b/src/core/util/atm.cc index 7e7a6834bb1..536163c110d 100644 --- a/src/core/util/atm.cc +++ b/src/core/util/atm.cc @@ -16,9 +16,8 @@ // // -#include - #include +#include #include "src/core/util/useful.h" diff --git a/src/core/util/avl.h b/src/core/util/avl.h index 23a510e949f..f5bc9b8d888 100644 --- a/src/core/util/avl.h +++ b/src/core/util/avl.h @@ -16,7 +16,6 @@ #define GRPC_SRC_CORE_UTIL_AVL_H #include - #include #include // IWYU pragma: keep diff --git a/src/core/util/backoff.cc b/src/core/util/backoff.cc index edae00cf3c8..4367a47475d 100644 --- a/src/core/util/backoff.cc +++ b/src/core/util/backoff.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/util/backoff.h" +#include + #include namespace grpc_core { diff --git a/src/core/util/backoff.h b/src/core/util/backoff.h index 34860793647..78f0948fe8d 100644 --- a/src/core/util/backoff.h +++ b/src/core/util/backoff.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CORE_UTIL_BACKOFF_H #include "absl/random/random.h" - #include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/util/bitset.h b/src/core/util/bitset.h index eec06814586..91b89d9925e 100644 --- a/src/core/util/bitset.h +++ b/src/core/util/bitset.h @@ -16,7 +16,6 @@ #define GRPC_SRC_CORE_UTIL_BITSET_H #include - #include #include diff --git a/src/core/util/chunked_vector.h b/src/core/util/chunked_vector.h index b85c7e2e7ae..d3a1d6ba930 100644 --- a/src/core/util/chunked_vector.h +++ b/src/core/util/chunked_vector.h @@ -22,7 +22,6 @@ #include #include "absl/log/check.h" - #include "src/core/lib/resource_quota/arena.h" #include "src/core/util/manual_constructor.h" diff --git a/src/core/util/crash.cc b/src/core/util/crash.cc index 9ab5a9852ba..c77412e2b96 100644 --- a/src/core/util/crash.cc +++ b/src/core/util/crash.cc @@ -12,10 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/crash.h" +#include #include #include diff --git a/src/core/util/crash.h b/src/core/util/crash.h index 9d0b19a5d0a..ece32088903 100644 --- a/src/core/util/crash.h +++ b/src/core/util/crash.h @@ -18,7 +18,6 @@ #include #include "absl/strings/string_view.h" - #include "src/core/util/debug_location.h" namespace grpc_core { diff --git a/src/core/util/dual_ref_counted.h b/src/core/util/dual_ref_counted.h index 6f3e3c43af6..4742c62bc2c 100644 --- a/src/core/util/dual_ref_counted.h +++ b/src/core/util/dual_ref_counted.h @@ -24,7 +24,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/core/util/debug_location.h" #include "src/core/util/down_cast.h" #include "src/core/util/orphanable.h" diff --git a/src/core/util/event_log.cc b/src/core/util/event_log.cc index 6bb1427f89e..66611150e6f 100644 --- a/src/core/util/event_log.cc +++ b/src/core/util/event_log.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/event_log.h" +#include + #include #include diff --git a/src/core/util/event_log.h b/src/core/util/event_log.h index f77967d57f2..47254348db5 100644 --- a/src/core/util/event_log.h +++ b/src/core/util/event_log.h @@ -16,7 +16,6 @@ #define GRPC_SRC_CORE_UTIL_EVENT_LOG_H #include - #include #include @@ -26,7 +25,6 @@ #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" #include "absl/types/span.h" - #include "src/core/util/per_cpu.h" #include "src/core/util/sync.h" #include "src/core/util/time_precise.h" diff --git a/src/core/util/examine_stack.cc b/src/core/util/examine_stack.cc index 96799b2a30c..a47f12472ca 100644 --- a/src/core/util/examine_stack.cc +++ b/src/core/util/examine_stack.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/util/examine_stack.h" +#include + namespace grpc_core { gpr_current_stack_trace_func g_current_stack_trace_provider = nullptr; diff --git a/src/core/util/fork.cc b/src/core/util/fork.cc index 35b211b42ff..27415423f1b 100644 --- a/src/core/util/fork.cc +++ b/src/core/util/fork.cc @@ -16,16 +16,15 @@ // // -#include - #include "src/core/util/fork.h" -#include - #include +#include #include #include +#include + #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/thread_local.h" #include "src/core/util/no_destruct.h" diff --git a/src/core/util/gcp_metadata_query.cc b/src/core/util/gcp_metadata_query.cc index 3543e46fa0e..cc9fd80cd1b 100644 --- a/src/core/util/gcp_metadata_query.cc +++ b/src/core/util/gcp_metadata_query.cc @@ -16,10 +16,12 @@ // // -#include - #include "src/core/util/gcp_metadata_query.h" +#include +#include +#include +#include #include #include @@ -31,11 +33,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/util/gcp_metadata_query.h b/src/core/util/gcp_metadata_query.h index b2abde5cd4a..a72ff5ae4d0 100644 --- a/src/core/util/gcp_metadata_query.h +++ b/src/core/util/gcp_metadata_query.h @@ -23,7 +23,6 @@ #include "absl/functional/any_invocable.h" #include "absl/status/statusor.h" - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" diff --git a/src/core/util/gethostname_host_name_max.cc b/src/core/util/gethostname_host_name_max.cc index def6984395d..d446d67c35c 100644 --- a/src/core/util/gethostname_host_name_max.cc +++ b/src/core/util/gethostname_host_name_max.cc @@ -23,11 +23,10 @@ #ifdef GRPC_POSIX_HOST_NAME_MAX +#include #include #include -#include - char* grpc_gethostname() { char* hostname = static_cast(gpr_malloc(HOST_NAME_MAX)); if (gethostname(hostname, HOST_NAME_MAX) != 0) { diff --git a/src/core/util/gethostname_sysconf.cc b/src/core/util/gethostname_sysconf.cc index 414a02118a0..78d38cc869b 100644 --- a/src/core/util/gethostname_sysconf.cc +++ b/src/core/util/gethostname_sysconf.cc @@ -23,9 +23,8 @@ #ifdef GRPC_POSIX_SYSCONF -#include - #include +#include char* grpc_gethostname() { size_t host_name_max = (size_t)sysconf(_SC_HOST_NAME_MAX); diff --git a/src/core/util/gpr_time.cc b/src/core/util/gpr_time.cc index ae2bd82f5bc..9368e51416b 100644 --- a/src/core/util/gpr_time.cc +++ b/src/core/util/gpr_time.cc @@ -18,17 +18,14 @@ // Generic implementation of time calls. +#include #include - +#include #include #include #include #include "absl/log/check.h" - -#include -#include - #include "src/core/util/crash.h" int gpr_time_cmp(gpr_timespec a, gpr_timespec b) { diff --git a/src/core/util/grpc_if_nametoindex.h b/src/core/util/grpc_if_nametoindex.h index ad1f3fcc224..237cd034da8 100644 --- a/src/core/util/grpc_if_nametoindex.h +++ b/src/core/util/grpc_if_nametoindex.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CORE_UTIL_GRPC_IF_NAMETOINDEX_H #include - #include // Returns the interface index corresponding to the interface "name" provided. diff --git a/src/core/util/grpc_if_nametoindex_posix.cc b/src/core/util/grpc_if_nametoindex_posix.cc index 1ec5f15cc99..1d5b866e5e0 100644 --- a/src/core/util/grpc_if_nametoindex_posix.cc +++ b/src/core/util/grpc_if_nametoindex_posix.cc @@ -26,7 +26,6 @@ #include #include "absl/log/log.h" - #include "src/core/util/crash.h" #include "src/core/util/grpc_if_nametoindex.h" diff --git a/src/core/util/grpc_if_nametoindex_unsupported.cc b/src/core/util/grpc_if_nametoindex_unsupported.cc index 767f41b67f6..cabca947c60 100644 --- a/src/core/util/grpc_if_nametoindex_unsupported.cc +++ b/src/core/util/grpc_if_nametoindex_unsupported.cc @@ -23,7 +23,6 @@ #if GRPC_IF_NAMETOINDEX == 0 || !defined(GRPC_POSIX_SOCKET_IF_NAMETOINDEX) #include "absl/log/log.h" - #include "src/core/util/crash.h" #include "src/core/util/grpc_if_nametoindex.h" diff --git a/src/core/util/host_port.cc b/src/core/util/host_port.cc index dad028d0b4a..3f2608951e3 100644 --- a/src/core/util/host_port.cc +++ b/src/core/util/host_port.cc @@ -16,10 +16,9 @@ // // -#include - #include "src/core/util/host_port.h" +#include #include #include "absl/log/check.h" diff --git a/src/core/util/http_client/format_request.cc b/src/core/util/http_client/format_request.cc index 1d785835e2b..8c56935dad0 100644 --- a/src/core/util/http_client/format_request.cc +++ b/src/core/util/http_client/format_request.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/util/http_client/format_request.h" +#include +#include #include #include @@ -31,9 +31,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/util/http_client/httpcli.h" static void fill_common_header(const grpc_http_request* request, diff --git a/src/core/util/http_client/format_request.h b/src/core/util/http_client/format_request.h index ab9d6a9d7d5..e123234ce5c 100644 --- a/src/core/util/http_client/format_request.h +++ b/src/core/util/http_client/format_request.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H #define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H -#include - #include +#include #include "src/core/util/http_client/parser.h" diff --git a/src/core/util/http_client/httpcli.cc b/src/core/util/http_client/httpcli.cc index c7b52e2de54..0eb2292d9b1 100644 --- a/src/core/util/http_client/httpcli.cc +++ b/src/core/util/http_client/httpcli.cc @@ -16,10 +16,12 @@ // // -#include - #include "src/core/util/http_client/httpcli.h" +#include +#include +#include +#include #include #include @@ -29,11 +31,6 @@ #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/strings/str_format.h" - -#include -#include -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/handshaker_registry.h" #include "src/core/handshaker/tcp_connect/tcp_connect_handshaker.h" diff --git a/src/core/util/http_client/httpcli.h b/src/core/util/http_client/httpcli.h index b041d190e07..8857d0df014 100644 --- a/src/core/util/http_client/httpcli.h +++ b/src/core/util/http_client/httpcli.h @@ -19,8 +19,9 @@ #ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H #define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H +#include +#include #include - #include #include @@ -32,10 +33,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" diff --git a/src/core/util/http_client/httpcli_security_connector.cc b/src/core/util/http_client/httpcli_security_connector.cc index 45156af53d1..ac1e522bb99 100644 --- a/src/core/util/http_client/httpcli_security_connector.cc +++ b/src/core/util/http_client/httpcli_security_connector.cc @@ -16,8 +16,13 @@ // // +#include +#include +#include +#include +#include #include - +#include #include #include @@ -27,14 +32,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/util/http_client/httpcli_ssl_credentials.h b/src/core/util/http_client/httpcli_ssl_credentials.h index e06668f65b5..6593d66a3d6 100644 --- a/src/core/util/http_client/httpcli_ssl_credentials.h +++ b/src/core/util/http_client/httpcli_ssl_credentials.h @@ -17,9 +17,8 @@ #ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H #define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H -#include - #include +#include #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/util/http_client/parser.cc b/src/core/util/http_client/parser.cc index b0c7416c6c9..a490f212ee9 100644 --- a/src/core/util/http_client/parser.cc +++ b/src/core/util/http_client/parser.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/util/http_client/parser.h" +#include +#include #include #include @@ -28,8 +28,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" -#include - static char* buf2str(void* buffer, size_t length) { char* out = static_cast(gpr_malloc(length + 1)); memcpy(out, buffer, length); diff --git a/src/core/util/http_client/parser.h b/src/core/util/http_client/parser.h index 01727e0e4df..d1bdf767a89 100644 --- a/src/core/util/http_client/parser.h +++ b/src/core/util/http_client/parser.h @@ -19,13 +19,11 @@ #ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H #define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H +#include #include - #include #include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/util/iphone/cpu.cc b/src/core/util/iphone/cpu.cc index 26c3726fc13..820246594c7 100644 --- a/src/core/util/iphone/cpu.cc +++ b/src/core/util/iphone/cpu.cc @@ -16,9 +16,8 @@ // // -#include - #include +#include #ifdef GPR_CPU_IPHONE diff --git a/src/core/util/json/json.h b/src/core/util/json/json.h index 9dbc95e3b94..a160fd3237f 100644 --- a/src/core/util/json/json.h +++ b/src/core/util/json/json.h @@ -17,9 +17,8 @@ #ifndef GRPC_SRC_CORE_UTIL_JSON_JSON_H #define GRPC_SRC_CORE_UTIL_JSON_JSON_H -#include - #include +#include namespace grpc_core { diff --git a/src/core/util/json/json_channel_args.h b/src/core/util/json/json_channel_args.h index fe64a377faa..ad5b1c1f897 100644 --- a/src/core/util/json/json_channel_args.h +++ b/src/core/util/json/json_channel_args.h @@ -19,7 +19,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/json/json_args.h" diff --git a/src/core/util/json/json_object_loader.cc b/src/core/util/json/json_object_loader.cc index 0d6dd4588a5..0eb496f5a87 100644 --- a/src/core/util/json/json_object_loader.cc +++ b/src/core/util/json/json_object_loader.cc @@ -12,18 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/json/json_object_loader.h" +#include +#include + #include #include "absl/strings/ascii.h" #include "absl/strings/str_cat.h" #include "absl/strings/strip.h" -#include - namespace grpc_core { namespace json_detail { diff --git a/src/core/util/json/json_object_loader.h b/src/core/util/json/json_object_loader.h index 1c1e8c565e1..96bd8655b91 100644 --- a/src/core/util/json/json_object_loader.h +++ b/src/core/util/json/json_object_loader.h @@ -31,7 +31,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/no_destruct.h" diff --git a/src/core/util/json/json_reader.cc b/src/core/util/json/json_reader.cc index bda35becad4..a93bb15a97e 100644 --- a/src/core/util/json/json_reader.cc +++ b/src/core/util/json/json_reader.cc @@ -14,8 +14,8 @@ // limitations under the License. // +#include #include - #include #include @@ -34,9 +34,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/variant.h" - -#include - #include "src/core/util/json/json.h" #include "src/core/util/match.h" diff --git a/src/core/util/json/json_reader.h b/src/core/util/json/json_reader.h index 2b16d911981..127b3808807 100644 --- a/src/core/util/json/json_reader.h +++ b/src/core/util/json/json_reader.h @@ -21,7 +21,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - #include "src/core/util/json/json.h" namespace grpc_core { diff --git a/src/core/util/json/json_util.cc b/src/core/util/json/json_util.cc index 88fdbb6755c..181882d7316 100644 --- a/src/core/util/json/json_util.cc +++ b/src/core/util/json/json_util.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/util/json/json_util.h" +#include + #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/no_destruct.h" diff --git a/src/core/util/json/json_util.h b/src/core/util/json/json_util.h index a8abf9efb88..7cb5b8b1103 100644 --- a/src/core/util/json/json_util.h +++ b/src/core/util/json/json_util.h @@ -31,7 +31,6 @@ #include "absl/strings/numbers.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - #include "src/core/lib/iomgr/error.h" #include "src/core/util/json/json.h" #include "src/core/util/time.h" diff --git a/src/core/util/json/json_writer.cc b/src/core/util/json/json_writer.cc index 009b31a4afc..37721f95228 100644 --- a/src/core/util/json/json_writer.cc +++ b/src/core/util/json/json_writer.cc @@ -17,7 +17,6 @@ // #include - #include #include @@ -27,7 +26,6 @@ #include #include "absl/strings/string_view.h" - #include "src/core/util/json/json.h" namespace grpc_core { diff --git a/src/core/util/latent_see.cc b/src/core/util/latent_see.cc index c8331144407..277ed57b3c5 100644 --- a/src/core/util/latent_see.cc +++ b/src/core/util/latent_see.cc @@ -24,7 +24,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - #include "src/core/util/ring_buffer.h" #include "src/core/util/sync.h" diff --git a/src/core/util/latent_see.h b/src/core/util/latent_see.h index 1ace01110a6..f801c3c8685 100644 --- a/src/core/util/latent_see.h +++ b/src/core/util/latent_see.h @@ -34,7 +34,6 @@ #include "absl/functional/any_invocable.h" #include "absl/log/log.h" #include "absl/strings/string_view.h" - #include "src/core/util/per_cpu.h" #include "src/core/util/ring_buffer.h" #include "src/core/util/sync.h" diff --git a/src/core/util/linux/cpu.cc b/src/core/util/linux/cpu.cc index 61f1d5d58ff..41730292e89 100644 --- a/src/core/util/linux/cpu.cc +++ b/src/core/util/linux/cpu.cc @@ -25,15 +25,13 @@ #ifdef GPR_CPU_LINUX #include +#include +#include #include #include #include #include "absl/log/log.h" - -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/strerror.h" diff --git a/src/core/util/load_file.cc b/src/core/util/load_file.cc index 91ec375ba65..2fda3c55e62 100644 --- a/src/core/util/load_file.cc +++ b/src/core/util/load_file.cc @@ -12,11 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/load_file.h" #include +#include +#include +#include #include #include @@ -24,9 +25,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" -#include -#include - namespace grpc_core { // Loads the content of a file into a slice. add_null_terminator will add a NULL diff --git a/src/core/util/load_file.h b/src/core/util/load_file.h index 5d3f7aa784f..980e0c11af6 100644 --- a/src/core/util/load_file.h +++ b/src/core/util/load_file.h @@ -20,7 +20,6 @@ #include #include "absl/status/statusor.h" - #include "src/core/lib/slice/slice.h" namespace grpc_core { diff --git a/src/core/util/log.cc b/src/core/util/log.cc index cc353fcbd64..fb0119947c3 100644 --- a/src/core/util/log.cc +++ b/src/core/util/log.cc @@ -16,10 +16,12 @@ // // -#include - #include "absl/log/log.h" +#include +#include +#include +#include #include #include @@ -27,11 +29,6 @@ #include "absl/log/globals.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" - -#include -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/util/crash.h" #include "src/core/util/string.h" diff --git a/src/core/util/manual_constructor.h b/src/core/util/manual_constructor.h index 38d4695753f..10bf8155827 100644 --- a/src/core/util/manual_constructor.h +++ b/src/core/util/manual_constructor.h @@ -22,7 +22,6 @@ // manually construct a region of memory with some type #include - #include #include diff --git a/src/core/util/match.h b/src/core/util/match.h index 69b91f2fc9b..32d1445f9b3 100644 --- a/src/core/util/match.h +++ b/src/core/util/match.h @@ -20,7 +20,6 @@ #include #include "absl/types/variant.h" - #include "src/core/util/overload.h" namespace grpc_core { diff --git a/src/core/util/matchers.cc b/src/core/util/matchers.cc index a0a8b786bec..d4f6c3bd7e1 100644 --- a/src/core/util/matchers.cc +++ b/src/core/util/matchers.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/matchers.h" +#include + #include #include "absl/status/status.h" diff --git a/src/core/util/matchers.h b/src/core/util/matchers.h index 69992106b45..922e0632bc7 100644 --- a/src/core/util/matchers.h +++ b/src/core/util/matchers.h @@ -16,7 +16,6 @@ #define GRPC_SRC_CORE_UTIL_MATCHERS_H #include - #include #include diff --git a/src/core/util/memory.h b/src/core/util/memory.h index eae0aaa4b83..9ced5cf2f64 100644 --- a/src/core/util/memory.h +++ b/src/core/util/memory.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_UTIL_MEMORY_H #define GRPC_SRC_CORE_UTIL_MEMORY_H +#include #include #include #include -#include - namespace grpc_core { class DefaultDeleteChar { diff --git a/src/core/util/mpscq.cc b/src/core/util/mpscq.cc index 45258346443..fd998e8c905 100644 --- a/src/core/util/mpscq.cc +++ b/src/core/util/mpscq.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/util/mpscq.h" +#include + namespace grpc_core { // diff --git a/src/core/util/mpscq.h b/src/core/util/mpscq.h index b4d48f78c3d..44502a0b352 100644 --- a/src/core/util/mpscq.h +++ b/src/core/util/mpscq.h @@ -24,7 +24,6 @@ #include #include "absl/log/check.h" - #include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/util/msys/tmpfile.cc b/src/core/util/msys/tmpfile.cc index 69eb209b149..5d7cf6484c6 100644 --- a/src/core/util/msys/tmpfile.cc +++ b/src/core/util/msys/tmpfile.cc @@ -20,14 +20,13 @@ #ifdef GPR_MSYS_TMPFILE +#include +#include #include #include #include #include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/string_windows.h" #include "src/core/util/tmpfile.h" diff --git a/src/core/util/notification.h b/src/core/util/notification.h index 45acff0fda7..4fca3d26cb5 100644 --- a/src/core/util/notification.h +++ b/src/core/util/notification.h @@ -19,7 +19,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" - #include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/util/per_cpu.cc b/src/core/util/per_cpu.cc index 8412f399173..13098726bc7 100644 --- a/src/core/util/per_cpu.cc +++ b/src/core/util/per_cpu.cc @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/per_cpu.h" #include +#include #include "src/core/util/useful.h" diff --git a/src/core/util/per_cpu.h b/src/core/util/per_cpu.h index 492ea2832b4..69648aa57fe 100644 --- a/src/core/util/per_cpu.h +++ b/src/core/util/per_cpu.h @@ -15,8 +15,8 @@ #ifndef GRPC_SRC_CORE_UTIL_PER_CPU_H #define GRPC_SRC_CORE_UTIL_PER_CPU_H +#include #include - #include #include @@ -24,8 +24,6 @@ #include #include -#include - // Sharded collections of objects // This used to be per-cpu, now it's much less so - but still a way to limit // contention. diff --git a/src/core/util/posix/cpu.cc b/src/core/util/posix/cpu.cc index 93e6cce0614..92a9e45635e 100644 --- a/src/core/util/posix/cpu.cc +++ b/src/core/util/posix/cpu.cc @@ -21,15 +21,13 @@ #if defined(GPR_CPU_POSIX) #include +#include +#include #include #include #include #include "absl/log/log.h" - -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/useful.h" diff --git a/src/core/util/posix/stat.cc b/src/core/util/posix/stat.cc index e4c870f8dbd..5de6f456321 100644 --- a/src/core/util/posix/stat.cc +++ b/src/core/util/posix/stat.cc @@ -29,7 +29,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/core/util/stat.h" #include "src/core/util/strerror.h" diff --git a/src/core/util/posix/string.cc b/src/core/util/posix/string.cc index 51a16d33cba..f7fad2b9f93 100644 --- a/src/core/util/posix/string.cc +++ b/src/core/util/posix/string.cc @@ -20,13 +20,12 @@ #ifdef GPR_POSIX_STRING +#include +#include #include #include #include -#include -#include - int gpr_asprintf(char** strp, const char* format, ...) { va_list args; int ret; diff --git a/src/core/util/posix/sync.cc b/src/core/util/posix/sync.cc index 255eec517a3..5529ee05c23 100644 --- a/src/core/util/posix/sync.cc +++ b/src/core/util/posix/sync.cc @@ -22,14 +22,12 @@ !defined(GPR_CUSTOM_SYNC) #include -#include - -#include "absl/log/check.h" - #include #include #include +#include +#include "absl/log/check.h" #include "src/core/util/crash.h" void gpr_mu_init(gpr_mu* mu) { diff --git a/src/core/util/posix/thd.cc b/src/core/util/posix/thd.cc index 6987e3ff2cd..764882dd676 100644 --- a/src/core/util/posix/thd.cc +++ b/src/core/util/posix/thd.cc @@ -19,7 +19,6 @@ // Posix implementation for gpr threads. #include - #include #include @@ -27,6 +26,9 @@ #ifdef GPR_POSIX_SYNC +#include +#include +#include #include #include #include @@ -34,11 +36,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/fork.h" #include "src/core/util/strerror.h" diff --git a/src/core/util/posix/time.cc b/src/core/util/posix/time.cc index a425a4721c6..ff444682101 100644 --- a/src/core/util/posix/time.cc +++ b/src/core/util/posix/time.cc @@ -28,11 +28,10 @@ #ifdef __linux__ #include #endif -#include "absl/log/check.h" - #include #include +#include "absl/log/check.h" #include "src/core/util/crash.h" static struct timespec timespec_from_gpr(gpr_timespec gts) { diff --git a/src/core/util/posix/tmpfile.cc b/src/core/util/posix/tmpfile.cc index 51b900a3527..832391f1599 100644 --- a/src/core/util/posix/tmpfile.cc +++ b/src/core/util/posix/tmpfile.cc @@ -21,16 +21,14 @@ #ifdef GPR_POSIX_TMPFILE #include +#include +#include #include #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/strerror.h" #include "src/core/util/string.h" diff --git a/src/core/util/random_early_detection.cc b/src/core/util/random_early_detection.cc index 882a7d530e9..d011ca25dc8 100644 --- a/src/core/util/random_early_detection.cc +++ b/src/core/util/random_early_detection.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/random_early_detection.h" +#include + #include "absl/random/distributions.h" namespace grpc_core { diff --git a/src/core/util/random_early_detection.h b/src/core/util/random_early_detection.h index fb2ea8f51a4..6ff1c67fd12 100644 --- a/src/core/util/random_early_detection.h +++ b/src/core/util/random_early_detection.h @@ -16,7 +16,6 @@ #define GRPC_SRC_CORE_UTIL_RANDOM_EARLY_DETECTION_H #include - #include #include diff --git a/src/core/util/ref_counted.h b/src/core/util/ref_counted.h index e32472d1c80..413e5d4f42a 100644 --- a/src/core/util/ref_counted.h +++ b/src/core/util/ref_counted.h @@ -27,7 +27,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/core/util/atomic_utils.h" #include "src/core/util/debug_location.h" #include "src/core/util/down_cast.h" diff --git a/src/core/util/ref_counted_ptr.h b/src/core/util/ref_counted_ptr.h index 28829bc0d20..601cc45e2dc 100644 --- a/src/core/util/ref_counted_ptr.h +++ b/src/core/util/ref_counted_ptr.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CORE_UTIL_REF_COUNTED_PTR_H #include - #include #include @@ -28,7 +27,6 @@ #include #include "absl/hash/hash.h" - #include "src/core/util/debug_location.h" #include "src/core/util/down_cast.h" diff --git a/src/core/util/ref_counted_string.cc b/src/core/util/ref_counted_string.cc index 2b3f6f66b36..6c2945adb9c 100644 --- a/src/core/util/ref_counted_string.cc +++ b/src/core/util/ref_counted_string.cc @@ -14,16 +14,14 @@ // limitations under the License. // -#include - #include "src/core/util/ref_counted_string.h" +#include +#include #include #include -#include - namespace grpc_core { RefCountedPtr RefCountedString::Make(absl::string_view src) { diff --git a/src/core/util/ref_counted_string.h b/src/core/util/ref_counted_string.h index ed3e93089ae..936d9c5742f 100644 --- a/src/core/util/ref_counted_string.h +++ b/src/core/util/ref_counted_string.h @@ -18,13 +18,11 @@ #define GRPC_SRC_CORE_UTIL_REF_COUNTED_STRING_H #include - #include #include #include "absl/strings/string_view.h" - #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/util/spinlock.h b/src/core/util/spinlock.h index b95d324e988..fdbce0cad6d 100644 --- a/src/core/util/spinlock.h +++ b/src/core/util/spinlock.h @@ -19,9 +19,8 @@ #ifndef GRPC_SRC_CORE_UTIL_SPINLOCK_H #define GRPC_SRC_CORE_UTIL_SPINLOCK_H -#include - #include +#include // Simple spinlock. No backoff strategy, gpr_spinlock_lock is almost always // a concurrency code smell. Code must _never_ block while holding a spinlock diff --git a/src/core/util/stat.h b/src/core/util/stat.h index e947c0a5de9..d3b5d4a6638 100644 --- a/src/core/util/stat.h +++ b/src/core/util/stat.h @@ -18,7 +18,6 @@ #define GRPC_SRC_CORE_UTIL_STAT_H #include - #include #include "absl/status/status.h" diff --git a/src/core/util/status_helper.cc b/src/core/util/status_helper.cc index 339500e2b0c..3d69b20fde5 100644 --- a/src/core/util/status_helper.cc +++ b/src/core/util/status_helper.cc @@ -16,10 +16,9 @@ // // -#include - #include "src/core/util/status_helper.h" +#include #include #include @@ -34,11 +33,10 @@ #include "absl/time/clock.h" #include "google/protobuf/any.upb.h" #include "google/rpc/status.upb.h" -#include "upb/base/string_view.h" -#include "upb/mem/arena.hpp" - #include "src/core/lib/slice/percent_encoding.h" #include "src/core/lib/slice/slice.h" +#include "upb/base/string_view.h" +#include "upb/mem/arena.hpp" namespace grpc_core { diff --git a/src/core/util/status_helper.h b/src/core/util/status_helper.h index e2e089ce25e..d7fb53da7a5 100644 --- a/src/core/util/status_helper.h +++ b/src/core/util/status_helper.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CORE_UTIL_STATUS_HELPER_H #include - #include #include @@ -30,7 +29,6 @@ #include "absl/strings/string_view.h" #include "absl/time/time.h" #include "absl/types/optional.h" - #include "src/core/util/debug_location.h" extern "C" { diff --git a/src/core/util/strerror.cc b/src/core/util/strerror.cc index 868acee2c06..06ad2ea092a 100644 --- a/src/core/util/strerror.cc +++ b/src/core/util/strerror.cc @@ -12,10 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/strerror.h" +#include #include #include "absl/strings/str_format.h" diff --git a/src/core/util/string.cc b/src/core/util/string.cc index 3048a432a63..036a23afbb2 100644 --- a/src/core/util/string.cc +++ b/src/core/util/string.cc @@ -16,11 +16,12 @@ // // -#include - #include "src/core/util/string.h" #include +#include +#include +#include #include #include #include @@ -30,10 +31,6 @@ #include "absl/strings/str_cat.h" #include "absl/time/time.h" - -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/useful.h" diff --git a/src/core/util/string.h b/src/core/util/string.h index 66f3d0f8344..018980a2a89 100644 --- a/src/core/util/string.h +++ b/src/core/util/string.h @@ -20,14 +20,12 @@ #define GRPC_SRC_CORE_UTIL_STRING_H #include - +#include #include #include #include -#include - // String utility functions // Flags for gpr_dump function. diff --git a/src/core/util/subprocess_posix.cc b/src/core/util/subprocess_posix.cc index b421d50549c..ef4512b3734 100644 --- a/src/core/util/subprocess_posix.cc +++ b/src/core/util/subprocess_posix.cc @@ -21,6 +21,7 @@ #ifdef GPR_POSIX_SUBPROCESS #include +#include #include #include #include @@ -31,9 +32,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/substitute.h" - -#include - #include "src/core/util/memory.h" #include "src/core/util/strerror.h" #include "src/core/util/subprocess.h" diff --git a/src/core/util/subprocess_windows.cc b/src/core/util/subprocess_windows.cc index c8760ec3ee7..71fd6497e78 100644 --- a/src/core/util/subprocess_windows.cc +++ b/src/core/util/subprocess_windows.cc @@ -20,6 +20,7 @@ #ifdef GPR_WINDOWS_SUBPROCESS +#include #include #include #include @@ -27,9 +28,6 @@ #include "absl/log/log.h" #include "absl/strings/str_join.h" #include "absl/types/span.h" - -#include - #include "src/core/util/crash.h" #include "src/core/util/string.h" #include "src/core/util/subprocess.h" diff --git a/src/core/util/sync.cc b/src/core/util/sync.cc index dd3db7e6423..7a5f24409ee 100644 --- a/src/core/util/sync.cc +++ b/src/core/util/sync.cc @@ -18,15 +18,13 @@ // Generic implementation of synchronization primitives. -#include - #include - -#include "absl/log/check.h" - #include +#include #include +#include "absl/log/check.h" + // Number of mutexes to allocate for events, to avoid lock contention. // Should be a prime. enum { event_sync_partitions = 31 }; diff --git a/src/core/util/sync.h b/src/core/util/sync.h index c85d9e2ad77..77d1a54206f 100644 --- a/src/core/util/sync.h +++ b/src/core/util/sync.h @@ -20,13 +20,12 @@ #define GRPC_SRC_CORE_UTIL_SYNC_H #include +#include #include "absl/base/thread_annotations.h" #include "absl/log/check.h" #include "absl/synchronization/mutex.h" -#include - #ifndef GPR_ABSEIL_SYNC #include "src/core/util/time_util.h" #endif diff --git a/src/core/util/sync_abseil.cc b/src/core/util/sync_abseil.cc index 9e837022532..688e4665612 100644 --- a/src/core/util/sync_abseil.cc +++ b/src/core/util/sync_abseil.cc @@ -21,17 +21,15 @@ #if defined(GPR_ABSEIL_SYNC) && !defined(GPR_CUSTOM_SYNC) #include +#include +#include +#include #include #include "absl/base/call_once.h" #include "absl/synchronization/mutex.h" #include "absl/time/clock.h" #include "absl/time/time.h" - -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/time_util.h" diff --git a/src/core/util/table.h b/src/core/util/table.h index bd35c4963a8..d2ea9d42a97 100644 --- a/src/core/util/table.h +++ b/src/core/util/table.h @@ -16,7 +16,6 @@ #define GRPC_SRC_CORE_UTIL_TABLE_H #include - #include #include @@ -26,7 +25,6 @@ #include "absl/meta/type_traits.h" #include "absl/utility/utility.h" - #include "src/core/util/bitset.h" namespace grpc_core { diff --git a/src/core/util/tchar.cc b/src/core/util/tchar.cc index f558b4cbc1d..ee9634be76a 100644 --- a/src/core/util/tchar.cc +++ b/src/core/util/tchar.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/tchar.h" +#include + #ifdef GPR_WINDOWS namespace grpc_core { diff --git a/src/core/util/thd.h b/src/core/util/thd.h index ec0ae599f7f..61f229af97e 100644 --- a/src/core/util/thd.h +++ b/src/core/util/thd.h @@ -22,7 +22,7 @@ /// Internal thread interface. #include - +#include #include #include @@ -31,8 +31,6 @@ #include "absl/functional/any_invocable.h" #include "absl/log/check.h" -#include - namespace grpc_core { namespace internal { diff --git a/src/core/util/time.cc b/src/core/util/time.cc index c5f899bc473..a15242f3b03 100644 --- a/src/core/util/time.cc +++ b/src/core/util/time.cc @@ -12,10 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/time.h" +#include +#include + #include #include #include @@ -25,9 +26,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/util/no_destruct.h" // IWYU pragma: no_include diff --git a/src/core/util/time.h b/src/core/util/time.h index cf242eba1cb..c51b3cf63ed 100644 --- a/src/core/util/time.h +++ b/src/core/util/time.h @@ -15,8 +15,9 @@ #ifndef GRPC_SRC_CORE_UTIL_TIME_H #define GRPC_SRC_CORE_UTIL_TIME_H +#include #include - +#include #include #include @@ -24,10 +25,6 @@ #include #include "absl/types/optional.h" - -#include -#include - #include "src/core/util/time_precise.h" #include "src/core/util/useful.h" diff --git a/src/core/util/time_averaged_stats.cc b/src/core/util/time_averaged_stats.cc index dc6db49a011..caf52f72751 100644 --- a/src/core/util/time_averaged_stats.cc +++ b/src/core/util/time_averaged_stats.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/util/time_averaged_stats.h" +#include + namespace grpc_core { TimeAveragedStats::TimeAveragedStats(double init_avg, double regress_weight, diff --git a/src/core/util/time_precise.cc b/src/core/util/time_precise.cc index 5274789c70e..0fe62929ef2 100644 --- a/src/core/util/time_precise.cc +++ b/src/core/util/time_precise.cc @@ -23,12 +23,11 @@ #include #endif +#include + #include #include "absl/log/log.h" - -#include - #include "src/core/util/crash.h" #include "src/core/util/time_precise.h" diff --git a/src/core/util/time_precise.h b/src/core/util/time_precise.h index 9decb6d4cfd..285b710ab0a 100644 --- a/src/core/util/time_precise.h +++ b/src/core/util/time_precise.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CORE_UTIL_TIME_PRECISE_H #include - #include // Depending on the platform gpr_get_cycle_counter() can have a resolution as diff --git a/src/core/util/time_util.cc b/src/core/util/time_util.cc index 4730e79184a..d20dca30e52 100644 --- a/src/core/util/time_util.cc +++ b/src/core/util/time_util.cc @@ -14,17 +14,15 @@ // limitations under the License. // -#include - #include "src/core/util/time_util.h" +#include +#include #include #include #include "absl/log/check.h" -#include - namespace grpc_core { gpr_timespec ToGprTimeSpec(absl::Duration duration) { diff --git a/src/core/util/time_util.h b/src/core/util/time_util.h index 61ad6d11a5b..29e599e5c96 100644 --- a/src/core/util/time_util.h +++ b/src/core/util/time_util.h @@ -18,11 +18,10 @@ #define GRPC_SRC_CORE_UTIL_TIME_UTIL_H #include +#include #include "absl/time/time.h" -#include - namespace grpc_core { // Converts absl::Duration to gpr_timespec(GPR_TIMESPAN) diff --git a/src/core/util/tmpfile.h b/src/core/util/tmpfile.h index d1ed3d0558c..ecda0c0611a 100644 --- a/src/core/util/tmpfile.h +++ b/src/core/util/tmpfile.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CORE_UTIL_TMPFILE_H #include - #include // Creates a temporary file from a prefix. diff --git a/src/core/util/unique_type_name.h b/src/core/util/unique_type_name.h index 29e63d8404f..fa723dc8d0c 100644 --- a/src/core/util/unique_type_name.h +++ b/src/core/util/unique_type_name.h @@ -22,7 +22,6 @@ #include #include "absl/strings/string_view.h" - #include "src/core/util/useful.h" // Provides a type name that is unique by instance rather than by diff --git a/src/core/util/uri.cc b/src/core/util/uri.cc index 82fb29d46e1..e6a94e57173 100644 --- a/src/core/util/uri.cc +++ b/src/core/util/uri.cc @@ -14,11 +14,10 @@ // limitations under the License. // -#include - #include "src/core/util/uri.h" #include +#include #include #include diff --git a/src/core/util/uuid_v4.cc b/src/core/util/uuid_v4.cc index b0847a8d33e..7cbf7cb7020 100644 --- a/src/core/util/uuid_v4.cc +++ b/src/core/util/uuid_v4.cc @@ -16,10 +16,10 @@ // // -#include - #include "src/core/util/uuid_v4.h" +#include + #include "absl/strings/str_format.h" namespace grpc_core { diff --git a/src/core/util/uuid_v4.h b/src/core/util/uuid_v4.h index e7bf52c6409..84e8e576780 100644 --- a/src/core/util/uuid_v4.h +++ b/src/core/util/uuid_v4.h @@ -20,7 +20,6 @@ #define GRPC_SRC_CORE_UTIL_UUID_V4_H #include - #include #include diff --git a/src/core/util/validation_errors.cc b/src/core/util/validation_errors.cc index 047ea420161..5ab09f6d76d 100644 --- a/src/core/util/validation_errors.cc +++ b/src/core/util/validation_errors.cc @@ -12,10 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/util/validation_errors.h" +#include #include #include diff --git a/src/core/util/validation_errors.h b/src/core/util/validation_errors.h index 5c075c12cce..4038d927c9a 100644 --- a/src/core/util/validation_errors.h +++ b/src/core/util/validation_errors.h @@ -16,7 +16,6 @@ #define GRPC_SRC_CORE_UTIL_VALIDATION_ERRORS_H #include - #include #include diff --git a/src/core/util/windows/directory_reader.cc b/src/core/util/windows/directory_reader.cc index 02c7916798c..9ae07c6357b 100644 --- a/src/core/util/windows/directory_reader.cc +++ b/src/core/util/windows/directory_reader.cc @@ -29,7 +29,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - #include "src/core/util/directory_reader.h" namespace grpc_core { diff --git a/src/core/util/windows/stat.cc b/src/core/util/windows/stat.cc index 8a08d087a5e..5ac15a407cf 100644 --- a/src/core/util/windows/stat.cc +++ b/src/core/util/windows/stat.cc @@ -24,7 +24,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/core/util/crash.h" #include "src/core/util/stat.h" #include "src/core/util/strerror.h" diff --git a/src/core/util/windows/string.cc b/src/core/util/windows/string.cc index c95c4b3fb16..abe4d0a9867 100644 --- a/src/core/util/windows/string.cc +++ b/src/core/util/windows/string.cc @@ -22,13 +22,12 @@ #ifdef GPR_WINDOWS_STRING +#include +#include #include #include #include -#include -#include - #include "src/core/util/string.h" int gpr_asprintf(char** strp, const char* format, ...) { diff --git a/src/core/util/windows/string_util.cc b/src/core/util/windows/string_util.cc index 105ce0636c9..3cc97fbc2c0 100644 --- a/src/core/util/windows/string_util.cc +++ b/src/core/util/windows/string_util.cc @@ -24,17 +24,15 @@ // Some platforms (namely msys) need wchar to be included BEFORE // anything else, especially strsafe.h. -#include - +#include +#include +#include #include #include #include #include #include - -#include -#include -#include +#include #include "src/core/util/string.h" #include "src/core/util/tchar.h" diff --git a/src/core/util/windows/sync.cc b/src/core/util/windows/sync.cc index 84c06503e2f..593037c5019 100644 --- a/src/core/util/windows/sync.cc +++ b/src/core/util/windows/sync.cc @@ -23,11 +23,10 @@ #if defined(GPR_WINDOWS) && !defined(GPR_ABSEIL_SYNC) && \ !defined(GPR_CUSTOM_SYNC) -#include "absl/log/check.h" - #include #include +#include "absl/log/check.h" #include "src/core/util/crash.h" void gpr_mu_init(gpr_mu* mu) { diff --git a/src/core/util/windows/thd.cc b/src/core/util/windows/thd.cc index 0423e21baa2..464d8a6d06c 100644 --- a/src/core/util/windows/thd.cc +++ b/src/core/util/windows/thd.cc @@ -21,16 +21,14 @@ #ifdef GPR_WINDOWS -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include #include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/util/crash.h" #include "src/core/util/memory.h" #include "src/core/util/thd.h" diff --git a/src/core/util/windows/time.cc b/src/core/util/windows/time.cc index 62151a2b6a5..696083856a3 100644 --- a/src/core/util/windows/time.cc +++ b/src/core/util/windows/time.cc @@ -22,14 +22,12 @@ #ifdef GPR_WINDOWS_TIME +#include #include #include #include #include "absl/log/check.h" - -#include - #include "src/core/util/crash.h" #include "src/core/util/time_precise.h" diff --git a/src/core/util/windows/tmpfile.cc b/src/core/util/windows/tmpfile.cc index 44119406582..9acbf77e57c 100644 --- a/src/core/util/windows/tmpfile.cc +++ b/src/core/util/windows/tmpfile.cc @@ -20,14 +20,13 @@ #ifdef GPR_WINDOWS_TMPFILE +#include +#include #include #include #include #include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/tchar.h" #include "src/core/util/tmpfile.h" diff --git a/src/core/util/work_serializer.cc b/src/core/util/work_serializer.cc index 35c509f5828..c9e0b1d9f45 100644 --- a/src/core/util/work_serializer.cc +++ b/src/core/util/work_serializer.cc @@ -14,10 +14,10 @@ // limitations under the License. // -#include - #include "src/core/util/work_serializer.h" +#include +#include #include #include @@ -31,9 +31,6 @@ #include "absl/container/inlined_vector.h" #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/util/work_serializer.h b/src/core/util/work_serializer.h index 780fa4fb05e..d7bc41554d3 100644 --- a/src/core/util/work_serializer.h +++ b/src/core/util/work_serializer.h @@ -17,15 +17,13 @@ #ifndef GRPC_SRC_CORE_UTIL_WORK_SERIALIZER_H #define GRPC_SRC_CORE_UTIL_WORK_SERIALIZER_H +#include #include #include #include #include "absl/base/thread_annotations.h" - -#include - #include "src/core/util/debug_location.h" #include "src/core/util/orphanable.h" diff --git a/src/core/xds/grpc/certificate_provider_store.cc b/src/core/xds/grpc/certificate_provider_store.cc index aef0c6c0783..1e7b9199d61 100644 --- a/src/core/xds/grpc/certificate_provider_store.cc +++ b/src/core/xds/grpc/certificate_provider_store.cc @@ -18,12 +18,11 @@ #include "src/core/xds/grpc/certificate_provider_store.h" -#include "absl/log/log.h" -#include "absl/strings/str_cat.h" - #include #include +#include "absl/log/log.h" +#include "absl/strings/str_cat.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/security/certificate_provider/certificate_provider_registry.h" diff --git a/src/core/xds/grpc/certificate_provider_store.h b/src/core/xds/grpc/certificate_provider_store.h index 239d5ca74af..f5b01ca8a44 100644 --- a/src/core/xds/grpc/certificate_provider_store.h +++ b/src/core/xds/grpc/certificate_provider_store.h @@ -19,16 +19,15 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_CERTIFICATE_PROVIDER_STORE_H #define GRPC_SRC_CORE_XDS_GRPC_CERTIFICATE_PROVIDER_STORE_H +#include +#include + #include #include #include #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/security/certificate_provider/certificate_provider_factory.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" diff --git a/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc b/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc index bbb76cfc22b..dd52e46d8e6 100644 --- a/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +++ b/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc @@ -18,6 +18,9 @@ #include "src/core/xds/grpc/file_watcher_certificate_provider_factory.h" +#include +#include + #include #include #include @@ -26,10 +29,6 @@ #include "absl/log/log.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" diff --git a/src/core/xds/grpc/file_watcher_certificate_provider_factory.h b/src/core/xds/grpc/file_watcher_certificate_provider_factory.h index 493e993648c..ab50c1844f4 100644 --- a/src/core/xds/grpc/file_watcher_certificate_provider_factory.h +++ b/src/core/xds/grpc/file_watcher_certificate_provider_factory.h @@ -19,13 +19,12 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_FILE_WATCHER_CERTIFICATE_PROVIDER_FACTORY_H #define GRPC_SRC_CORE_XDS_GRPC_FILE_WATCHER_CERTIFICATE_PROVIDER_FACTORY_H -#include - -#include "absl/strings/string_view.h" - #include #include +#include + +#include "absl/strings/string_view.h" #include "src/core/lib/security/certificate_provider/certificate_provider_factory.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" diff --git a/src/core/xds/grpc/xds_audit_logger_registry.cc b/src/core/xds/grpc/xds_audit_logger_registry.cc index ef041a4c933..a57e4295d89 100644 --- a/src/core/xds/grpc/xds_audit_logger_registry.cc +++ b/src/core/xds/grpc/xds_audit_logger_registry.cc @@ -16,6 +16,8 @@ #include "src/core/xds/grpc/xds_audit_logger_registry.h" +#include + #include #include @@ -25,9 +27,6 @@ #include "absl/types/optional.h" #include "envoy/config/core/v3/extension.upb.h" #include "envoy/config/rbac/v3/rbac.upb.h" - -#include - #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/util/match.h" #include "src/core/util/validation_errors.h" diff --git a/src/core/xds/grpc/xds_audit_logger_registry.h b/src/core/xds/grpc/xds_audit_logger_registry.h index 92f7aadd302..cb35fd53d86 100644 --- a/src/core/xds/grpc/xds_audit_logger_registry.h +++ b/src/core/xds/grpc/xds_audit_logger_registry.h @@ -17,14 +17,13 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_AUDIT_LOGGER_REGISTRY_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_AUDIT_LOGGER_REGISTRY_H +#include + #include #include #include "absl/strings/string_view.h" #include "envoy/config/rbac/v3/rbac.upb.h" - -#include - #include "src/core/util/json/json.h" #include "src/core/util/validation_errors.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_bootstrap_grpc.cc b/src/core/xds/grpc/xds_bootstrap_grpc.cc index 34fbd8f1331..227aafc77f7 100644 --- a/src/core/xds/grpc/xds_bootstrap_grpc.cc +++ b/src/core/xds/grpc/xds_bootstrap_grpc.cc @@ -16,6 +16,8 @@ #include "src/core/xds/grpc/xds_bootstrap_grpc.h" +#include +#include #include #include @@ -30,10 +32,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/util/json/json.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/xds/grpc/xds_bootstrap_grpc.h b/src/core/xds/grpc/xds_bootstrap_grpc.h index ba13d2bddf3..94a006a17b2 100644 --- a/src/core/xds/grpc/xds_bootstrap_grpc.h +++ b/src/core/xds/grpc/xds_bootstrap_grpc.h @@ -17,6 +17,8 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_BOOTSTRAP_GRPC_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_BOOTSTRAP_GRPC_H +#include + #include #include #include @@ -25,9 +27,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" diff --git a/src/core/xds/grpc/xds_certificate_provider.cc b/src/core/xds/grpc/xds_certificate_provider.cc index fecc658d364..bf73d434ec9 100644 --- a/src/core/xds/grpc/xds_certificate_provider.cc +++ b/src/core/xds/grpc/xds_certificate_provider.cc @@ -18,14 +18,13 @@ #include "src/core/xds/grpc/xds_certificate_provider.h" +#include + #include #include "absl/functional/bind_front.h" #include "absl/log/check.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/security_connector/ssl_utils.h" diff --git a/src/core/xds/grpc/xds_certificate_provider.h b/src/core/xds/grpc/xds_certificate_provider.h index 52b535af2db..1b916a879a4 100644 --- a/src/core/xds/grpc/xds_certificate_provider.h +++ b/src/core/xds/grpc/xds_certificate_provider.h @@ -19,6 +19,10 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_CERTIFICATE_PROVIDER_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_CERTIFICATE_PROVIDER_H +#include +#include +#include + #include #include #include @@ -26,11 +30,6 @@ #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "src/core/util/matchers.h" diff --git a/src/core/xds/grpc/xds_client_grpc.cc b/src/core/xds/grpc/xds_client_grpc.cc index bc47f168b71..db3bcacb5ba 100644 --- a/src/core/xds/grpc/xds_client_grpc.cc +++ b/src/core/xds/grpc/xds_client_grpc.cc @@ -16,6 +16,13 @@ #include "src/core/xds/grpc/xds_client_grpc.h" +#include +#include +#include +#include +#include +#include + #include #include #include @@ -30,15 +37,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "envoy/service/status/v3/csds.upb.h" -#include "upb/base/string_view.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" @@ -64,6 +62,7 @@ #include "src/core/xds/xds_client/xds_channel_args.h" #include "src/core/xds/xds_client/xds_client.h" #include "src/core/xds/xds_client/xds_transport.h" +#include "upb/base/string_view.h" // If gRPC is built with -DGRPC_XDS_USER_AGENT_NAME_SUFFIX="...", that string // will be appended to the user agent name reported to the xDS server. diff --git a/src/core/xds/grpc/xds_client_grpc.h b/src/core/xds/grpc/xds_client_grpc.h index bf6828f20f6..f52fdfc1dba 100644 --- a/src/core/xds/grpc/xds_client_grpc.h +++ b/src/core/xds/grpc/xds_client_grpc.h @@ -17,14 +17,13 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_CLIENT_GRPC_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_CLIENT_GRPC_H +#include +#include + #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/resolver/endpoint_addresses.h" diff --git a/src/core/xds/grpc/xds_cluster.cc b/src/core/xds/grpc/xds_cluster.cc index 09a7454d80f..b7633fa8fc7 100644 --- a/src/core/xds/grpc/xds_cluster.cc +++ b/src/core/xds/grpc/xds_cluster.cc @@ -18,7 +18,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" - #include "src/core/util/json/json_writer.h" #include "src/core/util/match.h" #include "src/core/util/time.h" diff --git a/src/core/xds/grpc/xds_cluster.h b/src/core/xds/grpc/xds_cluster.h index 7eea5d0b0fd..a2c6982acb1 100644 --- a/src/core/xds/grpc/xds_cluster.h +++ b/src/core/xds/grpc/xds_cluster.h @@ -23,7 +23,6 @@ #include "absl/container/flat_hash_map.h" #include "absl/types/optional.h" #include "absl/types/variant.h" - #include "src/core/load_balancing/outlier_detection/outlier_detection.h" #include "src/core/util/json/json.h" #include "src/core/xds/grpc/xds_common_types.h" diff --git a/src/core/xds/grpc/xds_cluster_parser.cc b/src/core/xds/grpc/xds_cluster_parser.cc index 1a6bbc2e2b6..5d1ff0540e6 100644 --- a/src/core/xds/grpc/xds_cluster_parser.cc +++ b/src/core/xds/grpc/xds_cluster_parser.cc @@ -44,9 +44,6 @@ #include "google/protobuf/duration.upb.h" #include "google/protobuf/struct.upb.h" #include "google/protobuf/wrappers.upb.h" -#include "upb/base/string_view.h" -#include "upb/text/encode.h" - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/load_balancing/lb_policy_registry.h" @@ -61,6 +58,8 @@ #include "src/core/xds/grpc/xds_metadata_parser.h" #include "src/core/xds/xds_client/lrs_client.h" #include "src/core/xds/xds_client/xds_backend_metric_propagation.h" +#include "upb/base/string_view.h" +#include "upb/text/encode.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_cluster_parser.h b/src/core/xds/grpc/xds_cluster_parser.h index 109818a079f..59981e8ec2e 100644 --- a/src/core/xds/grpc/xds_cluster_parser.h +++ b/src/core/xds/grpc/xds_cluster_parser.h @@ -22,12 +22,11 @@ #include "envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h" #include "envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h" #include "envoy/extensions/upstreams/http/v3/http_protocol_options.upbdefs.h" -#include "upb/reflection/def.h" - #include "src/core/xds/grpc/xds_cluster.h" #include "src/core/xds/xds_client/xds_client.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_resource_type_impl.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_cluster_specifier_plugin.cc b/src/core/xds/grpc/xds_cluster_specifier_plugin.cc index 8d77160224e..9e30ea84167 100644 --- a/src/core/xds/grpc/xds_cluster_specifier_plugin.cc +++ b/src/core/xds/grpc/xds_cluster_specifier_plugin.cc @@ -16,6 +16,8 @@ #include "src/core/xds/grpc/xds_cluster_specifier_plugin.h" +#include +#include #include #include @@ -25,17 +27,13 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/types/variant.h" -#include "upb/base/status.hpp" -#include "upb/json/encode.h" -#include "upb/mem/arena.hpp" - -#include -#include - #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" #include "src/proto/grpc/lookup/v1/rls_config.upb.h" #include "src/proto/grpc/lookup/v1/rls_config.upbdefs.h" +#include "upb/base/status.hpp" +#include "upb/json/encode.h" +#include "upb/mem/arena.hpp" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_cluster_specifier_plugin.h b/src/core/xds/grpc/xds_cluster_specifier_plugin.h index 4735ab749bc..4ae87310904 100644 --- a/src/core/xds/grpc/xds_cluster_specifier_plugin.h +++ b/src/core/xds/grpc/xds_cluster_specifier_plugin.h @@ -17,19 +17,18 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_CLUSTER_SPECIFIER_PLUGIN_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_CLUSTER_SPECIFIER_PLUGIN_H +#include + #include #include #include #include "absl/strings/string_view.h" -#include "upb/mem/arena.h" -#include "upb/reflection/def.h" - -#include - #include "src/core/util/json/json.h" #include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" +#include "upb/mem/arena.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_common_types.cc b/src/core/xds/grpc/xds_common_types.cc index f1a84590602..0679d184b59 100644 --- a/src/core/xds/grpc/xds_common_types.cc +++ b/src/core/xds/grpc/xds_common_types.cc @@ -19,7 +19,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - #include "src/core/util/match.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_common_types.h b/src/core/xds/grpc/xds_common_types.h index 5bd838f1b77..b8c4ea1378d 100644 --- a/src/core/xds/grpc/xds_common_types.h +++ b/src/core/xds/grpc/xds_common_types.h @@ -22,7 +22,6 @@ #include "absl/strings/string_view.h" #include "absl/types/variant.h" - #include "src/core/util/json/json.h" #include "src/core/util/matchers.h" #include "src/core/util/validation_errors.h" diff --git a/src/core/xds/grpc/xds_common_types_parser.cc b/src/core/xds/grpc/xds_common_types_parser.cc index 8470b87d6b1..164fecc6728 100644 --- a/src/core/xds/grpc/xds_common_types_parser.cc +++ b/src/core/xds/grpc/xds_common_types_parser.cc @@ -16,6 +16,8 @@ #include "src/core/xds/grpc/xds_common_types_parser.h" +#include +#include #include #include @@ -36,19 +38,15 @@ #include "google/protobuf/struct.upb.h" #include "google/protobuf/struct.upbdefs.h" #include "google/protobuf/wrappers.upb.h" -#include "upb/base/status.hpp" -#include "upb/json/encode.h" -#include "upb/mem/arena.h" -#include "xds/type/v3/typed_struct.upb.h" - -#include -#include - #include "src/core/util/env.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/upb_utils.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/xds_client/xds_client.h" +#include "upb/base/status.hpp" +#include "upb/json/encode.h" +#include "upb/mem/arena.h" +#include "xds/type/v3/typed_struct.upb.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_common_types_parser.h b/src/core/xds/grpc/xds_common_types_parser.h index 0db17b5f847..529e7abbd13 100644 --- a/src/core/xds/grpc/xds_common_types_parser.h +++ b/src/core/xds/grpc/xds_common_types_parser.h @@ -23,7 +23,6 @@ #include "google/protobuf/duration.upb.h" #include "google/protobuf/struct.upb.h" #include "google/protobuf/wrappers.upb.h" - #include "src/core/util/time.h" #include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" diff --git a/src/core/xds/grpc/xds_endpoint.h b/src/core/xds/grpc/xds_endpoint.h index 4a07e5871c0..a74541d2543 100644 --- a/src/core/xds/grpc/xds_endpoint.h +++ b/src/core/xds/grpc/xds_endpoint.h @@ -24,7 +24,6 @@ #include "absl/base/thread_annotations.h" #include "absl/random/random.h" - #include "src/core/resolver/endpoint_addresses.h" #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/xds/grpc/xds_endpoint_parser.cc b/src/core/xds/grpc/xds_endpoint_parser.cc index bc11c1651e4..886052ae7cc 100644 --- a/src/core/xds/grpc/xds_endpoint_parser.cc +++ b/src/core/xds/grpc/xds_endpoint_parser.cc @@ -16,6 +16,7 @@ #include "src/core/xds/grpc/xds_endpoint_parser.h" +#include #include #include @@ -39,10 +40,6 @@ #include "envoy/config/endpoint/v3/endpoint_components.upb.h" #include "envoy/type/v3/percent.upb.h" #include "google/protobuf/wrappers.upb.h" -#include "upb/text/encode.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" @@ -55,6 +52,7 @@ #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/grpc/xds_health_status.h" #include "src/core/xds/xds_client/xds_resource_type.h" +#include "upb/text/encode.h" // IWYU pragma: no_include "absl/meta/type_traits.h" diff --git a/src/core/xds/grpc/xds_endpoint_parser.h b/src/core/xds/grpc/xds_endpoint_parser.h index ababdd775bf..e543bab6356 100644 --- a/src/core/xds/grpc/xds_endpoint_parser.h +++ b/src/core/xds/grpc/xds_endpoint_parser.h @@ -19,12 +19,11 @@ #include "absl/strings/string_view.h" #include "envoy/config/endpoint/v3/endpoint.upbdefs.h" -#include "upb/reflection/def.h" - #include "src/core/xds/grpc/xds_endpoint.h" #include "src/core/xds/xds_client/xds_client.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_resource_type_impl.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_health_status.h b/src/core/xds/grpc/xds_health_status.h index 6f4e346a268..0f4c5bf0b00 100644 --- a/src/core/xds/grpc/xds_health_status.h +++ b/src/core/xds/grpc/xds_health_status.h @@ -22,7 +22,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "absl/types/span.h" - #include "src/core/resolver/endpoint_addresses.h" // Channel arg key for xDS health status. diff --git a/src/core/xds/grpc/xds_http_fault_filter.cc b/src/core/xds/grpc/xds_http_fault_filter.cc index bf078f9d0d0..cc5b22bcb15 100644 --- a/src/core/xds/grpc/xds_http_fault_filter.cc +++ b/src/core/xds/grpc/xds_http_fault_filter.cc @@ -16,6 +16,9 @@ #include "src/core/xds/grpc/xds_http_fault_filter.h" +#include +#include +#include #include #include @@ -30,11 +33,6 @@ #include "envoy/extensions/filters/http/fault/v3/fault.upbdefs.h" #include "envoy/type/v3/percent.upb.h" #include "google/protobuf/wrappers.upb.h" - -#include -#include -#include - #include "src/core/ext/filters/fault_injection/fault_injection_filter.h" #include "src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/xds/grpc/xds_http_fault_filter.h b/src/core/xds/grpc/xds_http_fault_filter.h index d36b7761e17..0fb5d2b6c91 100644 --- a/src/core/xds/grpc/xds_http_fault_filter.h +++ b/src/core/xds/grpc/xds_http_fault_filter.h @@ -17,19 +17,18 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_HTTP_FAULT_FILTER_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_HTTP_FAULT_FILTER_H +#include + #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "upb/reflection/def.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_http_filter.h b/src/core/xds/grpc/xds_http_filter.h index 888b5db75b0..4625b44ca3e 100644 --- a/src/core/xds/grpc/xds_http_filter.h +++ b/src/core/xds/grpc/xds_http_filter.h @@ -23,8 +23,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "upb/reflection/def.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/transport/interception_chain.h" @@ -33,6 +31,7 @@ #include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/xds_client/xds_resource_type.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_http_filter_registry.cc b/src/core/xds/grpc/xds_http_filter_registry.cc index 9decfded32d..38222b521af 100644 --- a/src/core/xds/grpc/xds_http_filter_registry.cc +++ b/src/core/xds/grpc/xds_http_filter_registry.cc @@ -16,6 +16,8 @@ #include "src/core/xds/grpc/xds_http_filter_registry.h" +#include + #include #include #include @@ -24,9 +26,6 @@ #include "absl/types/variant.h" #include "envoy/extensions/filters/http/router/v3/router.upb.h" #include "envoy/extensions/filters/http/router/v3/router.upbdefs.h" - -#include - #include "src/core/util/json/json.h" #include "src/core/xds/grpc/xds_http_fault_filter.h" #include "src/core/xds/grpc/xds_http_gcp_authn_filter.h" diff --git a/src/core/xds/grpc/xds_http_filter_registry.h b/src/core/xds/grpc/xds_http_filter_registry.h index 79547d35d86..a34ad7625a7 100644 --- a/src/core/xds/grpc/xds_http_filter_registry.h +++ b/src/core/xds/grpc/xds_http_filter_registry.h @@ -26,8 +26,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "upb/reflection/def.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/transport/interception_chain.h" @@ -35,6 +33,7 @@ #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_http_gcp_authn_filter.cc b/src/core/xds/grpc/xds_http_gcp_authn_filter.cc index 72e964fe74a..11de97f5c6b 100644 --- a/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +++ b/src/core/xds/grpc/xds_http_gcp_authn_filter.cc @@ -16,6 +16,8 @@ #include "src/core/xds/grpc/xds_http_gcp_authn_filter.h" +#include + #include #include @@ -24,9 +26,6 @@ #include "absl/types/variant.h" #include "envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb.h" #include "envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upbdefs.h" - -#include - #include "src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h" #include "src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/xds/grpc/xds_http_gcp_authn_filter.h b/src/core/xds/grpc/xds_http_gcp_authn_filter.h index 5a015e2ad81..11d07912bd2 100644 --- a/src/core/xds/grpc/xds_http_gcp_authn_filter.h +++ b/src/core/xds/grpc/xds_http_gcp_authn_filter.h @@ -20,14 +20,13 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "upb/reflection/def.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_http_rbac_filter.cc b/src/core/xds/grpc/xds_http_rbac_filter.cc index 381a2c31fdb..af819a7117e 100644 --- a/src/core/xds/grpc/xds_http_rbac_filter.cc +++ b/src/core/xds/grpc/xds_http_rbac_filter.cc @@ -16,6 +16,8 @@ #include "src/core/xds/grpc/xds_http_rbac_filter.h" +#include +#include #include #include @@ -38,11 +40,6 @@ #include "envoy/type/matcher/v3/string.upb.h" #include "envoy/type/v3/range.upb.h" #include "google/protobuf/wrappers.upb.h" -#include "upb/message/map.h" - -#include -#include - #include "src/core/ext/filters/rbac/rbac_filter.h" #include "src/core/ext/filters/rbac/rbac_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" @@ -55,6 +52,7 @@ #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/xds_client/xds_client.h" +#include "upb/message/map.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_http_rbac_filter.h b/src/core/xds/grpc/xds_http_rbac_filter.h index 47a0f01c33c..b5533057750 100644 --- a/src/core/xds/grpc/xds_http_rbac_filter.h +++ b/src/core/xds/grpc/xds_http_rbac_filter.h @@ -17,19 +17,18 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_HTTP_RBAC_FILTER_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_HTTP_RBAC_FILTER_H +#include + #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "upb/reflection/def.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_http_stateful_session_filter.cc b/src/core/xds/grpc/xds_http_stateful_session_filter.cc index a1442a1f392..acdc66551de 100644 --- a/src/core/xds/grpc/xds_http_stateful_session_filter.cc +++ b/src/core/xds/grpc/xds_http_stateful_session_filter.cc @@ -16,6 +16,9 @@ #include "src/core/xds/grpc/xds_http_stateful_session_filter.h" +#include +#include + #include #include @@ -28,10 +31,6 @@ #include "envoy/extensions/http/stateful_session/cookie/v3/cookie.upb.h" #include "envoy/extensions/http/stateful_session/cookie/v3/cookie.upbdefs.h" #include "envoy/type/http/v3/cookie.upb.h" - -#include -#include - #include "src/core/ext/filters/stateful_session/stateful_session_filter.h" #include "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" diff --git a/src/core/xds/grpc/xds_http_stateful_session_filter.h b/src/core/xds/grpc/xds_http_stateful_session_filter.h index 8327a7759f0..6dccd4b1a19 100644 --- a/src/core/xds/grpc/xds_http_stateful_session_filter.h +++ b/src/core/xds/grpc/xds_http_stateful_session_filter.h @@ -17,19 +17,18 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_HTTP_STATEFUL_SESSION_FILTER_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_HTTP_STATEFUL_SESSION_FILTER_H +#include + #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "upb/reflection/def.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_lb_policy_registry.cc b/src/core/xds/grpc/xds_lb_policy_registry.cc index f126855eb2b..cff37249417 100644 --- a/src/core/xds/grpc/xds_lb_policy_registry.cc +++ b/src/core/xds/grpc/xds_lb_policy_registry.cc @@ -16,6 +16,8 @@ #include "src/core/xds/grpc/xds_lb_policy_registry.h" +#include +#include #include #include @@ -31,10 +33,6 @@ #include "envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.h" #include "envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb.h" #include "google/protobuf/wrappers.upb.h" - -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/util/time.h" diff --git a/src/core/xds/grpc/xds_lb_policy_registry.h b/src/core/xds/grpc/xds_lb_policy_registry.h index 2396cb8a88d..06dcaa19c75 100644 --- a/src/core/xds/grpc/xds_lb_policy_registry.h +++ b/src/core/xds/grpc/xds_lb_policy_registry.h @@ -17,14 +17,13 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_LB_POLICY_REGISTRY_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_LB_POLICY_REGISTRY_H +#include + #include #include #include "absl/strings/string_view.h" #include "envoy/config/cluster/v3/cluster.upb.h" - -#include - #include "src/core/util/json/json.h" #include "src/core/util/validation_errors.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_listener.cc b/src/core/xds/grpc/xds_listener.cc index c67483c41a6..1bbff1e7918 100644 --- a/src/core/xds/grpc/xds_listener.cc +++ b/src/core/xds/grpc/xds_listener.cc @@ -19,7 +19,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/util/match.h" diff --git a/src/core/xds/grpc/xds_listener.h b/src/core/xds/grpc/xds_listener.h index 29b51923283..823a2a4f7f5 100644 --- a/src/core/xds/grpc/xds_listener.h +++ b/src/core/xds/grpc/xds_listener.h @@ -29,7 +29,6 @@ #include "absl/types/optional.h" #include "absl/types/variant.h" - #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/util/time.h" #include "src/core/xds/grpc/xds_common_types.h" diff --git a/src/core/xds/grpc/xds_listener_parser.cc b/src/core/xds/grpc/xds_listener_parser.cc index 3449b5875da..325705e30bb 100644 --- a/src/core/xds/grpc/xds_listener_parser.cc +++ b/src/core/xds/grpc/xds_listener_parser.cc @@ -16,6 +16,7 @@ #include "src/core/xds/grpc/xds_listener_parser.h" +#include #include #include @@ -43,10 +44,6 @@ #include "google/protobuf/any.upb.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/wrappers.upb.h" -#include "upb/text/encode.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/debug/trace.h" @@ -59,6 +56,7 @@ #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/grpc/xds_route_config_parser.h" #include "src/core/xds/xds_client/xds_resource_type.h" +#include "upb/text/encode.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_listener_parser.h b/src/core/xds/grpc/xds_listener_parser.h index 1a0e1e95004..908da7b995b 100644 --- a/src/core/xds/grpc/xds_listener_parser.h +++ b/src/core/xds/grpc/xds_listener_parser.h @@ -20,14 +20,13 @@ #include "absl/strings/string_view.h" #include "envoy/config/listener/v3/listener.upbdefs.h" #include "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h" -#include "upb/reflection/def.h" - #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_http_filter_registry.h" #include "src/core/xds/grpc/xds_listener.h" #include "src/core/xds/xds_client/xds_client.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_resource_type_impl.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_metadata.h b/src/core/xds/grpc/xds_metadata.h index 94857712136..63e2178ffb0 100644 --- a/src/core/xds/grpc/xds_metadata.h +++ b/src/core/xds/grpc/xds_metadata.h @@ -24,7 +24,6 @@ #include "absl/container/flat_hash_map.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - #include "src/core/util/down_cast.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" diff --git a/src/core/xds/grpc/xds_metadata_parser.cc b/src/core/xds/grpc/xds_metadata_parser.cc index cb355371c47..1ec9e7a106a 100644 --- a/src/core/xds/grpc/xds_metadata_parser.cc +++ b/src/core/xds/grpc/xds_metadata_parser.cc @@ -23,15 +23,14 @@ #include "absl/types/variant.h" #include "envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb.h" #include "envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upbdefs.h" -#include "upb/base/string_view.h" -#include "upb/text/encode.h" - #include "src/core/util/env.h" #include "src/core/util/string.h" #include "src/core/util/upb_utils.h" #include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_common_types_parser.h" +#include "upb/base/string_view.h" +#include "upb/text/encode.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_metadata_parser.h b/src/core/xds/grpc/xds_metadata_parser.h index a3cca589308..7cb9d55daa7 100644 --- a/src/core/xds/grpc/xds_metadata_parser.h +++ b/src/core/xds/grpc/xds_metadata_parser.h @@ -18,7 +18,6 @@ #define GRPC_SRC_CORE_XDS_GRPC_XDS_METADATA_PARSER_H #include "envoy/config/core/v3/base.upb.h" - #include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_metadata.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_route_config.cc b/src/core/xds/grpc/xds_route_config.cc index 82d670207ee..5c94d6a8824 100644 --- a/src/core/xds/grpc/xds_route_config.cc +++ b/src/core/xds/grpc/xds_route_config.cc @@ -26,7 +26,6 @@ #include "absl/types/optional.h" #include "absl/types/variant.h" #include "re2/re2.h" - #include "src/core/util/match.h" #include "src/core/util/matchers.h" diff --git a/src/core/xds/grpc/xds_route_config.h b/src/core/xds/grpc/xds_route_config.h index b6af799af1c..8b562ecab11 100644 --- a/src/core/xds/grpc/xds_route_config.h +++ b/src/core/xds/grpc/xds_route_config.h @@ -28,7 +28,6 @@ #include "absl/types/optional.h" #include "absl/types/variant.h" #include "re2/re2.h" - #include "src/core/lib/channel/status_util.h" #include "src/core/util/matchers.h" #include "src/core/util/time.h" diff --git a/src/core/xds/grpc/xds_route_config_parser.cc b/src/core/xds/grpc/xds_route_config_parser.cc index 55ffc7ced1a..fc94e71e07b 100644 --- a/src/core/xds/grpc/xds_route_config_parser.cc +++ b/src/core/xds/grpc/xds_route_config_parser.cc @@ -16,6 +16,8 @@ #include "src/core/xds/grpc/xds_route_config_parser.h" +#include +#include #include #include @@ -51,13 +53,6 @@ #include "google/protobuf/duration.upb.h" #include "google/protobuf/wrappers.upb.h" #include "re2/re2.h" -#include "upb/base/string_view.h" -#include "upb/message/map.h" -#include "upb/text/encode.h" - -#include -#include - #include "src/core/lib/channel/status_util.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" @@ -78,6 +73,9 @@ #include "src/core/xds/grpc/xds_http_filter_registry.h" #include "src/core/xds/grpc/xds_routing.h" #include "src/core/xds/xds_client/xds_resource_type.h" +#include "upb/base/string_view.h" +#include "upb/message/map.h" +#include "upb/text/encode.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_route_config_parser.h b/src/core/xds/grpc/xds_route_config_parser.h index 644c55e7198..d5909c9fcf8 100644 --- a/src/core/xds/grpc/xds_route_config_parser.h +++ b/src/core/xds/grpc/xds_route_config_parser.h @@ -17,6 +17,7 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_ROUTE_CONFIG_PARSER_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_ROUTE_CONFIG_PARSER_H +#include #include #include @@ -31,10 +32,6 @@ #include "envoy/config/route/v3/route.upb.h" #include "envoy/config/route/v3/route.upbdefs.h" #include "re2/re2.h" -#include "upb/reflection/def.h" - -#include - #include "src/core/lib/channel/status_util.h" #include "src/core/util/time.h" #include "src/core/util/validation_errors.h" @@ -45,6 +42,7 @@ #include "src/core/xds/xds_client/xds_client.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_resource_type_impl.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_routing.cc b/src/core/xds/grpc/xds_routing.cc index 2d8668326be..95f6cb7446f 100644 --- a/src/core/xds/grpc/xds_routing.cc +++ b/src/core/xds/grpc/xds_routing.cc @@ -18,6 +18,7 @@ #include "src/core/xds/grpc/xds_routing.h" +#include #include #include @@ -30,9 +31,6 @@ #include "absl/status/statusor.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/matchers.h" #include "src/core/xds/grpc/xds_http_filter.h" diff --git a/src/core/xds/grpc/xds_routing.h b/src/core/xds/grpc/xds_routing.h index 696599d8463..85309137635 100644 --- a/src/core/xds/grpc/xds_routing.h +++ b/src/core/xds/grpc/xds_routing.h @@ -19,6 +19,7 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_ROUTING_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_ROUTING_H +#include #include #include @@ -28,9 +29,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/xds/grpc/xds_http_filter_registry.h" diff --git a/src/core/xds/grpc/xds_server_grpc.cc b/src/core/xds/grpc/xds_server_grpc.cc index dca1d0b87c0..99654977e81 100644 --- a/src/core/xds/grpc/xds_server_grpc.cc +++ b/src/core/xds/grpc/xds_server_grpc.cc @@ -25,7 +25,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - #include "src/core/lib/config/core_configuration.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" diff --git a/src/core/xds/grpc/xds_transport_grpc.cc b/src/core/xds/grpc/xds_transport_grpc.cc index 5bc75266959..ef0186a2f8a 100644 --- a/src/core/xds/grpc/xds_transport_grpc.cc +++ b/src/core/xds/grpc/xds_transport_grpc.cc @@ -16,16 +16,6 @@ #include "src/core/xds/grpc/xds_transport_grpc.h" -#include - -#include -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/strings/str_cat.h" - #include #include #include @@ -35,7 +25,15 @@ #include #include #include +#include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/strings/str_cat.h" #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/src/core/xds/grpc/xds_transport_grpc.h b/src/core/xds/grpc/xds_transport_grpc.h index 7615d19f6c8..b057c054ae3 100644 --- a/src/core/xds/grpc/xds_transport_grpc.h +++ b/src/core/xds/grpc/xds_transport_grpc.h @@ -17,18 +17,17 @@ #ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_TRANSPORT_GRPC_H #define GRPC_SRC_CORE_XDS_GRPC_XDS_TRANSPORT_GRPC_H +#include +#include +#include +#include + #include #include #include #include "absl/container/flat_hash_map.h" #include "absl/status/status.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/xds/xds_client/lrs_client.cc b/src/core/xds/xds_client/lrs_client.cc index d8059321d9e..3ff9d42c0a9 100644 --- a/src/core/xds/xds_client/lrs_client.cc +++ b/src/core/xds/xds_client/lrs_client.cc @@ -16,6 +16,8 @@ #include "src/core/xds/xds_client/lrs_client.h" +#include + #include #include #include @@ -31,13 +33,6 @@ #include "envoy/service/load_stats/v3/lrs.upb.h" #include "envoy/service/load_stats/v3/lrs.upbdefs.h" #include "google/protobuf/duration.upb.h" -#include "upb/base/string_view.h" -#include "upb/mem/arena.h" -#include "upb/reflection/def.h" -#include "upb/text/encode.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/backoff.h" @@ -52,6 +47,10 @@ #include "src/core/xds/xds_client/xds_api.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_locality.h" +#include "upb/base/string_view.h" +#include "upb/mem/arena.h" +#include "upb/reflection/def.h" +#include "upb/text/encode.h" #define GRPC_XDS_INITIAL_CONNECT_BACKOFF_SECONDS 1 #define GRPC_XDS_RECONNECT_BACKOFF_MULTIPLIER 1.6 diff --git a/src/core/xds/xds_client/lrs_client.h b/src/core/xds/xds_client/lrs_client.h index 36fabc56fe3..eef921d953f 100644 --- a/src/core/xds/xds_client/lrs_client.h +++ b/src/core/xds/xds_client/lrs_client.h @@ -17,6 +17,8 @@ #ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_LRS_CLIENT_H #define GRPC_SRC_CORE_XDS_XDS_CLIENT_LRS_CLIENT_H +#include + #include #include #include @@ -28,10 +30,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include "upb/reflection/def.hpp" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/util/dual_ref_counted.h" @@ -50,6 +48,7 @@ #include "src/core/xds/xds_client/xds_metrics.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_transport.h" +#include "upb/reflection/def.hpp" namespace grpc_core { diff --git a/src/core/xds/xds_client/xds_api.cc b/src/core/xds/xds_client/xds_api.cc index 50522961920..5223aa16795 100644 --- a/src/core/xds/xds_client/xds_api.cc +++ b/src/core/xds/xds_client/xds_api.cc @@ -16,6 +16,9 @@ #include "src/core/xds/xds_client/xds_api.h" +#include +#include +#include #include #include @@ -38,19 +41,14 @@ #include "google/protobuf/struct.upb.h" #include "google/protobuf/timestamp.upb.h" #include "google/rpc/status.upb.h" +#include "src/core/util/json/json.h" +#include "src/core/util/upb_utils.h" +#include "src/core/xds/xds_client/xds_client.h" #include "upb/base/string_view.h" #include "upb/mem/arena.hpp" #include "upb/reflection/def.h" #include "upb/text/encode.h" -#include -#include -#include - -#include "src/core/util/json/json.h" -#include "src/core/util/upb_utils.h" -#include "src/core/xds/xds_client/xds_client.h" - // IWYU pragma: no_include "upb/msg_internal.h" namespace grpc_core { diff --git a/src/core/xds/xds_client/xds_api.h b/src/core/xds/xds_client/xds_api.h index 207e78a297a..74d688dddef 100644 --- a/src/core/xds/xds_client/xds_api.h +++ b/src/core/xds/xds_client/xds_api.h @@ -17,6 +17,7 @@ #ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_API_H #define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_API_H +#include #include #include @@ -29,16 +30,13 @@ #include "absl/strings/string_view.h" #include "envoy/admin/v3/config_dump_shared.upb.h" #include "envoy/service/status/v3/csds.upb.h" -#include "upb/mem/arena.h" -#include "upb/reflection/def.hpp" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/time.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_locality.h" +#include "upb/mem/arena.h" +#include "upb/reflection/def.hpp" namespace grpc_core { diff --git a/src/core/xds/xds_client/xds_backend_metric_propagation.cc b/src/core/xds/xds_client/xds_backend_metric_propagation.cc index 1d514a0f25c..edb2f852f71 100644 --- a/src/core/xds/xds_client/xds_backend_metric_propagation.cc +++ b/src/core/xds/xds_client/xds_backend_metric_propagation.cc @@ -20,7 +20,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" - #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/xds/xds_client/xds_backend_metric_propagation.h b/src/core/xds/xds_client/xds_backend_metric_propagation.h index 4216c0ac47e..3b9af885f71 100644 --- a/src/core/xds/xds_client/xds_backend_metric_propagation.h +++ b/src/core/xds/xds_client/xds_backend_metric_propagation.h @@ -20,7 +20,6 @@ #include #include "absl/container/flat_hash_set.h" - #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/xds/xds_client/xds_bootstrap.cc b/src/core/xds/xds_client/xds_bootstrap.cc index b6f5edfc9e2..718ac64bab3 100644 --- a/src/core/xds/xds_client/xds_bootstrap.cc +++ b/src/core/xds/xds_client/xds_bootstrap.cc @@ -16,10 +16,9 @@ #include "src/core/xds/xds_client/xds_bootstrap.h" -#include "absl/types/optional.h" - #include +#include "absl/types/optional.h" #include "src/core/util/env.h" #include "src/core/util/string.h" diff --git a/src/core/xds/xds_client/xds_bootstrap.h b/src/core/xds/xds_client/xds_bootstrap.h index cd802bbfa63..62f929b4c9d 100644 --- a/src/core/xds/xds_client/xds_bootstrap.h +++ b/src/core/xds/xds_client/xds_bootstrap.h @@ -17,10 +17,10 @@ #ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_BOOTSTRAP_H #define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_BOOTSTRAP_H -#include - #include +#include + #include "src/core/util/json/json.h" namespace grpc_core { diff --git a/src/core/xds/xds_client/xds_client.cc b/src/core/xds/xds_client/xds_client.cc index 6381f8ba38c..d9b13e2980d 100644 --- a/src/core/xds/xds_client/xds_client.cc +++ b/src/core/xds/xds_client/xds_client.cc @@ -16,6 +16,8 @@ #include "src/core/xds/xds_client/xds_client.h" +#include +#include #include #include @@ -40,12 +42,6 @@ #include "envoy/service/status/v3/csds.upb.h" #include "google/protobuf/any.upb.h" #include "google/protobuf/timestamp.upb.h" -#include "upb/base/string_view.h" -#include "upb/mem/arena.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/backoff.h" #include "src/core/util/debug_location.h" @@ -57,6 +53,8 @@ #include "src/core/xds/xds_client/xds_api.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_locality.h" +#include "upb/base/string_view.h" +#include "upb/mem/arena.h" #define GRPC_XDS_INITIAL_CONNECT_BACKOFF_SECONDS 1 #define GRPC_XDS_RECONNECT_BACKOFF_MULTIPLIER 1.6 diff --git a/src/core/xds/xds_client/xds_client.h b/src/core/xds/xds_client/xds_client.h index b5d4faa0b90..5b97b363d14 100644 --- a/src/core/xds/xds_client/xds_client.h +++ b/src/core/xds/xds_client/xds_client.h @@ -17,6 +17,9 @@ #ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_CLIENT_H #define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_CLIENT_H +#include +#include + #include #include #include @@ -28,11 +31,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include "upb/reflection/def.hpp" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/util/dual_ref_counted.h" #include "src/core/util/orphanable.h" @@ -48,6 +46,7 @@ #include "src/core/xds/xds_client/xds_metrics.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_transport.h" +#include "upb/reflection/def.hpp" namespace grpc_core { diff --git a/src/core/xds/xds_client/xds_locality.h b/src/core/xds/xds_client/xds_locality.h index 3223ff48c34..7fb469ba415 100644 --- a/src/core/xds/xds_client/xds_locality.h +++ b/src/core/xds/xds_client/xds_locality.h @@ -24,7 +24,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" - #include "src/core/resolver/endpoint_addresses.h" #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/core/xds/xds_client/xds_metrics.h b/src/core/xds/xds_client/xds_metrics.h index 5262e02e084..6e562296396 100644 --- a/src/core/xds/xds_client/xds_metrics.h +++ b/src/core/xds/xds_client/xds_metrics.h @@ -17,10 +17,10 @@ #ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_METRICS_H #define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_METRICS_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" + namespace grpc_core { // An interface for XdsClient to report metrics. diff --git a/src/core/xds/xds_client/xds_resource_type.h b/src/core/xds/xds_client/xds_resource_type.h index dade8ce0f83..642ff2e7119 100644 --- a/src/core/xds/xds_client/xds_resource_type.h +++ b/src/core/xds/xds_client/xds_resource_type.h @@ -16,19 +16,18 @@ #ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_RESOURCE_TYPE_H #define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_RESOURCE_TYPE_H +#include + #include #include #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "upb/mem/arena.h" -#include "upb/reflection/def.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/xds/xds_client/xds_bootstrap.h" +#include "upb/mem/arena.h" +#include "upb/reflection/def.h" namespace grpc_core { diff --git a/src/core/xds/xds_client/xds_resource_type_impl.h b/src/core/xds/xds_client/xds_resource_type_impl.h index a927f796b5e..0b97edb6aa0 100644 --- a/src/core/xds/xds_client/xds_resource_type_impl.h +++ b/src/core/xds/xds_client/xds_resource_type_impl.h @@ -16,13 +16,12 @@ #ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_RESOURCE_TYPE_IMPL_H #define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_RESOURCE_TYPE_IMPL_H +#include + #include #include #include "absl/strings/string_view.h" - -#include - #include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/xds_client/xds_client.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/xds_client/xds_transport.h b/src/core/xds/xds_client/xds_transport.h index b471b31477c..9d7f98f6bf5 100644 --- a/src/core/xds/xds_client/xds_transport.h +++ b/src/core/xds/xds_client/xds_transport.h @@ -22,7 +22,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" - #include "src/core/util/dual_ref_counted.h" #include "src/core/util/orphanable.h" #include "src/core/xds/xds_client/xds_bootstrap.h" diff --git a/src/cpp/client/call_credentials.cc b/src/cpp/client/call_credentials.cc index 88ccd07ea1f..3ecc72d5980 100644 --- a/src/cpp/client/call_credentials.cc +++ b/src/cpp/client/call_credentials.cc @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "absl/log/check.h" -#include "absl/strings/str_cat.h" - #include #include +#include "absl/log/check.h" +#include "absl/strings/str_cat.h" #include "src/core/lib/security/credentials/credentials.h" namespace grpc { diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc index 457f9db37aa..e99c416d175 100644 --- a/src/cpp/client/channel_cc.cc +++ b/src/cpp/client/channel_cc.cc @@ -16,15 +16,6 @@ // // -#include -#include -#include -#include -#include -#include - -#include "absl/log/check.h" - #include #include #include @@ -41,6 +32,14 @@ #include #include +#include +#include +#include +#include +#include +#include + +#include "absl/log/check.h" #include "src/core/lib/iomgr/iomgr.h" namespace grpc { diff --git a/src/cpp/client/channel_credentials.cc b/src/cpp/client/channel_credentials.cc index 321af7783da..e27643c2846 100644 --- a/src/cpp/client/channel_credentials.cc +++ b/src/cpp/client/channel_credentials.cc @@ -11,16 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include -#include -#include - #include #include #include #include #include +#include +#include +#include + namespace grpc { ChannelCredentials::ChannelCredentials(grpc_channel_credentials* c_creds) diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index ac480c87153..e338d440b9c 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -16,17 +16,6 @@ // // -#include - -#include -#include -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/strings/str_format.h" - #include #include #include @@ -40,7 +29,16 @@ #include #include #include +#include + +#include +#include +#include +#include +#include +#include "absl/log/check.h" +#include "absl/strings/str_format.h" #include "src/core/util/crash.h" namespace grpc { diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc index a2db03ae9ea..5385e3094e0 100644 --- a/src/cpp/client/create_channel.cc +++ b/src/cpp/client/create_channel.cc @@ -16,11 +16,6 @@ // // -#include -#include -#include -#include - #include #include #include @@ -31,6 +26,11 @@ #include #include +#include +#include +#include +#include + #include "src/cpp/client/create_channel_internal.h" namespace grpc { diff --git a/src/cpp/client/create_channel_internal.cc b/src/cpp/client/create_channel_internal.cc index e54910f46a3..31b6fa013ab 100644 --- a/src/cpp/client/create_channel_internal.cc +++ b/src/cpp/client/create_channel_internal.cc @@ -18,13 +18,13 @@ #include "src/cpp/client/create_channel_internal.h" +#include + #include #include #include #include -#include - namespace grpc { std::shared_ptr CreateChannelInternal( diff --git a/src/cpp/client/create_channel_internal.h b/src/cpp/client/create_channel_internal.h index 264ad575aac..02e555e77bb 100644 --- a/src/cpp/client/create_channel_internal.h +++ b/src/cpp/client/create_channel_internal.h @@ -19,14 +19,14 @@ #ifndef GRPC_SRC_CPP_CLIENT_CREATE_CHANNEL_INTERNAL_H #define GRPC_SRC_CPP_CLIENT_CREATE_CHANNEL_INTERNAL_H -#include -#include -#include - #include #include #include +#include +#include +#include + namespace grpc { std::shared_ptr CreateChannelInternal( diff --git a/src/cpp/client/create_channel_posix.cc b/src/cpp/client/create_channel_posix.cc index e1d6653ed55..9f25b4bfbb8 100644 --- a/src/cpp/client/create_channel_posix.cc +++ b/src/cpp/client/create_channel_posix.cc @@ -16,11 +16,6 @@ // // -#include -#include -#include -#include - #include #include #include @@ -30,6 +25,11 @@ #include #include +#include +#include +#include +#include + #include "src/cpp/client/create_channel_internal.h" namespace grpc { diff --git a/src/cpp/client/cronet_credentials.cc b/src/cpp/client/cronet_credentials.cc index da133a62f9c..0bae55aa657 100644 --- a/src/cpp/client/cronet_credentials.cc +++ b/src/cpp/client/cronet_credentials.cc @@ -16,11 +16,6 @@ // // -#include -#include -#include -#include - #include #include #include @@ -29,6 +24,11 @@ #include #include +#include +#include +#include +#include + #include "src/cpp/client/create_channel_internal.h" namespace grpc { diff --git a/src/cpp/client/global_callback_hook.cc b/src/cpp/client/global_callback_hook.cc index 2431508b7b3..e117214d1cc 100644 --- a/src/cpp/client/global_callback_hook.cc +++ b/src/cpp/client/global_callback_hook.cc @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include "absl/base/no_destructor.h" #include "absl/log/check.h" -#include - namespace grpc { static absl::NoDestructor> g_callback_hook( diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc index 0f3d000bd29..89dcadfc409 100644 --- a/src/cpp/client/insecure_credentials.cc +++ b/src/cpp/client/insecure_credentials.cc @@ -15,8 +15,6 @@ // limitations under the License. // // -#include - #include #include #include @@ -24,6 +22,8 @@ #include #include +#include + namespace grpc { namespace { class InsecureChannelCredentialsImpl final : public ChannelCredentials { diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 5c1804fbc66..e46561afb64 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -18,19 +18,6 @@ #include "src/cpp/client/secure_credentials.h" -#include - -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/status/status.h" -#include "absl/status/statusor.h" -#include "absl/strings/str_join.h" -#include "absl/types/optional.h" - #include #include #include @@ -45,7 +32,18 @@ #include #include #include +#include + +#include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/strings/str_join.h" +#include "absl/types/optional.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/security/util/json_util.h" #include "src/core/util/env.h" diff --git a/src/cpp/client/xds_credentials.cc b/src/cpp/client/xds_credentials.cc index e3fefd04c47..b9771e2d340 100644 --- a/src/cpp/client/xds_credentials.cc +++ b/src/cpp/client/xds_credentials.cc @@ -16,14 +16,14 @@ // // -#include - -#include "absl/log/check.h" - #include #include #include +#include + +#include "absl/log/check.h" + namespace grpc { class XdsChannelCredentialsImpl final : public ChannelCredentials { public: diff --git a/src/cpp/common/alarm.cc b/src/cpp/common/alarm.cc index 770b07085e3..7617ca64670 100644 --- a/src/cpp/common/alarm.cc +++ b/src/cpp/common/alarm.cc @@ -15,14 +15,6 @@ // // -#include -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/status/status.h" - #include #include #include @@ -32,6 +24,13 @@ #include #include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/status/status.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/cpp/common/alts_context.cc b/src/cpp/common/alts_context.cc index b8fed615a42..cdcf53ee59e 100644 --- a/src/cpp/common/alts_context.cc +++ b/src/cpp/common/alts_context.cc @@ -16,19 +16,17 @@ // // +#include +#include #include #include #include -#include "upb/base/string_view.h" -#include "upb/message/map.h" - -#include -#include - #include "src/proto/grpc/gcp/altscontext.upb.h" #include "src/proto/grpc/gcp/transport_security_common.upb.h" +#include "upb/base/string_view.h" +#include "upb/message/map.h" namespace grpc { namespace experimental { diff --git a/src/cpp/common/alts_util.cc b/src/cpp/common/alts_util.cc index df1a8a8cf5b..1a0a2149b1f 100644 --- a/src/cpp/common/alts_util.cc +++ b/src/cpp/common/alts_util.cc @@ -16,14 +16,6 @@ // // -#include -#include -#include -#include - -#include "absl/log/log.h" -#include "upb/mem/arena.hpp" - #include #include #include @@ -31,8 +23,15 @@ #include #include +#include +#include +#include +#include + +#include "absl/log/log.h" #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" #include "src/proto/grpc/gcp/altscontext.upb.h" +#include "upb/mem/arena.hpp" namespace grpc { namespace experimental { diff --git a/src/cpp/common/auth_property_iterator.cc b/src/cpp/common/auth_property_iterator.cc index 10e71d3a174..854e999115e 100644 --- a/src/cpp/common/auth_property_iterator.cc +++ b/src/cpp/common/auth_property_iterator.cc @@ -16,12 +16,12 @@ // // -#include - #include #include #include +#include + namespace grpc { AuthPropertyIterator::AuthPropertyIterator() diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index fc09938b99f..af1838571ca 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -15,19 +15,18 @@ // limitations under the License. // // -#include -#include -#include -#include - -#include "absl/log/check.h" - #include #include #include #include #include +#include +#include +#include +#include + +#include "absl/log/check.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/socket_mutator.h" diff --git a/src/cpp/common/completion_queue_cc.cc b/src/cpp/common/completion_queue_cc.cc index 88396bfbbc6..ebaf659acc2 100644 --- a/src/cpp/common/completion_queue_cc.cc +++ b/src/cpp/common/completion_queue_cc.cc @@ -15,12 +15,6 @@ // // -#include - -#include "absl/base/thread_annotations.h" -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -29,6 +23,11 @@ #include #include +#include + +#include "absl/base/thread_annotations.h" +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/util/sync.h" #include "src/core/util/thd.h" #include "src/core/util/useful.h" diff --git a/src/cpp/common/insecure_create_auth_context.cc b/src/cpp/common/insecure_create_auth_context.cc index b4c02d39b36..785357e1806 100644 --- a/src/cpp/common/insecure_create_auth_context.cc +++ b/src/cpp/common/insecure_create_auth_context.cc @@ -15,11 +15,11 @@ // limitations under the License. // // -#include - #include #include +#include + namespace grpc { std::shared_ptr CreateAuthContext(grpc_call* call) { diff --git a/src/cpp/common/resource_quota_cc.cc b/src/cpp/common/resource_quota_cc.cc index 075a4f71d76..253edd04ba4 100644 --- a/src/cpp/common/resource_quota_cc.cc +++ b/src/cpp/common/resource_quota_cc.cc @@ -16,13 +16,12 @@ // // +#include +#include #include #include -#include -#include - namespace grpc { ResourceQuota::ResourceQuota() : impl_(grpc_resource_quota_create(nullptr)) {} diff --git a/src/cpp/common/secure_auth_context.cc b/src/cpp/common/secure_auth_context.cc index c1b69efe4d5..ccf362b58be 100644 --- a/src/cpp/common/secure_auth_context.cc +++ b/src/cpp/common/secure_auth_context.cc @@ -18,10 +18,10 @@ #include "src/cpp/common/secure_auth_context.h" -#include - #include +#include + namespace grpc { std::vector SecureAuthContext::GetPeerIdentity() const { diff --git a/src/cpp/common/secure_auth_context.h b/src/cpp/common/secure_auth_context.h index 8da3e971c22..405036faa05 100644 --- a/src/cpp/common/secure_auth_context.h +++ b/src/cpp/common/secure_auth_context.h @@ -19,13 +19,13 @@ #ifndef GRPC_SRC_CPP_COMMON_SECURE_AUTH_CONTEXT_H #define GRPC_SRC_CPP_COMMON_SECURE_AUTH_CONTEXT_H -#include -#include - #include #include #include +#include +#include + #include "src/core/lib/security/context/security_context.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/cpp/common/secure_create_auth_context.cc b/src/cpp/common/secure_create_auth_context.cc index 8492655b4aa..3c1caeaccb5 100644 --- a/src/cpp/common/secure_create_auth_context.cc +++ b/src/cpp/common/secure_create_auth_context.cc @@ -15,12 +15,12 @@ // limitations under the License. // // -#include - #include #include #include +#include + #include "src/core/lib/security/context/security_context.h" #include "src/core/util/ref_counted_ptr.h" #include "src/cpp/common/secure_auth_context.h" diff --git a/src/cpp/common/tls_certificate_provider.cc b/src/cpp/common/tls_certificate_provider.cc index 88c684b3a45..091e478b9ba 100644 --- a/src/cpp/common/tls_certificate_provider.cc +++ b/src/cpp/common/tls_certificate_provider.cc @@ -14,15 +14,14 @@ // limitations under the License. // -#include -#include - -#include "absl/log/check.h" - #include #include #include +#include +#include + +#include "absl/log/check.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" namespace grpc { diff --git a/src/cpp/common/tls_certificate_verifier.cc b/src/cpp/common/tls_certificate_verifier.cc index d298cf26773..dfbd2e1c3e1 100644 --- a/src/cpp/common/tls_certificate_verifier.cc +++ b/src/cpp/common/tls_certificate_verifier.cc @@ -14,16 +14,6 @@ // limitations under the License. // -#include - -#include -#include -#include -#include -#include - -#include "absl/log/check.h" - #include #include #include @@ -33,6 +23,15 @@ #include #include #include +#include + +#include +#include +#include +#include +#include + +#include "absl/log/check.h" namespace grpc { namespace experimental { diff --git a/src/cpp/common/tls_credentials_options.cc b/src/cpp/common/tls_credentials_options.cc index 74e74128322..339a714bd2d 100644 --- a/src/cpp/common/tls_credentials_options.cc +++ b/src/cpp/common/tls_credentials_options.cc @@ -16,11 +16,6 @@ // // -#include -#include - -#include "absl/log/check.h" - #include #include #include @@ -30,6 +25,11 @@ #include #include +#include +#include + +#include "absl/log/check.h" + namespace grpc { namespace experimental { diff --git a/src/cpp/common/validate_service_config.cc b/src/cpp/common/validate_service_config.cc index f8f662d87b3..6869617036a 100644 --- a/src/cpp/common/validate_service_config.cc +++ b/src/cpp/common/validate_service_config.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index 44824d66f72..dbfe28ab0a5 100644 --- a/src/cpp/common/version_cc.cc +++ b/src/cpp/common/version_cc.cc @@ -16,10 +16,10 @@ // // -#include - #include +#include + namespace grpc { std::string Version() { return GRPC_CPP_VERSION_STRING; } } // namespace grpc diff --git a/src/cpp/ext/chaotic_good.cc b/src/cpp/ext/chaotic_good.cc index 7268598118e..31c36231a9c 100644 --- a/src/cpp/ext/chaotic_good.cc +++ b/src/cpp/ext/chaotic_good.cc @@ -14,10 +14,10 @@ #include "src/cpp/ext/chaotic_good.h" -#include - #include +#include + #include "src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h" #include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h" diff --git a/src/cpp/ext/chaotic_good.h b/src/cpp/ext/chaotic_good.h index b203f473e59..73fed2bd632 100644 --- a/src/cpp/ext/chaotic_good.h +++ b/src/cpp/ext/chaotic_good.h @@ -15,11 +15,11 @@ #ifndef GRPC_SRC_CPP_EXT_CHAOTIC_GOOD_H #define GRPC_SRC_CPP_EXT_CHAOTIC_GOOD_H -#include - #include #include +#include + namespace grpc { std::shared_ptr ChaoticGoodInsecureChannelCredentials(); diff --git a/src/cpp/ext/csm/csm_observability.cc b/src/cpp/ext/csm/csm_observability.cc index a5f61794660..66a2194f0e5 100644 --- a/src/cpp/ext/csm/csm_observability.cc +++ b/src/cpp/ext/csm/csm_observability.cc @@ -18,6 +18,9 @@ #include "src/cpp/ext/csm/csm_observability.h" +#include +#include + #include #include #include @@ -30,10 +33,6 @@ #include "opentelemetry/sdk/metrics/meter_provider.h" #include "opentelemetry/sdk/resource/resource.h" #include "opentelemetry/sdk/resource/resource_detector.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/uri.h" #include "src/core/xds/grpc/xds_enabled_server.h" diff --git a/src/cpp/ext/csm/csm_observability.h b/src/cpp/ext/csm/csm_observability.h index 8e623cb4edf..a42831a4f4a 100644 --- a/src/cpp/ext/csm/csm_observability.h +++ b/src/cpp/ext/csm/csm_observability.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CPP_EXT_CSM_CSM_OBSERVABILITY_H #define GRPC_SRC_CPP_EXT_CSM_CSM_OBSERVABILITY_H -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" #include "src/core/lib/channel/channel_args.h" namespace grpc { diff --git a/src/cpp/ext/csm/metadata_exchange.cc b/src/cpp/ext/csm/metadata_exchange.cc index bd922460fb9..5934554d10d 100644 --- a/src/cpp/ext/csm/metadata_exchange.cc +++ b/src/cpp/ext/csm/metadata_exchange.cc @@ -18,6 +18,8 @@ #include "src/cpp/ext/csm/metadata_exchange.h" +#include +#include #include #include @@ -34,11 +36,6 @@ #include "absl/types/optional.h" #include "absl/types/variant.h" #include "opentelemetry/sdk/resource/semantic_conventions.h" -#include "upb/base/string_view.h" - -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/telemetry/call_tracer.h" @@ -48,6 +45,7 @@ #include "src/core/util/json/json_reader.h" #include "src/core/util/load_file.h" #include "src/cpp/ext/otel/key_value_iterable.h" +#include "upb/base/string_view.h" namespace grpc { namespace internal { diff --git a/src/cpp/ext/csm/metadata_exchange.h b/src/cpp/ext/csm/metadata_exchange.h index 4487dcbb74e..0830acdd7ef 100644 --- a/src/cpp/ext/csm/metadata_exchange.h +++ b/src/cpp/ext/csm/metadata_exchange.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CPP_EXT_CSM_METADATA_EXCHANGE_H #define GRPC_SRC_CPP_EXT_CSM_METADATA_EXCHANGE_H +#include + #include #include #include @@ -27,13 +29,10 @@ #include "absl/strings/string_view.h" #include "google/protobuf/struct.upb.h" #include "opentelemetry/sdk/common/attribute_utils.h" -#include "upb/mem/arena.hpp" - -#include - #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/cpp/ext/otel/otel_plugin.h" +#include "upb/mem/arena.hpp" namespace grpc { namespace internal { diff --git a/src/cpp/ext/filters/census/client_filter.cc b/src/cpp/ext/filters/census/client_filter.cc index 001c1fa8d18..d865b75147c 100644 --- a/src/cpp/ext/filters/census/client_filter.cc +++ b/src/cpp/ext/filters/census/client_filter.cc @@ -18,6 +18,12 @@ #include "src/cpp/ext/filters/census/client_filter.h" +#include +#include +#include +#include +#include +#include #include #include @@ -42,14 +48,6 @@ #include "opencensus/trace/span.h" #include "opencensus/trace/span_context.h" #include "opencensus/trace/status_code.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/experiments/experiments.h" diff --git a/src/cpp/ext/filters/census/client_filter.h b/src/cpp/ext/filters/census/client_filter.h index 8e2f4057c3b..e1ee13b087f 100644 --- a/src/cpp/ext/filters/census/client_filter.h +++ b/src/cpp/ext/filters/census/client_filter.h @@ -19,12 +19,11 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CLIENT_FILTER_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CLIENT_FILTER_H -#include "absl/status/statusor.h" - #include #include #include +#include "absl/status/statusor.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/src/cpp/ext/filters/census/context.cc b/src/cpp/ext/filters/census/context.cc index 21d10f1fd28..2545b34e7ad 100644 --- a/src/cpp/ext/filters/census/context.cc +++ b/src/cpp/ext/filters/census/context.cc @@ -18,15 +18,14 @@ #include "src/cpp/ext/filters/census/context.h" +#include + #include #include "opencensus/tags/context_util.h" #include "opencensus/tags/tag_map.h" #include "opencensus/trace/context_util.h" #include "opencensus/trace/propagation/grpc_trace_bin.h" - -#include - #include "src/core/lib/transport/transport.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" #include "src/cpp/ext/filters/census/rpc_encoding.h" diff --git a/src/cpp/ext/filters/census/context.h b/src/cpp/ext/filters/census/context.h index 503823a427e..fcee9407139 100644 --- a/src/cpp/ext/filters/census/context.h +++ b/src/cpp/ext/filters/census/context.h @@ -19,6 +19,11 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CONTEXT_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_CONTEXT_H +#include +#include +#include +#include +#include #include #include @@ -26,13 +31,6 @@ #include "absl/strings/strip.h" #include "opencensus/trace/span.h" #include "opencensus/trace/span_context.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/slice/slice.h" diff --git a/src/cpp/ext/filters/census/grpc_plugin.cc b/src/cpp/ext/filters/census/grpc_plugin.cc index f41d6d687e8..cb407b21cdb 100644 --- a/src/cpp/ext/filters/census/grpc_plugin.cc +++ b/src/cpp/ext/filters/census/grpc_plugin.cc @@ -18,17 +18,16 @@ #include "src/cpp/ext/filters/census/grpc_plugin.h" +#include +#include +#include + #include #include "absl/base/attributes.h" #include "absl/strings/string_view.h" #include "opencensus/tags/tag_key.h" #include "opencensus/trace/span.h" - -#include -#include -#include - #include "src/core/ext/filters/logging/logging_filter.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/surface/channel_stack_type.h" diff --git a/src/cpp/ext/filters/census/grpc_plugin.h b/src/cpp/ext/filters/census/grpc_plugin.h index 553857c96b7..af647d33af1 100644 --- a/src/cpp/ext/filters/census/grpc_plugin.h +++ b/src/cpp/ext/filters/census/grpc_plugin.h @@ -19,6 +19,9 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_GRPC_PLUGIN_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_GRPC_PLUGIN_H +#include +#include + #include #include #include @@ -30,9 +33,6 @@ #include "opencensus/tags/tag_key.h" #include "opencensus/tags/tag_map.h" -#include -#include - namespace grpc { // The following using declarations have been added to prevent breaking users diff --git a/src/cpp/ext/filters/census/measures.cc b/src/cpp/ext/filters/census/measures.cc index 5710d04dc6e..c5f0d973d6e 100644 --- a/src/cpp/ext/filters/census/measures.cc +++ b/src/cpp/ext/filters/census/measures.cc @@ -18,11 +18,10 @@ #include "src/cpp/ext/filters/census/measures.h" -#include "opencensus/stats/stats.h" - #include #include +#include "opencensus/stats/stats.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" namespace grpc { diff --git a/src/cpp/ext/filters/census/measures.h b/src/cpp/ext/filters/census/measures.h index 78a58c6732a..5d0f39022c5 100644 --- a/src/cpp/ext/filters/census/measures.h +++ b/src/cpp/ext/filters/census/measures.h @@ -19,10 +19,10 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_MEASURES_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_MEASURES_H -#include "opencensus/stats/stats.h" - #include +#include "opencensus/stats/stats.h" + namespace grpc { ::opencensus::stats::MeasureInt64 RpcClientSentMessagesPerRpc(); diff --git a/src/cpp/ext/filters/census/open_census_call_tracer.h b/src/cpp/ext/filters/census/open_census_call_tracer.h index 2b98d4cb861..6b50bc0c756 100644 --- a/src/cpp/ext/filters/census/open_census_call_tracer.h +++ b/src/cpp/ext/filters/census/open_census_call_tracer.h @@ -19,6 +19,9 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_OPEN_CENSUS_CALL_TRACER_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_OPEN_CENSUS_CALL_TRACER_H +#include +#include +#include #include #include @@ -33,11 +36,6 @@ #include "opencensus/trace/span_context.h" #include "opencensus/trace/span_id.h" #include "opencensus/trace/trace_id.h" - -#include -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" diff --git a/src/cpp/ext/filters/census/rpc_encoding.h b/src/cpp/ext/filters/census/rpc_encoding.h index a42b4d8c9e6..ad474d81e1b 100644 --- a/src/cpp/ext/filters/census/rpc_encoding.h +++ b/src/cpp/ext/filters/census/rpc_encoding.h @@ -19,14 +19,13 @@ #ifndef GRPC_SRC_CPP_EXT_FILTERS_CENSUS_RPC_ENCODING_H #define GRPC_SRC_CPP_EXT_FILTERS_CENSUS_RPC_ENCODING_H +#include #include #include #include "absl/base/internal/endian.h" #include "absl/strings/string_view.h" -#include - namespace grpc { namespace internal { diff --git a/src/cpp/ext/filters/census/server_call_tracer.cc b/src/cpp/ext/filters/census/server_call_tracer.cc index e98b21ec0bc..bb6fb57f793 100644 --- a/src/cpp/ext/filters/census/server_call_tracer.cc +++ b/src/cpp/ext/filters/census/server_call_tracer.cc @@ -18,6 +18,9 @@ #include "src/cpp/ext/filters/census/server_call_tracer.h" +#include +#include +#include #include #include @@ -40,11 +43,6 @@ #include "opencensus/trace/span_context.h" #include "opencensus/trace/span_id.h" #include "opencensus/trace/trace_id.h" - -#include -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/arena.h" diff --git a/src/cpp/ext/filters/census/views.cc b/src/cpp/ext/filters/census/views.cc index 068c9089413..3fa27ff57a6 100644 --- a/src/cpp/ext/filters/census/views.cc +++ b/src/cpp/ext/filters/census/views.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/time/time.h" #include "opencensus/stats/stats.h" - -#include -#include - #include "src/cpp/ext/filters/census/grpc_plugin.h" namespace grpc { diff --git a/src/cpp/ext/gcp/environment_autodetect.cc b/src/cpp/ext/gcp/environment_autodetect.cc index 77f74608ee3..98365f3164f 100644 --- a/src/cpp/ext/gcp/environment_autodetect.cc +++ b/src/cpp/ext/gcp/environment_autodetect.cc @@ -18,6 +18,11 @@ #include "src/cpp/ext/gcp/environment_autodetect.h" +#include +#include +#include +#include + #include #include @@ -27,12 +32,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/closure.h" diff --git a/src/cpp/ext/gcp/environment_autodetect.h b/src/cpp/ext/gcp/environment_autodetect.h index b45eb9ed2c1..21ccfdf47a7 100644 --- a/src/cpp/ext/gcp/environment_autodetect.h +++ b/src/cpp/ext/gcp/environment_autodetect.h @@ -17,6 +17,9 @@ #ifndef GRPC_SRC_CPP_EXT_GCP_ENVIRONMENT_AUTODETECT_H #define GRPC_SRC_CPP_EXT_GCP_ENVIRONMENT_AUTODETECT_H +#include +#include + #include #include #include @@ -25,10 +28,6 @@ #include "absl/base/thread_annotations.h" #include "absl/functional/any_invocable.h" #include "absl/status/status.h" - -#include -#include - #include "src/core/util/sync.h" namespace grpc { diff --git a/src/cpp/ext/gcp/observability.cc b/src/cpp/ext/gcp/observability.cc index ef508c89dd9..ba60e112724 100644 --- a/src/cpp/ext/gcp/observability.cc +++ b/src/cpp/ext/gcp/observability.cc @@ -14,6 +14,13 @@ // limitations under the License. // +#include +#include +#include +#include +#include +#include +#include #include #include @@ -37,15 +44,6 @@ #include "opencensus/stats/stats.h" #include "opencensus/trace/sampler.h" #include "opencensus/trace/trace_config.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/ext/filters/logging/logging_filter.h" #include "src/core/util/crash.h" #include "src/core/util/notification.h" diff --git a/src/cpp/ext/gcp/observability_config.cc b/src/cpp/ext/gcp/observability_config.cc index f6ffcf94d6a..64246249f01 100644 --- a/src/cpp/ext/gcp/observability_config.cc +++ b/src/cpp/ext/gcp/observability_config.cc @@ -16,6 +16,9 @@ #include "src/cpp/ext/gcp/observability_config.h" +#include +#include +#include #include #include @@ -27,11 +30,6 @@ #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/error_utils.h" diff --git a/src/cpp/ext/gcp/observability_config.h b/src/cpp/ext/gcp/observability_config.h index 5fb18f3fae6..bc7d347a6e8 100644 --- a/src/cpp/ext/gcp/observability_config.h +++ b/src/cpp/ext/gcp/observability_config.h @@ -17,6 +17,7 @@ #ifndef GRPC_SRC_CPP_EXT_GCP_OBSERVABILITY_CONFIG_H #define GRPC_SRC_CPP_EXT_GCP_OBSERVABILITY_CONFIG_H +#include #include #include @@ -26,9 +27,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" diff --git a/src/cpp/ext/gcp/observability_logging_sink.cc b/src/cpp/ext/gcp/observability_logging_sink.cc index 0a370d87606..302cbc7be4d 100644 --- a/src/cpp/ext/gcp/observability_logging_sink.cc +++ b/src/cpp/ext/gcp/observability_logging_sink.cc @@ -18,6 +18,14 @@ #include "src/cpp/ext/gcp/observability_logging_sink.h" +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -33,15 +41,6 @@ #include "google/logging/v2/logging.grpc.pb.h" #include "google/logging/v2/logging.pb.h" #include "google/protobuf/text_format.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/util/env.h" #include "src/core/util/json/json.h" diff --git a/src/cpp/ext/gcp/observability_logging_sink.h b/src/cpp/ext/gcp/observability_logging_sink.h index f4703721f3d..a61765118c2 100644 --- a/src/cpp/ext/gcp/observability_logging_sink.h +++ b/src/cpp/ext/gcp/observability_logging_sink.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CPP_EXT_GCP_OBSERVABILITY_LOGGING_SINK_H #define GRPC_SRC_CPP_EXT_GCP_OBSERVABILITY_LOGGING_SINK_H +#include +#include #include #include @@ -30,10 +32,6 @@ #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" #include "google/logging/v2/logging.grpc.pb.h" - -#include -#include - #include "src/core/ext/filters/logging/logging_sink.h" #include "src/core/util/sync.h" #include "src/cpp/ext/gcp/environment_autodetect.h" diff --git a/src/cpp/ext/otel/key_value_iterable.h b/src/cpp/ext/otel/key_value_iterable.h index caad77aee36..b3d8d7d747f 100644 --- a/src/cpp/ext/otel/key_value_iterable.h +++ b/src/cpp/ext/otel/key_value_iterable.h @@ -19,6 +19,7 @@ #ifndef GRPC_SRC_CPP_EXT_OTEL_KEY_VALUE_ITERABLE_H #define GRPC_SRC_CPP_EXT_OTEL_KEY_VALUE_ITERABLE_H +#include #include #include @@ -31,9 +32,6 @@ #include "opentelemetry/common/key_value_iterable.h" #include "opentelemetry/nostd/function_ref.h" #include "opentelemetry/nostd/string_view.h" - -#include - #include "src/cpp/ext/otel/otel_plugin.h" namespace grpc { diff --git a/src/cpp/ext/otel/otel_client_call_tracer.cc b/src/cpp/ext/otel/otel_client_call_tracer.cc index 88750fca3e3..bf5b3aba61f 100644 --- a/src/cpp/ext/otel/otel_client_call_tracer.cc +++ b/src/cpp/ext/otel/otel_client_call_tracer.cc @@ -18,6 +18,9 @@ #include "src/cpp/ext/otel/otel_client_call_tracer.h" +#include +#include +#include #include #include @@ -38,11 +41,6 @@ #include "absl/types/span.h" #include "opentelemetry/context/context.h" #include "opentelemetry/metrics/sync_instruments.h" - -#include -#include -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/status_util.h" diff --git a/src/cpp/ext/otel/otel_client_call_tracer.h b/src/cpp/ext/otel/otel_client_call_tracer.h index c94219f2152..e489c7fa5f3 100644 --- a/src/cpp/ext/otel/otel_client_call_tracer.h +++ b/src/cpp/ext/otel/otel_client_call_tracer.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CPP_EXT_OTEL_OTEL_CLIENT_CALL_TRACER_H #define GRPC_SRC_CPP_EXT_OTEL_OTEL_CLIENT_CALL_TRACER_H +#include +#include #include #include @@ -28,10 +30,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/time/time.h" - -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" diff --git a/src/cpp/ext/otel/otel_plugin.cc b/src/cpp/ext/otel/otel_plugin.cc index 7f71ec517f6..c55c4584358 100644 --- a/src/cpp/ext/otel/otel_plugin.cc +++ b/src/cpp/ext/otel/otel_plugin.cc @@ -18,6 +18,10 @@ #include "src/cpp/ext/otel/otel_plugin.h" +#include +#include +#include + #include #include #include @@ -29,11 +33,6 @@ #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/nostd/unique_ptr.h" #include "opentelemetry/nostd/variant.h" - -#include -#include -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/src/cpp/ext/otel/otel_plugin.h b/src/cpp/ext/otel/otel_plugin.h index 9b0c4328673..2199596ed62 100644 --- a/src/cpp/ext/otel/otel_plugin.h +++ b/src/cpp/ext/otel/otel_plugin.h @@ -19,6 +19,9 @@ #ifndef GRPC_SRC_CPP_EXT_OTEL_OTEL_PLUGIN_H #define GRPC_SRC_CPP_EXT_OTEL_OTEL_PLUGIN_H +#include +#include +#include #include #include @@ -37,11 +40,6 @@ #include "opentelemetry/metrics/observer_result.h" #include "opentelemetry/metrics/sync_instruments.h" #include "opentelemetry/nostd/shared_ptr.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/telemetry/metrics.h" diff --git a/src/cpp/ext/otel/otel_server_call_tracer.cc b/src/cpp/ext/otel/otel_server_call_tracer.cc index 6fd4785672d..0e5d42febad 100644 --- a/src/cpp/ext/otel/otel_server_call_tracer.cc +++ b/src/cpp/ext/otel/otel_server_call_tracer.cc @@ -18,6 +18,8 @@ #include "src/cpp/ext/otel/otel_server_call_tracer.h" +#include + #include #include #include @@ -32,9 +34,6 @@ #include "absl/types/span.h" #include "opentelemetry/context/context.h" #include "opentelemetry/metrics/sync_instruments.h" - -#include - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/experiments/experiments.h" diff --git a/src/cpp/ext/otel/otel_server_call_tracer.h b/src/cpp/ext/otel/otel_server_call_tracer.h index 9d13d669b6d..b4f32f6ae84 100644 --- a/src/cpp/ext/otel/otel_server_call_tracer.h +++ b/src/cpp/ext/otel/otel_server_call_tracer.h @@ -19,10 +19,9 @@ #ifndef GRPC_SRC_CPP_EXT_OTEL_OTEL_SERVER_CALL_TRACER_H #define GRPC_SRC_CPP_EXT_OTEL_OTEL_SERVER_CALL_TRACER_H -#include "absl/strings/strip.h" - #include +#include "absl/strings/strip.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/telemetry/call_tracer.h" #include "src/cpp/ext/otel/otel_plugin.h" diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc index 95a30d892a9..075fc72ef3c 100644 --- a/src/cpp/ext/proto_server_reflection.cc +++ b/src/cpp/ext/proto_server_reflection.cc @@ -18,13 +18,13 @@ #include "src/cpp/ext/proto_server_reflection.h" -#include -#include - #include #include #include +#include +#include + // IWYU pragma: no_include "google/protobuf/descriptor.h" // IWYU pragma: no_include // IWYU pragma: no_include "src/proto/grpc/reflection/v1/reflection.pb.h" diff --git a/src/cpp/ext/proto_server_reflection.h b/src/cpp/ext/proto_server_reflection.h index 989e0bd3e23..9f1ba787ff0 100644 --- a/src/cpp/ext/proto_server_reflection.h +++ b/src/cpp/ext/proto_server_reflection.h @@ -19,18 +19,18 @@ #ifndef GRPC_SRC_CPP_EXT_PROTO_SERVER_REFLECTION_H #define GRPC_SRC_CPP_EXT_PROTO_SERVER_REFLECTION_H -#include -#include -#include -#include -#include - #include #include #include #include #include +#include +#include +#include +#include +#include + #include "src/proto/grpc/reflection/v1/reflection.grpc.pb.h" #include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h" diff --git a/src/cpp/ext/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc index 4299884055d..d880fc127a1 100644 --- a/src/cpp/ext/proto_server_reflection_plugin.cc +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -16,14 +16,14 @@ // // -#include -#include - #include #include #include #include +#include +#include + #include "src/core/lib/config/config_vars.h" #include "src/cpp/ext/proto_server_reflection.h" diff --git a/src/cpp/server/authorization_policy_provider.cc b/src/cpp/server/authorization_policy_provider.cc index bc34cdf44f8..efd67c7d968 100644 --- a/src/cpp/server/authorization_policy_provider.cc +++ b/src/cpp/server/authorization_policy_provider.cc @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include - #include #include #include #include #include +#include +#include + namespace grpc { namespace experimental { diff --git a/src/cpp/server/backend_metric_recorder.cc b/src/cpp/server/backend_metric_recorder.cc index 40a19f3a72f..6670878c7c2 100644 --- a/src/cpp/server/backend_metric_recorder.cc +++ b/src/cpp/server/backend_metric_recorder.cc @@ -16,6 +16,8 @@ #include "src/cpp/server/backend_metric_recorder.h" +#include +#include #include #include @@ -25,10 +27,6 @@ #include #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/load_balancing/backend_metric_data.h" diff --git a/src/cpp/server/backend_metric_recorder.h b/src/cpp/server/backend_metric_recorder.h index 0863d2b6a31..a556cb9b57f 100644 --- a/src/cpp/server/backend_metric_recorder.h +++ b/src/cpp/server/backend_metric_recorder.h @@ -19,6 +19,10 @@ #ifndef GRPC_SRC_CPP_SERVER_BACKEND_METRIC_RECORDER_H #define GRPC_SRC_CPP_SERVER_BACKEND_METRIC_RECORDER_H +#include +#include +#include +#include #include #include @@ -26,12 +30,6 @@ #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include - #include "src/core/ext/filters/backend_metrics/backend_metric_provider.h" #include "src/core/load_balancing/backend_metric_data.h" diff --git a/src/cpp/server/channel_argument_option.cc b/src/cpp/server/channel_argument_option.cc index 8ddad683cfd..957f99f79ed 100644 --- a/src/cpp/server/channel_argument_option.cc +++ b/src/cpp/server/channel_argument_option.cc @@ -16,15 +16,15 @@ // // -#include -#include -#include - #include #include #include #include +#include +#include +#include + namespace grpc { std::unique_ptr MakeChannelArgumentOption( diff --git a/src/cpp/server/channelz/channelz_service.cc b/src/cpp/server/channelz/channelz_service.cc index 5b9b2ff2553..3d2dbfe089f 100644 --- a/src/cpp/server/channelz/channelz_service.cc +++ b/src/cpp/server/channelz/channelz_service.cc @@ -18,12 +18,12 @@ #include "src/cpp/server/channelz/channelz_service.h" -#include - #include #include #include +#include + // IWYU pragma: no_include "google/protobuf/json/json.h" // IWYU pragma: no_include "google/protobuf/util/json_util.h" diff --git a/src/cpp/server/channelz/channelz_service_plugin.cc b/src/cpp/server/channelz/channelz_service_plugin.cc index a3d842ca145..e69b707e7bf 100644 --- a/src/cpp/server/channelz/channelz_service_plugin.cc +++ b/src/cpp/server/channelz/channelz_service_plugin.cc @@ -16,15 +16,15 @@ // // -#include -#include - #include #include #include #include #include +#include +#include + #include "src/cpp/server/channelz/channelz_service.h" namespace grpc { diff --git a/src/cpp/server/csds/csds.cc b/src/cpp/server/csds/csds.cc index d82d2b381c6..bda3a3e0112 100644 --- a/src/cpp/server/csds/csds.cc +++ b/src/cpp/server/csds/csds.cc @@ -18,17 +18,17 @@ #include "src/cpp/server/csds/csds.h" +#include +#include +#include +#include + #include #include #include "absl/status/status.h" #include "absl/status/statusor.h" -#include -#include -#include -#include - namespace grpc { namespace xds { namespace experimental { diff --git a/src/cpp/server/dynamic_thread_pool.h b/src/cpp/server/dynamic_thread_pool.h index 30da5d1de52..90be3414c7f 100644 --- a/src/cpp/server/dynamic_thread_pool.h +++ b/src/cpp/server/dynamic_thread_pool.h @@ -19,11 +19,11 @@ #ifndef GRPC_SRC_CPP_SERVER_DYNAMIC_THREAD_POOL_H #define GRPC_SRC_CPP_SERVER_DYNAMIC_THREAD_POOL_H +#include + #include #include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/cpp/server/thread_pool_interface.h" diff --git a/src/cpp/server/external_connection_acceptor_impl.cc b/src/cpp/server/external_connection_acceptor_impl.cc index 208ac0a37f2..5623dbfa36c 100644 --- a/src/cpp/server/external_connection_acceptor_impl.cc +++ b/src/cpp/server/external_connection_acceptor_impl.cc @@ -18,16 +18,16 @@ #include "src/cpp/server/external_connection_acceptor_impl.h" +#include +#include +#include + #include #include #include "absl/log/check.h" #include "absl/log/log.h" -#include -#include -#include - namespace grpc { namespace internal { namespace { diff --git a/src/cpp/server/external_connection_acceptor_impl.h b/src/cpp/server/external_connection_acceptor_impl.h index 3e23eb8a0c0..2ff036fe9ec 100644 --- a/src/cpp/server/external_connection_acceptor_impl.h +++ b/src/cpp/server/external_connection_acceptor_impl.h @@ -19,13 +19,13 @@ #ifndef GRPC_SRC_CPP_SERVER_EXTERNAL_CONNECTION_ACCEPTOR_IMPL_H #define GRPC_SRC_CPP_SERVER_EXTERNAL_CONNECTION_ACCEPTOR_IMPL_H -#include -#include - #include #include #include +#include +#include + #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/util/sync.h" diff --git a/src/cpp/server/health/default_health_check_service.cc b/src/cpp/server/health/default_health_check_service.cc index 179bdf7a2ed..bb86083bb54 100644 --- a/src/cpp/server/health/default_health_check_service.cc +++ b/src/cpp/server/health/default_health_check_service.cc @@ -18,6 +18,11 @@ #include "src/cpp/server/health/default_health_check_service.h" +#include +#include +#include +#include +#include #include #include @@ -25,17 +30,10 @@ #include "absl/log/check.h" #include "absl/log/log.h" +#include "src/proto/grpc/health/v1/health.upb.h" #include "upb/base/string_view.h" #include "upb/mem/arena.hpp" -#include -#include -#include -#include -#include - -#include "src/proto/grpc/health/v1/health.upb.h" - #define MAX_SERVICE_NAME_LENGTH 200 namespace grpc { diff --git a/src/cpp/server/health/default_health_check_service.h b/src/cpp/server/health/default_health_check_service.h index 042b057b08f..3a12f66f3a6 100644 --- a/src/cpp/server/health/default_health_check_service.h +++ b/src/cpp/server/health/default_health_check_service.h @@ -19,14 +19,6 @@ #ifndef GRPC_SRC_CPP_SERVER_HEALTH_DEFAULT_HEALTH_CHECK_SERVICE_H #define GRPC_SRC_CPP_SERVER_HEALTH_DEFAULT_HEALTH_CHECK_SERVICE_H -#include - -#include -#include -#include - -#include "absl/base/thread_annotations.h" - #include #include #include @@ -34,7 +26,13 @@ #include #include #include +#include +#include +#include +#include + +#include "absl/base/thread_annotations.h" #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/cpp/server/health/health_check_service_server_builder_option.cc b/src/cpp/server/health/health_check_service_server_builder_option.cc index c4eac98b470..d353c9c4129 100644 --- a/src/cpp/server/health/health_check_service_server_builder_option.cc +++ b/src/cpp/server/health/health_check_service_server_builder_option.cc @@ -16,15 +16,15 @@ // // -#include -#include -#include - #include #include #include #include +#include +#include +#include + namespace grpc { HealthCheckServiceServerBuilderOption::HealthCheckServiceServerBuilderOption( diff --git a/src/cpp/server/insecure_server_credentials.cc b/src/cpp/server/insecure_server_credentials.cc index a48b9cb93c7..3636fc057c8 100644 --- a/src/cpp/server/insecure_server_credentials.cc +++ b/src/cpp/server/insecure_server_credentials.cc @@ -16,13 +16,13 @@ // // -#include - #include #include #include #include +#include + namespace grpc { namespace { class InsecureServerCredentialsImpl final : public ServerCredentials { diff --git a/src/cpp/server/load_reporter/constants.h b/src/cpp/server/load_reporter/constants.h index 13b29946441..840a53b9c14 100644 --- a/src/cpp/server/load_reporter/constants.h +++ b/src/cpp/server/load_reporter/constants.h @@ -19,11 +19,10 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_CONSTANTS_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_CONSTANTS_H +#include #include #include -#include - namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/get_cpu_stats.h b/src/cpp/server/load_reporter/get_cpu_stats.h index 76d91ede495..876202cc148 100644 --- a/src/cpp/server/load_reporter/get_cpu_stats.h +++ b/src/cpp/server/load_reporter/get_cpu_stats.h @@ -19,12 +19,11 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_GET_CPU_STATS_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_GET_CPU_STATS_H +#include #include #include -#include - namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/get_cpu_stats_linux.cc b/src/cpp/server/load_reporter/get_cpu_stats_linux.cc index 4742481c373..ee2fa144c16 100644 --- a/src/cpp/server/load_reporter/get_cpu_stats_linux.cc +++ b/src/cpp/server/load_reporter/get_cpu_stats_linux.cc @@ -16,10 +16,10 @@ // // -#include - #include +#include + #ifdef GPR_LINUX #include diff --git a/src/cpp/server/load_reporter/get_cpu_stats_unsupported.cc b/src/cpp/server/load_reporter/get_cpu_stats_unsupported.cc index debc4a556b6..70b8c0851e3 100644 --- a/src/cpp/server/load_reporter/get_cpu_stats_unsupported.cc +++ b/src/cpp/server/load_reporter/get_cpu_stats_unsupported.cc @@ -21,7 +21,6 @@ #if !defined(GPR_LINUX) && !defined(GPR_WINDOWS) && !defined(GPR_APPLE) #include "absl/log/log.h" - #include "src/core/util/crash.h" #include "src/cpp/server/load_reporter/get_cpu_stats.h" diff --git a/src/cpp/server/load_reporter/load_data_store.cc b/src/cpp/server/load_reporter/load_data_store.cc index 649c073efe1..5faa03a4fad 100644 --- a/src/cpp/server/load_reporter/load_data_store.cc +++ b/src/cpp/server/load_reporter/load_data_store.cc @@ -18,6 +18,7 @@ #include "src/cpp/server/load_reporter/load_data_store.h" +#include #include #include @@ -28,9 +29,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/iomgr/socket_utils.h" #include "src/cpp/server/load_reporter/constants.h" diff --git a/src/cpp/server/load_reporter/load_data_store.h b/src/cpp/server/load_reporter/load_data_store.h index efb102c0909..e27b64ce2e7 100644 --- a/src/cpp/server/load_reporter/load_data_store.h +++ b/src/cpp/server/load_reporter/load_data_store.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H +#include +#include #include #include @@ -28,9 +30,6 @@ #include #include -#include -#include - namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/load_reporter.cc b/src/cpp/server/load_reporter/load_reporter.cc index 6af88e8ba7f..c2aae6635fc 100644 --- a/src/cpp/server/load_reporter/load_reporter.cc +++ b/src/cpp/server/load_reporter/load_reporter.cc @@ -18,6 +18,7 @@ #include "src/cpp/server/load_reporter/load_reporter.h" +#include #include #include @@ -30,9 +31,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "opencensus/tags/tag_key.h" - -#include - #include "src/cpp/server/load_reporter/constants.h" #include "src/cpp/server/load_reporter/get_cpu_stats.h" diff --git a/src/cpp/server/load_reporter/load_reporter.h b/src/cpp/server/load_reporter/load_reporter.h index 4b08ca05bfc..b0123724b6a 100644 --- a/src/cpp/server/load_reporter/load_reporter.h +++ b/src/cpp/server/load_reporter/load_reporter.h @@ -19,6 +19,8 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTER_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTER_H +#include +#include #include #include @@ -31,13 +33,8 @@ #include #include -#include - #include "opencensus/stats/stats.h" #include "opencensus/tags/tag_key.h" - -#include - #include "src/core/util/sync.h" #include "src/cpp/server/load_reporter/load_data_store.h" #include "src/proto/grpc/lb/v1/load_reporter.grpc.pb.h" diff --git a/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc b/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc index fc452fc8ced..6b0adc5b254 100644 --- a/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc +++ b/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc @@ -18,17 +18,14 @@ #include "src/cpp/server/load_reporter/load_reporter_async_service_impl.h" -#include - #include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/cpp/server/load_reporter/constants.h" // IWYU pragma: no_include "google/protobuf/duration.pb.h" diff --git a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h index 80210b4af7d..e5597a38188 100644 --- a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h +++ b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h @@ -19,6 +19,11 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTER_ASYNC_SERVICE_IMPL_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTER_ASYNC_SERVICE_IMPL_H +#include +#include +#include +#include +#include #include #include @@ -28,13 +33,6 @@ #include #include "absl/log/check.h" - -#include -#include -#include -#include -#include - #include "src/core/util/sync.h" #include "src/core/util/thd.h" #include "src/cpp/server/load_reporter/load_reporter.h" diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc b/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc index ec1926beb1a..665a63fbf9d 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc @@ -16,16 +16,16 @@ // // -#include -#include -#include - #include #include #include #include #include +#include +#include +#include + #include "src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h" namespace grpc { diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc index 766386178ed..248145aa311 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.cc @@ -18,12 +18,12 @@ #include "src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h" -#include - #include #include #include +#include + namespace grpc { namespace load_reporter { diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h index c1370ec348e..7492fe22d6d 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h @@ -19,15 +19,15 @@ #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTING_SERVICE_SERVER_BUILDER_PLUGIN_H #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_REPORTING_SERVICE_SERVER_BUILDER_PLUGIN_H -#include -#include - #include #include #include #include #include +#include +#include + #include "src/cpp/server/load_reporter/load_reporter_async_service_impl.h" namespace grpc { diff --git a/src/cpp/server/load_reporter/util.cc b/src/cpp/server/load_reporter/util.cc index 043d4ebb480..4d2ddc9c42c 100644 --- a/src/cpp/server/load_reporter/util.cc +++ b/src/cpp/server/load_reporter/util.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include +#include #include #include @@ -23,11 +27,6 @@ #include "absl/log/log.h" -#include -#include -#include -#include - namespace grpc { namespace load_reporter { namespace experimental { diff --git a/src/cpp/server/orca/orca_service.cc b/src/cpp/server/orca/orca_service.cc index 45829844e8f..6d5175d87e4 100644 --- a/src/cpp/server/orca/orca_service.cc +++ b/src/cpp/server/orca/orca_service.cc @@ -14,23 +14,6 @@ // limitations under the License. // -#include - -#include -#include -#include - -#include "absl/base/thread_annotations.h" -#include "absl/log/check.h" -#include "absl/strings/string_view.h" -#include "absl/time/time.h" -#include "absl/types/optional.h" -#include "google/protobuf/duration.upb.h" -#include "upb/base/string_view.h" -#include "upb/mem/arena.hpp" -#include "xds/data/orca/v3/orca_load_report.upb.h" -#include "xds/service/orca/v3/orca.upb.h" - #include #include #include @@ -43,7 +26,18 @@ #include #include #include +#include + +#include +#include +#include +#include "absl/base/thread_annotations.h" +#include "absl/log/check.h" +#include "absl/strings/string_view.h" +#include "absl/time/time.h" +#include "absl/types/optional.h" +#include "google/protobuf/duration.upb.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/load_balancing/backend_metric_data.h" @@ -52,6 +46,10 @@ #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/time.h" #include "src/cpp/server/backend_metric_recorder.h" +#include "upb/base/string_view.h" +#include "upb/mem/arena.hpp" +#include "xds/data/orca/v3/orca_load_report.upb.h" +#include "xds/service/orca/v3/orca.upb.h" namespace grpc { namespace experimental { diff --git a/src/cpp/server/secure_server_credentials.cc b/src/cpp/server/secure_server_credentials.cc index 4a68e8e33c2..a522a9fdcdd 100644 --- a/src/cpp/server/secure_server_credentials.cc +++ b/src/cpp/server/secure_server_credentials.cc @@ -18,10 +18,6 @@ #include "src/cpp/server/secure_server_credentials.h" -#include -#include -#include - #include #include #include @@ -30,6 +26,10 @@ #include #include +#include +#include +#include + #include "src/cpp/common/secure_auth_context.h" namespace grpc { diff --git a/src/cpp/server/secure_server_credentials.h b/src/cpp/server/secure_server_credentials.h index 3167b257a4b..cb1b9927f77 100644 --- a/src/cpp/server/secure_server_credentials.h +++ b/src/cpp/server/secure_server_credentials.h @@ -19,13 +19,13 @@ #ifndef GRPC_SRC_CPP_SERVER_SECURE_SERVER_CREDENTIALS_H #define GRPC_SRC_CPP_SERVER_SECURE_SERVER_CREDENTIALS_H -#include - #include #include #include #include +#include + #include "src/cpp/server/thread_pool_interface.h" namespace grpc { diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index b20aa88113c..1e611449931 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -16,18 +16,6 @@ // // -#include -#include - -#include -#include -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -47,7 +35,17 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/ext/transport/chttp2/server/chttp2_server.h" #include "src/core/server/server.h" #include "src/core/util/string.h" diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc index 8996e78b4d8..49cb31dcb48 100644 --- a/src/cpp/server/server_cc.cc +++ b/src/cpp/server/server_cc.cc @@ -15,24 +15,6 @@ // // -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/status/status.h" - #include #include #include @@ -67,7 +49,23 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/status.h" #include "src/core/ext/transport/inproc/inproc_transport.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index ed1080aeaf6..ca8e3a4728f 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -17,22 +17,6 @@ // #include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/strings/str_format.h" -#include "absl/strings/string_view.h" - #include #include #include @@ -56,6 +40,20 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/str_format.h" +#include "absl/strings/string_view.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/surface/call.h" #include "src/core/util/crash.h" diff --git a/src/cpp/server/xds_server_credentials.cc b/src/cpp/server/xds_server_credentials.cc index df05e254d45..6ce2d70570b 100644 --- a/src/cpp/server/xds_server_credentials.cc +++ b/src/cpp/server/xds_server_credentials.cc @@ -16,14 +16,14 @@ // // -#include - -#include "absl/log/check.h" - #include #include #include +#include + +#include "absl/log/check.h" + namespace grpc { std::shared_ptr XdsServerCredentials( diff --git a/src/cpp/thread_manager/thread_manager.cc b/src/cpp/thread_manager/thread_manager.cc index 3128e1c6f41..6cdf78c95bc 100644 --- a/src/cpp/thread_manager/thread_manager.cc +++ b/src/cpp/thread_manager/thread_manager.cc @@ -23,7 +23,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/crash.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/src/cpp/util/byte_buffer_cc.cc b/src/cpp/util/byte_buffer_cc.cc index 687df553505..939e38d19e4 100644 --- a/src/cpp/util/byte_buffer_cc.cc +++ b/src/cpp/util/byte_buffer_cc.cc @@ -16,9 +16,6 @@ // // -#include -#include - #include #include #include @@ -28,6 +25,9 @@ #include #include +#include +#include + namespace grpc { Status ByteBuffer::TrySingleSlice(Slice* slice) const { diff --git a/src/cpp/util/status.cc b/src/cpp/util/status.cc index 3fcaebf8ad0..7d2bdd5566d 100644 --- a/src/cpp/util/status.cc +++ b/src/cpp/util/status.cc @@ -16,10 +16,10 @@ // // -#include - #include +#include + namespace grpc { const Status& Status::OK = Status(); diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc index 67b2e018a6f..ed60bc6683c 100644 --- a/src/cpp/util/string_ref.cc +++ b/src/cpp/util/string_ref.cc @@ -16,9 +16,8 @@ // // -#include - #include +#include namespace grpc { diff --git a/src/cpp/util/time_cc.cc b/src/cpp/util/time_cc.cc index 458a0e0cf75..64e164a020c 100644 --- a/src/cpp/util/time_cc.cc +++ b/src/cpp/util/time_cc.cc @@ -16,12 +16,12 @@ // // -#include -#include - #include #include +#include +#include + // IWYU pragma: no_include using std::chrono::duration_cast; diff --git a/src/objective-c/tests/CppCronetTests/TestHelper.h b/src/objective-c/tests/CppCronetTests/TestHelper.h index 738161918ed..886c696eca2 100644 --- a/src/objective-c/tests/CppCronetTests/TestHelper.h +++ b/src/objective-c/tests/CppCronetTests/TestHelper.h @@ -20,15 +20,14 @@ #define GRPC_TEST_CPP_IOS_CRONETTESTS_TESTHELPER_H #import - -#import -#import - #import #import #import #import +#import +#import + #import "src/proto/grpc/testing/echo.grpc.pb.h" const char* const kServerFinishAfterNReads = "server_finish_after_n_reads"; diff --git a/src/python/grpcio_observability/grpc_observability/client_call_tracer.cc b/src/python/grpcio_observability/grpc_observability/client_call_tracer.cc index 21c6521f922..66b83488752 100644 --- a/src/python/grpcio_observability/grpc_observability/client_call_tracer.cc +++ b/src/python/grpcio_observability/grpc_observability/client_call_tracer.cc @@ -14,6 +14,7 @@ #include "client_call_tracer.h" +#include #include #include @@ -25,9 +26,6 @@ #include "metadata_exchange.h" #include "observability_util.h" #include "python_observability_context.h" - -#include - #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/slice/slice.h" diff --git a/src/python/grpcio_observability/grpc_observability/client_call_tracer.h b/src/python/grpcio_observability/grpc_observability/client_call_tracer.h index bb1b97813f5..34d7196ba74 100644 --- a/src/python/grpcio_observability/grpc_observability/client_call_tracer.h +++ b/src/python/grpcio_observability/grpc_observability/client_call_tracer.h @@ -15,6 +15,7 @@ #ifndef GRPC_PYTHON_OPENCENSUS_CLIENT_CALL_TRACER_H #define GRPC_PYTHON_OPENCENSUS_CLIENT_CALL_TRACER_H +#include #include #include @@ -27,9 +28,6 @@ #include "absl/time/time.h" #include "metadata_exchange.h" #include "python_observability_context.h" - -#include - #include "src/core/telemetry/call_tracer.h" namespace grpc_observability { diff --git a/src/python/grpcio_observability/grpc_observability/metadata_exchange.cc b/src/python/grpcio_observability/grpc_observability/metadata_exchange.cc index b11ed1d9386..dae2f5e0edf 100644 --- a/src/python/grpcio_observability/grpc_observability/metadata_exchange.cc +++ b/src/python/grpcio_observability/grpc_observability/metadata_exchange.cc @@ -18,6 +18,7 @@ #include "metadata_exchange.h" +#include #include #include @@ -27,9 +28,6 @@ #include "absl/strings/string_view.h" #include "constants.h" - -#include - #include "src/core/telemetry/call_tracer.h" namespace grpc_observability { diff --git a/src/python/grpcio_observability/grpc_observability/metadata_exchange.h b/src/python/grpcio_observability/grpc_observability/metadata_exchange.h index dd971b6b1e5..592a78179a4 100644 --- a/src/python/grpcio_observability/grpc_observability/metadata_exchange.h +++ b/src/python/grpcio_observability/grpc_observability/metadata_exchange.h @@ -30,7 +30,6 @@ #include "absl/strings/string_view.h" #include "constants.h" #include "python_observability_context.h" - #include "src/core/lib/transport/metadata_batch.h" namespace grpc_observability { diff --git a/src/python/grpcio_observability/grpc_observability/observability_util.h b/src/python/grpcio_observability/grpc_observability/observability_util.h index e86ade06afd..5978e26c49f 100644 --- a/src/python/grpcio_observability/grpc_observability/observability_util.h +++ b/src/python/grpcio_observability/grpc_observability/observability_util.h @@ -15,6 +15,7 @@ #ifndef OBSERVABILITY_MAIN_H #define OBSERVABILITY_MAIN_H +#include #include #include @@ -29,8 +30,6 @@ #include "constants.h" #include "python_observability_context.h" -#include - namespace grpc_observability { struct CensusData { diff --git a/src/python/grpcio_observability/grpc_observability/python_observability_context.cc b/src/python/grpcio_observability/grpc_observability/python_observability_context.cc index 5cc7c41beee..bca2455c87e 100644 --- a/src/python/grpcio_observability/grpc_observability/python_observability_context.cc +++ b/src/python/grpcio_observability/grpc_observability/python_observability_context.cc @@ -24,7 +24,6 @@ #include "absl/random/random.h" #include "absl/strings/escaping.h" #include "rpc_encoding.h" - #include "src/core/lib/transport/transport.h" namespace grpc_observability { diff --git a/src/python/grpcio_observability/grpc_observability/python_observability_context.h b/src/python/grpcio_observability/grpc_observability/python_observability_context.h index 16b05d63128..9c347098933 100644 --- a/src/python/grpcio_observability/grpc_observability/python_observability_context.h +++ b/src/python/grpcio_observability/grpc_observability/python_observability_context.h @@ -15,6 +15,7 @@ #ifndef GRPC_PYTHON_OBSERVABILITY_H #define GRPC_PYTHON_OBSERVABILITY_H +#include #include #include @@ -29,9 +30,6 @@ #include "absl/time/time.h" #include "constants.h" #include "sampler.h" - -#include - #include "src/core/lib/channel/channel_stack.h" namespace grpc_observability { diff --git a/src/python/grpcio_observability/grpc_observability/rpc_encoding.h b/src/python/grpcio_observability/grpc_observability/rpc_encoding.h index 4fd5c94ea46..f73f4b84e18 100644 --- a/src/python/grpcio_observability/grpc_observability/rpc_encoding.h +++ b/src/python/grpcio_observability/grpc_observability/rpc_encoding.h @@ -15,14 +15,13 @@ #ifndef GRPC_PYTHON_OPENCENSUS_RPC_ENCODING_H #define GRPC_PYTHON_OPENCENSUS_RPC_ENCODING_H +#include #include #include #include "absl/base/internal/endian.h" #include "absl/strings/string_view.h" -#include - namespace grpc_observability { // TODO(xuanwn): Reuse c++ rpc_encoding file. diff --git a/src/python/grpcio_observability/grpc_observability/server_call_tracer.cc b/src/python/grpcio_observability/grpc_observability/server_call_tracer.cc index bc19a8e672d..4695758b908 100644 --- a/src/python/grpcio_observability/grpc_observability/server_call_tracer.cc +++ b/src/python/grpcio_observability/grpc_observability/server_call_tracer.cc @@ -14,6 +14,7 @@ #include "server_call_tracer.h" +#include #include #include @@ -32,9 +33,6 @@ #include "constants.h" #include "observability_util.h" #include "python_observability_context.h" - -#include - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/python/grpcio_observability/grpc_observability/server_call_tracer.h b/src/python/grpcio_observability/grpc_observability/server_call_tracer.h index f125b9cca62..ccb4a21bd3b 100644 --- a/src/python/grpcio_observability/grpc_observability/server_call_tracer.h +++ b/src/python/grpcio_observability/grpc_observability/server_call_tracer.h @@ -15,6 +15,8 @@ #ifndef GRPC_PYTHON_OPENCENSUS_SERVER_CALL_TRACER_H #define GRPC_PYTHON_OPENCENSUS_SERVER_CALL_TRACER_H +#include + #include #include "absl/strings/string_view.h" @@ -22,9 +24,6 @@ #include "constants.h" #include "metadata_exchange.h" #include "python_observability_context.h" - -#include - #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" #include "src/core/telemetry/call_tracer.h" diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index ffd95330d2a..f71516f0bf8 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -20,13 +20,13 @@ #include "rb_byte_buffer.h" -#include "rb_grpc.h" -#include "rb_grpc_imports.generated.h" - #include #include #include +#include "rb_grpc.h" +#include "rb_grpc_imports.generated.h" + grpc_byte_buffer* grpc_rb_s_to_byte_buffer(char* string, size_t length) { grpc_slice slice = grpc_slice_from_copied_buffer(string, length); grpc_byte_buffer* buffer = grpc_raw_byte_buffer_create(&slice, 1); diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index 2ef9b6a54f7..0f3b33da801 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -20,17 +20,17 @@ #include "rb_call.h" +#include +#include +#include +#include + #include "rb_byte_buffer.h" #include "rb_call_credentials.h" #include "rb_completion_queue.h" #include "rb_grpc.h" #include "rb_grpc_imports.generated.h" -#include -#include -#include -#include - /* grpc_rb_cCall is the Call class whose instances proxy grpc_call. */ static VALUE grpc_rb_cCall; diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 8c69c82b1e3..9957f3937e7 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -20,6 +20,11 @@ #include "rb_call_credentials.h" +#include +#include +#include +#include +#include #include #include "rb_call.h" @@ -27,12 +32,6 @@ #include "rb_grpc.h" #include "rb_grpc_imports.generated.h" -#include -#include -#include -#include -#include - /* grpc_rb_cCallCredentials is the ruby class that proxies * grpc_call_credentials */ static VALUE grpc_rb_cCallCredentials = Qnil; diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index 2c800d8b9ec..76d2f39f17d 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -20,6 +20,12 @@ #include "rb_channel.h" +#include +#include +#include +#include +#include +#include #include #include "rb_byte_buffer.h" @@ -32,13 +38,6 @@ #include "rb_server.h" #include "rb_xds_channel_credentials.h" -#include -#include -#include -#include -#include -#include - /* id_channel is the name of the hidden ivar that preserves a reference to the * channel on a call, so that calls are not GCed before their channel. */ static ID id_channel; diff --git a/src/ruby/ext/grpc/rb_channel_args.c b/src/ruby/ext/grpc/rb_channel_args.c index 4c252397e2a..d7f67297be6 100644 --- a/src/ruby/ext/grpc/rb_channel_args.c +++ b/src/ruby/ext/grpc/rb_channel_args.c @@ -20,14 +20,14 @@ #include "rb_channel_args.h" -#include "rb_grpc.h" -#include "rb_grpc_imports.generated.h" - #include #include #include #include +#include "rb_grpc.h" +#include "rb_grpc_imports.generated.h" + static rb_data_type_t grpc_rb_channel_args_data_type = { "grpc_channel_args", {GRPC_RB_GC_NOT_MARKED, diff --git a/src/ruby/ext/grpc/rb_channel_credentials.c b/src/ruby/ext/grpc/rb_channel_credentials.c index e570bfb707f..9b1931954be 100644 --- a/src/ruby/ext/grpc/rb_channel_credentials.c +++ b/src/ruby/ext/grpc/rb_channel_credentials.c @@ -20,17 +20,16 @@ #include "rb_channel_credentials.h" -#include - -#include "rb_call_credentials.h" -#include "rb_grpc.h" -#include "rb_grpc_imports.generated.h" - #include #include #include #include #include +#include + +#include "rb_call_credentials.h" +#include "rb_grpc.h" +#include "rb_grpc_imports.generated.h" /* grpc_rb_cChannelCredentials is the ruby class that proxies grpc_channel_credentials. */ diff --git a/src/ruby/ext/grpc/rb_channel_credentials.h b/src/ruby/ext/grpc/rb_channel_credentials.h index 75bda4b25ad..ecc02e449ba 100644 --- a/src/ruby/ext/grpc/rb_channel_credentials.h +++ b/src/ruby/ext/grpc/rb_channel_credentials.h @@ -21,9 +21,8 @@ #include -#include - #include +#include /* Initializes the ruby ChannelCredentials class. */ void Init_grpc_channel_credentials(); diff --git a/src/ruby/ext/grpc/rb_completion_queue.c b/src/ruby/ext/grpc/rb_completion_queue.c index 6a4bb9c3072..91047ec14cc 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.c +++ b/src/ruby/ext/grpc/rb_completion_queue.c @@ -20,15 +20,14 @@ #include "rb_completion_queue.h" +#include +#include +#include #include #include "rb_grpc.h" #include "rb_grpc_imports.generated.h" -#include -#include -#include - /* Used to allow grpc_completion_queue_next call to release the GIL */ typedef struct next_call_stack { grpc_completion_queue* cq; diff --git a/src/ruby/ext/grpc/rb_compression_options.c b/src/ruby/ext/grpc/rb_compression_options.c index a38790faf79..062d5362c3e 100644 --- a/src/ruby/ext/grpc/rb_compression_options.c +++ b/src/ruby/ext/grpc/rb_compression_options.c @@ -20,12 +20,6 @@ #include "rb_compression_options.h" -#include - -#include "rb_byte_buffer.h" -#include "rb_grpc.h" -#include "rb_grpc_imports.generated.h" - #include #include #include @@ -33,6 +27,11 @@ #include #include #include +#include + +#include "rb_byte_buffer.h" +#include "rb_grpc.h" +#include "rb_grpc_imports.generated.h" static VALUE grpc_rb_cCompressionOptions = Qnil; diff --git a/src/ruby/ext/grpc/rb_event_thread.c b/src/ruby/ext/grpc/rb_event_thread.c index 0d7ec2ea2f4..014dd2dcd88 100644 --- a/src/ruby/ext/grpc/rb_event_thread.c +++ b/src/ruby/ext/grpc/rb_event_thread.c @@ -20,17 +20,16 @@ #include "rb_event_thread.h" +#include +#include +#include +#include #include #include #include "rb_grpc.h" #include "rb_grpc_imports.generated.h" -#include -#include -#include -#include - typedef struct grpc_rb_event { // callback will be called with argument while holding the GVL void (*callback)(void*); diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c index b26ddf357c0..ac66b590782 100644 --- a/src/ruby/ext/grpc/rb_grpc.c +++ b/src/ruby/ext/grpc/rb_grpc.c @@ -20,6 +20,9 @@ #include "rb_grpc.h" +#include +#include +#include #include #include #include @@ -39,10 +42,6 @@ #include "rb_xds_channel_credentials.h" #include "rb_xds_server_credentials.h" -#include -#include -#include - #ifdef GPR_LINUX #include #include diff --git a/src/ruby/ext/grpc/rb_grpc.h b/src/ruby/ext/grpc/rb_grpc.h index 7518b79e390..01b7e0d4c78 100644 --- a/src/ruby/ext/grpc/rb_grpc.h +++ b/src/ruby/ext/grpc/rb_grpc.h @@ -21,9 +21,8 @@ #include -#include - #include +#include /* grpc_rb_mGrpcCore is the module containing the ruby wrapper GRPC classes. */ extern VALUE grpc_rb_mGrpcCore; diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index 09e8788b9ed..f80b40ae70e 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -20,6 +20,12 @@ #include "rb_server.h" +#include +#include +#include +#include +#include + #include "rb_byte_buffer.h" #include "rb_call.h" #include "rb_channel_args.h" @@ -29,12 +35,6 @@ #include "rb_server_credentials.h" #include "rb_xds_server_credentials.h" -#include -#include -#include -#include -#include - /* grpc_rb_cServer is the ruby class that proxies grpc_server. */ static VALUE grpc_rb_cServer = Qnil; diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c index 73c754d5352..121f888f897 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.c +++ b/src/ruby/ext/grpc/rb_server_credentials.c @@ -20,14 +20,14 @@ #include "rb_server_credentials.h" -#include "rb_grpc.h" -#include "rb_grpc_imports.generated.h" - #include #include #include #include +#include "rb_grpc.h" +#include "rb_grpc_imports.generated.h" + /* grpc_rb_cServerCredentials is the ruby class that proxies grpc_server_credentials. */ static VALUE grpc_rb_cServerCredentials = Qnil; diff --git a/src/ruby/ext/grpc/rb_server_credentials.h b/src/ruby/ext/grpc/rb_server_credentials.h index 64b22715d99..35db1ed328f 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.h +++ b/src/ruby/ext/grpc/rb_server_credentials.h @@ -21,10 +21,9 @@ #include -#include - #include #include +#include /* Initializes the ruby ServerCredentials class. */ void Init_grpc_server_credentials(); diff --git a/src/ruby/ext/grpc/rb_xds_channel_credentials.c b/src/ruby/ext/grpc/rb_xds_channel_credentials.c index 56b08d99287..124bc8b3378 100644 --- a/src/ruby/ext/grpc/rb_xds_channel_credentials.c +++ b/src/ruby/ext/grpc/rb_xds_channel_credentials.c @@ -20,6 +20,11 @@ #include "rb_xds_channel_credentials.h" +#include +#include +#include +#include +#include #include #include "rb_call_credentials.h" @@ -27,12 +32,6 @@ #include "rb_grpc.h" #include "rb_grpc_imports.generated.h" -#include -#include -#include -#include -#include - /* grpc_rb_cXdsChannelCredentials is the ruby class that proxies grpc_channel_credentials. */ static VALUE grpc_rb_cXdsChannelCredentials = Qnil; diff --git a/src/ruby/ext/grpc/rb_xds_channel_credentials.h b/src/ruby/ext/grpc/rb_xds_channel_credentials.h index 5eba040ba17..a66f974413b 100644 --- a/src/ruby/ext/grpc/rb_xds_channel_credentials.h +++ b/src/ruby/ext/grpc/rb_xds_channel_credentials.h @@ -21,9 +21,8 @@ #include -#include - #include +#include /* Initializes the ruby ChannelCredentials class. */ void Init_grpc_xds_channel_credentials(); diff --git a/src/ruby/ext/grpc/rb_xds_server_credentials.c b/src/ruby/ext/grpc/rb_xds_server_credentials.c index 8186d0eb49e..703e3e99b4b 100644 --- a/src/ruby/ext/grpc/rb_xds_server_credentials.c +++ b/src/ruby/ext/grpc/rb_xds_server_credentials.c @@ -20,15 +20,15 @@ #include "rb_xds_server_credentials.h" -#include "rb_grpc.h" -#include "rb_grpc_imports.generated.h" -#include "rb_server_credentials.h" - #include #include #include #include +#include "rb_grpc.h" +#include "rb_grpc_imports.generated.h" +#include "rb_server_credentials.h" + /* grpc_rb_cXdsServerCredentials is the ruby class that proxies grpc_server_credentials. */ static VALUE grpc_rb_cXdsServerCredentials = Qnil; diff --git a/src/ruby/ext/grpc/rb_xds_server_credentials.h b/src/ruby/ext/grpc/rb_xds_server_credentials.h index 3ec1ced8e4b..59de9824a63 100644 --- a/src/ruby/ext/grpc/rb_xds_server_credentials.h +++ b/src/ruby/ext/grpc/rb_xds_server_credentials.h @@ -21,10 +21,9 @@ #include -#include - #include #include +#include /* Initializes the ruby XdsServerCredentials class. */ void Init_grpc_xds_server_credentials(); diff --git a/test/core/address_utils/parse_address_test.cc b/test/core/address_utils/parse_address_test.cc index 41b9df4bd5d..3bc09f0490a 100644 --- a/test/core/address_utils/parse_address_test.cc +++ b/test/core/address_utils/parse_address_test.cc @@ -32,15 +32,14 @@ #include #endif +#include + #include #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/strings/match.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/test/core/address_utils/parse_address_with_named_scope_id_test.cc b/test/core/address_utils/parse_address_with_named_scope_id_test.cc index c8e85ad1e26..0924eb2b33f 100644 --- a/test/core/address_utils/parse_address_with_named_scope_id_test.cc +++ b/test/core/address_utils/parse_address_with_named_scope_id_test.cc @@ -16,16 +16,17 @@ // // +#include #include #include #include #include - -#include #ifdef GRPC_HAVE_UNIX_SOCKET #include #endif +#include + #include #include "absl/log/log.h" @@ -33,9 +34,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolved_address.h" diff --git a/test/core/address_utils/sockaddr_utils_fuzzer_test.cc b/test/core/address_utils/sockaddr_utils_fuzzer_test.cc index 8c63854a203..08b80672f16 100644 --- a/test/core/address_utils/sockaddr_utils_fuzzer_test.cc +++ b/test/core/address_utils/sockaddr_utils_fuzzer_test.cc @@ -21,7 +21,6 @@ #include "absl/log/check.h" #include "absl/status/statusor.h" - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolved_address.h" diff --git a/test/core/address_utils/sockaddr_utils_test.cc b/test/core/address_utils/sockaddr_utils_test.cc index 83de472f102..234e4fe9896 100644 --- a/test/core/address_utils/sockaddr_utils_test.cc +++ b/test/core/address_utils/sockaddr_utils_test.cc @@ -17,6 +17,7 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include +#include #include #include @@ -24,9 +25,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolved_address.h" #ifdef GRPC_HAVE_UNIX_SOCKET @@ -43,7 +41,6 @@ #include #include "absl/log/check.h" - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc index f338e2dc0a4..83c05a2ad9b 100644 --- a/test/core/bad_client/bad_client.cc +++ b/test/core/bad_client/bad_client.cc @@ -18,18 +18,16 @@ #include "test/core/bad_client/bad_client.h" -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include #include #include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/channelz/channelz.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/bad_client/bad_client.h b/test/core/bad_client/bad_client.h index 57a8d92c6e6..fba8a07b354 100644 --- a/test/core/bad_client/bad_client.h +++ b/test/core/bad_client/bad_client.h @@ -19,11 +19,10 @@ #ifndef GRPC_TEST_CORE_BAD_CLIENT_BAD_CLIENT_H #define GRPC_TEST_CORE_BAD_CLIENT_BAD_CLIENT_H -#include -#include - #include #include +#include +#include #define GRPC_BAD_CLIENT_REGISTERED_METHOD "/registered/bar" #define GRPC_BAD_CLIENT_REGISTERED_HOST "localhost" diff --git a/test/core/bad_client/tests/bad_streaming_id.cc b/test/core/bad_client/tests/bad_streaming_id.cc index 4cd7cbc5778..a8018ae6acd 100644 --- a/test/core/bad_client/tests/bad_streaming_id.cc +++ b/test/core/bad_client/tests/bad_streaming_id.cc @@ -16,14 +16,12 @@ // // -#include - +#include #include -#include "absl/log/check.h" - -#include +#include +#include "absl/log/check.h" #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_client/tests/badreq.cc b/test/core/bad_client/tests/badreq.cc index 27a01496d97..7cfa2ace385 100644 --- a/test/core/bad_client/tests/badreq.cc +++ b/test/core/bad_client/tests/badreq.cc @@ -16,10 +16,9 @@ // // -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_client/tests/connection_prefix.cc b/test/core/bad_client/tests/connection_prefix.cc index 1aa899ab707..c1c34a25d94 100644 --- a/test/core/bad_client/tests/connection_prefix.cc +++ b/test/core/bad_client/tests/connection_prefix.cc @@ -16,10 +16,9 @@ // // -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_client/tests/duplicate_header.cc b/test/core/bad_client/tests/duplicate_header.cc index b31c9663218..919ae4eeefb 100644 --- a/test/core/bad_client/tests/duplicate_header.cc +++ b/test/core/bad_client/tests/duplicate_header.cc @@ -16,14 +16,12 @@ // // -#include - -#include "absl/log/check.h" - #include #include #include +#include +#include "absl/log/check.h" #include "src/core/util/time.h" #include "test/core/bad_client/bad_client.h" #include "test/core/end2end/cq_verifier.h" diff --git a/test/core/bad_client/tests/head_of_line_blocking.cc b/test/core/bad_client/tests/head_of_line_blocking.cc index 2a46c836780..bce31bc893d 100644 --- a/test/core/bad_client/tests/head_of_line_blocking.cc +++ b/test/core/bad_client/tests/head_of_line_blocking.cc @@ -16,18 +16,16 @@ // // +#include +#include +#include +#include #include #include #include #include "absl/log/check.h" - -#include -#include -#include -#include - #include "test/core/bad_client/bad_client.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_client/tests/headers.cc b/test/core/bad_client/tests/headers.cc index 0aa31a507c3..468f19a34d1 100644 --- a/test/core/bad_client/tests/headers.cc +++ b/test/core/bad_client/tests/headers.cc @@ -16,10 +16,9 @@ // // -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_client/tests/initial_settings_frame.cc b/test/core/bad_client/tests/initial_settings_frame.cc index deca4fdaebd..d4231c9c373 100644 --- a/test/core/bad_client/tests/initial_settings_frame.cc +++ b/test/core/bad_client/tests/initial_settings_frame.cc @@ -16,12 +16,11 @@ // // -#include "absl/log/check.h" -#include "absl/strings/str_cat.h" - #include #include +#include "absl/log/check.h" +#include "absl/strings/str_cat.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" diff --git a/test/core/bad_client/tests/out_of_bounds.cc b/test/core/bad_client/tests/out_of_bounds.cc index 04cdf739c41..9abb44f777c 100644 --- a/test/core/bad_client/tests/out_of_bounds.cc +++ b/test/core/bad_client/tests/out_of_bounds.cc @@ -16,14 +16,12 @@ // // -#include - +#include #include -#include "absl/log/check.h" - -#include +#include +#include "absl/log/check.h" #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_client/tests/server_registered_method.cc b/test/core/bad_client/tests/server_registered_method.cc index 731eeb91acc..04adbc14a16 100644 --- a/test/core/bad_client/tests/server_registered_method.cc +++ b/test/core/bad_client/tests/server_registered_method.cc @@ -16,12 +16,11 @@ // // -#include "absl/log/check.h" - #include #include #include +#include "absl/log/check.h" #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" #include "test/core/end2end/cq_verifier.h" diff --git a/test/core/bad_client/tests/simple_request.cc b/test/core/bad_client/tests/simple_request.cc index 6732d76147d..52db06cccb3 100644 --- a/test/core/bad_client/tests/simple_request.cc +++ b/test/core/bad_client/tests/simple_request.cc @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "absl/log/check.h" - #include #include +#include "absl/log/check.h" #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" #include "test/core/end2end/cq_verifier.h" diff --git a/test/core/bad_client/tests/unknown_frame.cc b/test/core/bad_client/tests/unknown_frame.cc index a7c908ca483..1357b3208af 100644 --- a/test/core/bad_client/tests/unknown_frame.cc +++ b/test/core/bad_client/tests/unknown_frame.cc @@ -16,14 +16,12 @@ // // -#include - +#include #include -#include "absl/log/check.h" - -#include +#include +#include "absl/log/check.h" #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_client/tests/window_overflow.cc b/test/core/bad_client/tests/window_overflow.cc index 3137921591e..6cf962bb42a 100644 --- a/test/core/bad_client/tests/window_overflow.cc +++ b/test/core/bad_client/tests/window_overflow.cc @@ -12,16 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include #include #include #include #include "absl/log/check.h" - -#include -#include - #include "src/core/server/server.h" #include "test/core/bad_client/bad_client.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_connection/close_fd_test.cc b/test/core/bad_connection/close_fd_test.cc index 41bd7021a0f..258a4cbe30e 100644 --- a/test/core/bad_connection/close_fd_test.cc +++ b/test/core/bad_connection/close_fd_test.cc @@ -21,19 +21,17 @@ // an RPC call is in progress. // // -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/status/statusor.h" -#include "absl/strings/str_format.h" - #include #include #include #include #include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/statusor.h" +#include "absl/strings/str_format.h" #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/endpoint.h" @@ -49,12 +47,11 @@ // This test won't work except with posix sockets enabled #ifdef GRPC_POSIX_SOCKET_TCP -#include -#include - #include #include #include +#include +#include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/iomgr/endpoint_pair.h" diff --git a/test/core/bad_ssl/bad_ssl_test.cc b/test/core/bad_ssl/bad_ssl_test.cc index 51fad155944..d7a367c5868 100644 --- a/test/core/bad_ssl/bad_ssl_test.cc +++ b/test/core/bad_ssl/bad_ssl_test.cc @@ -16,13 +16,6 @@ // // -#include -#include - -#include - -#include "absl/log/check.h" - #include #include #include @@ -33,7 +26,12 @@ #include #include #include +#include +#include +#include + +#include "absl/log/check.h" #include "src/core/util/env.h" #include "src/core/util/host_port.h" #include "src/core/util/subprocess.h" diff --git a/test/core/bad_ssl/server_common.cc b/test/core/bad_ssl/server_common.cc index e76708b1969..a503b1dc835 100644 --- a/test/core/bad_ssl/server_common.cc +++ b/test/core/bad_ssl/server_common.cc @@ -18,13 +18,11 @@ #include "test/core/bad_ssl/server_common.h" +#include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "test/core/test_util/cmdline.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_ssl/servers/alpn.cc b/test/core/bad_ssl/servers/alpn.cc index 285488747c8..af6bebf6213 100644 --- a/test/core/bad_ssl/servers/alpn.cc +++ b/test/core/bad_ssl/servers/alpn.cc @@ -18,15 +18,13 @@ #include "src/core/ext/transport/chttp2/alpn/alpn.h" -#include - -#include "absl/log/check.h" - #include #include #include #include +#include +#include "absl/log/check.h" #include "src/core/lib/iomgr/error.h" #include "src/core/util/useful.h" #include "test/core/bad_ssl/server_common.h" diff --git a/test/core/bad_ssl/servers/cert.cc b/test/core/bad_ssl/servers/cert.cc index 30d1b7fc8fd..e7f37f0a011 100644 --- a/test/core/bad_ssl/servers/cert.cc +++ b/test/core/bad_ssl/servers/cert.cc @@ -16,13 +16,12 @@ // // -#include "absl/log/check.h" - #include #include #include #include +#include "absl/log/check.h" #include "src/core/lib/iomgr/error.h" #include "test/core/bad_ssl/server_common.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/call/batch_builder.h b/test/core/call/batch_builder.h index 40202ea25dc..fec948b8b62 100644 --- a/test/core/call/batch_builder.h +++ b/test/core/call/batch_builder.h @@ -17,7 +17,6 @@ #include "absl/strings/str_cat.h" #include "gtest/gtest.h" - #include "src/core/lib/slice/slice.h" #include "test/core/end2end/cq_verifier.h" diff --git a/test/core/call/bm_client_call.cc b/test/core/call/bm_client_call.cc index 78e4a2a4196..b79ae1f9caf 100644 --- a/test/core/call/bm_client_call.cc +++ b/test/core/call/bm_client_call.cc @@ -13,7 +13,6 @@ // limitations under the License. #include - #include #include "src/core/lib/event_engine/default_event_engine.h" diff --git a/test/core/call/call_utils_test.cc b/test/core/call/call_utils_test.cc index f9a8fdae345..323b3069394 100644 --- a/test/core/call/call_utils_test.cc +++ b/test/core/call/call_utils_test.cc @@ -14,12 +14,12 @@ #include "src/core/lib/surface/call_utils.h" +#include + #include #include "gtest/gtest.h" -#include - namespace grpc_core { TEST(CallUtils, AreWriteFlagsValid) { diff --git a/test/core/call/client_call_test.cc b/test/core/call/client_call_test.cc index ef9ba6cd1a4..78225dbea07 100644 --- a/test/core/call/client_call_test.cc +++ b/test/core/call/client_call_test.cc @@ -14,11 +14,10 @@ #include "src/core/lib/surface/client_call.h" -#include "absl/status/status.h" - #include #include +#include "absl/status/status.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/transport/metadata.h" #include "src/core/util/debug_location.h" diff --git a/test/core/call/request_buffer_test.cc b/test/core/call/request_buffer_test.cc index 98aba0ac495..9e9f9a3fc6a 100644 --- a/test/core/call/request_buffer_test.cc +++ b/test/core/call/request_buffer_test.cc @@ -15,7 +15,6 @@ #include "src/core/call/request_buffer.h" #include "gtest/gtest.h" - #include "test/core/promise/poll_matcher.h" using testing::Mock; diff --git a/test/core/call/server_call_test.cc b/test/core/call/server_call_test.cc index b42f0503203..6e1db3b4d92 100644 --- a/test/core/call/server_call_test.cc +++ b/test/core/call/server_call_test.cc @@ -14,13 +14,12 @@ #include "src/core/lib/surface/server_call.h" -#include - -#include "absl/status/status.h" - #include #include +#include + +#include "absl/status/status.h" #include "src/core/channelz/channelz.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/resource_quota/arena.h" diff --git a/test/core/call/yodel/fuzzer_main.cc b/test/core/call/yodel/fuzzer_main.cc index 0f14c28eb51..7e7f37224f0 100644 --- a/test/core/call/yodel/fuzzer_main.cc +++ b/test/core/call/yodel/fuzzer_main.cc @@ -12,14 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - +#include #include +#include #include "absl/log/check.h" - -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/config.h" diff --git a/test/core/call/yodel/test_main.cc b/test/core/call/yodel/test_main.cc index 22b1ff3d561..5cdd9dead55 100644 --- a/test/core/call/yodel/test_main.cc +++ b/test/core/call/yodel/test_main.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "absl/random/random.h" - #include "src/core/lib/debug/trace.h" #include "test/core/call/yodel/yodel_test.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/call/yodel/yodel_test.cc b/test/core/call/yodel/yodel_test.cc index ccd31f35fb9..f9969184867 100644 --- a/test/core/call/yodel/yodel_test.cc +++ b/test/core/call/yodel/yodel_test.cc @@ -17,7 +17,6 @@ #include #include "absl/random/random.h" - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/timer_manager.h" diff --git a/test/core/call/yodel/yodel_test.h b/test/core/call/yodel/yodel_test.h index 7ccb97e7d6a..518e6f0e64f 100644 --- a/test/core/call/yodel/yodel_test.h +++ b/test/core/call/yodel/yodel_test.h @@ -15,14 +15,13 @@ #ifndef GRPC_TEST_CORE_CALL_YODEL_YODEL_TEST_H #define GRPC_TEST_CORE_CALL_YODEL_YODEL_TEST_H +#include + #include "absl/functional/any_invocable.h" #include "absl/log/log.h" #include "absl/random/bit_gen_ref.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/promise/cancel_callback.h" #include "src/core/lib/promise/detail/promise_factory.h" diff --git a/test/core/channel/call_finalization_test.cc b/test/core/channel/call_finalization_test.cc index 9e7ba84794d..fc07e704681 100644 --- a/test/core/channel/call_finalization_test.cc +++ b/test/core/channel/call_finalization_test.cc @@ -14,14 +14,13 @@ #include "src/core/lib/channel/call_finalization.h" +#include + #include #include #include "absl/strings/str_cat.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/core/channel/channel_args_test.cc b/test/core/channel/channel_args_test.cc index bb19b352e21..d79acdbc2e3 100644 --- a/test/core/channel/channel_args_test.cc +++ b/test/core/channel/channel_args_test.cc @@ -18,18 +18,16 @@ #include "src/core/lib/channel/channel_args.h" -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "gtest/gtest.h" - #include #include #include #include #include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "gtest/gtest.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/notification.h" #include "src/core/util/ref_counted.h" diff --git a/test/core/channel/channel_stack_builder_test.cc b/test/core/channel/channel_stack_builder_test.cc index 82bda202df4..1c6ed8995f0 100644 --- a/test/core/channel/channel_stack_builder_test.cc +++ b/test/core/channel/channel_stack_builder_test.cc @@ -18,15 +18,14 @@ #include "src/core/lib/channel/channel_stack_builder.h" +#include + #include #include #include #include "absl/status/status.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder_impl.h" #include "src/core/lib/iomgr/closure.h" diff --git a/test/core/channel/channel_stack_test.cc b/test/core/channel/channel_stack_test.cc index 1c722beb282..31d5e5fd216 100644 --- a/test/core/channel/channel_stack_test.cc +++ b/test/core/channel/channel_stack_test.cc @@ -18,12 +18,11 @@ #include "src/core/lib/channel/channel_stack.h" +#include + #include "absl/status/status.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/core/channel/minimal_stack_is_minimal_test.cc b/test/core/channel/minimal_stack_is_minimal_test.cc index d06f98fba2e..c207c274f80 100644 --- a/test/core/channel/minimal_stack_is_minimal_test.cc +++ b/test/core/channel/minimal_stack_is_minimal_test.cc @@ -29,6 +29,9 @@ // configurations and assess whether such a change is correct and desirable. // +#include +#include + #include #include #include @@ -38,10 +41,6 @@ #include "absl/memory/memory.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder_impl.h" diff --git a/test/core/channel/server_call_tracer_factory_test.cc b/test/core/channel/server_call_tracer_factory_test.cc index 821087f9d93..c38b9dd737c 100644 --- a/test/core/channel/server_call_tracer_factory_test.cc +++ b/test/core/channel/server_call_tracer_factory_test.cc @@ -15,7 +15,6 @@ #include #include "gtest/gtest.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/telemetry/call_tracer.h" diff --git a/test/core/channelz/channel_trace_test.cc b/test/core/channelz/channel_trace_test.cc index e3fab992eb8..72834781eb5 100644 --- a/test/core/channelz/channel_trace_test.cc +++ b/test/core/channelz/channel_trace_test.cc @@ -18,6 +18,10 @@ #include "src/core/channelz/channel_trace.h" +#include +#include +#include +#include #include #include @@ -27,12 +31,6 @@ #include "absl/synchronization/notification.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/channelz/channelz_registry_test.cc b/test/core/channelz/channelz_registry_test.cc index 29110f3f5c1..3dbd7a80b9e 100644 --- a/test/core/channelz/channelz_registry_test.cc +++ b/test/core/channelz/channelz_registry_test.cc @@ -24,7 +24,6 @@ #include #include "gtest/gtest.h" - #include "src/core/channelz/channelz.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/channelz/channelz_test.cc b/test/core/channelz/channelz_test.cc index a43950eefbb..ce58754cb74 100644 --- a/test/core/channelz/channelz_test.cc +++ b/test/core/channelz/channelz_test.cc @@ -18,6 +18,14 @@ #include "src/core/channelz/channelz.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -29,16 +37,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz_registry.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/default_event_engine.h" diff --git a/test/core/client_channel/bm_client_channel.cc b/test/core/client_channel/bm_client_channel.cc index 1ee51257c9f..566da748da9 100644 --- a/test/core/client_channel/bm_client_channel.cc +++ b/test/core/client_channel/bm_client_channel.cc @@ -13,12 +13,10 @@ // limitations under the License. #include +#include #include "absl/memory/memory.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/client_channel/client_channel.h" #include "src/core/lib/address_utils/parse_address.h" #include "test/core/transport/call_spine_benchmarks.h" diff --git a/test/core/client_channel/bm_load_balanced_call_destination.cc b/test/core/client_channel/bm_load_balanced_call_destination.cc index f3a52f40ae9..555e51bdcc5 100644 --- a/test/core/client_channel/bm_load_balanced_call_destination.cc +++ b/test/core/client_channel/bm_load_balanced_call_destination.cc @@ -13,12 +13,10 @@ // limitations under the License. #include +#include #include "absl/memory/memory.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/client_channel/load_balanced_call_destination.h" #include "src/core/lib/address_utils/parse_address.h" #include "test/core/transport/call_spine_benchmarks.h" diff --git a/test/core/client_channel/client_channel_service_config_test.cc b/test/core/client_channel/client_channel_service_config_test.cc index 28ffddf7f31..67b6af99e43 100644 --- a/test/core/client_channel/client_channel_service_config_test.cc +++ b/test/core/client_channel/client_channel_service_config_test.cc @@ -16,13 +16,12 @@ #include "src/core/client_channel/client_channel_service_config.h" -#include "absl/status/status.h" -#include "absl/status/statusor.h" -#include "gtest/gtest.h" - #include #include +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/service_config/service_config.h" diff --git a/test/core/client_channel/client_channel_test.cc b/test/core/client_channel/client_channel_test.cc index 2c624c3b9c9..4dc980f5855 100644 --- a/test/core/client_channel/client_channel_test.cc +++ b/test/core/client_channel/client_channel_test.cc @@ -14,15 +14,14 @@ #include "src/core/client_channel/client_channel.h" +#include + #include #include #include "absl/log/log.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/core/client_channel/connected_subchannel_test.cc b/test/core/client_channel/connected_subchannel_test.cc index 98f5b26207f..619577d719e 100644 --- a/test/core/client_channel/connected_subchannel_test.cc +++ b/test/core/client_channel/connected_subchannel_test.cc @@ -12,15 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include - #include "src/core/client_channel/client_channel.h" #include "src/core/client_channel/local_subchannel_pool.h" #include "src/core/lib/address_utils/parse_address.h" diff --git a/test/core/client_channel/lb_metadata_test.cc b/test/core/client_channel/lb_metadata_test.cc index 0ad10a62971..3d88972714c 100644 --- a/test/core/client_channel/lb_metadata_test.cc +++ b/test/core/client_channel/lb_metadata_test.cc @@ -20,7 +20,6 @@ #include "absl/strings/string_view.h" #include "gtest/gtest.h" - #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/metadata_batch.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/client_channel/load_balanced_call_destination_test.cc b/test/core/client_channel/load_balanced_call_destination_test.cc index 399f7bddc5a..268ea7825d4 100644 --- a/test/core/client_channel/load_balanced_call_destination_test.cc +++ b/test/core/client_channel/load_balanced_call_destination_test.cc @@ -14,6 +14,8 @@ #include "src/core/client_channel/load_balanced_call_destination.h" +#include + #include #include #include @@ -21,9 +23,6 @@ #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "test/core/call/yodel/yodel_test.h" using testing::StrictMock; diff --git a/test/core/client_channel/retry_service_config_test.cc b/test/core/client_channel/retry_service_config_test.cc index 5578e18ed11..b44bf119ec9 100644 --- a/test/core/client_channel/retry_service_config_test.cc +++ b/test/core/client_channel/retry_service_config_test.cc @@ -16,15 +16,14 @@ #include "src/core/client_channel/retry_service_config.h" -#include "absl/status/status.h" -#include "absl/status/statusor.h" -#include "gtest/gtest.h" - #include #include #include #include +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/service_config/service_config.h" diff --git a/test/core/client_channel/retry_throttle_test.cc b/test/core/client_channel/retry_throttle_test.cc index 78cda1694ad..f8463ba83d4 100644 --- a/test/core/client_channel/retry_throttle_test.cc +++ b/test/core/client_channel/retry_throttle_test.cc @@ -19,7 +19,6 @@ #include "src/core/client_channel/retry_throttle.h" #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/client_channel/subchannel_args_test.cc b/test/core/client_channel/subchannel_args_test.cc index 3750a8dc42b..b7f3aa3287b 100644 --- a/test/core/client_channel/subchannel_args_test.cc +++ b/test/core/client_channel/subchannel_args_test.cc @@ -14,14 +14,13 @@ // limitations under the License. // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_pool_interface.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/compiler_bugs/miscompile_with_no_unique_address_test.cc b/test/core/compiler_bugs/miscompile_with_no_unique_address_test.cc index 49d723884ca..81aa23d06cf 100644 --- a/test/core/compiler_bugs/miscompile_with_no_unique_address_test.cc +++ b/test/core/compiler_bugs/miscompile_with_no_unique_address_test.cc @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include "gtest/gtest.h" -#include - // Make a template argument to test which bit pattern remains in A's destructor // to try and detect similar bugs in non-MSAN builds (none have been detected // yet thankfully) diff --git a/test/core/compression/compression_test.cc b/test/core/compression/compression_test.cc index 9ed5b61b042..09a84548dd6 100644 --- a/test/core/compression/compression_test.cc +++ b/test/core/compression/compression_test.cc @@ -16,6 +16,8 @@ // // +#include +#include #include #include @@ -23,10 +25,6 @@ #include "absl/log/log.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/compression/message_compress_fuzzer.cc b/test/core/compression/message_compress_fuzzer.cc index 64abbf21a4f..8b98844d910 100644 --- a/test/core/compression/message_compress_fuzzer.cc +++ b/test/core/compression/message_compress_fuzzer.cc @@ -16,13 +16,12 @@ // // -#include -#include - #include #include #include #include +#include +#include #include "src/core/lib/compression/message_compress.h" diff --git a/test/core/compression/message_compress_test.cc b/test/core/compression/message_compress_test.cc index e8aac4237a6..7bf558af1fa 100644 --- a/test/core/compression/message_compress_test.cc +++ b/test/core/compression/message_compress_test.cc @@ -18,6 +18,8 @@ #include "src/core/lib/compression/message_compress.h" +#include +#include #include #include #include @@ -26,10 +28,6 @@ #include "absl/log/log.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/useful.h" #include "test/core/test_util/slice_splitter.h" diff --git a/test/core/compression/message_decompress_fuzzer.cc b/test/core/compression/message_decompress_fuzzer.cc index 4996705182b..58b324de716 100644 --- a/test/core/compression/message_decompress_fuzzer.cc +++ b/test/core/compression/message_decompress_fuzzer.cc @@ -16,13 +16,12 @@ // // -#include -#include - #include #include #include #include +#include +#include #include "src/core/lib/compression/message_compress.h" diff --git a/test/core/config/core_configuration_test.cc b/test/core/config/core_configuration_test.cc index bf2e10b1890..3a391a8f097 100644 --- a/test/core/config/core_configuration_test.cc +++ b/test/core/config/core_configuration_test.cc @@ -14,13 +14,13 @@ #include "src/core/lib/config/core_configuration.h" +#include + #include #include #include #include -#include - namespace grpc_core { // Allow substitution of config builder - in real code this would iterate diff --git a/test/core/config/load_config_test.cc b/test/core/config/load_config_test.cc index 7d9ac207163..8c34bb0b651 100644 --- a/test/core/config/load_config_test.cc +++ b/test/core/config/load_config_test.cc @@ -16,7 +16,6 @@ #include "absl/flags/flag.h" #include "gtest/gtest.h" - #include "src/core/util/env.h" ABSL_FLAG(std::vector, comma_separated_strings, {}, ""); diff --git a/test/core/end2end/bad_server_response_test.cc b/test/core/end2end/bad_server_response_test.cc index f76151aa9d3..1badbcb5391 100644 --- a/test/core/end2end/bad_server_response_test.cc +++ b/test/core/end2end/bad_server_response_test.cc @@ -16,17 +16,6 @@ // // -#include -#include -#include - -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -38,7 +27,16 @@ #include #include #include +#include +#include +#include + +#include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/event_engine/shim.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" diff --git a/test/core/end2end/connection_refused_test.cc b/test/core/end2end/connection_refused_test.cc index 436b2fb5730..e87fbcf3c64 100644 --- a/test/core/end2end/connection_refused_test.cc +++ b/test/core/end2end/connection_refused_test.cc @@ -16,13 +16,6 @@ // // -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -31,7 +24,12 @@ #include #include #include +#include + +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/host_port.h" diff --git a/test/core/end2end/cq_verifier.cc b/test/core/end2end/cq_verifier.cc index d1a322bc989..2b606807b41 100644 --- a/test/core/end2end/cq_verifier.cc +++ b/test/core/end2end/cq_verifier.cc @@ -18,6 +18,12 @@ #include "test/core/end2end/cq_verifier.h" +#include +#include +#include +#include +#include +#include #include #include #include @@ -36,14 +42,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/compression/message_compress.h" #include "src/core/lib/surface/event_string.h" #include "src/core/util/crash.h" diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h index d86d3248958..856822807fa 100644 --- a/test/core/end2end/cq_verifier.h +++ b/test/core/end2end/cq_verifier.h @@ -19,6 +19,10 @@ #ifndef GRPC_TEST_CORE_END2END_CQ_VERIFIER_H #define GRPC_TEST_CORE_END2END_CQ_VERIFIER_H +#include +#include +#include +#include #include #include @@ -28,12 +32,6 @@ #include "absl/container/flat_hash_map.h" #include "absl/functional/any_invocable.h" #include "absl/types/variant.h" - -#include -#include -#include -#include - #include "src/core/util/debug_location.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/dualstack_socket_test.cc b/test/core/end2end/dualstack_socket_test.cc index 44fc736e5ca..cbe48b86785 100644 --- a/test/core/end2end/dualstack_socket_test.cc +++ b/test/core/end2end/dualstack_socket_test.cc @@ -16,6 +16,11 @@ // // +#include +#include +#include +#include + #include #include #include @@ -23,18 +28,16 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include - #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolved_address.h" // This test won't work except with posix sockets enabled #ifdef GRPC_POSIX_SOCKET_EV +#include +#include +#include +#include #include #include @@ -43,12 +46,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/resolve_address.h" diff --git a/test/core/end2end/end2end_test_fuzzer.cc b/test/core/end2end/end2end_test_fuzzer.cc index e74627117a2..331ad4b998b 100644 --- a/test/core/end2end/end2end_test_fuzzer.cc +++ b/test/core/end2end/end2end_test_fuzzer.cc @@ -14,6 +14,8 @@ #include "test/core/end2end/end2end_test_fuzzer.h" +#include +#include #include #include @@ -24,12 +26,7 @@ #include #include -#include - #include "absl/log/check.h" - -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/config.h" diff --git a/test/core/end2end/end2end_test_main.cc b/test/core/end2end/end2end_test_main.cc index 8d40eb90900..c9b0d0f0050 100644 --- a/test/core/end2end/end2end_test_main.cc +++ b/test/core/end2end/end2end_test_main.cc @@ -19,7 +19,6 @@ #include "absl/strings/str_cat.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - #include "src/core/lib/config/config_vars.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/fixtures/h2_tls_common.h" diff --git a/test/core/end2end/end2end_test_suites.cc b/test/core/end2end/end2end_test_suites.cc index 4b74ff032be..4b111ad1586 100644 --- a/test/core/end2end/end2end_test_suites.cc +++ b/test/core/end2end/end2end_test_suites.cc @@ -12,6 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -33,18 +43,6 @@ #include "absl/strings/str_format.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h" #include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/end2end/end2end_tests.h b/test/core/end2end/end2end_tests.h index 9dc89e93a87..b358e9456e6 100644 --- a/test/core/end2end/end2end_tests.h +++ b/test/core/end2end/end2end_tests.h @@ -15,6 +15,16 @@ #ifndef GRPC_TEST_CORE_END2END_END2END_TESTS_H #define GRPC_TEST_CORE_END2END_END2END_TESTS_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -36,18 +46,6 @@ #include "absl/types/optional.h" #include "absl/types/variant.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/slice/slice.h" diff --git a/test/core/end2end/fixtures/h2_oauth2_common.h b/test/core/end2end/fixtures/h2_oauth2_common.h index 92d873d313c..fe52b1c8656 100644 --- a/test/core/end2end/fixtures/h2_oauth2_common.h +++ b/test/core/end2end/fixtures/h2_oauth2_common.h @@ -15,10 +15,6 @@ #ifndef GRPC_TEST_CORE_END2END_FIXTURES_H2_OAUTH2_COMMON_H #define GRPC_TEST_CORE_END2END_FIXTURES_H2_OAUTH2_COMMON_H -#include - -#include "absl/log/check.h" - #include #include #include @@ -26,7 +22,9 @@ #include #include #include +#include +#include "absl/log/check.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/test/core/end2end/fixtures/h2_ssl_cred_reload_fixture.h b/test/core/end2end/fixtures/h2_ssl_cred_reload_fixture.h index cbe17d19a13..cf8a611f40b 100644 --- a/test/core/end2end/fixtures/h2_ssl_cred_reload_fixture.h +++ b/test/core/end2end/fixtures/h2_ssl_cred_reload_fixture.h @@ -15,10 +15,6 @@ #ifndef GRPC_TEST_CORE_END2END_FIXTURES_H2_SSL_CRED_RELOAD_FIXTURE_H #define GRPC_TEST_CORE_END2END_FIXTURES_H2_SSL_CRED_RELOAD_FIXTURE_H -#include - -#include "absl/log/check.h" - #include #include #include @@ -26,7 +22,9 @@ #include #include #include +#include +#include "absl/log/check.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/ssl/ssl_credentials.h" diff --git a/test/core/end2end/fixtures/h2_ssl_tls_common.h b/test/core/end2end/fixtures/h2_ssl_tls_common.h index ce346b3175e..d97ca4ad9f5 100644 --- a/test/core/end2end/fixtures/h2_ssl_tls_common.h +++ b/test/core/end2end/fixtures/h2_ssl_tls_common.h @@ -15,10 +15,6 @@ #ifndef GRPC_TEST_CORE_END2END_FIXTURES_H2_SSL_TLS_COMMON_H #define GRPC_TEST_CORE_END2END_FIXTURES_H2_SSL_TLS_COMMON_H -#include - -#include "absl/log/check.h" - #include #include #include @@ -26,7 +22,9 @@ #include #include #include +#include +#include "absl/log/check.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/ssl/ssl_credentials.h" diff --git a/test/core/end2end/fixtures/h2_tls_common.h b/test/core/end2end/fixtures/h2_tls_common.h index c7a5ffd1d73..1c325dc7e8c 100644 --- a/test/core/end2end/fixtures/h2_tls_common.h +++ b/test/core/end2end/fixtures/h2_tls_common.h @@ -19,14 +19,6 @@ #ifndef GRPC_TEST_CORE_END2END_FIXTURES_H2_TLS_COMMON_H #define GRPC_TEST_CORE_END2END_FIXTURES_H2_TLS_COMMON_H -#include -#include - -#include - -#include "absl/log/check.h" -#include "absl/strings/string_view.h" - #include #include #include @@ -34,7 +26,13 @@ #include #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/strings/string_view.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h" diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index 88b65d3de94..c5f77bcf27f 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -18,6 +18,11 @@ #include "test/core/end2end/fixtures/http_proxy_fixture.h" +#include +#include +#include +#include +#include #include #include @@ -33,13 +38,6 @@ #include "absl/strings/escaping.h" #include "absl/strings/str_cat.h" #include "absl/strings/strip.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" diff --git a/test/core/end2end/fixtures/inproc_fixture.h b/test/core/end2end/fixtures/inproc_fixture.h index 4f08c3773fd..7a70aa138a7 100644 --- a/test/core/end2end/fixtures/inproc_fixture.h +++ b/test/core/end2end/fixtures/inproc_fixture.h @@ -15,10 +15,9 @@ #ifndef GRPC_TEST_CORE_END2END_FIXTURES_INPROC_FIXTURE_H #define GRPC_TEST_CORE_END2END_FIXTURES_INPROC_FIXTURE_H -#include "absl/functional/any_invocable.h" - #include +#include "absl/functional/any_invocable.h" #include "src/core/ext/transport/inproc/inproc_transport.h" #include "src/core/lib/channel/channel_args.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/fixtures/local_util.cc b/test/core/end2end/fixtures/local_util.cc index 63bc96b9052..c9ae9c5f1ce 100644 --- a/test/core/end2end/fixtures/local_util.cc +++ b/test/core/end2end/fixtures/local_util.cc @@ -18,16 +18,15 @@ #include "test/core/end2end/fixtures/local_util.h" +#include +#include +#include #include #include #include "absl/log/check.h" -#include -#include -#include - static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/, const grpc_metadata* /*md*/, size_t /*md_count*/, diff --git a/test/core/end2end/fixtures/local_util.h b/test/core/end2end/fixtures/local_util.h index fc9f8d8af5c..e7f3ce3c2d2 100644 --- a/test/core/end2end/fixtures/local_util.h +++ b/test/core/end2end/fixtures/local_util.h @@ -19,13 +19,12 @@ #ifndef GRPC_TEST_CORE_END2END_FIXTURES_LOCAL_UTIL_H #define GRPC_TEST_CORE_END2END_FIXTURES_LOCAL_UTIL_H -#include - -#include "absl/functional/any_invocable.h" - #include #include +#include + +#include "absl/functional/any_invocable.h" #include "src/core/lib/channel/channel_args.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/fixtures/proxy.cc b/test/core/end2end/fixtures/proxy.cc index 1d78ebcd2b7..728eddfc70d 100644 --- a/test/core/end2end/fixtures/proxy.cc +++ b/test/core/end2end/fixtures/proxy.cc @@ -18,15 +18,6 @@ #include "test/core/end2end/fixtures/proxy.h" -#include - -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -35,7 +26,14 @@ #include #include #include +#include + +#include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/surface/call.h" #include "src/core/util/crash.h" diff --git a/test/core/end2end/fixtures/secure_fixture.h b/test/core/end2end/fixtures/secure_fixture.h index 4586994981b..20e488f427b 100644 --- a/test/core/end2end/fixtures/secure_fixture.h +++ b/test/core/end2end/fixtures/secure_fixture.h @@ -15,16 +15,15 @@ #ifndef GRPC_TEST_CORE_END2END_FIXTURES_SECURE_FIXTURE_H #define GRPC_TEST_CORE_END2END_FIXTURES_SECURE_FIXTURE_H +#include +#include +#include + #include #include #include "absl/functional/any_invocable.h" #include "absl/log/check.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/host_port.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/fixtures/sockpair_fixture.h b/test/core/end2end/fixtures/sockpair_fixture.h index cedc002695f..ce3616c22cf 100644 --- a/test/core/end2end/fixtures/sockpair_fixture.h +++ b/test/core/end2end/fixtures/sockpair_fixture.h @@ -15,6 +15,10 @@ #ifndef GRPC_TEST_CORE_END2END_FIXTURES_SOCKPAIR_FIXTURE_H #define GRPC_TEST_CORE_END2END_FIXTURES_SOCKPAIR_FIXTURE_H +#include +#include +#include + #include #include "absl/functional/any_invocable.h" @@ -22,11 +26,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc index c4e960a7d9a..2cc58bdf76b 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.cc +++ b/test/core/end2end/fuzzers/api_fuzzer.cc @@ -16,6 +16,12 @@ // // +#include +#include +#include +#include +#include +#include #include #include @@ -36,14 +42,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/inproc/inproc_transport.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/end2end/fuzzers/client_fuzzer.cc b/test/core/end2end/fuzzers/client_fuzzer.cc index 9278eb8d0e5..b44a42e8fa6 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.cc +++ b/test/core/end2end/fuzzers/client_fuzzer.cc @@ -12,16 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include "absl/log/check.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" diff --git a/test/core/end2end/fuzzers/connector_fuzzer.h b/test/core/end2end/fuzzers/connector_fuzzer.h index 64b78aeb0bf..458851fa7cd 100644 --- a/test/core/end2end/fuzzers/connector_fuzzer.h +++ b/test/core/end2end/fuzzers/connector_fuzzer.h @@ -16,7 +16,6 @@ #define GRPC_TEST_CORE_END2END_FUZZERS_CONNECTOR_FUZZER_H #include "absl/functional/function_ref.h" - #include "src/core/client_channel/connector.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "test/core/end2end/fuzzers/fuzzer_input.pb.h" diff --git a/test/core/end2end/fuzzers/fuzzing_common.cc b/test/core/end2end/fuzzers/fuzzing_common.cc index 820af4ab182..85d6ec51d26 100644 --- a/test/core/end2end/fuzzers/fuzzing_common.cc +++ b/test/core/end2end/fuzzers/fuzzing_common.cc @@ -18,6 +18,13 @@ #include "test/core/end2end/fuzzers/fuzzing_common.h" +#include +#include +#include +#include +#include +#include +#include #include #include @@ -27,15 +34,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/config.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/end2end/fuzzers/fuzzing_common.h b/test/core/end2end/fuzzers/fuzzing_common.h index b365c698e2d..5f287fae66b 100644 --- a/test/core/end2end/fuzzers/fuzzing_common.h +++ b/test/core/end2end/fuzzers/fuzzing_common.h @@ -19,6 +19,7 @@ #ifndef GRPC_TEST_CORE_END2END_FUZZERS_FUZZING_COMMON_H #define GRPC_TEST_CORE_END2END_FUZZERS_FUZZING_COMMON_H +#include #include #include @@ -30,9 +31,6 @@ #include "absl/log/check.h" #include "absl/types/span.h" - -#include - #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/ref_counted_ptr.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/fuzzers/network_input.cc b/test/core/end2end/fuzzers/network_input.cc index 0afd8d1b95d..6a91a74d9ca 100644 --- a/test/core/end2end/fuzzers/network_input.cc +++ b/test/core/end2end/fuzzers/network_input.cc @@ -14,6 +14,7 @@ #include "test/core/end2end/fuzzers/network_input.h" +#include #include #include @@ -26,9 +27,6 @@ #include "absl/log/log.h" #include "absl/strings/string_view.h" #include "absl/types/span.h" - -#include - #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/ext/transport/chttp2/transport/varint.h" diff --git a/test/core/end2end/fuzzers/server_fuzzer.cc b/test/core/end2end/fuzzers/server_fuzzer.cc index ebf7034caec..1983ff9316e 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.cc +++ b/test/core/end2end/fuzzers/server_fuzzer.cc @@ -12,15 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "absl/log/check.h" -#include "absl/types/optional.h" - #include #include #include +#include + +#include "absl/log/check.h" +#include "absl/types/optional.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/experiments/config.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/end2end/fuzzers/server_fuzzer.h b/test/core/end2end/fuzzers/server_fuzzer.h index c8e42730348..621bb70ac4f 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.h +++ b/test/core/end2end/fuzzers/server_fuzzer.h @@ -15,10 +15,9 @@ #ifndef GRPC_TEST_CORE_END2END_FUZZERS_SERVER_FUZZER_H #define GRPC_TEST_CORE_END2END_FUZZERS_SERVER_FUZZER_H -#include "absl/functional/function_ref.h" - #include +#include "absl/functional/function_ref.h" #include "src/core/lib/channel/channel_args.h" #include "test/core/end2end/fuzzers/fuzzer_input.pb.h" diff --git a/test/core/end2end/fuzzers/server_fuzzer_chaotic_good.cc b/test/core/end2end/fuzzers/server_fuzzer_chaotic_good.cc index 6d688e655a2..09070be455f 100644 --- a/test/core/end2end/fuzzers/server_fuzzer_chaotic_good.cc +++ b/test/core/end2end/fuzzers/server_fuzzer_chaotic_good.cc @@ -12,10 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/libfuzzer/libfuzzer_macro.h" diff --git a/test/core/end2end/goaway_server_test.cc b/test/core/end2end/goaway_server_test.cc index 2ebc094e210..ef2e6840c2d 100644 --- a/test/core/end2end/goaway_server_test.cc +++ b/test/core/end2end/goaway_server_test.cc @@ -16,6 +16,16 @@ // // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -32,18 +42,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/experiments.h" diff --git a/test/core/end2end/h2_ssl_cert_test.cc b/test/core/end2end/h2_ssl_cert_test.cc index d9509266d0f..716b1faa0ad 100644 --- a/test/core/end2end/h2_ssl_cert_test.cc +++ b/test/core/end2end/h2_ssl_cert_test.cc @@ -16,6 +16,16 @@ // // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -28,18 +38,6 @@ #include "absl/log/log.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/h2_ssl_session_reuse_test.cc b/test/core/end2end/h2_ssl_session_reuse_test.cc index 882f09995e8..7bb518425b4 100644 --- a/test/core/end2end/h2_ssl_session_reuse_test.cc +++ b/test/core/end2end/h2_ssl_session_reuse_test.cc @@ -16,15 +16,6 @@ // // -#include - -#include - -#include - -#include "absl/log/check.h" -#include "absl/types/optional.h" - #include #include #include @@ -34,7 +25,13 @@ #include #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/types/optional.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/error.h" diff --git a/test/core/end2end/h2_tls_peer_property_external_verifier_test.cc b/test/core/end2end/h2_tls_peer_property_external_verifier_test.cc index a9f74bed935..9d232edf911 100644 --- a/test/core/end2end/h2_tls_peer_property_external_verifier_test.cc +++ b/test/core/end2end/h2_tls_peer_property_external_verifier_test.cc @@ -15,16 +15,6 @@ // limitations under the License. // // -#include -#include - -#include - -#include - -#include "absl/log/check.h" -#include "absl/types/optional.h" - #include #include #include @@ -34,7 +24,14 @@ #include #include #include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/types/optional.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/error.h" diff --git a/test/core/end2end/invalid_call_argument_test.cc b/test/core/end2end/invalid_call_argument_test.cc index ee7caff77ca..d587079a0e2 100644 --- a/test/core/end2end/invalid_call_argument_test.cc +++ b/test/core/end2end/invalid_call_argument_test.cc @@ -16,16 +16,6 @@ // // -#include -#include - -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -35,7 +25,15 @@ #include #include #include +#include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/util/host_port.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" diff --git a/test/core/end2end/no_server_test.cc b/test/core/end2end/no_server_test.cc index 5e8d9add4fd..f03b3225d70 100644 --- a/test/core/end2end/no_server_test.cc +++ b/test/core/end2end/no_server_test.cc @@ -16,6 +16,13 @@ // // +#include +#include +#include +#include +#include +#include +#include #include #include @@ -25,15 +32,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/time/time.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/resolver/endpoint_addresses.h" diff --git a/test/core/end2end/tests/bad_ping.cc b/test/core/end2end/tests/bad_ping.cc index 1a556d5ee52..adc5d8529f5 100644 --- a/test/core/end2end/tests/bad_ping.cc +++ b/test/core/end2end/tests/bad_ping.cc @@ -16,13 +16,12 @@ // // -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/binary_metadata.cc b/test/core/end2end/tests/binary_metadata.cc index a96ce818304..8b08e161521 100644 --- a/test/core/end2end/tests/binary_metadata.cc +++ b/test/core/end2end/tests/binary_metadata.cc @@ -16,13 +16,12 @@ // // -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/slice/slice.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/call_creds.cc b/test/core/end2end/tests/call_creds.cc index b19d555005b..115d368c473 100644 --- a/test/core/end2end/tests/call_creds.cc +++ b/test/core/end2end/tests/call_creds.cc @@ -16,17 +16,16 @@ // // -#include - -#include "absl/log/log.h" -#include "absl/types/optional.h" -#include "gtest/gtest.h" - #include #include #include #include +#include + +#include "absl/log/log.h" +#include "absl/types/optional.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/call_host_override.cc b/test/core/end2end/tests/call_host_override.cc index ee847552969..7c90de9486a 100644 --- a/test/core/end2end/tests/call_host_override.cc +++ b/test/core/end2end/tests/call_host_override.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/cancel_after_accept.cc b/test/core/end2end/tests/cancel_after_accept.cc index e22063354de..fde403d5b5a 100644 --- a/test/core/end2end/tests/cancel_after_accept.cc +++ b/test/core/end2end/tests/cancel_after_accept.cc @@ -16,15 +16,14 @@ // // +#include +#include + #include #include "absl/strings/str_cat.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/cancel_after_client_done.cc b/test/core/end2end/tests/cancel_after_client_done.cc index 8ca9e005ba8..a25bde486b4 100644 --- a/test/core/end2end/tests/cancel_after_client_done.cc +++ b/test/core/end2end/tests/cancel_after_client_done.cc @@ -16,13 +16,12 @@ // // +#include + #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/tests/cancel_test_helpers.h" diff --git a/test/core/end2end/tests/cancel_after_invoke.cc b/test/core/end2end/tests/cancel_after_invoke.cc index aeaf45bd2f1..6c66eae9f4d 100644 --- a/test/core/end2end/tests/cancel_after_invoke.cc +++ b/test/core/end2end/tests/cancel_after_invoke.cc @@ -16,13 +16,12 @@ // // +#include + #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/cancel_after_round_trip.cc b/test/core/end2end/tests/cancel_after_round_trip.cc index 00f268683a4..f225f1ad80d 100644 --- a/test/core/end2end/tests/cancel_after_round_trip.cc +++ b/test/core/end2end/tests/cancel_after_round_trip.cc @@ -16,15 +16,14 @@ // // +#include +#include + #include #include "absl/strings/str_cat.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/cancel_before_invoke.cc b/test/core/end2end/tests/cancel_before_invoke.cc index 6c5e07d6d63..942acef1941 100644 --- a/test/core/end2end/tests/cancel_before_invoke.cc +++ b/test/core/end2end/tests/cancel_before_invoke.cc @@ -16,12 +16,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/cancel_with_status.cc b/test/core/end2end/tests/cancel_with_status.cc index 4673ade3698..f80779ad96f 100644 --- a/test/core/end2end/tests/cancel_with_status.cc +++ b/test/core/end2end/tests/cancel_with_status.cc @@ -16,14 +16,13 @@ // // -#include - -#include "gtest/gtest.h" - #include #include #include +#include + +#include "gtest/gtest.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/channelz.cc b/test/core/end2end/tests/channelz.cc index dcd363a1051..7332b428a22 100644 --- a/test/core/end2end/tests/channelz.cc +++ b/test/core/end2end/tests/channelz.cc @@ -18,14 +18,13 @@ #include "src/core/channelz/channelz.h" +#include +#include + #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/surface/channel.h" #include "src/core/server/server.h" diff --git a/test/core/end2end/tests/client_streaming.cc b/test/core/end2end/tests/client_streaming.cc index 2cf6a617556..372e3d377b6 100644 --- a/test/core/end2end/tests/client_streaming.cc +++ b/test/core/end2end/tests/client_streaming.cc @@ -16,12 +16,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/compressed_payload.cc b/test/core/end2end/tests/compressed_payload.cc index cbae272da8e..0df335bca87 100644 --- a/test/core/end2end/tests/compressed_payload.cc +++ b/test/core/end2end/tests/compressed_payload.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include +#include #include #include @@ -24,12 +28,6 @@ #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/bitset.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/connectivity.cc b/test/core/end2end/tests/connectivity.cc index 00e83236e4d..364489fdb05 100644 --- a/test/core/end2end/tests/connectivity.cc +++ b/test/core/end2end/tests/connectivity.cc @@ -16,12 +16,11 @@ // // -#include "gmock/gmock.h" -#include "gtest/gtest.h" - #include #include +#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/default_host.cc b/test/core/end2end/tests/default_host.cc index fe5100dd845..5a84e9acdcd 100644 --- a/test/core/end2end/tests/default_host.cc +++ b/test/core/end2end/tests/default_host.cc @@ -16,14 +16,13 @@ // // +#include + #include #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/disappearing_server.cc b/test/core/end2end/tests/disappearing_server.cc index a42853b538b..31badc9f9b7 100644 --- a/test/core/end2end/tests/disappearing_server.cc +++ b/test/core/end2end/tests/disappearing_server.cc @@ -16,13 +16,12 @@ // // +#include + #include #include "absl/log/log.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/filter_causes_close.cc b/test/core/end2end/tests/filter_causes_close.cc index feae6776991..e1836375f1c 100644 --- a/test/core/end2end/tests/filter_causes_close.cc +++ b/test/core/end2end/tests/filter_causes_close.cc @@ -16,6 +16,7 @@ // // +#include #include #include @@ -23,9 +24,6 @@ #include "absl/status/status.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/test/core/end2end/tests/filter_init_fails.cc b/test/core/end2end/tests/filter_init_fails.cc index 5183489db1e..c258ee74221 100644 --- a/test/core/end2end/tests/filter_init_fails.cc +++ b/test/core/end2end/tests/filter_init_fails.cc @@ -16,6 +16,8 @@ // // +#include + #include #include @@ -23,9 +25,6 @@ #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/test/core/end2end/tests/filtered_metadata.cc b/test/core/end2end/tests/filtered_metadata.cc index 5f14a22a85b..ac3da1a9370 100644 --- a/test/core/end2end/tests/filtered_metadata.cc +++ b/test/core/end2end/tests/filtered_metadata.cc @@ -16,14 +16,13 @@ // // +#include + #include #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/graceful_server_shutdown.cc b/test/core/end2end/tests/graceful_server_shutdown.cc index 34390d02f07..8e72b926272 100644 --- a/test/core/end2end/tests/graceful_server_shutdown.cc +++ b/test/core/end2end/tests/graceful_server_shutdown.cc @@ -16,12 +16,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/grpc_authz.cc b/test/core/end2end/tests/grpc_authz.cc index 48553dd0357..7763d831da7 100644 --- a/test/core/end2end/tests/grpc_authz.cc +++ b/test/core/end2end/tests/grpc_authz.cc @@ -12,17 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "absl/log/check.h" -#include "absl/status/status.h" -#include "gtest/gtest.h" - #include #include #include #include +#include + +#include "absl/log/check.h" +#include "absl/status/status.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/authorization/authorization_policy_provider.h" #include "src/core/lib/security/authorization/grpc_authorization_policy_provider.h" diff --git a/test/core/end2end/tests/high_initial_seqno.cc b/test/core/end2end/tests/high_initial_seqno.cc index e9dd5cd39a7..5708bda98db 100644 --- a/test/core/end2end/tests/high_initial_seqno.cc +++ b/test/core/end2end/tests/high_initial_seqno.cc @@ -16,13 +16,12 @@ // // -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/hpack_size.cc b/test/core/end2end/tests/hpack_size.cc index 766a00cbe99..f42894e18b7 100644 --- a/test/core/end2end/tests/hpack_size.cc +++ b/test/core/end2end/tests/hpack_size.cc @@ -16,6 +16,8 @@ // // +#include +#include #include #include @@ -24,10 +26,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/no_destruct.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/http2_stats.cc b/test/core/end2end/tests/http2_stats.cc index 51561dbbe17..9e33da9ad5d 100644 --- a/test/core/end2end/tests/http2_stats.cc +++ b/test/core/end2end/tests/http2_stats.cc @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include #include @@ -23,10 +26,6 @@ #include "absl/strings/string_view.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/test/core/end2end/tests/invoke_large_request.cc b/test/core/end2end/tests/invoke_large_request.cc index 3302ee48e89..2b3ba1ba511 100644 --- a/test/core/end2end/tests/invoke_large_request.cc +++ b/test/core/end2end/tests/invoke_large_request.cc @@ -16,15 +16,13 @@ // // +#include +#include #include #include #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/slice/slice.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/keepalive_timeout.cc b/test/core/end2end/tests/keepalive_timeout.cc index 9c94b653c84..e60f8b29c97 100644 --- a/test/core/end2end/tests/keepalive_timeout.cc +++ b/test/core/end2end/tests/keepalive_timeout.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" diff --git a/test/core/end2end/tests/large_metadata.cc b/test/core/end2end/tests/large_metadata.cc index 9f053983980..b22b75d29d9 100644 --- a/test/core/end2end/tests/large_metadata.cc +++ b/test/core/end2end/tests/large_metadata.cc @@ -16,16 +16,14 @@ // // +#include +#include #include #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/max_concurrent_streams.cc b/test/core/end2end/tests/max_concurrent_streams.cc index 1b0d301b724..9c644dbe69c 100644 --- a/test/core/end2end/tests/max_concurrent_streams.cc +++ b/test/core/end2end/tests/max_concurrent_streams.cc @@ -16,13 +16,12 @@ // // -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/max_connection_age.cc b/test/core/end2end/tests/max_connection_age.cc index 0938eb2393c..88a0b2b3915 100644 --- a/test/core/end2end/tests/max_connection_age.cc +++ b/test/core/end2end/tests/max_connection_age.cc @@ -16,16 +16,14 @@ // // +#include +#include #include #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/max_connection_idle.cc b/test/core/end2end/tests/max_connection_idle.cc index 1dfbd2f6ede..1d139e862ac 100644 --- a/test/core/end2end/tests/max_connection_idle.cc +++ b/test/core/end2end/tests/max_connection_idle.cc @@ -16,16 +16,15 @@ // // +#include +#include +#include + #include #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/max_message_length.cc b/test/core/end2end/tests/max_message_length.cc index 5a70f2cdfa9..a7154fcb2d2 100644 --- a/test/core/end2end/tests/max_message_length.cc +++ b/test/core/end2end/tests/max_message_length.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/negative_deadline.cc b/test/core/end2end/tests/negative_deadline.cc index c1c5392c1bf..1fdf6771325 100644 --- a/test/core/end2end/tests/negative_deadline.cc +++ b/test/core/end2end/tests/negative_deadline.cc @@ -16,12 +16,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/no_logging.cc b/test/core/end2end/tests/no_logging.cc index e144dda3d1d..0bae8cf6270 100644 --- a/test/core/end2end/tests/no_logging.cc +++ b/test/core/end2end/tests/no_logging.cc @@ -16,6 +16,9 @@ // // +#include +#include + #include #include #include @@ -32,10 +35,6 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/payload.cc b/test/core/end2end/tests/payload.cc index 31c5456dee4..edc97835ba8 100644 --- a/test/core/end2end/tests/payload.cc +++ b/test/core/end2end/tests/payload.cc @@ -16,12 +16,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/slice/slice.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/ping.cc b/test/core/end2end/tests/ping.cc index 70b2fbb57c2..73094b8feb2 100644 --- a/test/core/end2end/tests/ping.cc +++ b/test/core/end2end/tests/ping.cc @@ -16,12 +16,11 @@ // // -#include "gmock/gmock.h" -#include "gtest/gtest.h" - #include #include +#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/ping_pong_streaming.cc b/test/core/end2end/tests/ping_pong_streaming.cc index 9cfd8bb92a9..784db17c7ad 100644 --- a/test/core/end2end/tests/ping_pong_streaming.cc +++ b/test/core/end2end/tests/ping_pong_streaming.cc @@ -16,10 +16,10 @@ // // -#include - #include +#include + #include "src/core/lib/slice/slice.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/proxy_auth.cc b/test/core/end2end/tests/proxy_auth.cc index 9b2b3897b83..23bcdbaff5e 100644 --- a/test/core/end2end/tests/proxy_auth.cc +++ b/test/core/end2end/tests/proxy_auth.cc @@ -16,13 +16,12 @@ // // +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/registered_call.cc b/test/core/end2end/tests/registered_call.cc index 1dc13b5acd5..e5779d67103 100644 --- a/test/core/end2end/tests/registered_call.cc +++ b/test/core/end2end/tests/registered_call.cc @@ -16,10 +16,9 @@ // // -#include "gtest/gtest.h" - #include +#include "gtest/gtest.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/request_with_flags.cc b/test/core/end2end/tests/request_with_flags.cc index 60db5aae583..12d25f13f05 100644 --- a/test/core/end2end/tests/request_with_flags.cc +++ b/test/core/end2end/tests/request_with_flags.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include +#include #include #include @@ -24,12 +28,6 @@ #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include -#include -#include - #include "src/core/lib/transport/transport.h" #include "src/core/util/time.h" #include "test/core/end2end/cq_verifier.h" diff --git a/test/core/end2end/tests/request_with_payload.cc b/test/core/end2end/tests/request_with_payload.cc index d2da70e6ec6..76cdf6c95e8 100644 --- a/test/core/end2end/tests/request_with_payload.cc +++ b/test/core/end2end/tests/request_with_payload.cc @@ -16,12 +16,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/resource_quota_server.cc b/test/core/end2end/tests/resource_quota_server.cc index 4b25143b5ec..637eee793c7 100644 --- a/test/core/end2end/tests/resource_quota_server.cc +++ b/test/core/end2end/tests/resource_quota_server.cc @@ -16,6 +16,9 @@ // // +#include +#include +#include #include #include @@ -24,11 +27,6 @@ #include "absl/log/log.h" #include "absl/strings/str_format.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/slice/slice.h" diff --git a/test/core/end2end/tests/retry.cc b/test/core/end2end/tests/retry.cc index 22e3434e553..e2a9361336a 100644 --- a/test/core/end2end/tests/retry.cc +++ b/test/core/end2end/tests/retry.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc b/test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc index cf33d718760..abef13e894c 100644 --- a/test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc +++ b/test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc @@ -14,12 +14,11 @@ // limitations under the License. // +#include + #include #include "absl/types/optional.h" - -#include - #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/retry_cancel_during_delay.cc b/test/core/end2end/tests/retry_cancel_during_delay.cc index 255d31ffe87..f30324170f5 100644 --- a/test/core/end2end/tests/retry_cancel_during_delay.cc +++ b/test/core/end2end/tests/retry_cancel_during_delay.cc @@ -14,15 +14,14 @@ // limitations under the License. // +#include +#include + #include #include "absl/strings/str_format.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_cancel_with_multiple_send_batches.cc b/test/core/end2end/tests/retry_cancel_with_multiple_send_batches.cc index 0fa65238d88..026bfc18278 100644 --- a/test/core/end2end/tests/retry_cancel_with_multiple_send_batches.cc +++ b/test/core/end2end/tests/retry_cancel_with_multiple_send_batches.cc @@ -16,6 +16,9 @@ // // +#include +#include + #include #include @@ -23,10 +26,6 @@ #include "absl/strings/str_format.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" diff --git a/test/core/end2end/tests/retry_cancellation.cc b/test/core/end2end/tests/retry_cancellation.cc index fd26c53c513..be20108ba49 100644 --- a/test/core/end2end/tests/retry_cancellation.cc +++ b/test/core/end2end/tests/retry_cancellation.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_disabled.cc b/test/core/end2end/tests/retry_disabled.cc index be335e8cd6d..9d86e113f5b 100644 --- a/test/core/end2end/tests/retry_disabled.cc +++ b/test/core/end2end/tests/retry_disabled.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_exceeds_buffer_size_in_delay.cc b/test/core/end2end/tests/retry_exceeds_buffer_size_in_delay.cc index 0171d6a828d..c819437c2b4 100644 --- a/test/core/end2end/tests/retry_exceeds_buffer_size_in_delay.cc +++ b/test/core/end2end/tests/retry_exceeds_buffer_size_in_delay.cc @@ -14,14 +14,13 @@ // limitations under the License. // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc b/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc index 90ac8edd5a0..7a6340c790e 100644 --- a/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc +++ b/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc b/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc index f962de41719..0edc8a9cfda 100644 --- a/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc +++ b/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_lb_drop.cc b/test/core/end2end/tests/retry_lb_drop.cc index abe92f8f9ac..f09cb785251 100644 --- a/test/core/end2end/tests/retry_lb_drop.cc +++ b/test/core/end2end/tests/retry_lb_drop.cc @@ -14,6 +14,10 @@ // limitations under the License. // +#include +#include +#include + #include #include #include @@ -24,11 +28,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/load_balancing/lb_policy.h" diff --git a/test/core/end2end/tests/retry_lb_fail.cc b/test/core/end2end/tests/retry_lb_fail.cc index 77ef319f3e3..7eed6fe21b3 100644 --- a/test/core/end2end/tests/retry_lb_fail.cc +++ b/test/core/end2end/tests/retry_lb_fail.cc @@ -14,15 +14,14 @@ // limitations under the License. // +#include +#include + #include #include #include "absl/status/status.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/retry_non_retriable_status.cc b/test/core/end2end/tests/retry_non_retriable_status.cc index 4051f38daa6..b0ce4bc5c10 100644 --- a/test/core/end2end/tests/retry_non_retriable_status.cc +++ b/test/core/end2end/tests/retry_non_retriable_status.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_non_retriable_status_before_trailers.cc b/test/core/end2end/tests/retry_non_retriable_status_before_trailers.cc index 07340b8d7f9..dfb33ba1ec3 100644 --- a/test/core/end2end/tests/retry_non_retriable_status_before_trailers.cc +++ b/test/core/end2end/tests/retry_non_retriable_status_before_trailers.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_per_attempt_recv_timeout.cc b/test/core/end2end/tests/retry_per_attempt_recv_timeout.cc index d21ce8ae7c3..f114ad330fd 100644 --- a/test/core/end2end/tests/retry_per_attempt_recv_timeout.cc +++ b/test/core/end2end/tests/retry_per_attempt_recv_timeout.cc @@ -14,15 +14,14 @@ // limitations under the License. // +#include +#include + #include #include "absl/strings/str_format.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_per_attempt_recv_timeout_on_last_attempt.cc b/test/core/end2end/tests/retry_per_attempt_recv_timeout_on_last_attempt.cc index f0447521b8c..0bb835fbca8 100644 --- a/test/core/end2end/tests/retry_per_attempt_recv_timeout_on_last_attempt.cc +++ b/test/core/end2end/tests/retry_per_attempt_recv_timeout_on_last_attempt.cc @@ -14,15 +14,14 @@ // limitations under the License. // +#include +#include + #include #include "absl/strings/str_format.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_recv_initial_metadata.cc b/test/core/end2end/tests/retry_recv_initial_metadata.cc index 2c4d44e6e1a..24021d4dbfa 100644 --- a/test/core/end2end/tests/retry_recv_initial_metadata.cc +++ b/test/core/end2end/tests/retry_recv_initial_metadata.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_recv_message.cc b/test/core/end2end/tests/retry_recv_message.cc index a2fcbc5ebd0..93d282684e9 100644 --- a/test/core/end2end/tests/retry_recv_message.cc +++ b/test/core/end2end/tests/retry_recv_message.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_recv_message_replay.cc b/test/core/end2end/tests/retry_recv_message_replay.cc index 1260785976a..31f11c01567 100644 --- a/test/core/end2end/tests/retry_recv_message_replay.cc +++ b/test/core/end2end/tests/retry_recv_message_replay.cc @@ -16,16 +16,15 @@ // // +#include +#include + #include #include #include "absl/status/status.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/test/core/end2end/tests/retry_recv_trailing_metadata_error.cc b/test/core/end2end/tests/retry_recv_trailing_metadata_error.cc index ab8a0fe4e34..9f986707f50 100644 --- a/test/core/end2end/tests/retry_recv_trailing_metadata_error.cc +++ b/test/core/end2end/tests/retry_recv_trailing_metadata_error.cc @@ -14,16 +14,15 @@ // limitations under the License. // +#include +#include + #include #include #include "absl/status/status.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/test/core/end2end/tests/retry_send_initial_metadata_refs.cc b/test/core/end2end/tests/retry_send_initial_metadata_refs.cc index 2f99da1ed2f..2f8bc7ea21a 100644 --- a/test/core/end2end/tests/retry_send_initial_metadata_refs.cc +++ b/test/core/end2end/tests/retry_send_initial_metadata_refs.cc @@ -16,15 +16,14 @@ // // -#include - -#include "absl/types/optional.h" -#include "gtest/gtest.h" - #include #include #include +#include + +#include "absl/types/optional.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_send_op_fails.cc b/test/core/end2end/tests/retry_send_op_fails.cc index 46ac40cff79..96cc4b0197a 100644 --- a/test/core/end2end/tests/retry_send_op_fails.cc +++ b/test/core/end2end/tests/retry_send_op_fails.cc @@ -16,16 +16,15 @@ // // +#include +#include + #include #include #include "absl/status/status.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" diff --git a/test/core/end2end/tests/retry_send_recv_batch.cc b/test/core/end2end/tests/retry_send_recv_batch.cc index 5f9ac9c7aa4..0708bd6665d 100644 --- a/test/core/end2end/tests/retry_send_recv_batch.cc +++ b/test/core/end2end/tests/retry_send_recv_batch.cc @@ -14,13 +14,12 @@ // limitations under the License. // -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_server_pushback_delay.cc b/test/core/end2end/tests/retry_server_pushback_delay.cc index 58507c833c3..b1acf7c3802 100644 --- a/test/core/end2end/tests/retry_server_pushback_delay.cc +++ b/test/core/end2end/tests/retry_server_pushback_delay.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_server_pushback_disabled.cc b/test/core/end2end/tests/retry_server_pushback_disabled.cc index 33226294b89..e63f92a3b3c 100644 --- a/test/core/end2end/tests/retry_server_pushback_disabled.cc +++ b/test/core/end2end/tests/retry_server_pushback_disabled.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_streaming.cc b/test/core/end2end/tests/retry_streaming.cc index 57b081803ac..62efed732ee 100644 --- a/test/core/end2end/tests/retry_streaming.cc +++ b/test/core/end2end/tests/retry_streaming.cc @@ -16,15 +16,14 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/surface/channel.h" diff --git a/test/core/end2end/tests/retry_streaming_after_commit.cc b/test/core/end2end/tests/retry_streaming_after_commit.cc index 2e642d4852f..c882b77d708 100644 --- a/test/core/end2end/tests/retry_streaming_after_commit.cc +++ b/test/core/end2end/tests/retry_streaming_after_commit.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc b/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc index 1d2e1f54d81..52cfc2b3659 100644 --- a/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc +++ b/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_throttled.cc b/test/core/end2end/tests/retry_throttled.cc index a0ca05f8757..0f973c59a66 100644 --- a/test/core/end2end/tests/retry_throttled.cc +++ b/test/core/end2end/tests/retry_throttled.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_too_many_attempts.cc b/test/core/end2end/tests/retry_too_many_attempts.cc index b68b5c14853..6cbbe9529ef 100644 --- a/test/core/end2end/tests/retry_too_many_attempts.cc +++ b/test/core/end2end/tests/retry_too_many_attempts.cc @@ -16,14 +16,13 @@ // // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_transparent_goaway.cc b/test/core/end2end/tests/retry_transparent_goaway.cc index 40352a5148f..e26882ca11e 100644 --- a/test/core/end2end/tests/retry_transparent_goaway.cc +++ b/test/core/end2end/tests/retry_transparent_goaway.cc @@ -14,16 +14,15 @@ // limitations under the License. // +#include +#include + #include #include #include "absl/status/status.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/core/end2end/tests/retry_transparent_max_concurrent_streams.cc b/test/core/end2end/tests/retry_transparent_max_concurrent_streams.cc index 75e4c8a9264..fd8eadff762 100644 --- a/test/core/end2end/tests/retry_transparent_max_concurrent_streams.cc +++ b/test/core/end2end/tests/retry_transparent_max_concurrent_streams.cc @@ -14,15 +14,14 @@ // limitations under the License. // -#include - -#include "absl/types/optional.h" -#include "gtest/gtest.h" - #include #include #include +#include + +#include "absl/types/optional.h" +#include "gtest/gtest.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/retry_transparent_not_sent_on_wire.cc b/test/core/end2end/tests/retry_transparent_not_sent_on_wire.cc index 1a7ca65aae6..9b3366397f1 100644 --- a/test/core/end2end/tests/retry_transparent_not_sent_on_wire.cc +++ b/test/core/end2end/tests/retry_transparent_not_sent_on_wire.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include +#include #include #include @@ -22,10 +24,6 @@ #include "absl/status/status.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/core/end2end/tests/retry_unref_before_finish.cc b/test/core/end2end/tests/retry_unref_before_finish.cc index 5c6a460c23d..c38fcb99c12 100644 --- a/test/core/end2end/tests/retry_unref_before_finish.cc +++ b/test/core/end2end/tests/retry_unref_before_finish.cc @@ -14,13 +14,12 @@ // limitations under the License. // -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/retry_unref_before_recv.cc b/test/core/end2end/tests/retry_unref_before_recv.cc index 569e8114d6b..83766e89bfa 100644 --- a/test/core/end2end/tests/retry_unref_before_recv.cc +++ b/test/core/end2end/tests/retry_unref_before_recv.cc @@ -14,14 +14,13 @@ // limitations under the License. // +#include +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/server_finishes_request.cc b/test/core/end2end/tests/server_finishes_request.cc index b1df0a39904..ff03a272f7d 100644 --- a/test/core/end2end/tests/server_finishes_request.cc +++ b/test/core/end2end/tests/server_finishes_request.cc @@ -16,12 +16,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/server_streaming.cc b/test/core/end2end/tests/server_streaming.cc index fd4e34d9afc..0d64489aa44 100644 --- a/test/core/end2end/tests/server_streaming.cc +++ b/test/core/end2end/tests/server_streaming.cc @@ -16,14 +16,13 @@ // // +#include + #include #include "absl/log/check.h" #include "absl/log/log.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/shutdown_finishes_calls.cc b/test/core/end2end/tests/shutdown_finishes_calls.cc index 03e83c57c62..39dc5ceb0c0 100644 --- a/test/core/end2end/tests/shutdown_finishes_calls.cc +++ b/test/core/end2end/tests/shutdown_finishes_calls.cc @@ -16,13 +16,12 @@ // // -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/tests/simple_delayed_request.cc b/test/core/end2end/tests/simple_delayed_request.cc index e9c61145e2b..952f983f2e8 100644 --- a/test/core/end2end/tests/simple_delayed_request.cc +++ b/test/core/end2end/tests/simple_delayed_request.cc @@ -16,15 +16,14 @@ // // -#include - -#include "absl/log/log.h" -#include "gtest/gtest.h" - #include #include #include +#include + +#include "absl/log/log.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/simple_metadata.cc b/test/core/end2end/tests/simple_metadata.cc index 4d1df2c05ff..265a71a5b74 100644 --- a/test/core/end2end/tests/simple_metadata.cc +++ b/test/core/end2end/tests/simple_metadata.cc @@ -16,12 +16,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/simple_request.cc b/test/core/end2end/tests/simple_request.cc index 5236e9692da..15a62333d64 100644 --- a/test/core/end2end/tests/simple_request.cc +++ b/test/core/end2end/tests/simple_request.cc @@ -16,6 +16,7 @@ // // +#include #include #include @@ -27,9 +28,6 @@ #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/streaming_error_response.cc b/test/core/end2end/tests/streaming_error_response.cc index 3ac939ed861..5efecd10671 100644 --- a/test/core/end2end/tests/streaming_error_response.cc +++ b/test/core/end2end/tests/streaming_error_response.cc @@ -19,12 +19,11 @@ /// \file Verify that status ordering rules are obeyed. /// \ref doc/status_ordering.md +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/timeout_before_request_call.cc b/test/core/end2end/tests/timeout_before_request_call.cc index 3a7217ed49d..e6b1c59f295 100644 --- a/test/core/end2end/tests/timeout_before_request_call.cc +++ b/test/core/end2end/tests/timeout_before_request_call.cc @@ -12,17 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include #include #include #include "absl/log/log.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/slice/slice.h" #include "src/core/util/time.h" diff --git a/test/core/end2end/tests/trailing_metadata.cc b/test/core/end2end/tests/trailing_metadata.cc index 268b699b427..d1eb7781937 100644 --- a/test/core/end2end/tests/trailing_metadata.cc +++ b/test/core/end2end/tests/trailing_metadata.cc @@ -16,12 +16,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/write_buffering.cc b/test/core/end2end/tests/write_buffering.cc index d3956f80031..c29bcca9d28 100644 --- a/test/core/end2end/tests/write_buffering.cc +++ b/test/core/end2end/tests/write_buffering.cc @@ -16,13 +16,12 @@ // // -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/write_buffering_at_end.cc b/test/core/end2end/tests/write_buffering_at_end.cc index 064e979e8fb..517a8820a10 100644 --- a/test/core/end2end/tests/write_buffering_at_end.cc +++ b/test/core/end2end/tests/write_buffering_at_end.cc @@ -16,13 +16,12 @@ // // -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/event_engine/cf/cf_engine_test.cc b/test/core/event_engine/cf/cf_engine_test.cc index 07ed18aa994..f6ac8c0ac6e 100644 --- a/test/core/event_engine/cf/cf_engine_test.cc +++ b/test/core/event_engine/cf/cf_engine_test.cc @@ -16,6 +16,9 @@ #ifdef GPR_APPLE +#include +#include + #include #include "absl/log/check.h" @@ -23,10 +26,6 @@ #include "absl/strings/str_format.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/event_engine/cf_engine/cf_engine.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" diff --git a/test/core/event_engine/common_closures_test.cc b/test/core/event_engine/common_closures_test.cc index a09d2061d69..b3a8fa39bbf 100644 --- a/test/core/event_engine/common_closures_test.cc +++ b/test/core/event_engine/common_closures_test.cc @@ -14,13 +14,12 @@ #include "src/core/lib/event_engine/common_closures.h" +#include + #include #include "absl/functional/any_invocable.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/notification.h" using ::grpc_event_engine::experimental::AnyInvocableClosure; diff --git a/test/core/event_engine/default_engine_methods_test.cc b/test/core/event_engine/default_engine_methods_test.cc index 030be18a504..04a415c1d9d 100644 --- a/test/core/event_engine/default_engine_methods_test.cc +++ b/test/core/event_engine/default_engine_methods_test.cc @@ -11,6 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include +#include +#include + #include #include #include @@ -22,13 +28,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/event_engine/endpoint_config_test.cc b/test/core/event_engine/endpoint_config_test.cc index 5a23b5e3263..f406481f9ec 100644 --- a/test/core/event_engine/endpoint_config_test.cc +++ b/test/core/event_engine/endpoint_config_test.cc @@ -11,13 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" diff --git a/test/core/event_engine/event_engine_test_utils.cc b/test/core/event_engine/event_engine_test_utils.cc index 65b609a63d4..c2a02d4dad5 100644 --- a/test/core/event_engine/event_engine_test_utils.cc +++ b/test/core/event_engine/event_engine_test_utils.cc @@ -14,6 +14,11 @@ #include "test/core/event_engine/event_engine_test_utils.h" +#include +#include +#include +#include +#include #include #include @@ -30,13 +35,6 @@ #include "absl/strings/str_cat.h" #include "absl/time/clock.h" #include "absl/time/time.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/resource_quota/memory_quota.h" diff --git a/test/core/event_engine/event_engine_test_utils.h b/test/core/event_engine/event_engine_test_utils.h index fa0f3622e1a..1cc09380fc5 100644 --- a/test/core/event_engine/event_engine_test_utils.h +++ b/test/core/event_engine/event_engine_test_utils.h @@ -15,6 +15,9 @@ #ifndef GRPC_TEST_CORE_EVENT_ENGINE_EVENT_ENGINE_TEST_UTILS_H #define GRPC_TEST_CORE_EVENT_ENGINE_EVENT_ENGINE_TEST_UTILS_H +#include +#include + #include #include #include @@ -27,10 +30,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/util/notification.h" #include "src/core/util/sync.h" diff --git a/test/core/event_engine/factory_test.cc b/test/core/event_engine/factory_test.cc index 370a7577f72..b8239dce4fe 100644 --- a/test/core/event_engine/factory_test.cc +++ b/test/core/event_engine/factory_test.cc @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "gtest/gtest.h" - #include #include #include +#include + +#include "gtest/gtest.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "test/core/event_engine/util/aborting_event_engine.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/event_engine/forkable_test.cc b/test/core/event_engine/forkable_test.cc index 86dbe636593..2b1da1d0b09 100644 --- a/test/core/event_engine/forkable_test.cc +++ b/test/core/event_engine/forkable_test.cc @@ -28,7 +28,6 @@ #include "absl/log/log.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - #include "src/core/lib/config/config_vars.h" #include "src/core/util/no_destruct.h" diff --git a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc index 1bc8a7a203e..7c24b1abfb8 100644 --- a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc +++ b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc @@ -14,6 +14,8 @@ #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" +#include +#include #include #include @@ -26,10 +28,6 @@ #include "absl/log/check.h" #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" - -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/iomgr/port.h" diff --git a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h index 6ff76e32a23..180943c882c 100644 --- a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h +++ b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h @@ -15,6 +15,11 @@ #ifndef GRPC_TEST_CORE_EVENT_ENGINE_FUZZING_EVENT_ENGINE_FUZZING_EVENT_ENGINE_H #define GRPC_TEST_CORE_EVENT_ENGINE_FUZZING_EVENT_ENGINE_FUZZING_EVENT_ENGINE_H +#include +#include +#include +#include +#include #include #include @@ -34,13 +39,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/time_util.h" #include "src/core/util/no_destruct.h" #include "src/core/util/sync.h" diff --git a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine_unittest.cc b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine_unittest.cc index e5eb79fccc3..0d89448a2f7 100644 --- a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine_unittest.cc +++ b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine_unittest.cc @@ -16,11 +16,10 @@ #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" -#include "absl/synchronization/notification.h" -#include "gtest/gtest.h" - #include +#include "absl/synchronization/notification.h" +#include "gtest/gtest.h" #include "src/core/util/time.h" using ::grpc_event_engine::experimental::FuzzingEventEngine; diff --git a/test/core/event_engine/handle_tests.cc b/test/core/event_engine/handle_tests.cc index 9e082c23a0e..864d9547246 100644 --- a/test/core/event_engine/handle_tests.cc +++ b/test/core/event_engine/handle_tests.cc @@ -11,14 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include "absl/strings/str_cat.h" #include "gtest/gtest.h" -#include -#include - using ::grpc_event_engine::experimental::EventEngine; template diff --git a/test/core/event_engine/mock_event_engine.h b/test/core/event_engine/mock_event_engine.h index 62266bdb12d..9036e7af6d1 100644 --- a/test/core/event_engine/mock_event_engine.h +++ b/test/core/event_engine/mock_event_engine.h @@ -15,6 +15,10 @@ #ifndef GRPC_TEST_CORE_EVENT_ENGINE_MOCK_EVENT_ENGINE_H #define GRPC_TEST_CORE_EVENT_ENGINE_MOCK_EVENT_ENGINE_H +#include +#include +#include + #include #include "absl/functional/any_invocable.h" @@ -22,10 +26,6 @@ #include "absl/status/statusor.h" #include "gmock/gmock.h" -#include -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/posix/event_poller_posix_test.cc b/test/core/event_engine/posix/event_poller_posix_test.cc index 673c4f9c78a..87ab1fc8038 100644 --- a/test/core/event_engine/posix/event_poller_posix_test.cc +++ b/test/core/event_engine/posix/event_poller_posix_test.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include @@ -28,9 +29,6 @@ #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h" @@ -46,6 +44,8 @@ #include #include +#include +#include #include #include #include @@ -54,10 +54,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" - -#include -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/event_poller_posix_default.h" diff --git a/test/core/event_engine/posix/lock_free_event_test.cc b/test/core/event_engine/posix/lock_free_event_test.cc index f53aea94ad5..1b0ffac0d37 100644 --- a/test/core/event_engine/posix/lock_free_event_test.cc +++ b/test/core/event_engine/posix/lock_free_event_test.cc @@ -12,22 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include #include #include -#include - #include "absl/functional/any_invocable.h" #include "absl/status/status.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/lockfree_event.h" diff --git a/test/core/event_engine/posix/log_too_many_open_files_test.cc b/test/core/event_engine/posix/log_too_many_open_files_test.cc index c87b879a286..8b2dc68679a 100644 --- a/test/core/event_engine/posix/log_too_many_open_files_test.cc +++ b/test/core/event_engine/posix/log_too_many_open_files_test.cc @@ -21,7 +21,6 @@ #include "absl/status/statusor.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/util/strerror.h" diff --git a/test/core/event_engine/posix/posix_endpoint_test.cc b/test/core/event_engine/posix/posix_endpoint_test.cc index a8ec3af12c5..5ad8bb7d937 100644 --- a/test/core/event_engine/posix/posix_endpoint_test.cc +++ b/test/core/event_engine/posix/posix_endpoint_test.cc @@ -14,6 +14,10 @@ #include "src/core/lib/event_engine/posix_engine/posix_endpoint.h" +#include +#include +#include + #include #include #include @@ -30,11 +34,6 @@ #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" diff --git a/test/core/event_engine/posix/posix_engine_listener_utils_test.cc b/test/core/event_engine/posix/posix_engine_listener_utils_test.cc index 319d8098b06..1e44d7633ad 100644 --- a/test/core/event_engine/posix/posix_engine_listener_utils_test.cc +++ b/test/core/event_engine/posix/posix_engine_listener_utils_test.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include #include @@ -23,9 +24,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/port.h" // This test won't work except with posix sockets enabled @@ -34,7 +32,6 @@ #include #include "absl/log/log.h" - #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h" #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" diff --git a/test/core/event_engine/posix/posix_engine_test_utils.cc b/test/core/event_engine/posix/posix_engine_test_utils.cc index 30c7f408804..88da5686515 100644 --- a/test/core/event_engine/posix/posix_engine_test_utils.cc +++ b/test/core/event_engine/posix/posix_engine_test_utils.cc @@ -22,7 +22,6 @@ #include "absl/log/log.h" #include "absl/strings/str_format.h" - #include "src/core/util/crash.h" namespace grpc_event_engine { diff --git a/test/core/event_engine/posix/posix_engine_test_utils.h b/test/core/event_engine/posix/posix_engine_test_utils.h index 33deec80818..34e83c4a124 100644 --- a/test/core/event_engine/posix/posix_engine_test_utils.h +++ b/test/core/event_engine/posix/posix_engine_test_utils.h @@ -15,12 +15,11 @@ #ifndef GRPC_TEST_CORE_EVENT_ENGINE_POSIX_POSIX_ENGINE_TEST_UTILS_H #define GRPC_TEST_CORE_EVENT_ENGINE_POSIX_POSIX_ENGINE_TEST_UTILS_H +#include + #include #include "absl/functional/any_invocable.h" - -#include - #include "src/core/lib/event_engine/posix_engine/event_poller.h" namespace grpc_event_engine { diff --git a/test/core/event_engine/posix/posix_event_engine_connect_test.cc b/test/core/event_engine/posix/posix_event_engine_connect_test.cc index 989e6c9f341..19f2819c51e 100644 --- a/test/core/event_engine/posix/posix_event_engine_connect_test.cc +++ b/test/core/event_engine/posix/posix_event_engine_connect_test.cc @@ -13,6 +13,9 @@ // limitations under the License. #include #include +#include +#include +#include #include #include #include @@ -34,11 +37,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/posix_engine/posix_engine.h" diff --git a/test/core/event_engine/posix/tcp_posix_socket_utils_test.cc b/test/core/event_engine/posix/tcp_posix_socket_utils_test.cc index 0e1099b57aa..99db037a195 100644 --- a/test/core/event_engine/posix/tcp_posix_socket_utils_test.cc +++ b/test/core/event_engine/posix/tcp_posix_socket_utils_test.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include @@ -19,9 +20,6 @@ #include "absl/status/status.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/port.h" // IWYU pragma: no_include @@ -29,11 +27,10 @@ // This test won't work except with posix sockets enabled #ifdef GRPC_POSIX_SOCKET_UTILS_COMMON +#include #include #include -#include - #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include "src/core/lib/iomgr/socket_mutator.h" #include "src/core/util/useful.h" diff --git a/test/core/event_engine/posix/timer_heap_test.cc b/test/core/event_engine/posix/timer_heap_test.cc index ee1a82e6e0b..5d71ee6f52e 100644 --- a/test/core/event_engine/posix/timer_heap_test.cc +++ b/test/core/event_engine/posix/timer_heap_test.cc @@ -27,7 +27,6 @@ #include "absl/log/check.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/event_engine/posix_engine/timer.h" #include "src/core/util/bitset.h" diff --git a/test/core/event_engine/posix/timer_list_test.cc b/test/core/event_engine/posix/timer_list_test.cc index 0fae801fb94..ca3aa663949 100644 --- a/test/core/event_engine/posix/timer_list_test.cc +++ b/test/core/event_engine/posix/timer_list_test.cc @@ -16,6 +16,9 @@ // // +#include +#include + #include #include #include @@ -23,10 +26,6 @@ #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/event_engine/posix_engine/timer.h" #include "src/core/util/time.h" diff --git a/test/core/event_engine/posix/timer_manager_test.cc b/test/core/event_engine/posix/timer_manager_test.cc index 1cfe58a2d80..40f53540b75 100644 --- a/test/core/event_engine/posix/timer_manager_test.cc +++ b/test/core/event_engine/posix/timer_manager_test.cc @@ -14,6 +14,8 @@ #include "src/core/lib/event_engine/posix_engine/timer_manager.h" +#include + #include #include #include @@ -23,9 +25,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/posix_engine/timer.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" diff --git a/test/core/event_engine/posix/traced_buffer_list_test.cc b/test/core/event_engine/posix/traced_buffer_list_test.cc index 9e267fe1d3f..1d460aac166 100644 --- a/test/core/event_engine/posix/traced_buffer_list_test.cc +++ b/test/core/event_engine/posix/traced_buffer_list_test.cc @@ -14,16 +14,14 @@ #include "src/core/lib/event_engine/posix_engine/traced_buffer_list.h" +#include +#include #include #include #include "absl/log/check.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/port.h" #include "src/core/util/time.h" diff --git a/test/core/event_engine/posix/wakeup_fd_posix_test.cc b/test/core/event_engine/posix/wakeup_fd_posix_test.cc index b9872eede12..e2d11bba602 100644 --- a/test/core/event_engine/posix/wakeup_fd_posix_test.cc +++ b/test/core/event_engine/posix/wakeup_fd_posix_test.cc @@ -18,7 +18,6 @@ #include "absl/status/statusor.h" #include "gtest/gtest.h" - #include "src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h" diff --git a/test/core/event_engine/query_extensions_test.cc b/test/core/event_engine/query_extensions_test.cc index d657f43b81f..0c10b76cc29 100644 --- a/test/core/event_engine/query_extensions_test.cc +++ b/test/core/event_engine/query_extensions_test.cc @@ -13,16 +13,15 @@ // limitations under the License. #include "src/core/lib/event_engine/query_extensions.h" +#include +#include +#include + #include #include "absl/functional/any_invocable.h" #include "absl/status/status.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/util/crash.h" namespace grpc_event_engine { diff --git a/test/core/event_engine/slice_buffer_test.cc b/test/core/event_engine/slice_buffer_test.cc index 0a0c26f9520..a3221ac6743 100644 --- a/test/core/event_engine/slice_buffer_test.cc +++ b/test/core/event_engine/slice_buffer_test.cc @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include +#include +#include #include #include @@ -20,12 +25,6 @@ #include "absl/log/check.h" #include "gtest/gtest.h" -#include -#include -#include -#include -#include - using ::grpc_event_engine::experimental::Slice; using ::grpc_event_engine::experimental::SliceBuffer; diff --git a/test/core/event_engine/smoke_test.cc b/test/core/event_engine/smoke_test.cc index e557a8c4e45..0a53992b15e 100644 --- a/test/core/event_engine/smoke_test.cc +++ b/test/core/event_engine/smoke_test.cc @@ -11,15 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "gmock/gmock.h" -#include "gtest/gtest.h" - #include #include #include +#include + +#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "test/core/test_util/test_config.h" namespace { diff --git a/test/core/event_engine/tcp_socket_utils_test.cc b/test/core/event_engine/tcp_socket_utils_test.cc index 53ce735e478..fc926592685 100644 --- a/test/core/event_engine/tcp_socket_utils_test.cc +++ b/test/core/event_engine/tcp_socket_utils_test.cc @@ -14,7 +14,6 @@ #include "src/core/lib/event_engine/tcp_socket_utils.h" #include - #include #include "src/core/lib/iomgr/port.h" // IWYU pragma: keep @@ -45,13 +44,12 @@ #endif // GPR_WINDOWS #endif // GRPC_HAVE_UNIX_SOCKET +#include + #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/sockaddr.h" namespace grpc_event_engine { diff --git a/test/core/event_engine/test_init.cc b/test/core/event_engine/test_init.cc index 2b7600ce0d2..1a342794345 100644 --- a/test/core/event_engine/test_init.cc +++ b/test/core/event_engine/test_init.cc @@ -13,12 +13,12 @@ // limitations under the License. #include "test/core/event_engine/test_init.h" +#include + #include #include "absl/strings/str_cat.h" -#include - namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/test_init.h b/test/core/event_engine/test_init.h index 7ab584d07f3..2af682f523f 100644 --- a/test/core/event_engine/test_init.h +++ b/test/core/event_engine/test_init.h @@ -13,11 +13,11 @@ // limitations under the License. #ifndef GRPC_TEST_CORE_EVENT_ENGINE_TEST_INIT_H #define GRPC_TEST_CORE_EVENT_ENGINE_TEST_INIT_H +#include + #include "absl/status/status.h" #include "absl/strings/string_view.h" -#include - namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/test_suite/event_engine_test_framework.cc b/test/core/event_engine/test_suite/event_engine_test_framework.cc index 962d9e4d074..2affed14094 100644 --- a/test/core/event_engine/test_suite/event_engine_test_framework.cc +++ b/test/core/event_engine/test_suite/event_engine_test_framework.cc @@ -13,9 +13,8 @@ // limitations under the License. #include "test/core/event_engine/test_suite/event_engine_test_framework.h" -#include - #include +#include absl::AnyInvocable< std::shared_ptr()>* diff --git a/test/core/event_engine/test_suite/event_engine_test_framework.h b/test/core/event_engine/test_suite/event_engine_test_framework.h index 0f2b768637a..afb57911e2b 100644 --- a/test/core/event_engine/test_suite/event_engine_test_framework.h +++ b/test/core/event_engine/test_suite/event_engine_test_framework.h @@ -14,16 +14,15 @@ #ifndef GRPC_TEST_CORE_EVENT_ENGINE_TEST_SUITE_EVENT_ENGINE_TEST_FRAMEWORK_H #define GRPC_TEST_CORE_EVENT_ENGINE_TEST_SUITE_EVENT_ENGINE_TEST_FRAMEWORK_H +#include +#include + #include #include -#include - #include "absl/functional/any_invocable.h" #include "absl/log/check.h" -#include - extern absl::AnyInvocable< std::shared_ptr()>* g_ee_factory; diff --git a/test/core/event_engine/test_suite/fuzzing_event_engine_test.cc b/test/core/event_engine/test_suite/fuzzing_event_engine_test.cc index afd288bcc0a..e2c718f9166 100644 --- a/test/core/event_engine/test_suite/fuzzing_event_engine_test.cc +++ b/test/core/event_engine/test_suite/fuzzing_event_engine_test.cc @@ -14,10 +14,10 @@ #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" -#include - #include +#include + #include "test/core/event_engine/test_suite/event_engine_test_framework.h" #include "test/core/event_engine/test_suite/tests/timer_test.h" diff --git a/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.cc b/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.cc index 3efef67009f..b5f0c70ceb9 100644 --- a/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.cc +++ b/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.cc @@ -14,6 +14,8 @@ #include "test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h" +#include +#include #include #include #include @@ -30,10 +32,6 @@ #include "absl/strings/str_format.h" #include "absl/time/clock.h" #include "absl/time/time.h" - -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/util/crash.h" diff --git a/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h b/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h index 94fbb928832..6db3489c030 100644 --- a/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h +++ b/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h @@ -15,6 +15,11 @@ #ifndef GRPC_TEST_CORE_EVENT_ENGINE_TEST_SUITE_POSIX_ORACLE_EVENT_ENGINE_POSIX_H #define GRPC_TEST_CORE_EVENT_ENGINE_TEST_SUITE_POSIX_ORACLE_EVENT_ENGINE_POSIX_H +#include +#include +#include +#include + #include #include #include @@ -24,12 +29,6 @@ #include "absl/functional/any_invocable.h" #include "absl/status/status.h" #include "absl/status/statusor.h" - -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/notification.h" #include "src/core/util/sync.h" diff --git a/test/core/event_engine/test_suite/posix_event_engine_native_dns_test.cc b/test/core/event_engine/test_suite/posix_event_engine_native_dns_test.cc index fc864f89078..682d4402d80 100644 --- a/test/core/event_engine/test_suite/posix_event_engine_native_dns_test.cc +++ b/test/core/event_engine/test_suite/posix_event_engine_native_dns_test.cc @@ -11,14 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include #include -#include - -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/posix_engine/posix_engine.h" #include "test/core/event_engine/test_suite/event_engine_test_framework.h" diff --git a/test/core/event_engine/test_suite/posix_event_engine_test.cc b/test/core/event_engine/test_suite/posix_event_engine_test.cc index 26c34c9a9f8..605431a95dd 100644 --- a/test/core/event_engine/test_suite/posix_event_engine_test.cc +++ b/test/core/event_engine/test_suite/posix_event_engine_test.cc @@ -11,11 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include - +#include #include -#include +#include #include "src/core/lib/event_engine/posix_engine/posix_engine.h" #include "test/core/event_engine/test_suite/event_engine_test_framework.h" diff --git a/test/core/event_engine/test_suite/tests/client_test.cc b/test/core/event_engine/test_suite/tests/client_test.cc index c6bd435a3cb..fd6c22067d5 100644 --- a/test/core/event_engine/test_suite/tests/client_test.cc +++ b/test/core/event_engine/test_suite/tests/client_test.cc @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include @@ -29,11 +33,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" diff --git a/test/core/event_engine/test_suite/tests/dns_test.cc b/test/core/event_engine/test_suite/tests/dns_test.cc index a50102970ed..1613085a42d 100644 --- a/test/core/event_engine/test_suite/tests/dns_test.cc +++ b/test/core/event_engine/test_suite/tests/dns_test.cc @@ -15,6 +15,9 @@ // IWYU pragma: no_include // IWYU pragma: no_include +#include +#include + #include #include #include @@ -31,10 +34,6 @@ #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/test/core/event_engine/test_suite/tests/server_test.cc b/test/core/event_engine/test_suite/tests/server_test.cc index 88e64ef04e0..630dc7c7dd5 100644 --- a/test/core/event_engine/test_suite/tests/server_test.cc +++ b/test/core/event_engine/test_suite/tests/server_test.cc @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include @@ -29,11 +33,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" diff --git a/test/core/event_engine/test_suite/tests/timer_test.cc b/test/core/event_engine/test_suite/tests/timer_test.cc index c4a4e5cc35a..bc25e6e1bbc 100644 --- a/test/core/event_engine/test_suite/tests/timer_test.cc +++ b/test/core/event_engine/test_suite/tests/timer_test.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include #include @@ -31,9 +33,6 @@ #include "absl/time/time.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/event_engine/time_util.h" #include "src/core/util/sync.h" #include "test/core/event_engine/test_suite/event_engine_test_framework.h" diff --git a/test/core/event_engine/test_suite/thready_posix_event_engine_test.cc b/test/core/event_engine/test_suite/thready_posix_event_engine_test.cc index 43088eb5bb3..6ebd37ffb39 100644 --- a/test/core/event_engine/test_suite/thready_posix_event_engine_test.cc +++ b/test/core/event_engine/test_suite/thready_posix_event_engine_test.cc @@ -11,11 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include - +#include #include -#include +#include #include "src/core/lib/event_engine/posix_engine/posix_engine.h" #include "src/core/lib/event_engine/thready_event_engine/thready_event_engine.h" diff --git a/test/core/event_engine/test_suite/tools/echo_client.cc b/test/core/event_engine/test_suite/tools/echo_client.cc index 76749f58309..f44ddae72e6 100644 --- a/test/core/event_engine/test_suite/tools/echo_client.cc +++ b/test/core/event_engine/test_suite/tools/echo_client.cc @@ -11,13 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include +#include #include #include "absl/log/check.h" -#include -#include - // The echo client wraps an EventEngine::Connect and EventEngine::Endpoint // implementations, allowing third-party TCP listeners to interact with your // EventEngine client. Example usage: @@ -31,6 +30,10 @@ // bazel run // //test/core/event_engine/test_suite/tools:my_event_engine_echo_client +#include +#include +#include + #include #include #include @@ -43,11 +46,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" - -#include -#include -#include - #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" diff --git a/test/core/event_engine/test_suite/tools/posix_event_engine_factory.cc b/test/core/event_engine/test_suite/tools/posix_event_engine_factory.cc index 9b7d2ae8a5a..c107ef47f3b 100644 --- a/test/core/event_engine/test_suite/tools/posix_event_engine_factory.cc +++ b/test/core/event_engine/test_suite/tools/posix_event_engine_factory.cc @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include "absl/functional/any_invocable.h" #include "absl/log/check.h" - -#include -#include - #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET_TCP diff --git a/test/core/event_engine/test_suite/tools/windows_event_engine_factory.cc b/test/core/event_engine/test_suite/tools/windows_event_engine_factory.cc index 98f591fe604..2fa66748d82 100644 --- a/test/core/event_engine/test_suite/tools/windows_event_engine_factory.cc +++ b/test/core/event_engine/test_suite/tools/windows_event_engine_factory.cc @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include "absl/functional/any_invocable.h" #include "absl/log/check.h" -#include -#include - #ifdef GPR_WINDOWS #include "src/core/lib/event_engine/windows/windows_engine.h" diff --git a/test/core/event_engine/thread_pool_test.cc b/test/core/event_engine/thread_pool_test.cc index 29f32d16691..1c4d29c44e7 100644 --- a/test/core/event_engine/thread_pool_test.cc +++ b/test/core/event_engine/thread_pool_test.cc @@ -13,6 +13,9 @@ // limitations under the License. #include "src/core/lib/event_engine/thread_pool/thread_pool.h" +#include +#include + #include #include #include @@ -26,10 +29,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/event_engine/thread_pool/thread_count.h" #include "src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h" #include "src/core/util/notification.h" diff --git a/test/core/event_engine/util/aborting_event_engine.h b/test/core/event_engine/util/aborting_event_engine.h index ecc2db968dd..9c49a2b2b6a 100644 --- a/test/core/event_engine/util/aborting_event_engine.h +++ b/test/core/event_engine/util/aborting_event_engine.h @@ -14,6 +14,10 @@ #ifndef GRPC_TEST_CORE_EVENT_ENGINE_UTIL_ABORTING_EVENT_ENGINE_H #define GRPC_TEST_CORE_EVENT_ENGINE_UTIL_ABORTING_EVENT_ENGINE_H +#include +#include +#include +#include #include #include @@ -22,11 +26,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" -#include -#include -#include -#include - namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/windows/create_sockpair.cc b/test/core/event_engine/windows/create_sockpair.cc index 3817f98ac6f..7de56720da7 100644 --- a/test/core/event_engine/windows/create_sockpair.cc +++ b/test/core/event_engine/windows/create_sockpair.cc @@ -20,7 +20,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/status.h" - #include "src/core/lib/event_engine/windows/win_socket.h" #include "src/core/lib/iomgr/error.h" #include "test/core/event_engine/windows/create_sockpair.h" diff --git a/test/core/event_engine/windows/iocp_test.cc b/test/core/event_engine/windows/iocp_test.cc index b5ee504c643..9e798ff7e21 100644 --- a/test/core/event_engine/windows/iocp_test.cc +++ b/test/core/event_engine/windows/iocp_test.cc @@ -14,19 +14,17 @@ #include #ifdef GPR_WINDOWS -#include - #include +#include +#include #include +#include + #include "absl/log/log.h" #include "absl/status/status.h" #include "absl/time/time.h" #include "absl/types/variant.h" - -#include -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" diff --git a/test/core/event_engine/windows/win_socket_test.cc b/test/core/event_engine/windows/win_socket_test.cc index daa3c5360f5..e0902a81bd3 100644 --- a/test/core/event_engine/windows/win_socket_test.cc +++ b/test/core/event_engine/windows/win_socket_test.cc @@ -15,14 +15,12 @@ #include #ifdef GPR_WINDOWS +#include +#include #include #include "absl/status/status.h" #include "absl/time/time.h" - -#include -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/iocp.h" diff --git a/test/core/event_engine/windows/windows_endpoint_test.cc b/test/core/event_engine/windows/windows_endpoint_test.cc index 9ada4bbf471..e06b3928350 100644 --- a/test/core/event_engine/windows/windows_endpoint_test.cc +++ b/test/core/event_engine/windows/windows_endpoint_test.cc @@ -16,13 +16,11 @@ #ifdef GPR_WINDOWS -#include - -#include "absl/status/status.h" - #include #include +#include +#include "absl/status/status.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/iocp.h" diff --git a/test/core/event_engine/work_queue/basic_work_queue_fuzzer.cc b/test/core/event_engine/work_queue/basic_work_queue_fuzzer.cc index be59f7ecdb8..9481282ea5e 100644 --- a/test/core/event_engine/work_queue/basic_work_queue_fuzzer.cc +++ b/test/core/event_engine/work_queue/basic_work_queue_fuzzer.cc @@ -11,6 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include +#include #include #include @@ -19,10 +21,6 @@ #include "absl/functional/any_invocable.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" #include "src/libfuzzer/libfuzzer_macro.h" diff --git a/test/core/event_engine/work_queue/basic_work_queue_test.cc b/test/core/event_engine/work_queue/basic_work_queue_test.cc index e5658f85c0a..a8ecefb928b 100644 --- a/test/core/event_engine/work_queue/basic_work_queue_test.cc +++ b/test/core/event_engine/work_queue/basic_work_queue_test.cc @@ -13,15 +13,14 @@ // limitations under the License. #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" +#include +#include + #include #include #include "absl/functional/any_invocable.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/event_engine/common_closures.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/experiments/experiments_tag_test.cc b/test/core/experiments/experiments_tag_test.cc index 51643148209..63d42a7bd3b 100644 --- a/test/core/experiments/experiments_tag_test.cc +++ b/test/core/experiments/experiments_tag_test.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include "absl/status/status.h" @@ -20,9 +22,6 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/experiments/config.h" #include "test/core/experiments/fixtures/experiments.h" diff --git a/test/core/experiments/experiments_test.cc b/test/core/experiments/experiments_test.cc index f604efa05ff..2964104c3dd 100644 --- a/test/core/experiments/experiments_test.cc +++ b/test/core/experiments/experiments_test.cc @@ -16,12 +16,11 @@ #include "test/core/experiments/fixtures/experiments.h" +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/experiments/config.h" #ifndef GRPC_EXPERIMENTS_ARE_FINAL diff --git a/test/core/ext/filters/event_engine_client_channel_resolver/resolver_fuzzer.cc b/test/core/ext/filters/event_engine_client_channel_resolver/resolver_fuzzer.cc index 56e8783629b..202ead109fb 100644 --- a/test/core/ext/filters/event_engine_client_channel_resolver/resolver_fuzzer.cc +++ b/test/core/ext/filters/event_engine_client_channel_resolver/resolver_fuzzer.cc @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include #include @@ -25,10 +28,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" diff --git a/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc b/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc index 369ebcc468d..43985c9d5c6 100644 --- a/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc +++ b/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc @@ -14,6 +14,10 @@ #include "src/core/ext/filters/rbac/rbac_service_config_parser.h" +#include +#include +#include + #include #include #include @@ -23,11 +27,6 @@ #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" diff --git a/test/core/filters/bm_http_client_filter.cc b/test/core/filters/bm_http_client_filter.cc index 967af7ab6a4..0e295d86fec 100644 --- a/test/core/filters/bm_http_client_filter.cc +++ b/test/core/filters/bm_http_client_filter.cc @@ -13,11 +13,9 @@ // limitations under the License. #include - -#include "absl/strings/string_view.h" - #include +#include "absl/strings/string_view.h" #include "src/core/ext/filters/http/client/http_client_filter.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/test/core/filters/client_auth_filter_test.cc b/test/core/filters/client_auth_filter_test.cc index f6a29e17d89..b4cdef1abe5 100644 --- a/test/core/filters/client_auth_filter_test.cc +++ b/test/core/filters/client_auth_filter_test.cc @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include +#include + #include #include @@ -20,12 +25,6 @@ #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/promise/arena_promise.h" diff --git a/test/core/filters/client_authority_filter_test.cc b/test/core/filters/client_authority_filter_test.cc index cdb99d9999d..62e85416ac6 100644 --- a/test/core/filters/client_authority_filter_test.cc +++ b/test/core/filters/client_authority_filter_test.cc @@ -14,15 +14,14 @@ #include "src/core/ext/filters/http/client_authority_filter.h" +#include + #include #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "test/core/filters/filter_test.h" using ::testing::StrictMock; diff --git a/test/core/filters/filter_test.cc b/test/core/filters/filter_test.cc index 11ff4cfa087..e710abc43b9 100644 --- a/test/core/filters/filter_test.cc +++ b/test/core/filters/filter_test.cc @@ -14,6 +14,8 @@ #include "test/core/filters/filter_test.h" +#include + #include #include #include @@ -24,9 +26,6 @@ #include "absl/strings/str_format.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/call_finalization.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/timer_manager.h" diff --git a/test/core/filters/filter_test.h b/test/core/filters/filter_test.h index 4c193efce31..13a9a80e8a1 100644 --- a/test/core/filters/filter_test.h +++ b/test/core/filters/filter_test.h @@ -15,6 +15,9 @@ #ifndef GRPC_TEST_CORE_FILTERS_FILTER_TEST_H #define GRPC_TEST_CORE_FILTERS_FILTER_TEST_H +#include +#include +#include #include #include @@ -25,17 +28,11 @@ #include #include -#include - #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/escaping.h" #include "absl/strings/string_view.h" #include "gmock/gmock.h" - -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/resource_quota/arena.h" diff --git a/test/core/filters/filter_test_test.cc b/test/core/filters/filter_test_test.cc index ec836316f86..6da52c84be4 100644 --- a/test/core/filters/filter_test_test.cc +++ b/test/core/filters/filter_test_test.cc @@ -14,6 +14,8 @@ #include "test/core/filters/filter_test.h" +#include + #include #include #include @@ -22,9 +24,6 @@ #include "absl/status/statusor.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/promise/activity.h" diff --git a/test/core/filters/gcp_authentication_filter_test.cc b/test/core/filters/gcp_authentication_filter_test.cc index 5f3880fa998..e75706b4ea0 100644 --- a/test/core/filters/gcp_authentication_filter_test.cc +++ b/test/core/filters/gcp_authentication_filter_test.cc @@ -22,7 +22,6 @@ #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/security/context/security_context.h" diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc index 3032abf8ced..1a8035cc104 100644 --- a/test/core/handshake/client_ssl.cc +++ b/test/core/handshake/client_ssl.cc @@ -16,21 +16,18 @@ // // +#include +#include +#include #include -#include -#include - #include #include +#include +#include #include "absl/base/thread_annotations.h" #include "absl/strings/str_format.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/port.h" #include "test/core/test_util/test_config.h" @@ -40,6 +37,11 @@ // This test won't work except with posix sockets enabled #ifdef GRPC_POSIX_SOCKET_TCP +#include +#include +#include +#include +#include #include #include #include @@ -47,16 +49,8 @@ #include -#include -#include - #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/util/crash.h" #include "src/core/util/sync.h" diff --git a/test/core/handshake/http_proxy_mapper_test.cc b/test/core/handshake/http_proxy_mapper_test.cc index 1c7d40e022d..30741b71589 100644 --- a/test/core/handshake/http_proxy_mapper_test.cc +++ b/test/core/handshake/http_proxy_mapper_test.cc @@ -18,15 +18,14 @@ #include "src/core/handshaker/http_connect/http_proxy_mapper.h" +#include + #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/handshaker/http_connect/http_connect_handshaker.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" diff --git a/test/core/handshake/readahead_handshaker_server_ssl.cc b/test/core/handshake/readahead_handshaker_server_ssl.cc index 9b4203ec6f2..e8401f084f6 100644 --- a/test/core/handshake/readahead_handshaker_server_ssl.cc +++ b/test/core/handshake/readahead_handshaker_server_ssl.cc @@ -16,14 +16,13 @@ // // +#include + #include #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include - #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/handshaker_factory.h" #include "src/core/handshaker/handshaker_registry.h" diff --git a/test/core/handshake/server_ssl.cc b/test/core/handshake/server_ssl.cc index 9776d7330e4..7910251502e 100644 --- a/test/core/handshake/server_ssl.cc +++ b/test/core/handshake/server_ssl.cc @@ -19,7 +19,6 @@ #include #include "gtest/gtest.h" - #include "test/core/handshake/server_ssl_common.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc index 7a8910fac34..a026e7c9fba 100644 --- a/test/core/handshake/server_ssl_common.cc +++ b/test/core/handshake/server_ssl_common.cc @@ -18,7 +18,18 @@ #include "test/core/handshake/server_ssl_common.h" +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include #include #include @@ -28,24 +39,10 @@ #include -#include -#include -#include -#include - #include "absl/base/thread_annotations.h" #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/util/crash.h" #include "src/core/util/sync.h" diff --git a/test/core/handshake/verify_peer_options.cc b/test/core/handshake/verify_peer_options.cc index 626dc964468..96e9d4cd79c 100644 --- a/test/core/handshake/verify_peer_options.cc +++ b/test/core/handshake/verify_peer_options.cc @@ -22,6 +22,12 @@ #ifdef GRPC_POSIX_SOCKET_TCP #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -29,18 +35,9 @@ #include -#include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/thd.h" #include "test/core/test_util/port.h" diff --git a/test/core/http/format_request_test.cc b/test/core/http/format_request_test.cc index 31c73d88100..2d2deb6d4bb 100644 --- a/test/core/http/format_request_test.cc +++ b/test/core/http/format_request_test.cc @@ -23,7 +23,6 @@ #include #include "gtest/gtest.h" - #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/http_client/httpcli.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index 0f9b26ab912..53b6236ba0d 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -18,6 +18,14 @@ #include "src/core/util/http_client/httpcli.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -26,23 +34,12 @@ #include #include -#include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/time/clock.h" #include "absl/time/time.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/test/core/http/httpcli_test_util.cc b/test/core/http/httpcli_test_util.cc index f47bb1d61a8..6ba8c6d1d7d 100644 --- a/test/core/http/httpcli_test_util.cc +++ b/test/core/http/httpcli_test_util.cc @@ -16,6 +16,10 @@ #include "test/core/http/httpcli_test_util.h" +#include +#include +#include +#include #include #include @@ -26,12 +30,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include -#include -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/util/subprocess.h" #include "test/core/test_util/port.h" diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc index 11596745a6d..0f051f6a860 100644 --- a/test/core/http/httpscli_test.cc +++ b/test/core/http/httpscli_test.cc @@ -16,6 +16,12 @@ // // +#include +#include +#include +#include +#include +#include #include #include @@ -26,21 +32,12 @@ #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "absl/time/clock.h" #include "absl/time/time.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" diff --git a/test/core/http/parser_test.cc b/test/core/http/parser_test.cc index 4e3f508338a..a7ff86e5cc6 100644 --- a/test/core/http/parser_test.cc +++ b/test/core/http/parser_test.cc @@ -18,6 +18,7 @@ #include "src/core/util/http_client/parser.h" +#include #include #include @@ -26,9 +27,6 @@ #include "absl/status/status.h" #include "absl/strings/str_format.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/useful.h" #include "test/core/test_util/slice_splitter.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/http/request_fuzzer.cc b/test/core/http/request_fuzzer.cc index 7ca890c7e01..aef8b6424f5 100644 --- a/test/core/http/request_fuzzer.cc +++ b/test/core/http/request_fuzzer.cc @@ -16,11 +16,10 @@ // // -#include -#include - #include #include +#include +#include #include "src/core/util/http_client/parser.h" diff --git a/test/core/http/response_fuzzer.cc b/test/core/http/response_fuzzer.cc index e2cadb79eb8..377098028e3 100644 --- a/test/core/http/response_fuzzer.cc +++ b/test/core/http/response_fuzzer.cc @@ -16,11 +16,10 @@ // // -#include -#include - #include #include +#include +#include #include "src/core/util/http_client/parser.h" diff --git a/test/core/iomgr/buffer_list_test.cc b/test/core/iomgr/buffer_list_test.cc index d6620314c29..f80a2a53ff9 100644 --- a/test/core/iomgr/buffer_list_test.cc +++ b/test/core/iomgr/buffer_list_test.cc @@ -18,13 +18,11 @@ #include "src/core/lib/iomgr/buffer_list.h" -#include - -#include "absl/log/check.h" - #include #include +#include +#include "absl/log/check.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/internal_errqueue.h" #include "src/core/lib/iomgr/port.h" diff --git a/test/core/iomgr/combiner_test.cc b/test/core/iomgr/combiner_test.cc index 1e3daba3978..7c7d66e918d 100644 --- a/test/core/iomgr/combiner_test.cc +++ b/test/core/iomgr/combiner_test.cc @@ -18,12 +18,11 @@ #include "src/core/lib/iomgr/combiner.h" -#include - -#include - #include #include +#include + +#include #include "src/core/util/crash.h" #include "src/core/util/notification.h" diff --git a/test/core/iomgr/endpoint_pair_test.cc b/test/core/iomgr/endpoint_pair_test.cc index 76518fa5cd0..532d40203fa 100644 --- a/test/core/iomgr/endpoint_pair_test.cc +++ b/test/core/iomgr/endpoint_pair_test.cc @@ -18,18 +18,16 @@ #include "src/core/lib/iomgr/endpoint_pair.h" -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include #include +#include + +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/default_event_engine.h" diff --git a/test/core/iomgr/endpoint_tests.cc b/test/core/iomgr/endpoint_tests.cc index 5f0044bb6f0..b20245aad53 100644 --- a/test/core/iomgr/endpoint_tests.cc +++ b/test/core/iomgr/endpoint_tests.cc @@ -18,17 +18,15 @@ #include "test/core/iomgr/endpoint_tests.h" +#include +#include +#include #include #include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/crash.h" diff --git a/test/core/iomgr/error_test.cc b/test/core/iomgr/error_test.cc index 93ce01db702..2ff779733bb 100644 --- a/test/core/iomgr/error_test.cc +++ b/test/core/iomgr/error_test.cc @@ -18,16 +18,13 @@ #include "src/core/lib/iomgr/error.h" -#include - #include - -#include "absl/log/log.h" -#include "absl/strings/str_cat.h" - #include #include +#include +#include "absl/log/log.h" +#include "absl/strings/str_cat.h" #include "src/core/util/crash.h" #include "src/core/util/strerror.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/iomgr/fd_conservation_posix_test.cc b/test/core/iomgr/fd_conservation_posix_test.cc index 8a75b4f41e2..8d1f7844cbb 100644 --- a/test/core/iomgr/fd_conservation_posix_test.cc +++ b/test/core/iomgr/fd_conservation_posix_test.cc @@ -16,12 +16,10 @@ // // +#include #include #include "absl/log/check.h" - -#include - #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/util/crash.h" diff --git a/test/core/iomgr/fd_posix_test.cc b/test/core/iomgr/fd_posix_test.cc index 4de02c79db3..875bbf5e0be 100644 --- a/test/core/iomgr/fd_posix_test.cc +++ b/test/core/iomgr/fd_posix_test.cc @@ -27,6 +27,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -38,12 +42,6 @@ #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include - #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/socket_utils_posix.h" diff --git a/test/core/iomgr/grpc_ipv6_loopback_available_test.cc b/test/core/iomgr/grpc_ipv6_loopback_available_test.cc index e1d615ea9ca..db1da269193 100644 --- a/test/core/iomgr/grpc_ipv6_loopback_available_test.cc +++ b/test/core/iomgr/grpc_ipv6_loopback_available_test.cc @@ -16,9 +16,8 @@ // // -#include - #include +#include #include "src/core/lib/iomgr/port.h" #include "src/core/util/crash.h" diff --git a/test/core/iomgr/pollset_windows_starvation_test.cc b/test/core/iomgr/pollset_windows_starvation_test.cc index dc75b1f61d6..b921e19f162 100644 --- a/test/core/iomgr/pollset_windows_starvation_test.cc +++ b/test/core/iomgr/pollset_windows_starvation_test.cc @@ -15,11 +15,11 @@ // limitations under the License. // // -#include - #include #include +#include + #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr_internal.h" diff --git a/test/core/iomgr/resolve_address_posix_test.cc b/test/core/iomgr/resolve_address_posix_test.cc index 1c0eecfa04c..0d3deea8ba4 100644 --- a/test/core/iomgr/resolve_address_posix_test.cc +++ b/test/core/iomgr/resolve_address_posix_test.cc @@ -16,24 +16,21 @@ // // +#include +#include +#include +#include +#include #include #include #include #include -#include - #include "absl/flags/flag.h" #include "absl/flags/parse.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" diff --git a/test/core/iomgr/resolve_address_test.cc b/test/core/iomgr/resolve_address_test.cc index 97da4df464c..db0c041c470 100644 --- a/test/core/iomgr/resolve_address_test.cc +++ b/test/core/iomgr/resolve_address_test.cc @@ -18,22 +18,19 @@ #include "src/core/lib/iomgr/resolve_address.h" -#include - #include #include +#include +#include +#include +#include #include +#include #include "absl/functional/bind_front.h" #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/match.h" - -#include -#include -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" diff --git a/test/core/iomgr/socket_utils_test.cc b/test/core/iomgr/socket_utils_test.cc index 861ea5eae25..fa492c8c204 100644 --- a/test/core/iomgr/socket_utils_test.cc +++ b/test/core/iomgr/socket_utils_test.cc @@ -22,17 +22,14 @@ #ifdef GRPC_POSIX_SOCKET_UTILS_COMMON #include +#include +#include +#include #include #include #include -#include - #include "absl/log/check.h" - -#include -#include - #include "src/core/lib/iomgr/socket_mutator.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/util/crash.h" diff --git a/test/core/iomgr/tcp_client_posix_test.cc b/test/core/iomgr/tcp_client_posix_test.cc index 6a567765b38..bdfb8a9ab9d 100644 --- a/test/core/iomgr/tcp_client_posix_test.cc +++ b/test/core/iomgr/tcp_client_posix_test.cc @@ -30,6 +30,9 @@ #include #include +#include +#include +#include #include #include #include @@ -37,11 +40,6 @@ #include #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/test/core/iomgr/tcp_posix_test.cc b/test/core/iomgr/tcp_posix_test.cc index 897df84cf3e..35a7018075b 100644 --- a/test/core/iomgr/tcp_posix_test.cc +++ b/test/core/iomgr/tcp_posix_test.cc @@ -17,7 +17,6 @@ // #include "absl/time/time.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/port.h" #include "src/core/util/notification.h" @@ -28,21 +27,18 @@ #include #include +#include +#include +#include +#include #include #include #include #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/posix.h" diff --git a/test/core/iomgr/tcp_server_posix_test.cc b/test/core/iomgr/tcp_server_posix_test.cc index 09c4a5c0d83..86a7e30ab32 100644 --- a/test/core/iomgr/tcp_server_posix_test.cc +++ b/test/core/iomgr/tcp_server_posix_test.cc @@ -39,16 +39,15 @@ #include #endif -#include -#include - -#include "absl/log/log.h" - #include #include #include #include +#include +#include + +#include "absl/log/log.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/iomgr/error.h" diff --git a/test/core/iomgr/timer_heap_test.cc b/test/core/iomgr/timer_heap_test.cc index 3e2b907e7b5..4882fb2fda2 100644 --- a/test/core/iomgr/timer_heap_test.cc +++ b/test/core/iomgr/timer_heap_test.cc @@ -18,15 +18,12 @@ #include "src/core/lib/iomgr/timer_heap.h" +#include +#include #include #include -#include - #include "absl/log/log.h" - -#include - #include "src/core/lib/iomgr/port.h" #include "src/core/util/crash.h" #include "src/core/util/useful.h" diff --git a/test/core/iomgr/timer_list_test.cc b/test/core/iomgr/timer_list_test.cc index cd0a5221d60..ffe81cd0a5e 100644 --- a/test/core/iomgr/timer_list_test.cc +++ b/test/core/iomgr/timer_list_test.cc @@ -16,6 +16,7 @@ // // +#include #include #include @@ -23,9 +24,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/port.h" diff --git a/test/core/json/fuzzer.cc b/test/core/json/fuzzer.cc index bc17d74af3d..3191f0a00c4 100644 --- a/test/core/json/fuzzer.cc +++ b/test/core/json/fuzzer.cc @@ -16,15 +16,13 @@ // // +#include #include #include #include "absl/log/check.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" diff --git a/test/core/json/json_object_loader_test.cc b/test/core/json/json_object_loader_test.cc index aad3567f86b..385c8ef93bb 100644 --- a/test/core/json/json_object_loader_test.cc +++ b/test/core/json/json_object_loader_test.cc @@ -14,14 +14,13 @@ #include "src/core/util/json/json_object_loader.h" +#include + #include #include "absl/status/status.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" #include "src/core/util/ref_counted.h" diff --git a/test/core/json/json_test.cc b/test/core/json/json_test.cc index cf9f68cf212..2e44c6636ad 100644 --- a/test/core/json/json_test.cc +++ b/test/core/json/json_test.cc @@ -29,7 +29,6 @@ #include "absl/strings/str_cat.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/load_balancing/bm_picker.cc b/test/core/load_balancing/bm_picker.cc index 51aee364d3f..b596ef553bc 100644 --- a/test/core/load_balancing/bm_picker.cc +++ b/test/core/load_balancing/bm_picker.cc @@ -12,14 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include - -#include "absl/strings/string_view.h" - #include +#include + +#include "absl/strings/string_view.h" #include "src/core/client_channel/subchannel_interface_internal.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/core/load_balancing/lb_policy_test_lib.h b/test/core/load_balancing/lb_policy_test_lib.h index 00c21dcd9a3..2280ae6833f 100644 --- a/test/core/load_balancing/lb_policy_test_lib.h +++ b/test/core/load_balancing/lb_policy_test_lib.h @@ -17,6 +17,10 @@ #ifndef GRPC_TEST_CORE_LOAD_BALANCING_LB_POLICY_TEST_LIB_H #define GRPC_TEST_CORE_LOAD_BALANCING_LB_POLICY_TEST_LIB_H +#include +#include +#include +#include #include #include @@ -48,12 +52,6 @@ #include "absl/types/variant.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include - #include "src/core/client_channel/client_channel_internal.h" #include "src/core/client_channel/subchannel_interface_internal.h" #include "src/core/client_channel/subchannel_pool_interface.h" diff --git a/test/core/load_balancing/outlier_detection_lb_config_parser_test.cc b/test/core/load_balancing/outlier_detection_lb_config_parser_test.cc index b5145f451ff..1793807fc55 100644 --- a/test/core/load_balancing/outlier_detection_lb_config_parser_test.cc +++ b/test/core/load_balancing/outlier_detection_lb_config_parser_test.cc @@ -14,15 +14,14 @@ // limitations under the License. // +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" diff --git a/test/core/load_balancing/outlier_detection_test.cc b/test/core/load_balancing/outlier_detection_test.cc index e92c3bc4e84..d73a4ed54bf 100644 --- a/test/core/load_balancing/outlier_detection_test.cc +++ b/test/core/load_balancing/outlier_detection_test.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include +#include #include #include @@ -31,10 +33,6 @@ #include "absl/types/optional.h" #include "absl/types/span.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/resolver/endpoint_addresses.h" diff --git a/test/core/load_balancing/pick_first_test.cc b/test/core/load_balancing/pick_first_test.cc index 0f07d6fd39d..75bf64c8328 100644 --- a/test/core/load_balancing/pick_first_test.cc +++ b/test/core/load_balancing/pick_first_test.cc @@ -16,6 +16,8 @@ #include "src/core/load_balancing/pick_first/pick_first.h" +#include +#include #include #include @@ -33,10 +35,6 @@ #include "absl/types/span.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/load_balancing/lb_policy.h" diff --git a/test/core/load_balancing/ring_hash_test.cc b/test/core/load_balancing/ring_hash_test.cc index 0861cdcb5db..522f5794921 100644 --- a/test/core/load_balancing/ring_hash_test.cc +++ b/test/core/load_balancing/ring_hash_test.cc @@ -16,6 +16,8 @@ #include "src/core/load_balancing/ring_hash/ring_hash.h" +#include +#include #include #include @@ -30,10 +32,6 @@ #include "absl/strings/strip.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/load_balancing/lb_policy.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/util/json/json.h" diff --git a/test/core/load_balancing/rls_lb_config_parser_test.cc b/test/core/load_balancing/rls_lb_config_parser_test.cc index edf3e8127bf..a710284f471 100644 --- a/test/core/load_balancing/rls_lb_config_parser_test.cc +++ b/test/core/load_balancing/rls_lb_config_parser_test.cc @@ -14,15 +14,14 @@ // limitations under the License. // +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" diff --git a/test/core/load_balancing/round_robin_test.cc b/test/core/load_balancing/round_robin_test.cc index 78da9b904f3..0eb2a3ef372 100644 --- a/test/core/load_balancing/round_robin_test.cc +++ b/test/core/load_balancing/round_robin_test.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include + #include #include @@ -21,9 +23,6 @@ #include "absl/strings/string_view.h" #include "absl/types/span.h" #include "gtest/gtest.h" - -#include - #include "src/core/resolver/endpoint_addresses.h" #include "src/core/util/orphanable.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/core/load_balancing/static_stride_scheduler_benchmark.cc b/test/core/load_balancing/static_stride_scheduler_benchmark.cc index aba086e7e40..06edb74f976 100644 --- a/test/core/load_balancing/static_stride_scheduler_benchmark.cc +++ b/test/core/load_balancing/static_stride_scheduler_benchmark.cc @@ -14,19 +14,18 @@ // limitations under the License. // +#include + #include #include #include #include -#include - #include "absl/algorithm/container.h" #include "absl/log/check.h" #include "absl/random/random.h" #include "absl/types/optional.h" #include "absl/types/span.h" - #include "src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h" #include "src/core/util/no_destruct.h" diff --git a/test/core/load_balancing/weighted_round_robin_config_test.cc b/test/core/load_balancing/weighted_round_robin_config_test.cc index 5da2fb5a006..eac134bd823 100644 --- a/test/core/load_balancing/weighted_round_robin_config_test.cc +++ b/test/core/load_balancing/weighted_round_robin_config_test.cc @@ -14,14 +14,13 @@ // limitations under the License. // +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" diff --git a/test/core/load_balancing/weighted_round_robin_test.cc b/test/core/load_balancing/weighted_round_robin_test.cc index 8faa6c693e1..274d6543bf8 100644 --- a/test/core/load_balancing/weighted_round_robin_test.cc +++ b/test/core/load_balancing/weighted_round_robin_test.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include +#include #include #include @@ -36,10 +38,6 @@ #include "absl/types/optional.h" #include "absl/types/span.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/weighted_target/weighted_target.h" diff --git a/test/core/load_balancing/xds_override_host_lb_config_parser_test.cc b/test/core/load_balancing/xds_override_host_lb_config_parser_test.cc index 3407ababe59..fb14dd90c34 100644 --- a/test/core/load_balancing/xds_override_host_lb_config_parser_test.cc +++ b/test/core/load_balancing/xds_override_host_lb_config_parser_test.cc @@ -14,14 +14,13 @@ // limitations under the License. // +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gtest/gtest.h" - -#include - #include "src/core/client_channel/client_channel_service_config.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/load_balancing/xds/xds_override_host.h" diff --git a/test/core/load_balancing/xds_override_host_test.cc b/test/core/load_balancing/xds_override_host_test.cc index 4352b6db370..e487b6ab323 100644 --- a/test/core/load_balancing/xds_override_host_test.cc +++ b/test/core/load_balancing/xds_override_host_test.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include +#include #include #include @@ -33,10 +35,6 @@ #include "absl/types/span.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/ext/filters/stateful_session/stateful_session_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/load_balancing/lb_policy.h" diff --git a/test/core/memory_usage/callback_client.cc b/test/core/memory_usage/callback_client.cc index 449fcbd34fe..0f0630517ac 100644 --- a/test/core/memory_usage/callback_client.cc +++ b/test/core/memory_usage/callback_client.cc @@ -16,6 +16,11 @@ // // +#include +#include +#include +#include +#include #include #include @@ -31,13 +36,6 @@ #include "absl/log/log.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" - -#include -#include -#include -#include -#include - #include "src/core/util/notification.h" #include "src/cpp/ext/chaotic_good.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" diff --git a/test/core/memory_usage/callback_server.cc b/test/core/memory_usage/callback_server.cc index c630b4dc816..81a08b38725 100644 --- a/test/core/memory_usage/callback_server.cc +++ b/test/core/memory_usage/callback_server.cc @@ -16,6 +16,11 @@ // // +#include +#include +#include +#include +#include #include #include @@ -26,13 +31,6 @@ #include "absl/flags/parse.h" #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include -#include - #include "src/cpp/ext/chaotic_good.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/core/memory_usage/client.cc b/test/core/memory_usage/client.cc index 003b108e6dd..6591f48e294 100644 --- a/test/core/memory_usage/client.cc +++ b/test/core/memory_usage/client.cc @@ -16,6 +16,16 @@ // // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -30,18 +40,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/match.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/test/core/memory_usage/memory_usage_test.cc b/test/core/memory_usage/memory_usage_test.cc index 798b90093da..04349e9bb10 100644 --- a/test/core/memory_usage/memory_usage_test.cc +++ b/test/core/memory_usage/memory_usage_test.cc @@ -16,6 +16,11 @@ // // +#include +#include +#include +#include +#include #include #include #include @@ -38,13 +43,6 @@ #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "google/protobuf/wrappers.pb.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/util/env.h" #include "src/core/util/subprocess.h" diff --git a/test/core/memory_usage/server.cc b/test/core/memory_usage/server.cc index 4f41754d06c..294a10c95b4 100644 --- a/test/core/memory_usage/server.cc +++ b/test/core/memory_usage/server.cc @@ -26,17 +26,6 @@ #include #endif -#include -#include -#include - -#include "absl/base/attributes.h" -#include "absl/flags/flag.h" -#include "absl/flags/parse.h" -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/status/status.h" - #include #include #include @@ -47,6 +36,16 @@ #include #include +#include +#include +#include + +#include "absl/base/attributes.h" +#include "absl/flags/flag.h" +#include "absl/flags/parse.h" +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/status.h" #include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/host_port.h" diff --git a/test/core/message_size/message_size_service_config_test.cc b/test/core/message_size/message_size_service_config_test.cc index 65fd3a11118..ed15404a886 100644 --- a/test/core/message_size/message_size_service_config_test.cc +++ b/test/core/message_size/message_size_service_config_test.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include +#include #include #include @@ -21,10 +23,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/ext/filters/message_size/message_size_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/core/nanopb/fuzzer_response.cc b/test/core/nanopb/fuzzer_response.cc index a952cf558dc..75b7c196536 100644 --- a/test/core/nanopb/fuzzer_response.cc +++ b/test/core/nanopb/fuzzer_response.cc @@ -16,11 +16,10 @@ // // +#include #include #include -#include - #include "test/core/test_util/test_config.h" bool squelch = true; diff --git a/test/core/nanopb/fuzzer_serverlist.cc b/test/core/nanopb/fuzzer_serverlist.cc index 278f4c4cbfa..e58e855ebe1 100644 --- a/test/core/nanopb/fuzzer_serverlist.cc +++ b/test/core/nanopb/fuzzer_serverlist.cc @@ -16,11 +16,10 @@ // // +#include #include #include -#include - #include "test/core/test_util/test_config.h" bool squelch = true; diff --git a/test/core/network_benchmarks/low_level_ping_pong.cc b/test/core/network_benchmarks/low_level_ping_pong.cc index 9211b83e7ea..44b990eb5ee 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.cc +++ b/test/core/network_benchmarks/low_level_ping_pong.cc @@ -33,14 +33,12 @@ #ifdef __linux__ #include #endif +#include +#include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/util/strerror.h" diff --git a/test/core/promise/activity_test.cc b/test/core/promise/activity_test.cc index eccd2c8c9bc..45edfc35eec 100644 --- a/test/core/promise/activity_test.cc +++ b/test/core/promise/activity_test.cc @@ -22,7 +22,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/promise/join.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/promise/promise.h" diff --git a/test/core/promise/arena_promise_test.cc b/test/core/promise/arena_promise_test.cc index 2f4da3b2c5d..f51d26f114d 100644 --- a/test/core/promise/arena_promise_test.cc +++ b/test/core/promise/arena_promise_test.cc @@ -14,13 +14,12 @@ #include "src/core/lib/promise/arena_promise.h" +#include + #include #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/core/promise/bm_party.cc b/test/core/promise/bm_party.cc index c271a4d240a..c6976e62a19 100644 --- a/test/core/promise/bm_party.cc +++ b/test/core/promise/bm_party.cc @@ -13,7 +13,6 @@ // limitations under the License. #include - #include #include "src/core/lib/event_engine/default_event_engine.h" diff --git a/test/core/promise/cancel_callback_test.cc b/test/core/promise/cancel_callback_test.cc index 64ca6d0a8ce..3a674a009f6 100644 --- a/test/core/promise/cancel_callback_test.cc +++ b/test/core/promise/cancel_callback_test.cc @@ -18,7 +18,6 @@ #include #include "gtest/gtest.h" - #include "src/core/lib/promise/poll.h" namespace grpc_core { diff --git a/test/core/promise/event_engine_wakeup_scheduler_test.cc b/test/core/promise/event_engine_wakeup_scheduler_test.cc index 739c1a25f4e..4972de90245 100644 --- a/test/core/promise/event_engine_wakeup_scheduler_test.cc +++ b/test/core/promise/event_engine_wakeup_scheduler_test.cc @@ -14,16 +14,14 @@ #include "src/core/lib/promise/event_engine_wakeup_scheduler.h" +#include +#include #include #include #include "absl/status/status.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/util/notification.h" diff --git a/test/core/promise/exec_ctx_wakeup_scheduler_test.cc b/test/core/promise/exec_ctx_wakeup_scheduler_test.cc index 27d1c49bdb6..d7fb2449bc1 100644 --- a/test/core/promise/exec_ctx_wakeup_scheduler_test.cc +++ b/test/core/promise/exec_ctx_wakeup_scheduler_test.cc @@ -20,7 +20,6 @@ #include "absl/status/status.h" #include "gtest/gtest.h" - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" diff --git a/test/core/promise/for_each_test.cc b/test/core/promise/for_each_test.cc index ea0f63732c1..c1863b6e4ea 100644 --- a/test/core/promise/for_each_test.cc +++ b/test/core/promise/for_each_test.cc @@ -14,13 +14,12 @@ #include "src/core/lib/promise/for_each.h" +#include + #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/inter_activity_pipe.h" #include "src/core/lib/promise/join.h" diff --git a/test/core/promise/inter_activity_latch_test.cc b/test/core/promise/inter_activity_latch_test.cc index 925062c561b..d71ce40cae5 100644 --- a/test/core/promise/inter_activity_latch_test.cc +++ b/test/core/promise/inter_activity_latch_test.cc @@ -14,11 +14,10 @@ #include "src/core/lib/promise/inter_activity_latch.h" -#include "absl/status/status.h" -#include "gtest/gtest.h" - #include +#include "absl/status/status.h" +#include "gtest/gtest.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/promise/event_engine_wakeup_scheduler.h" #include "src/core/lib/promise/seq.h" diff --git a/test/core/promise/inter_activity_pipe_test.cc b/test/core/promise/inter_activity_pipe_test.cc index a81ac5c1822..6493ff35b2d 100644 --- a/test/core/promise/inter_activity_pipe_test.cc +++ b/test/core/promise/inter_activity_pipe_test.cc @@ -18,7 +18,6 @@ #include "absl/status/status.h" #include "gtest/gtest.h" - #include "src/core/lib/promise/seq.h" #include "test/core/promise/test_wakeup_schedulers.h" diff --git a/test/core/promise/interceptor_list_test.cc b/test/core/promise/interceptor_list_test.cc index d52ba611006..6797c4dfe5a 100644 --- a/test/core/promise/interceptor_list_test.cc +++ b/test/core/promise/interceptor_list_test.cc @@ -14,12 +14,11 @@ #include "src/core/lib/promise/interceptor_list.h" +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/core/promise/join_test.cc b/test/core/promise/join_test.cc index 7e60d65732f..2fd6b21dc96 100644 --- a/test/core/promise/join_test.cc +++ b/test/core/promise/join_test.cc @@ -19,7 +19,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/promise/poll.h" #include "test/core/promise/poll_matcher.h" diff --git a/test/core/promise/latch_test.cc b/test/core/promise/latch_test.cc index b1af24bd4bf..8fef26a0d40 100644 --- a/test/core/promise/latch_test.cc +++ b/test/core/promise/latch_test.cc @@ -20,7 +20,6 @@ #include "absl/status/status.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/join.h" #include "src/core/lib/promise/seq.h" diff --git a/test/core/promise/loop_test.cc b/test/core/promise/loop_test.cc index 42362327915..7ec3a1060ef 100644 --- a/test/core/promise/loop_test.cc +++ b/test/core/promise/loop_test.cc @@ -18,7 +18,6 @@ #include #include "gtest/gtest.h" - #include "src/core/lib/promise/seq.h" namespace grpc_core { diff --git a/test/core/promise/map_pipe_test.cc b/test/core/promise/map_pipe_test.cc index 5b702f2f8d0..5f891a36191 100644 --- a/test/core/promise/map_pipe_test.cc +++ b/test/core/promise/map_pipe_test.cc @@ -14,14 +14,13 @@ #include "src/core/lib/promise/map_pipe.h" +#include + #include #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/for_each.h" #include "src/core/lib/promise/join.h" diff --git a/test/core/promise/map_test.cc b/test/core/promise/map_test.cc index 85697084084..cd6f373f3fe 100644 --- a/test/core/promise/map_test.cc +++ b/test/core/promise/map_test.cc @@ -18,7 +18,6 @@ #include "absl/functional/any_invocable.h" #include "gtest/gtest.h" - #include "src/core/lib/promise/promise.h" #include "test/core/promise/poll_matcher.h" diff --git a/test/core/promise/mpsc_test.cc b/test/core/promise/mpsc_test.cc index 0a486edff72..fd852b088de 100644 --- a/test/core/promise/mpsc_test.cc +++ b/test/core/promise/mpsc_test.cc @@ -14,15 +14,14 @@ #include "src/core/lib/promise/mpsc.h" +#include + #include #include #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/promise.h" #include "test/core/promise/poll_matcher.h" diff --git a/test/core/promise/observable_test.cc b/test/core/promise/observable_test.cc index 45fb438ebd1..8de6dd56812 100644 --- a/test/core/promise/observable_test.cc +++ b/test/core/promise/observable_test.cc @@ -14,6 +14,8 @@ #include "src/core/lib/promise/observable.h" +#include + #include #include #include @@ -22,9 +24,6 @@ #include "absl/strings/str_join.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/promise/loop.h" #include "src/core/lib/promise/map.h" #include "src/core/util/notification.h" diff --git a/test/core/promise/party_test.cc b/test/core/promise/party_test.cc index 09075395bf4..540163333fa 100644 --- a/test/core/promise/party_test.cc +++ b/test/core/promise/party_test.cc @@ -14,6 +14,9 @@ #include "src/core/lib/promise/party.h" +#include +#include +#include #include #include @@ -25,11 +28,6 @@ #include "absl/base/thread_annotations.h" #include "absl/log/log.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/promise/pipe_test.cc b/test/core/promise/pipe_test.cc index b74f29df2e8..d1cffb08d97 100644 --- a/test/core/promise/pipe_test.cc +++ b/test/core/promise/pipe_test.cc @@ -14,6 +14,9 @@ #include "src/core/lib/promise/pipe.h" +#include +#include + #include #include #include @@ -22,10 +25,6 @@ #include "absl/status/status.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/join.h" #include "src/core/lib/promise/map.h" diff --git a/test/core/promise/prioritized_race_test.cc b/test/core/promise/prioritized_race_test.cc index c663fe041d0..53bc0830719 100644 --- a/test/core/promise/prioritized_race_test.cc +++ b/test/core/promise/prioritized_race_test.cc @@ -17,7 +17,6 @@ #include #include "gtest/gtest.h" - #include "src/core/lib/promise/poll.h" namespace grpc_core { diff --git a/test/core/promise/promise_factory_test.cc b/test/core/promise/promise_factory_test.cc index 3690d78e5cc..f6418c3ed47 100644 --- a/test/core/promise/promise_factory_test.cc +++ b/test/core/promise/promise_factory_test.cc @@ -16,7 +16,6 @@ #include "absl/functional/bind_front.h" #include "gtest/gtest.h" - #include "src/core/lib/promise/poll.h" namespace grpc_core { diff --git a/test/core/promise/promise_fuzzer.cc b/test/core/promise/promise_fuzzer.cc index 0b70153d023..28214f96f4b 100644 --- a/test/core/promise/promise_fuzzer.cc +++ b/test/core/promise/promise_fuzzer.cc @@ -23,7 +23,6 @@ #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/types/optional.h" - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/join.h" #include "src/core/lib/promise/map.h" diff --git a/test/core/promise/promise_mutex_test.cc b/test/core/promise/promise_mutex_test.cc index 9ef2c778d65..8bbadd03925 100644 --- a/test/core/promise/promise_mutex_test.cc +++ b/test/core/promise/promise_mutex_test.cc @@ -19,7 +19,6 @@ #include "absl/status/status.h" #include "gtest/gtest.h" - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/join.h" #include "src/core/lib/promise/promise.h" diff --git a/test/core/promise/race_test.cc b/test/core/promise/race_test.cc index 16fbdb13d0a..4369fa81472 100644 --- a/test/core/promise/race_test.cc +++ b/test/core/promise/race_test.cc @@ -17,7 +17,6 @@ #include #include "gtest/gtest.h" - #include "src/core/lib/promise/poll.h" namespace grpc_core { diff --git a/test/core/promise/sleep_test.cc b/test/core/promise/sleep_test.cc index eaa816294da..842320d4eff 100644 --- a/test/core/promise/sleep_test.cc +++ b/test/core/promise/sleep_test.cc @@ -14,6 +14,8 @@ #include "src/core/lib/promise/sleep.h" +#include + #include #include #include @@ -23,9 +25,6 @@ #include "absl/log/log.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/promise/try_seq_metadata_test.cc b/test/core/promise/try_seq_metadata_test.cc index 34c74a83211..1f8c583a810 100644 --- a/test/core/promise/try_seq_metadata_test.cc +++ b/test/core/promise/try_seq_metadata_test.cc @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/promise/try_seq.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/test/core/promise/wait_for_callback_test.cc b/test/core/promise/wait_for_callback_test.cc index 25f5771379c..f710717ba78 100644 --- a/test/core/promise/wait_for_callback_test.cc +++ b/test/core/promise/wait_for_callback_test.cc @@ -16,7 +16,6 @@ #include "absl/status/status.h" #include "gtest/gtest.h" - #include "src/core/lib/promise/map.h" #include "src/core/util/notification.h" #include "test/core/promise/test_wakeup_schedulers.h" diff --git a/test/core/resolver/binder_resolver_test.cc b/test/core/resolver/binder_resolver_test.cc index 7f6d3b9f14c..fa8430fb11f 100644 --- a/test/core/resolver/binder_resolver_test.cc +++ b/test/core/resolver/binder_resolver_test.cc @@ -20,7 +20,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gtest/gtest.h" - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolved_address.h" @@ -43,10 +42,9 @@ #include #endif // GPR_WINDOWS -#include "absl/log/log.h" - #include +#include "absl/log/log.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/resolver/resolver_registry.h" diff --git a/test/core/resolver/dns_resolver_cooldown_test.cc b/test/core/resolver/dns_resolver_cooldown_test.cc index ad7b6a3a8c3..8682a1b2553 100644 --- a/test/core/resolver/dns_resolver_cooldown_test.cc +++ b/test/core/resolver/dns_resolver_cooldown_test.cc @@ -16,6 +16,13 @@ // // +#include +#include +#include +#include +#include +#include +#include #include #include @@ -29,15 +36,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/default_event_engine.h" diff --git a/test/core/resolver/dns_resolver_test.cc b/test/core/resolver/dns_resolver_test.cc index 4bf8a069c8b..9a80fbc2787 100644 --- a/test/core/resolver/dns_resolver_test.cc +++ b/test/core/resolver/dns_resolver_test.cc @@ -25,7 +25,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/core/resolver/endpoint_addresses_test.cc b/test/core/resolver/endpoint_addresses_test.cc index dafb5a54aac..1d2c848aea2 100644 --- a/test/core/resolver/endpoint_addresses_test.cc +++ b/test/core/resolver/endpoint_addresses_test.cc @@ -16,6 +16,8 @@ #include "src/core/resolver/endpoint_addresses.h" +#include + #include #include "absl/log/check.h" @@ -23,9 +25,6 @@ #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/resolved_address.h" diff --git a/test/core/resolver/fake_resolver_test.cc b/test/core/resolver/fake_resolver_test.cc index 9b14b43d431..2f4b7621b39 100644 --- a/test/core/resolver/fake_resolver_test.cc +++ b/test/core/resolver/fake_resolver_test.cc @@ -18,6 +18,7 @@ #include "src/core/resolver/fake/fake_resolver.h" +#include #include #include @@ -34,9 +35,6 @@ #include "absl/strings/str_format.h" #include "absl/synchronization/notification.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/core/resolver/google_c2p_resolver_test.cc b/test/core/resolver/google_c2p_resolver_test.cc index 96ddc587c4e..52e9d57b5ae 100644 --- a/test/core/resolver/google_c2p_resolver_test.cc +++ b/test/core/resolver/google_c2p_resolver_test.cc @@ -14,6 +14,11 @@ // limitations under the License. // +#include +#include +#include +#include +#include #include #include @@ -25,13 +30,6 @@ #include "absl/strings/str_format.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include - #include "src/core/util/env.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" #include "test/core/test_util/port.h" diff --git a/test/core/resolver/sockaddr_resolver_test.cc b/test/core/resolver/sockaddr_resolver_test.cc index faf90400364..94559aca191 100644 --- a/test/core/resolver/sockaddr_resolver_test.cc +++ b/test/core/resolver/sockaddr_resolver_test.cc @@ -24,7 +24,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gtest/gtest.h" - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/resource_quota/arena_test.cc b/test/core/resource_quota/arena_test.cc index 997b7760d22..bac5cf13e6e 100644 --- a/test/core/resource_quota/arena_test.cc +++ b/test/core/resource_quota/arena_test.cc @@ -18,6 +18,8 @@ #include "src/core/lib/resource_quota/arena.h" +#include +#include #include #include @@ -31,10 +33,6 @@ #include "absl/strings/str_join.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/core/resource_quota/memory_quota_fuzzer.cc b/test/core/resource_quota/memory_quota_fuzzer.cc index 654f20e291a..a3296fb43fb 100644 --- a/test/core/resource_quota/memory_quota_fuzzer.cc +++ b/test/core/resource_quota/memory_quota_fuzzer.cc @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include #include #include @@ -24,11 +27,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/types/optional.h" - -#include -#include -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/config.h" #include "src/core/lib/iomgr/closure.h" diff --git a/test/core/resource_quota/memory_quota_stress_test.cc b/test/core/resource_quota/memory_quota_stress_test.cc index a8086810cc7..eb8c66127d3 100644 --- a/test/core/resource_quota/memory_quota_stress_test.cc +++ b/test/core/resource_quota/memory_quota_stress_test.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include #include #include @@ -29,10 +31,6 @@ #include "absl/strings/str_cat.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/util/sync.h" diff --git a/test/core/resource_quota/memory_quota_test.cc b/test/core/resource_quota/memory_quota_test.cc index 245fe892c97..31993f03377 100644 --- a/test/core/resource_quota/memory_quota_test.cc +++ b/test/core/resource_quota/memory_quota_test.cc @@ -14,6 +14,9 @@ #include "src/core/lib/resource_quota/memory_quota.h" +#include +#include + #include #include #include @@ -23,10 +26,6 @@ #include #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "test/core/resource_quota/call_checker.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/resource_quota/periodic_update_test.cc b/test/core/resource_quota/periodic_update_test.cc index 90d98913693..4ae6709e18d 100644 --- a/test/core/resource_quota/periodic_update_test.cc +++ b/test/core/resource_quota/periodic_update_test.cc @@ -14,6 +14,8 @@ #include "src/core/lib/resource_quota/periodic_update.h" +#include +#include #include #include @@ -21,10 +23,6 @@ #include #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" namespace grpc_core { diff --git a/test/core/resource_quota/resource_quota_test.cc b/test/core/resource_quota/resource_quota_test.cc index 3ea0046f773..c0dfd8da44e 100644 --- a/test/core/resource_quota/resource_quota_test.cc +++ b/test/core/resource_quota/resource_quota_test.cc @@ -15,7 +15,6 @@ #include "src/core/lib/resource_quota/resource_quota.h" #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/security/alts_credentials_fuzzer.cc b/test/core/security/alts_credentials_fuzzer.cc index 9f76b2bf738..80d2a065a86 100644 --- a/test/core/security/alts_credentials_fuzzer.cc +++ b/test/core/security/alts_credentials_fuzzer.cc @@ -16,16 +16,14 @@ // // -#include - -#include "absl/log/check.h" - #include #include #include #include #include +#include +#include "absl/log/check.h" #include "src/core/lib/security/credentials/alts/alts_credentials.h" #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" #include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h" diff --git a/test/core/security/alts_security_connector_test.cc b/test/core/security/alts_security_connector_test.cc index 02a7cf5e1a4..f215eee5a78 100644 --- a/test/core/security/alts_security_connector_test.cc +++ b/test/core/security/alts_security_connector_test.cc @@ -18,17 +18,14 @@ #include "src/core/lib/security/security_connector/alts/alts_security_connector.h" +#include +#include +#include #include #include #include -#include - #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/transport/transport.h" #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" diff --git a/test/core/security/auth_context_test.cc b/test/core/security/auth_context_test.cc index 9443712cc91..64efbb79590 100644 --- a/test/core/security/auth_context_test.cc +++ b/test/core/security/auth_context_test.cc @@ -16,12 +16,10 @@ // // -#include - #include +#include #include "absl/log/log.h" - #include "src/core/lib/security/context/security_context.h" #include "src/core/util/crash.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/core/security/authorization_matchers_test.cc b/test/core/security/authorization_matchers_test.cc index 3ce899e2a36..9cc15c665be 100644 --- a/test/core/security/authorization_matchers_test.cc +++ b/test/core/security/authorization_matchers_test.cc @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include -#include - #include #include +#include + +#include #include "src/core/lib/security/authorization/evaluate_args.h" #include "src/core/lib/security/authorization/matchers.h" diff --git a/test/core/security/aws_request_signer_test.cc b/test/core/security/aws_request_signer_test.cc index 89c2d962ee7..11d93f5580d 100644 --- a/test/core/security/aws_request_signer_test.cc +++ b/test/core/security/aws_request_signer_test.cc @@ -17,11 +17,9 @@ #include "src/core/lib/security/credentials/external/aws_request_signer.h" #include - -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "test/core/test_util/test_config.h" namespace testing { diff --git a/test/core/security/certificate_provider_registry_test.cc b/test/core/security/certificate_provider_registry_test.cc index cca80deeb35..f4f1b48aa08 100644 --- a/test/core/security/certificate_provider_registry_test.cc +++ b/test/core/security/certificate_provider_registry_test.cc @@ -19,7 +19,6 @@ #include "src/core/lib/security/certificate_provider/certificate_provider_registry.h" #include - #include #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" diff --git a/test/core/security/channel_creds_registry_test.cc b/test/core/security/channel_creds_registry_test.cc index 399e26a58ea..f2a207ce439 100644 --- a/test/core/security/channel_creds_registry_test.cc +++ b/test/core/security/channel_creds_registry_test.cc @@ -19,12 +19,10 @@ #include "src/core/lib/security/credentials/channel_creds_registry.h" #include +#include #include #include "absl/types/optional.h" - -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/security/credentials/composite/composite_credentials.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" diff --git a/test/core/security/check_gcp_environment_linux_test.cc b/test/core/security/check_gcp_environment_linux_test.cc index b4122a8051e..2730ca757fe 100644 --- a/test/core/security/check_gcp_environment_linux_test.cc +++ b/test/core/security/check_gcp_environment_linux_test.cc @@ -16,13 +16,11 @@ // // -#include -#include - -#include - #include #include +#include +#include +#include #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" #include "src/core/util/crash.h" diff --git a/test/core/security/check_gcp_environment_windows_test.cc b/test/core/security/check_gcp_environment_windows_test.cc index 7d1db40d69f..7659144350a 100644 --- a/test/core/security/check_gcp_environment_windows_test.cc +++ b/test/core/security/check_gcp_environment_windows_test.cc @@ -16,13 +16,11 @@ // // -#include -#include - -#include - #include #include +#include +#include +#include #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" #include "src/core/util/crash.h" diff --git a/test/core/security/create_jwt.cc b/test/core/security/create_jwt.cc index f4f84a4ff4b..7d6c1188557 100644 --- a/test/core/security/create_jwt.cc +++ b/test/core/security/create_jwt.cc @@ -16,12 +16,11 @@ // // -#include -#include - #include #include #include +#include +#include #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include "src/core/util/crash.h" diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index da207a6474b..f075bb32f91 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -18,29 +18,26 @@ #include "src/core/lib/security/credentials/credentials.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_replace.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/timer_manager.h" diff --git a/test/core/security/evaluate_args_test.cc b/test/core/security/evaluate_args_test.cc index 0599416a898..91c954b0406 100644 --- a/test/core/security/evaluate_args_test.cc +++ b/test/core/security/evaluate_args_test.cc @@ -15,9 +15,8 @@ #include "src/core/lib/security/authorization/evaluate_args.h" #include -#include - #include +#include #include "src/core/lib/address_utils/sockaddr_utils.h" #include "test/core/test_util/evaluate_args_test_util.h" diff --git a/test/core/security/fetch_oauth2.cc b/test/core/security/fetch_oauth2.cc index b99d41f9dce..35c34eb3ef8 100644 --- a/test/core/security/fetch_oauth2.cc +++ b/test/core/security/fetch_oauth2.cc @@ -16,12 +16,6 @@ // // -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -29,7 +23,11 @@ #include #include #include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/util/json_util.h" diff --git a/test/core/security/grpc_alts_credentials_options_test.cc b/test/core/security/grpc_alts_credentials_options_test.cc index 77f41ef7a8d..7884aa87885 100644 --- a/test/core/security/grpc_alts_credentials_options_test.cc +++ b/test/core/security/grpc_alts_credentials_options_test.cc @@ -18,14 +18,12 @@ #include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h" +#include +#include #include #include #include -#include - -#include - #include "src/core/util/crash.h" #define ALTS_CLIENT_OPTIONS_TEST_TARGET_SERVICE_ACCOUNT_1 "abc@google.com" diff --git a/test/core/security/grpc_audit_logging_test.cc b/test/core/security/grpc_audit_logging_test.cc index 415a6089fa9..d6113a68e91 100644 --- a/test/core/security/grpc_audit_logging_test.cc +++ b/test/core/security/grpc_audit_logging_test.cc @@ -16,21 +16,19 @@ // // +#include +#include +#include + #include #include -#include - #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/numbers.h" #include "absl/strings/string_view.h" #include "absl/time/clock.h" #include "absl/time/time.h" - -#include -#include - #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/test/core/security/grpc_authorization_engine_test.cc b/test/core/security/grpc_authorization_engine_test.cc index 03f6b7d6a0d..4535c9c1287 100644 --- a/test/core/security/grpc_authorization_engine_test.cc +++ b/test/core/security/grpc_authorization_engine_test.cc @@ -14,14 +14,13 @@ #include "src/core/lib/security/authorization/grpc_authorization_engine.h" -#include - #include -#include - #include #include #include +#include + +#include #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/util/json/json.h" diff --git a/test/core/security/grpc_authorization_policy_provider_test.cc b/test/core/security/grpc_authorization_policy_provider_test.cc index bf1c6d81a28..0af5f2db8c3 100644 --- a/test/core/security/grpc_authorization_policy_provider_test.cc +++ b/test/core/security/grpc_authorization_policy_provider_test.cc @@ -15,10 +15,9 @@ #include "src/core/lib/security/authorization/grpc_authorization_policy_provider.h" #include -#include - #include #include +#include #include "src/core/lib/security/authorization/grpc_authorization_engine.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/security/grpc_tls_certificate_distributor_test.cc b/test/core/security/grpc_tls_certificate_distributor_test.cc index c3459b22370..374969aeca1 100644 --- a/test/core/security/grpc_tls_certificate_distributor_test.cc +++ b/test/core/security/grpc_tls_certificate_distributor_test.cc @@ -16,19 +16,17 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" +#include +#include +#include +#include + #include #include #include #include -#include -#include - #include "absl/log/check.h" - -#include -#include - #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/security/grpc_tls_certificate_provider_test.cc b/test/core/security/grpc_tls_certificate_provider_test.cc index d0ce58ecafb..32f47d44d0c 100644 --- a/test/core/security/grpc_tls_certificate_provider_test.cc +++ b/test/core/security/grpc_tls_certificate_provider_test.cc @@ -16,18 +16,16 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" -#include -#include - #include +#include +#include #include +#include +#include + #include "absl/log/check.h" #include "absl/status/status.h" - -#include -#include - #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/crash.h" #include "src/core/util/tmpfile.h" diff --git a/test/core/security/grpc_tls_certificate_verifier_test.cc b/test/core/security/grpc_tls_certificate_verifier_test.cc index 162c2e3c367..deafd044262 100644 --- a/test/core/security/grpc_tls_certificate_verifier_test.cc +++ b/test/core/security/grpc_tls_certificate_verifier_test.cc @@ -16,17 +16,15 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h" -#include -#include - #include -#include - -#include "absl/log/log.h" - #include #include +#include + +#include +#include +#include "absl/log/log.h" #include "src/core/lib/security/security_connector/tls/tls_security_connector.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/crash.h" diff --git a/test/core/security/grpc_tls_credentials_options_test.cc b/test/core/security/grpc_tls_credentials_options_test.cc index 8e2784c77d6..9064a430e0a 100644 --- a/test/core/security/grpc_tls_credentials_options_test.cc +++ b/test/core/security/grpc_tls_credentials_options_test.cc @@ -19,12 +19,11 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h" #include -#include - #include #include #include #include +#include #include "src/core/lib/config/config_vars.h" #include "src/core/lib/security/credentials/tls/tls_credentials.h" diff --git a/test/core/security/grpc_tls_crl_provider_test.cc b/test/core/security/grpc_tls_crl_provider_test.cc index d8bb630005d..6331283effb 100644 --- a/test/core/security/grpc_tls_crl_provider_test.cc +++ b/test/core/security/grpc_tls_crl_provider_test.cc @@ -18,23 +18,21 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h" +#include +#include +#include +#include + #include #include #include #include #include -#include - #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/timer_manager.h" #include "test/core/event_engine/event_engine_test_utils.h" diff --git a/test/core/security/insecure_security_connector_test.cc b/test/core/security/insecure_security_connector_test.cc index 31b175889e0..598ed8c5a83 100644 --- a/test/core/security/insecure_security_connector_test.cc +++ b/test/core/security/insecure_security_connector_test.cc @@ -19,9 +19,8 @@ #include "src/core/lib/security/security_connector/insecure/insecure_security_connector.h" #include -#include - #include +#include #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/security_connector/ssl_utils.h" diff --git a/test/core/security/json_token_test.cc b/test/core/security/json_token_test.cc index 03569c4d1b5..f66bd7cb9e7 100644 --- a/test/core/security/json_token_test.cc +++ b/test/core/security/json_token_test.cc @@ -18,19 +18,16 @@ #include "src/core/lib/security/credentials/jwt/json_token.h" -#include - -#include -#include - -#include "absl/log/log.h" -#include "absl/strings/escaping.h" - #include #include #include #include +#include +#include +#include +#include "absl/log/log.h" +#include "absl/strings/escaping.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/crash.h" diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc index 448dd57e7fc..7510ab738b7 100644 --- a/test/core/security/jwt_verifier_test.cc +++ b/test/core/security/jwt_verifier_test.cc @@ -18,17 +18,14 @@ #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" -#include - -#include - -#include "absl/strings/escaping.h" - #include #include #include #include +#include +#include +#include "absl/strings/escaping.h" #include "src/core/lib/security/credentials/jwt/json_token.h" #include "src/core/util/crash.h" #include "src/core/util/http_client/httpcli.h" diff --git a/test/core/security/local_security_connector_test.cc b/test/core/security/local_security_connector_test.cc index 0470cd3bc1d..3975e148a6c 100644 --- a/test/core/security/local_security_connector_test.cc +++ b/test/core/security/local_security_connector_test.cc @@ -16,9 +16,8 @@ // // -#include - #include +#include #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/security/context/security_context.h" diff --git a/test/core/security/oauth2_utils.cc b/test/core/security/oauth2_utils.cc index 6111bb25e61..66bd0968811 100644 --- a/test/core/security/oauth2_utils.cc +++ b/test/core/security/oauth2_utils.cc @@ -18,10 +18,6 @@ #include "test/core/security/oauth2_utils.h" -#include - -#include "absl/log/log.h" - #include #include #include @@ -29,7 +25,9 @@ #include #include #include +#include +#include "absl/log/log.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" #include "src/core/lib/promise/map.h" diff --git a/test/core/security/print_google_default_creds_token.cc b/test/core/security/print_google_default_creds_token.cc index 1d715fe18cd..dc6e10aa4d8 100644 --- a/test/core/security/print_google_default_creds_token.cc +++ b/test/core/security/print_google_default_creds_token.cc @@ -16,18 +16,16 @@ // // -#include -#include - -#include "absl/log/check.h" - #include #include #include #include #include #include +#include +#include +#include "absl/log/check.h" #include "src/core/lib/security/credentials/composite/composite_credentials.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/slice_string_helpers.h" diff --git a/test/core/security/rbac_translator_test.cc b/test/core/security/rbac_translator_test.cc index 0d7a798da34..156696637af 100644 --- a/test/core/security/rbac_translator_test.cc +++ b/test/core/security/rbac_translator_test.cc @@ -14,16 +14,14 @@ #include "src/core/lib/security/authorization/rbac_translator.h" -#include - #include +#include #include +#include + #include "absl/strings/match.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/util/crash.h" #include "src/core/util/json/json.h" diff --git a/test/core/security/secure_endpoint_test.cc b/test/core/security/secure_endpoint_test.cc index 6f4cd318820..c220ede196d 100644 --- a/test/core/security/secure_endpoint_test.cc +++ b/test/core/security/secure_endpoint_test.cc @@ -19,15 +19,12 @@ #include "src/core/handshaker/security/secure_endpoint.h" #include -#include - -#include - -#include "absl/log/log.h" - #include #include +#include +#include +#include "absl/log/log.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/test/core/security/security_connector_test.cc b/test/core/security/security_connector_test.cc index dfccc4b7abe..2716441b900 100644 --- a/test/core/security/security_connector_test.cc +++ b/test/core/security/security_connector_test.cc @@ -18,18 +18,15 @@ #include "src/core/lib/security/security_connector/security_connector.h" -#include -#include - -#include - -#include "absl/log/log.h" - #include #include #include #include +#include +#include +#include +#include "absl/log/log.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/security_connector/ssl_utils.h" diff --git a/test/core/security/ssl_credentials_test.cc b/test/core/security/ssl_credentials_test.cc index 8e63303c8b8..49171f6c4c5 100644 --- a/test/core/security/ssl_credentials_test.cc +++ b/test/core/security/ssl_credentials_test.cc @@ -18,13 +18,11 @@ #include "src/core/lib/security/credentials/ssl/ssl_credentials.h" -#include -#include - -#include - #include #include +#include +#include +#include #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/tsi/ssl_transport_security.h" diff --git a/test/core/security/ssl_server_fuzzer.cc b/test/core/security/ssl_server_fuzzer.cc index 7ca9762c124..09c170fc44a 100644 --- a/test/core/security/ssl_server_fuzzer.cc +++ b/test/core/security/ssl_server_fuzzer.cc @@ -16,14 +16,13 @@ // // -#include "absl/log/check.h" -#include "absl/synchronization/notification.h" - #include #include #include #include +#include "absl/log/check.h" +#include "absl/synchronization/notification.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" diff --git a/test/core/security/system_roots_test.cc b/test/core/security/system_roots_test.cc index 9d94185edfb..c5c840085da 100644 --- a/test/core/security/system_roots_test.cc +++ b/test/core/security/system_roots_test.cc @@ -16,9 +16,8 @@ // // -#include - #include +#include #if defined(GPR_LINUX) || defined(GPR_FREEBSD) || defined(GPR_APPLE) || \ defined(GPR_WINDOWS) @@ -27,12 +26,11 @@ #include #endif // GPR_LINUX || GPR_FREEBSD || GPR_APPLE -#include "gtest/gtest.h" - #include #include #include +#include "gtest/gtest.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/security_connector/load_system_roots.h" #include "src/core/lib/security/security_connector/load_system_roots_supported.h" diff --git a/test/core/security/tls_security_connector_test.cc b/test/core/security/tls_security_connector_test.cc index b2e933d6d16..16a498f6097 100644 --- a/test/core/security/tls_security_connector_test.cc +++ b/test/core/security/tls_security_connector_test.cc @@ -18,18 +18,15 @@ #include "src/core/lib/security/security_connector/tls/tls_security_connector.h" -#include -#include - #include -#include - -#include "absl/log/check.h" - #include #include #include +#include +#include +#include +#include "absl/log/check.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/security/context/security_context.h" diff --git a/test/core/security/verify_jwt.cc b/test/core/security/verify_jwt.cc index b330c0dbf33..e977f2a8e06 100644 --- a/test/core/security/verify_jwt.cc +++ b/test/core/security/verify_jwt.cc @@ -16,17 +16,15 @@ // // -#include -#include - -#include "absl/log/check.h" - #include #include #include #include #include +#include +#include +#include "absl/log/check.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" diff --git a/test/core/security/xds_credentials_test.cc b/test/core/security/xds_credentials_test.cc index 2d485f8f733..5434720e55d 100644 --- a/test/core/security/xds_credentials_test.cc +++ b/test/core/security/xds_credentials_test.cc @@ -18,9 +18,8 @@ #include "src/core/lib/security/credentials/xds/xds_credentials.h" -#include - #include +#include #include "test/core/test_util/test_config.h" diff --git a/test/core/server/server_config_selector_test.cc b/test/core/server/server_config_selector_test.cc index 3bdf5a7dca0..3a023239285 100644 --- a/test/core/server/server_config_selector_test.cc +++ b/test/core/server/server_config_selector_test.cc @@ -18,11 +18,10 @@ #include "src/core/server/server_config_selector.h" -#include "absl/status/status.h" -#include "gtest/gtest.h" - #include +#include "absl/status/status.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/server/xds_channel_stack_modifier_test.cc b/test/core/server/xds_channel_stack_modifier_test.cc index 16f0e6e4e81..07569b8b93c 100644 --- a/test/core/server/xds_channel_stack_modifier_test.cc +++ b/test/core/server/xds_channel_stack_modifier_test.cc @@ -18,13 +18,12 @@ #include "src/core/server/xds_channel_stack_modifier.h" +#include + #include #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder_impl.h" diff --git a/test/core/service_config/service_config_test.cc b/test/core/service_config/service_config_test.cc index 24112d7732f..26a381084f9 100644 --- a/test/core/service_config/service_config_test.cc +++ b/test/core/service_config/service_config_test.cc @@ -16,6 +16,7 @@ #include "src/core/service_config/service_config.h" +#include #include #include @@ -27,9 +28,6 @@ #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/service_config/service_config_impl.h" diff --git a/test/core/slice/c_slice_buffer_test.cc b/test/core/slice/c_slice_buffer_test.cc index 2f2edb50dcf..105d96afd70 100644 --- a/test/core/slice/c_slice_buffer_test.cc +++ b/test/core/slice/c_slice_buffer_test.cc @@ -16,14 +16,12 @@ // // -#include - -#include "gtest/gtest.h" - #include #include #include +#include +#include "gtest/gtest.h" #include "src/core/lib/slice/slice_internal.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/slice/percent_decode_fuzzer.cc b/test/core/slice/percent_decode_fuzzer.cc index 9124c042434..e7f3f4e15de 100644 --- a/test/core/slice/percent_decode_fuzzer.cc +++ b/test/core/slice/percent_decode_fuzzer.cc @@ -16,11 +16,10 @@ // // +#include #include #include -#include - #include "src/core/lib/slice/percent_encoding.h" #include "src/core/lib/slice/slice.h" diff --git a/test/core/slice/percent_encode_fuzzer.cc b/test/core/slice/percent_encode_fuzzer.cc index 6deef7b8786..e6d10da820c 100644 --- a/test/core/slice/percent_encode_fuzzer.cc +++ b/test/core/slice/percent_encode_fuzzer.cc @@ -16,15 +16,13 @@ // // +#include #include #include #include #include "absl/log/check.h" - -#include - #include "src/core/lib/slice/percent_encoding.h" #include "src/core/lib/slice/slice.h" diff --git a/test/core/slice/percent_encoding_test.cc b/test/core/slice/percent_encoding_test.cc index 6d3534e539e..8ed0eac045c 100644 --- a/test/core/slice/percent_encoding_test.cc +++ b/test/core/slice/percent_encoding_test.cc @@ -18,6 +18,7 @@ #include "src/core/lib/slice/percent_encoding.h" +#include #include #include @@ -25,9 +26,6 @@ #include "absl/log/log.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/util/string.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/slice/slice_buffer_test.cc b/test/core/slice/slice_buffer_test.cc index 08bcf0429b7..f2f3dc42293 100644 --- a/test/core/slice/slice_buffer_test.cc +++ b/test/core/slice/slice_buffer_test.cc @@ -14,6 +14,9 @@ #include "src/core/lib/slice/slice_buffer.h" +#include +#include +#include #include #include @@ -21,11 +24,6 @@ #include "absl/log/check.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/slice/slice.h" using ::grpc_core::Slice; diff --git a/test/core/slice/slice_string_helpers_test.cc b/test/core/slice/slice_string_helpers_test.cc index a158a382221..ed4dfa62b99 100644 --- a/test/core/slice/slice_string_helpers_test.cc +++ b/test/core/slice/slice_string_helpers_test.cc @@ -18,13 +18,12 @@ #include "src/core/lib/slice/slice_string_helpers.h" +#include + #include #include "absl/log/log.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/string.h" static void expect_slice_dump(grpc_slice slice, uint32_t flags, diff --git a/test/core/slice/slice_test.cc b/test/core/slice/slice_test.cc index 1503e11abc7..734ece4db83 100644 --- a/test/core/slice/slice_test.cc +++ b/test/core/slice/slice_test.cc @@ -18,6 +18,8 @@ #include "src/core/lib/slice/slice.h" +#include +#include #include #include @@ -31,10 +33,6 @@ #include "absl/log/log.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_refcount.h" #include "src/core/util/memory.h" diff --git a/test/core/surface/byte_buffer_reader_test.cc b/test/core/surface/byte_buffer_reader_test.cc index 0f0ba7cec07..7dd5da279b4 100644 --- a/test/core/surface/byte_buffer_reader_test.cc +++ b/test/core/surface/byte_buffer_reader_test.cc @@ -16,19 +16,17 @@ // // -#include - -#include - -#include "absl/log/log.h" -#include "gtest/gtest.h" - #include #include #include #include #include +#include + +#include +#include "absl/log/log.h" +#include "gtest/gtest.h" #include "test/core/test_util/test_config.h" TEST(GrpcByteBufferReaderTest, TestReadOneSlice) { diff --git a/test/core/surface/channel_init_test.cc b/test/core/surface/channel_init_test.cc index 29eadfed9a4..334a87e83d0 100644 --- a/test/core/surface/channel_init_test.cc +++ b/test/core/surface/channel_init_test.cc @@ -20,7 +20,6 @@ #include "absl/strings/string_view.h" #include "gtest/gtest.h" - #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder_impl.h" #include "src/core/lib/channel/promise_based_filter.h" diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc index 9175196fa1a..2ded6ce64bf 100644 --- a/test/core/surface/completion_queue_test.cc +++ b/test/core/surface/completion_queue_test.cc @@ -18,6 +18,9 @@ #include "src/core/lib/surface/completion_queue.h" +#include +#include +#include #include #include @@ -25,11 +28,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/surface/completion_queue_threading_test.cc b/test/core/surface/completion_queue_threading_test.cc index 3d6dbd1fc97..f9a95f1d56b 100644 --- a/test/core/surface/completion_queue_threading_test.cc +++ b/test/core/surface/completion_queue_threading_test.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include +#include #include #include @@ -24,12 +28,6 @@ #include "absl/log/log.h" #include "absl/status/status.h" #include "gtest/gtest.h" - -#include -#include -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/completion_queue.h" #include "src/core/util/crash.h" diff --git a/test/core/surface/concurrent_connectivity_test.cc b/test/core/surface/concurrent_connectivity_test.cc index 329dd0ef286..ff6edf5d877 100644 --- a/test/core/surface/concurrent_connectivity_test.cc +++ b/test/core/surface/concurrent_connectivity_test.cc @@ -16,6 +16,12 @@ // // +#include +#include +#include +#include +#include +#include #include #include @@ -26,14 +32,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" diff --git a/test/core/surface/init_test.cc b/test/core/surface/init_test.cc index 58d0347a2bb..bff6d0564f6 100644 --- a/test/core/surface/init_test.cc +++ b/test/core/surface/init_test.cc @@ -18,16 +18,15 @@ #include "src/core/lib/surface/init.h" +#include +#include + #include #include #include "absl/time/clock.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/thd.h" diff --git a/test/core/surface/lame_client_test.cc b/test/core/surface/lame_client_test.cc index c81f2492c2b..f2fb59585a7 100644 --- a/test/core/surface/lame_client_test.cc +++ b/test/core/surface/lame_client_test.cc @@ -16,19 +16,17 @@ // // -#include - -#include - -#include "absl/status/status.h" -#include "gtest/gtest.h" - #include #include #include #include #include +#include + +#include +#include "absl/status/status.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/experiments/experiments.h" diff --git a/test/core/surface/num_external_connectivity_watchers_test.cc b/test/core/surface/num_external_connectivity_watchers_test.cc index 8eeb546e35b..f718ccef780 100644 --- a/test/core/surface/num_external_connectivity_watchers_test.cc +++ b/test/core/surface/num_external_connectivity_watchers_test.cc @@ -16,20 +16,18 @@ // // -#include - -#include - -#include "absl/log/log.h" -#include "gtest/gtest.h" - #include #include #include #include #include #include +#include + +#include +#include "absl/log/log.h" +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/surface/secure_channel_create_test.cc b/test/core/surface/secure_channel_create_test.cc index baa1e8d05d1..54f2ece9629 100644 --- a/test/core/surface/secure_channel_create_test.cc +++ b/test/core/surface/secure_channel_create_test.cc @@ -15,12 +15,11 @@ // // +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/core/surface/sequential_connectivity_test.cc b/test/core/surface/sequential_connectivity_test.cc index ab6dfe4b1a6..e6467316c96 100644 --- a/test/core/surface/sequential_connectivity_test.cc +++ b/test/core/surface/sequential_connectivity_test.cc @@ -16,6 +16,12 @@ // // +#include +#include +#include +#include +#include +#include #include #include @@ -24,14 +30,6 @@ #include "absl/log/log.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/util/host_port.h" diff --git a/test/core/surface/server_chttp2_test.cc b/test/core/surface/server_chttp2_test.cc index 359af60ff28..214175f7a0c 100644 --- a/test/core/surface/server_chttp2_test.cc +++ b/test/core/surface/server_chttp2_test.cc @@ -16,16 +16,15 @@ // // -#include - -#include "gtest/gtest.h" - #include #include #include #include #include +#include + +#include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/util/host_port.h" diff --git a/test/core/surface/server_test.cc b/test/core/surface/server_test.cc index ec58b556a7f..67600a4ddf5 100644 --- a/test/core/surface/server_test.cc +++ b/test/core/surface/server_test.cc @@ -16,6 +16,11 @@ // // +#include +#include +#include +#include +#include #include #include @@ -26,13 +31,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolved_address.h" diff --git a/test/core/telemetry/call_tracer_test.cc b/test/core/telemetry/call_tracer_test.cc index 688a5114156..fbc8892485b 100644 --- a/test/core/telemetry/call_tracer_test.cc +++ b/test/core/telemetry/call_tracer_test.cc @@ -18,13 +18,12 @@ #include "src/core/telemetry/call_tracer.h" -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/core/telemetry/metrics_test.cc b/test/core/telemetry/metrics_test.cc index 8c492cb698f..ad139096e14 100644 --- a/test/core/telemetry/metrics_test.cc +++ b/test/core/telemetry/metrics_test.cc @@ -19,7 +19,6 @@ #include "absl/log/log.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "test/core/test_util/fake_stats_plugin.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/telemetry/stats_test.cc b/test/core/telemetry/stats_test.cc index 8f6a2f10960..9655d50eec1 100644 --- a/test/core/telemetry/stats_test.cc +++ b/test/core/telemetry/stats_test.cc @@ -18,13 +18,12 @@ #include "src/core/telemetry/stats.h" +#include + #include #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/telemetry/stats_data.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/telemetry/trace_flags_test.cc b/test/core/telemetry/trace_flags_test.cc index 06472794ba7..b23ccf3d7fb 100644 --- a/test/core/telemetry/trace_flags_test.cc +++ b/test/core/telemetry/trace_flags_test.cc @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "absl/strings/match.h" -#include "gtest/gtest.h" - #include +#include "absl/strings/match.h" +#include "gtest/gtest.h" #include "src/core/lib/debug/trace.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/test_util/audit_logging_utils.cc b/test/core/test_util/audit_logging_utils.cc index 492cbb3312d..a4ff7768345 100644 --- a/test/core/test_util/audit_logging_utils.cc +++ b/test/core/test_util/audit_logging_utils.cc @@ -16,6 +16,10 @@ #include "test/core/test_util/audit_logging_utils.h" +#include +#include +#include + #include #include #include @@ -23,11 +27,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/util/json/json_writer.h" namespace grpc_core { diff --git a/test/core/test_util/audit_logging_utils.h b/test/core/test_util/audit_logging_utils.h index 6e46119bc36..4c119e11412 100644 --- a/test/core/test_util/audit_logging_utils.h +++ b/test/core/test_util/audit_logging_utils.h @@ -17,6 +17,10 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_AUDIT_LOGGING_UTILS_H #define GRPC_TEST_CORE_TEST_UTIL_AUDIT_LOGGING_UTILS_H +#include +#include +#include + #include #include #include @@ -24,10 +28,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include -#include -#include - namespace grpc_core { namespace testing { diff --git a/test/core/test_util/cmdline.cc b/test/core/test_util/cmdline.cc index b22d0767c09..c4bcb299144 100644 --- a/test/core/test_util/cmdline.cc +++ b/test/core/test_util/cmdline.cc @@ -18,6 +18,7 @@ #include "test/core/test_util/cmdline.h" +#include #include #include #include @@ -30,9 +31,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" - -#include - #include "src/core/util/memory.h" typedef enum { ARGTYPE_INT, ARGTYPE_BOOL, ARGTYPE_STRING } argtype; diff --git a/test/core/test_util/cmdline.h b/test/core/test_util/cmdline.h index d118d6a9412..91915d7551c 100644 --- a/test/core/test_util/cmdline.h +++ b/test/core/test_util/cmdline.h @@ -19,12 +19,12 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_CMDLINE_H #define GRPC_TEST_CORE_TEST_UTIL_CMDLINE_H +#include + #include #include "absl/log/log.h" -#include - /// Simple command line parser. /// Supports flags that can be specified as -foo, --foo, --no-foo, -no-foo, etc diff --git a/test/core/test_util/cmdline_test.cc b/test/core/test_util/cmdline_test.cc index c292c768fbc..b94ade30dfa 100644 --- a/test/core/test_util/cmdline_test.cc +++ b/test/core/test_util/cmdline_test.cc @@ -22,7 +22,6 @@ #include "absl/log/log.h" #include "gtest/gtest.h" - #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/test_util/evaluate_args_test_util.h b/test/core/test_util/evaluate_args_test_util.h index 2d681d3b50f..f53aee93022 100644 --- a/test/core/test_util/evaluate_args_test_util.h +++ b/test/core/test_util/evaluate_args_test_util.h @@ -15,16 +15,14 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_EVALUATE_ARGS_TEST_UTIL_H #define GRPC_TEST_CORE_TEST_UTIL_EVALUATE_ARGS_TEST_UTIL_H +#include +#include +#include #include #include #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/handshaker/endpoint_info/endpoint_info_handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/resource_quota/arena.h" diff --git a/test/core/test_util/fake_stats_plugin.cc b/test/core/test_util/fake_stats_plugin.cc index 3ce9431cd66..74d7dcecc1f 100644 --- a/test/core/test_util/fake_stats_plugin.cc +++ b/test/core/test_util/fake_stats_plugin.cc @@ -15,7 +15,6 @@ #include "test/core/test_util/fake_stats_plugin.h" #include "absl/log/check.h" - #include "src/core/lib/config/core_configuration.h" namespace grpc_core { diff --git a/test/core/test_util/fake_stats_plugin.h b/test/core/test_util/fake_stats_plugin.h index 4c60f0735fb..983213e71de 100644 --- a/test/core/test_util/fake_stats_plugin.h +++ b/test/core/test_util/fake_stats_plugin.h @@ -28,7 +28,6 @@ #include "absl/types/optional.h" #include "absl/types/span.h" #include "gmock/gmock.h" - #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/telemetry/call_tracer.h" #include "src/core/telemetry/metrics.h" diff --git a/test/core/test_util/fake_udp_and_tcp_server.cc b/test/core/test_util/fake_udp_and_tcp_server.cc index 68cc354b7a4..92118fa248e 100644 --- a/test/core/test_util/fake_udp_and_tcp_server.cc +++ b/test/core/test_util/fake_udp_and_tcp_server.cc @@ -17,6 +17,8 @@ #include "test/core/test_util/fake_udp_and_tcp_server.h" #include +#include +#include #include #include @@ -27,10 +29,6 @@ #include "absl/log/log.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" - -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/test/core/test_util/fake_udp_and_tcp_server.h b/test/core/test_util/fake_udp_and_tcp_server.h index 3032f254f26..35a54471723 100644 --- a/test/core/test_util/fake_udp_and_tcp_server.h +++ b/test/core/test_util/fake_udp_and_tcp_server.h @@ -17,14 +17,14 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_FAKE_UDP_AND_TCP_SERVER_H #define GRPC_TEST_CORE_TEST_UTIL_FAKE_UDP_AND_TCP_SERVER_H +#include +#include + #include #include #include #include -#include -#include - namespace grpc_core { namespace testing { diff --git a/test/core/test_util/fuzz_config_vars_helpers.cc b/test/core/test_util/fuzz_config_vars_helpers.cc index 9029fdfd665..60075e0dee1 100644 --- a/test/core/test_util/fuzz_config_vars_helpers.cc +++ b/test/core/test_util/fuzz_config_vars_helpers.cc @@ -20,7 +20,6 @@ #include #include "absl/strings/str_join.h" - #include "src/core/lib/experiments/config.h" #include "src/core/lib/experiments/experiments.h" diff --git a/test/core/test_util/fuzz_config_vars_helpers.h b/test/core/test_util/fuzz_config_vars_helpers.h index 05edc5dc4b9..1601f49775f 100644 --- a/test/core/test_util/fuzz_config_vars_helpers.h +++ b/test/core/test_util/fuzz_config_vars_helpers.h @@ -15,12 +15,11 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_FUZZ_CONFIG_VARS_HELPERS_H #define GRPC_TEST_CORE_TEST_UTIL_FUZZ_CONFIG_VARS_HELPERS_H +#include #include #include -#include - namespace grpc_core { std::string ValidateExperimentsStringForFuzzing(uint64_t experiments); diff --git a/test/core/test_util/fuzzer_corpus_test.cc b/test/core/test_util/fuzzer_corpus_test.cc index 3eaef693f10..a80eff40bf4 100644 --- a/test/core/test_util/fuzzer_corpus_test.cc +++ b/test/core/test_util/fuzzer_corpus_test.cc @@ -17,6 +17,8 @@ // #include +#include +#include #include #include #include @@ -31,10 +33,6 @@ #include "absl/log/log.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/util/env.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/test_util/fuzzer_util.cc b/test/core/test_util/fuzzer_util.cc index 5e55638af7e..05301487575 100644 --- a/test/core/test_util/fuzzer_util.cc +++ b/test/core/test_util/fuzzer_util.cc @@ -18,12 +18,11 @@ #include "test/core/test_util/fuzzer_util.h" +#include #include #include -#include - namespace grpc_core { namespace testing { diff --git a/test/core/test_util/fuzzing_channel_args.h b/test/core/test_util/fuzzing_channel_args.h index 83cb5497bd3..cae31e99eb7 100644 --- a/test/core/test_util/fuzzing_channel_args.h +++ b/test/core/test_util/fuzzing_channel_args.h @@ -15,10 +15,10 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_FUZZING_CHANNEL_ARGS_H #define GRPC_TEST_CORE_TEST_UTIL_FUZZING_CHANNEL_ARGS_H -#include - #include +#include + #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/core/test_util/histogram.cc b/test/core/test_util/histogram.cc index c1b88b99268..d94e78dc990 100644 --- a/test/core/test_util/histogram.cc +++ b/test/core/test_util/histogram.cc @@ -18,14 +18,12 @@ #include "test/core/test_util/histogram.h" +#include +#include #include #include #include "absl/log/check.h" - -#include -#include - #include "src/core/util/useful.h" // Histograms are stored with exponentially increasing bucket sizes. diff --git a/test/core/test_util/histogram.h b/test/core/test_util/histogram.h index d3e6ba52b40..98523fb61d8 100644 --- a/test/core/test_util/histogram.h +++ b/test/core/test_util/histogram.h @@ -19,11 +19,10 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_HISTOGRAM_H #define GRPC_TEST_CORE_TEST_UTIL_HISTOGRAM_H +#include #include #include -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/test/core/test_util/mock_endpoint.cc b/test/core/test_util/mock_endpoint.cc index 8d16b2293ee..5706d8cedc3 100644 --- a/test/core/test_util/mock_endpoint.cc +++ b/test/core/test_util/mock_endpoint.cc @@ -18,16 +18,15 @@ #include "test/core/test_util/mock_endpoint.h" +#include +#include +#include + #include #include "absl/log/check.h" #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" #include "src/core/util/down_cast.h" diff --git a/test/core/test_util/mock_endpoint.h b/test/core/test_util/mock_endpoint.h index 901b21eedd6..ccc8d74af28 100644 --- a/test/core/test_util/mock_endpoint.h +++ b/test/core/test_util/mock_endpoint.h @@ -19,11 +19,11 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_MOCK_ENDPOINT_H #define GRPC_TEST_CORE_TEST_UTIL_MOCK_ENDPOINT_H -#include - #include #include +#include + #include "src/core/lib/iomgr/endpoint.h" namespace grpc_event_engine { diff --git a/test/core/test_util/one_corpus_entry_fuzzer.cc b/test/core/test_util/one_corpus_entry_fuzzer.cc index d6cbe2b6827..71325b589fc 100644 --- a/test/core/test_util/one_corpus_entry_fuzzer.cc +++ b/test/core/test_util/one_corpus_entry_fuzzer.cc @@ -16,12 +16,10 @@ // // +#include #include #include "absl/log/check.h" - -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/crash.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/test_util/parse_hexstring.cc b/test/core/test_util/parse_hexstring.cc index 0ede85e2c09..4468f9d97ce 100644 --- a/test/core/test_util/parse_hexstring.cc +++ b/test/core/test_util/parse_hexstring.cc @@ -18,13 +18,12 @@ #include "test/core/test_util/parse_hexstring.h" +#include #include #include #include "absl/log/check.h" -#include - namespace grpc_core { Slice ParseHexstring(absl::string_view hexstring) { size_t nibbles = 0; diff --git a/test/core/test_util/parse_hexstring.h b/test/core/test_util/parse_hexstring.h index fe50f9bf959..d43f0148031 100644 --- a/test/core/test_util/parse_hexstring.h +++ b/test/core/test_util/parse_hexstring.h @@ -20,7 +20,6 @@ #define GRPC_TEST_CORE_TEST_UTIL_PARSE_HEXSTRING_H #include "absl/strings/string_view.h" - #include "src/core/lib/slice/slice.h" namespace grpc_core { diff --git a/test/core/test_util/passthrough_endpoint.h b/test/core/test_util/passthrough_endpoint.h index cf8abe834d1..b8fe820f6e4 100644 --- a/test/core/test_util/passthrough_endpoint.h +++ b/test/core/test_util/passthrough_endpoint.h @@ -15,10 +15,10 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_PASSTHROUGH_ENDPOINT_H #define GRPC_TEST_CORE_TEST_UTIL_PASSTHROUGH_ENDPOINT_H -#include - #include +#include + #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/util/ref_counted.h" diff --git a/test/core/test_util/port.cc b/test/core/test_util/port.cc index 3a5a04bf117..bac509ee232 100644 --- a/test/core/test_util/port.cc +++ b/test/core/test_util/port.cc @@ -18,17 +18,15 @@ #include "src/core/lib/iomgr/port.h" +#include +#include +#include #include #include #include #include "absl/log/check.h" - -#include -#include -#include - #include "src/core/util/sync.h" #include "test/core/test_util/port.h" #include "test/core/test_util/port_server_client.h" diff --git a/test/core/test_util/port_isolated_runtime_environment.cc b/test/core/test_util/port_isolated_runtime_environment.cc index 57fa3865112..8c429df1e66 100644 --- a/test/core/test_util/port_isolated_runtime_environment.cc +++ b/test/core/test_util/port_isolated_runtime_environment.cc @@ -22,13 +22,11 @@ // runs in a separate container) the framework takes a round-robin pick of a // port within certain range. There is no need to recycle ports. // -#include - -#include "absl/log/check.h" - #include #include +#include +#include "absl/log/check.h" #include "src/core/lib/iomgr/port.h" #include "src/core/util/crash.h" #include "test/core/test_util/port.h" diff --git a/test/core/test_util/port_server_client.cc b/test/core/test_util/port_server_client.cc index 5a8b4d4d2ed..65287efbe48 100644 --- a/test/core/test_util/port_server_client.cc +++ b/test/core/test_util/port_server_client.cc @@ -18,6 +18,13 @@ #include "test/core/test_util/port_server_client.h" +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -31,15 +38,6 @@ #include "absl/log/log.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/test_util/proto_bit_gen.h b/test/core/test_util/proto_bit_gen.h index 3732acca2a2..5f307ab7363 100644 --- a/test/core/test_util/proto_bit_gen.h +++ b/test/core/test_util/proto_bit_gen.h @@ -15,6 +15,7 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_PROTO_BIT_GEN_H #define GRPC_TEST_CORE_TEST_UTIL_PROTO_BIT_GEN_H +#include #include #include @@ -22,8 +23,6 @@ #include #include -#include - namespace grpc_core { // Set of random numbers from a proto file (or other container) forming a bit diff --git a/test/core/test_util/reconnect_server.cc b/test/core/test_util/reconnect_server.cc index 871c1298f8b..478e078cecd 100644 --- a/test/core/test_util/reconnect_server.cc +++ b/test/core/test_util/reconnect_server.cc @@ -18,14 +18,12 @@ #include "test/core/test_util/reconnect_server.h" +#include +#include #include #include "absl/log/log.h" #include "absl/strings/string_view.h" - -#include -#include - #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" diff --git a/test/core/test_util/reconnect_server.h b/test/core/test_util/reconnect_server.h index d04661c9c6e..018362985d7 100644 --- a/test/core/test_util/reconnect_server.h +++ b/test/core/test_util/reconnect_server.h @@ -19,10 +19,10 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_RECONNECT_SERVER_H #define GRPC_TEST_CORE_TEST_UTIL_RECONNECT_SERVER_H -#include - #include +#include + #include "test/core/test_util/test_tcp_server.h" typedef struct timestamp_list { diff --git a/test/core/test_util/resolve_localhost_ip46.cc b/test/core/test_util/resolve_localhost_ip46.cc index ba58738b8e4..c2cb8077407 100644 --- a/test/core/test_util/resolve_localhost_ip46.cc +++ b/test/core/test_util/resolve_localhost_ip46.cc @@ -18,15 +18,14 @@ #include "test/core/test_util/resolve_localhost_ip46.h" +#include + #include #include #include "absl/log/check.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/test/core/test_util/slice_splitter.cc b/test/core/test_util/slice_splitter.cc index 0190255bc44..e2211e152ff 100644 --- a/test/core/test_util/slice_splitter.cc +++ b/test/core/test_util/slice_splitter.cc @@ -18,14 +18,13 @@ #include "test/core/test_util/slice_splitter.h" +#include +#include #include #include #include -#include -#include - const char* grpc_slice_split_mode_name(grpc_slice_split_mode mode) { switch (mode) { case GRPC_SLICE_SPLIT_IDENTITY: diff --git a/test/core/test_util/slice_splitter.h b/test/core/test_util/slice_splitter.h index 8af3dc7ac8e..90e8107db53 100644 --- a/test/core/test_util/slice_splitter.h +++ b/test/core/test_util/slice_splitter.h @@ -22,9 +22,8 @@ // utility function to split/merge slices together to help create test // cases -#include - #include +#include typedef enum { // merge all input slices into a single slice diff --git a/test/core/test_util/socket_use_after_close_detector.cc b/test/core/test_util/socket_use_after_close_detector.cc index 8d2c77b2555..546936d4122 100644 --- a/test/core/test_util/socket_use_after_close_detector.cc +++ b/test/core/test_util/socket_use_after_close_detector.cc @@ -20,13 +20,14 @@ #include #include -#include - #include +#include // IWYU pragma: no_include // IWYU pragma: no_include +#include + #include #include #include @@ -35,9 +36,6 @@ #include "absl/log/log.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/sockaddr.h" #include "test/core/test_util/port.h" diff --git a/test/core/test_util/socket_use_after_close_detector.h b/test/core/test_util/socket_use_after_close_detector.h index 67e7b2e73bd..36b333b82ee 100644 --- a/test/core/test_util/socket_use_after_close_detector.h +++ b/test/core/test_util/socket_use_after_close_detector.h @@ -19,12 +19,12 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_SOCKET_USE_AFTER_CLOSE_DETECTOR_H #define GRPC_TEST_CORE_TEST_UTIL_SOCKET_USE_AFTER_CLOSE_DETECTOR_H -#include -#include - #include #include +#include +#include + namespace grpc_core { namespace testing { diff --git a/test/core/test_util/stack_tracer.cc b/test/core/test_util/stack_tracer.cc index 305a43c8fc4..979e5dad534 100644 --- a/test/core/test_util/stack_tracer.cc +++ b/test/core/test_util/stack_tracer.cc @@ -18,14 +18,13 @@ #include "test/core/test_util/stack_tracer.h" +#include + #include #include #include "absl/debugging/stacktrace.h" #include "absl/debugging/symbolize.h" - -#include - #include "src/core/util/examine_stack.h" namespace { diff --git a/test/core/test_util/stack_tracer.h b/test/core/test_util/stack_tracer.h index 82870cbe770..e1b231862d8 100644 --- a/test/core/test_util/stack_tracer.h +++ b/test/core/test_util/stack_tracer.h @@ -19,10 +19,10 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_STACK_TRACER_H #define GRPC_TEST_CORE_TEST_UTIL_STACK_TRACER_H -#include - #include +#include + namespace grpc_core { namespace testing { diff --git a/test/core/test_util/stack_tracer_test.cc b/test/core/test_util/stack_tracer_test.cc index 701ffaddbfe..36039e2ac27 100644 --- a/test/core/test_util/stack_tracer_test.cc +++ b/test/core/test_util/stack_tracer_test.cc @@ -23,7 +23,6 @@ #include "absl/log/log.h" #include "absl/strings/match.h" #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" TEST(StackTracerTest, Basic) { diff --git a/test/core/test_util/test_config.cc b/test/core/test_util/test_config.cc index 0395887fe7a..b8682828119 100644 --- a/test/core/test_util/test_config.cc +++ b/test/core/test_util/test_config.cc @@ -18,6 +18,9 @@ #include "test/core/test_util/test_config.h" +#include +#include +#include #include #include @@ -31,11 +34,6 @@ #include "absl/strings/match.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/surface/init.h" #include "src/core/util/crash.h" #include "test/core/event_engine/test_init.h" diff --git a/test/core/test_util/test_config.h b/test/core/test_util/test_config.h index 5fb385ce31c..8a2020af2ce 100644 --- a/test/core/test_util/test_config.h +++ b/test/core/test_util/test_config.h @@ -19,9 +19,8 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_TEST_CONFIG_H #define GRPC_TEST_CORE_TEST_UTIL_TEST_CONFIG_H -#include - #include +#include extern int64_t g_fixture_slowdown_factor; extern int64_t g_poller_slowdown_factor; diff --git a/test/core/test_util/test_lb_policies.cc b/test/core/test_util/test_lb_policies.cc index afd701417cb..d02b224793a 100644 --- a/test/core/test_util/test_lb_policies.cc +++ b/test/core/test_util/test_lb_policies.cc @@ -16,6 +16,8 @@ #include "test/core/test_util/test_lb_policies.h" +#include +#include #include #include @@ -26,10 +28,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/variant.h" - -#include -#include - #include "src/core/client_channel/lb_metadata.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/test_util/test_lb_policies.h b/test/core/test_util/test_lb_policies.h index 235a6990734..18c016fb80f 100644 --- a/test/core/test_util/test_lb_policies.h +++ b/test/core/test_util/test_lb_policies.h @@ -17,6 +17,8 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_TEST_LB_POLICIES_H #define GRPC_TEST_CORE_TEST_UTIL_TEST_LB_POLICIES_H +#include + #include #include #include @@ -25,9 +27,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/resolver/endpoint_addresses.h" diff --git a/test/core/test_util/test_tcp_server.cc b/test/core/test_util/test_tcp_server.cc index cc3d2957648..25193394c40 100644 --- a/test/core/test_util/test_tcp_server.cc +++ b/test/core/test_util/test_tcp_server.cc @@ -18,6 +18,10 @@ #include "test/core/test_util/test_tcp_server.h" +#include +#include +#include +#include #include #include @@ -25,12 +29,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" diff --git a/test/core/test_util/test_tcp_server.h b/test/core/test_util/test_tcp_server.h index 66818e1b774..634fc728633 100644 --- a/test/core/test_util/test_tcp_server.h +++ b/test/core/test_util/test_tcp_server.h @@ -19,10 +19,10 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_TEST_TCP_SERVER_H #define GRPC_TEST_CORE_TEST_UTIL_TEST_TCP_SERVER_H -#include - #include +#include + #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/tcp_server.h" diff --git a/test/core/test_util/tls_utils.cc b/test/core/test_util/tls_utils.cc index c2dfd13eea9..a891e43c33c 100644 --- a/test/core/test_util/tls_utils.cc +++ b/test/core/test_util/tls_utils.cc @@ -15,16 +15,14 @@ // #include "test/core/test_util/tls_utils.h" -#include - -#include "absl/log/check.h" -#include "absl/strings/str_cat.h" - #include #include #include #include +#include +#include "absl/log/check.h" +#include "absl/strings/str_cat.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/load_file.h" diff --git a/test/core/test_util/tls_utils.h b/test/core/test_util/tls_utils.h index 5cd12ac6a10..4c9ccf720da 100644 --- a/test/core/test_util/tls_utils.h +++ b/test/core/test_util/tls_utils.h @@ -17,17 +17,16 @@ #ifndef GRPC_TEST_CORE_TEST_UTIL_TLS_UTILS_H #define GRPC_TEST_CORE_TEST_UTIL_TLS_UTILS_H +#include +#include +#include + #include #include #include #include "absl/base/thread_annotations.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/util/sync.h" #include "src/core/util/thd.h" diff --git a/test/core/transport/bdp_estimator_test.cc b/test/core/transport/bdp_estimator_test.cc index b8e0ded91a0..b7174df8e93 100644 --- a/test/core/transport/bdp_estimator_test.cc +++ b/test/core/transport/bdp_estimator_test.cc @@ -18,15 +18,13 @@ #include "src/core/lib/transport/bdp_estimator.h" +#include #include #include #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/timer_manager.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/benchmarks/bm_chaotic_good.cc b/test/core/transport/benchmarks/bm_chaotic_good.cc index 362693429d6..6610e66e1aa 100644 --- a/test/core/transport/benchmarks/bm_chaotic_good.cc +++ b/test/core/transport/benchmarks/bm_chaotic_good.cc @@ -13,12 +13,10 @@ // limitations under the License. #include +#include #include "absl/memory/memory.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/ext/transport/chaotic_good/client_transport.h" #include "src/core/ext/transport/chaotic_good/server_transport.h" #include "src/core/lib/address_utils/parse_address.h" diff --git a/test/core/transport/benchmarks/bm_inproc.cc b/test/core/transport/benchmarks/bm_inproc.cc index f7725628f45..cb8d1fe31c3 100644 --- a/test/core/transport/benchmarks/bm_inproc.cc +++ b/test/core/transport/benchmarks/bm_inproc.cc @@ -12,15 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include +#include + +#include #include "absl/memory/memory.h" #include "absl/strings/string_view.h" - -#include - #include "src/core/ext/transport/inproc/inproc_transport.h" #include "src/core/lib/address_utils/parse_address.h" #include "test/core/transport/call_spine_benchmarks.h" diff --git a/test/core/transport/binder/binder_transport_test.cc b/test/core/transport/binder/binder_transport_test.cc index 5ad7150e8e2..959a6fd33a0 100644 --- a/test/core/transport/binder/binder_transport_test.cc +++ b/test/core/transport/binder/binder_transport_test.cc @@ -18,19 +18,17 @@ // transform into the correct sequence of binder transactions. #include "src/core/ext/transport/binder/transport/binder_transport.h" +#include +#include +#include + #include #include #include -#include - #include "absl/memory/memory.h" #include "absl/strings/match.h" #include "absl/strings/str_join.h" - -#include -#include - #include "src/core/ext/transport/binder/transport/binder_stream.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/notification.h" diff --git a/test/core/transport/binder/end2end/binder_server_test.cc b/test/core/transport/binder/end2end/binder_server_test.cc index a1d26094e42..da17a099e4b 100644 --- a/test/core/transport/binder/end2end/binder_server_test.cc +++ b/test/core/transport/binder/end2end/binder_server_test.cc @@ -14,18 +14,16 @@ #include "src/core/ext/transport/binder/server/binder_server.h" +#include +#include +#include +#include + #include #include #include -#include - #include "absl/memory/memory.h" - -#include -#include -#include - #include "src/core/ext/transport/binder/client/channel_create_impl.h" #include "test/core/test_util/test_config.h" #include "test/core/transport/binder/end2end/fake_binder.h" diff --git a/test/core/transport/binder/end2end/end2end_binder_transport_test.cc b/test/core/transport/binder/end2end/end2end_binder_transport_test.cc index 7c24090894e..bc8f7be9078 100644 --- a/test/core/transport/binder/end2end/end2end_binder_transport_test.cc +++ b/test/core/transport/binder/end2end/end2end_binder_transport_test.cc @@ -12,18 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include -#include -#include - #include "absl/memory/memory.h" #include "absl/time/time.h" - -#include - #include "src/core/ext/transport/binder/transport/binder_transport.h" #include "src/core/ext/transport/binder/wire_format/wire_reader_impl.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/binder/end2end/fake_binder.cc b/test/core/transport/binder/end2end/fake_binder.cc index 6a5cc9698ac..d3e93f50ada 100644 --- a/test/core/transport/binder/end2end/fake_binder.cc +++ b/test/core/transport/binder/end2end/fake_binder.cc @@ -18,7 +18,6 @@ #include #include "absl/log/log.h" - #include "src/core/util/crash.h" namespace grpc_binder { diff --git a/test/core/transport/binder/end2end/fake_binder.h b/test/core/transport/binder/end2end/fake_binder.h index 6dbb532a230..46877bfb9de 100644 --- a/test/core/transport/binder/end2end/fake_binder.h +++ b/test/core/transport/binder/end2end/fake_binder.h @@ -63,7 +63,6 @@ #include "absl/strings/string_view.h" #include "absl/time/time.h" #include "absl/types/variant.h" - #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_reader.h" #include "src/core/util/sync.h" diff --git a/test/core/transport/binder/end2end/fake_binder_test.cc b/test/core/transport/binder/end2end/fake_binder_test.cc index 47bcc3704bc..68875bcd864 100644 --- a/test/core/transport/binder/end2end/fake_binder_test.cc +++ b/test/core/transport/binder/end2end/fake_binder_test.cc @@ -14,17 +14,16 @@ #include "test/core/transport/binder/end2end/fake_binder.h" +#include +#include + #include #include #include #include -#include -#include - #include "absl/strings/str_format.h" #include "absl/time/time.h" - #include "test/core/test_util/test_config.h" namespace grpc_binder { diff --git a/test/core/transport/binder/end2end/fuzzers/client_fuzzer.cc b/test/core/transport/binder/end2end/fuzzers/client_fuzzer.cc index e62c056c8b7..e852b032fcb 100644 --- a/test/core/transport/binder/end2end/fuzzers/client_fuzzer.cc +++ b/test/core/transport/binder/end2end/fuzzers/client_fuzzer.cc @@ -12,15 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include #include "absl/log/check.h" #include "absl/memory/memory.h" - -#include -#include - #include "src/core/ext/transport/binder/transport/binder_transport.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/iomgr/executor.h" diff --git a/test/core/transport/binder/end2end/fuzzers/fuzzer_utils.h b/test/core/transport/binder/end2end/fuzzers/fuzzer_utils.h index 8b4affab2cc..ee47780b227 100644 --- a/test/core/transport/binder/end2end/fuzzers/fuzzer_utils.h +++ b/test/core/transport/binder/end2end/fuzzers/fuzzer_utils.h @@ -23,7 +23,6 @@ #include "absl/memory/memory.h" #include "absl/status/status.h" - #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_reader.h" #include "src/core/util/crash.h" diff --git a/test/core/transport/binder/end2end/fuzzers/server_fuzzer.cc b/test/core/transport/binder/end2end/fuzzers/server_fuzzer.cc index bc8f0400b00..d0fdaab3400 100644 --- a/test/core/transport/binder/end2end/fuzzers/server_fuzzer.cc +++ b/test/core/transport/binder/end2end/fuzzers/server_fuzzer.cc @@ -12,10 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "absl/log/check.h" - #include +#include "absl/log/check.h" #include "src/core/ext/transport/binder/transport/binder_transport.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/iomgr/executor.h" diff --git a/test/core/transport/binder/end2end/testing_channel_create.cc b/test/core/transport/binder/end2end/testing_channel_create.cc index 50d9470960e..58a9a03006d 100644 --- a/test/core/transport/binder/end2end/testing_channel_create.cc +++ b/test/core/transport/binder/end2end/testing_channel_create.cc @@ -14,12 +14,11 @@ #include "test/core/transport/binder/end2end/testing_channel_create.h" +#include + #include #include "absl/log/check.h" - -#include - #include "src/core/ext/transport/binder/transport/binder_transport.h" #include "src/core/ext/transport/binder/wire_format/wire_reader_impl.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/transport/binder/end2end/testing_channel_create.h b/test/core/transport/binder/end2end/testing_channel_create.h index 8838f7265e7..2efe71365fe 100644 --- a/test/core/transport/binder/end2end/testing_channel_create.h +++ b/test/core/transport/binder/end2end/testing_channel_create.h @@ -15,10 +15,10 @@ #ifndef GRPC_TEST_CORE_TRANSPORT_BINDER_END2END_TESTING_CHANNEL_CREATE_H #define GRPC_TEST_CORE_TRANSPORT_BINDER_END2END_TESTING_CHANNEL_CREATE_H -#include - #include +#include + #include "src/core/ext/transport/binder/transport/binder_transport.h" #include "src/core/server/server.h" #include "test/core/transport/binder/end2end/fake_binder.h" diff --git a/test/core/transport/binder/endpoint_binder_pool_test.cc b/test/core/transport/binder/endpoint_binder_pool_test.cc index bba32557f4c..5086a2ea18c 100644 --- a/test/core/transport/binder/endpoint_binder_pool_test.cc +++ b/test/core/transport/binder/endpoint_binder_pool_test.cc @@ -14,16 +14,15 @@ #include "src/core/ext/transport/binder/client/endpoint_binder_pool.h" +#include +#include + #include #include #include #include -#include -#include - #include "absl/memory/memory.h" - #include "test/core/test_util/test_config.h" #include "test/core/transport/binder/mock_objects.h" diff --git a/test/core/transport/binder/transport_stream_receiver_test.cc b/test/core/transport/binder/transport_stream_receiver_test.cc index 76d2689b8c4..86ead7f5c17 100644 --- a/test/core/transport/binder/transport_stream_receiver_test.cc +++ b/test/core/transport/binder/transport_stream_receiver_test.cc @@ -12,16 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include #include #include -#include -#include - #include "absl/memory/memory.h" - #include "src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/binder/wire_reader_test.cc b/test/core/transport/binder/wire_reader_test.cc index 75a7432628d..bdfeaa98e8b 100644 --- a/test/core/transport/binder/wire_reader_test.cc +++ b/test/core/transport/binder/wire_reader_test.cc @@ -19,18 +19,16 @@ // WireReaderImpl and both the output (readable) parcel and the transport stream // receiver are correct in all possible situations. +#include +#include +#include + #include #include #include #include -#include - #include "absl/memory/memory.h" - -#include -#include - #include "src/core/ext/transport/binder/wire_format/wire_reader_impl.h" #include "test/core/test_util/test_config.h" #include "test/core/transport/binder/mock_objects.h" diff --git a/test/core/transport/binder/wire_writer_test.cc b/test/core/transport/binder/wire_writer_test.cc index 851430bdeff..7dffe26d5ab 100644 --- a/test/core/transport/binder/wire_writer_test.cc +++ b/test/core/transport/binder/wire_writer_test.cc @@ -14,15 +14,13 @@ #include "src/core/ext/transport/binder/wire_format/wire_writer.h" +#include +#include + #include #include -#include - #include "absl/memory/memory.h" - -#include - #include "test/core/test_util/test_config.h" #include "test/core/transport/binder/mock_objects.h" diff --git a/test/core/transport/bm_call_spine.cc b/test/core/transport/bm_call_spine.cc index 7a757a5d733..749c2c9f5ae 100644 --- a/test/core/transport/bm_call_spine.cc +++ b/test/core/transport/bm_call_spine.cc @@ -13,7 +13,6 @@ // limitations under the License. #include - #include #include "src/core/lib/event_engine/default_event_engine.h" diff --git a/test/core/transport/call_arena_allocator_test.cc b/test/core/transport/call_arena_allocator_test.cc index 1c5c222cf86..32235066106 100644 --- a/test/core/transport/call_arena_allocator_test.cc +++ b/test/core/transport/call_arena_allocator_test.cc @@ -18,6 +18,8 @@ #include "src/core/lib/transport/call_arena_allocator.h" +#include +#include #include #include @@ -31,10 +33,6 @@ #include "absl/strings/str_join.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/core/transport/call_filters_test.cc b/test/core/transport/call_filters_test.cc index 77973df2c48..7e8a5e3c3ca 100644 --- a/test/core/transport/call_filters_test.cc +++ b/test/core/transport/call_filters_test.cc @@ -18,7 +18,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "test/core/promise/poll_matcher.h" using testing::Mock; diff --git a/test/core/transport/call_spine_benchmarks.h b/test/core/transport/call_spine_benchmarks.h index d89f3678bdb..c62f1e21733 100644 --- a/test/core/transport/call_spine_benchmarks.h +++ b/test/core/transport/call_spine_benchmarks.h @@ -18,7 +18,6 @@ #include #include "benchmark/benchmark.h" - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/transport/call_spine_test.cc b/test/core/transport/call_spine_test.cc index b5807e28ec7..cd1c8020d5f 100644 --- a/test/core/transport/call_spine_test.cc +++ b/test/core/transport/call_spine_test.cc @@ -14,6 +14,8 @@ #include "src/core/lib/transport/call_spine.h" +#include + #include #include #include @@ -21,9 +23,6 @@ #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/transport/metadata.h" #include "test/core/call/yodel/yodel_test.h" diff --git a/test/core/transport/call_state_test.cc b/test/core/transport/call_state_test.cc index fcdf91b2818..4ad4a0ebe80 100644 --- a/test/core/transport/call_state_test.cc +++ b/test/core/transport/call_state_test.cc @@ -18,7 +18,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "test/core/promise/poll_matcher.h" using testing::Mock; diff --git a/test/core/transport/chaotic_good/chaotic_good_server_test.cc b/test/core/transport/chaotic_good/chaotic_good_server_test.cc index 1f1335f5f6c..b76b97b4bfc 100644 --- a/test/core/transport/chaotic_good/chaotic_good_server_test.cc +++ b/test/core/transport/chaotic_good/chaotic_good_server_test.cc @@ -14,6 +14,11 @@ #include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h" +#include +#include +#include +#include + #include #include #include @@ -24,12 +29,6 @@ #include "absl/time/time.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include - #include "src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/transport/chaotic_good/client_transport_error_test.cc b/test/core/transport/chaotic_good/client_transport_error_test.cc index 8de27018183..99caac0602e 100644 --- a/test/core/transport/chaotic_good/client_transport_error_test.cc +++ b/test/core/transport/chaotic_good/client_transport_error_test.cc @@ -12,6 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include +#include +#include +#include #include #include @@ -28,14 +34,6 @@ #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chaotic_good/client_transport.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/event_engine_context.h" diff --git a/test/core/transport/chaotic_good/client_transport_test.cc b/test/core/transport/chaotic_good/client_transport_test.cc index aad18ee1601..1739d1bbcec 100644 --- a/test/core/transport/chaotic_good/client_transport_test.cc +++ b/test/core/transport/chaotic_good/client_transport_test.cc @@ -14,6 +14,13 @@ #include "src/core/ext/transport/chaotic_good/client_transport.h" +#include +#include +#include +#include +#include +#include + #include #include #include @@ -29,14 +36,6 @@ #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/promise/if.h" #include "src/core/lib/promise/loop.h" diff --git a/test/core/transport/chaotic_good/frame_fuzzer.cc b/test/core/transport/chaotic_good/frame_fuzzer.cc index 3082b3645f0..11d2e3f64c5 100644 --- a/test/core/transport/chaotic_good/frame_fuzzer.cc +++ b/test/core/transport/chaotic_good/frame_fuzzer.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include @@ -22,9 +23,6 @@ #include "absl/log/log.h" #include "absl/random/bit_gen_ref.h" #include "absl/status/statusor.h" - -#include - #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" diff --git a/test/core/transport/chaotic_good/frame_header_fuzzer.cc b/test/core/transport/chaotic_good/frame_header_fuzzer.cc index eaed3bfc379..765f7c35f0e 100644 --- a/test/core/transport/chaotic_good/frame_header_fuzzer.cc +++ b/test/core/transport/chaotic_good/frame_header_fuzzer.cc @@ -17,7 +17,6 @@ #include #include "absl/status/statusor.h" - #include "src/core/ext/transport/chaotic_good/frame_header.h" bool squelch = false; diff --git a/test/core/transport/chaotic_good/frame_test.cc b/test/core/transport/chaotic_good/frame_test.cc index 8fc0f2b41eb..2ca7a446e74 100644 --- a/test/core/transport/chaotic_good/frame_test.cc +++ b/test/core/transport/chaotic_good/frame_test.cc @@ -21,7 +21,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gtest/gtest.h" - #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/core/transport/chaotic_good/mock_promise_endpoint.cc b/test/core/transport/chaotic_good/mock_promise_endpoint.cc index 9ba96e75804..33ab43b817c 100644 --- a/test/core/transport/chaotic_good/mock_promise_endpoint.cc +++ b/test/core/transport/chaotic_good/mock_promise_endpoint.cc @@ -14,11 +14,11 @@ #include "test/core/transport/chaotic_good/mock_promise_endpoint.h" +#include + #include "gmock/gmock.h" #include "gtest/gtest.h" -#include - using EventEngineSlice = grpc_event_engine::experimental::Slice; using grpc_event_engine::experimental::EventEngine; diff --git a/test/core/transport/chaotic_good/mock_promise_endpoint.h b/test/core/transport/chaotic_good/mock_promise_endpoint.h index bf073e4644f..314883a257b 100644 --- a/test/core/transport/chaotic_good/mock_promise_endpoint.h +++ b/test/core/transport/chaotic_good/mock_promise_endpoint.h @@ -15,11 +15,10 @@ #ifndef GRPC_TEST_CORE_TRANSPORT_CHAOTIC_GOOD_MOCK_PROMISE_ENDPOINT_H #define GRPC_TEST_CORE_TRANSPORT_CHAOTIC_GOOD_MOCK_PROMISE_ENDPOINT_H -#include "gmock/gmock.h" -#include "gtest/gtest.h" - #include +#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/transport/promise_endpoint.h" diff --git a/test/core/transport/chaotic_good/server_transport_test.cc b/test/core/transport/chaotic_good/server_transport_test.cc index f3ab7f3a350..72e62a89682 100644 --- a/test/core/transport/chaotic_good/server_transport_test.cc +++ b/test/core/transport/chaotic_good/server_transport_test.cc @@ -14,6 +14,13 @@ #include "src/core/ext/transport/chaotic_good/server_transport.h" +#include +#include +#include +#include +#include +#include + #include #include #include @@ -26,14 +33,6 @@ #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/promise/seq.h" #include "src/core/lib/resource_quota/arena.h" diff --git a/test/core/transport/chaotic_good/transport_test.h b/test/core/transport/chaotic_good/transport_test.h index 5f9dd8845d3..d6269c6e984 100644 --- a/test/core/transport/chaotic_good/transport_test.h +++ b/test/core/transport/chaotic_good/transport_test.h @@ -17,7 +17,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/iomgr/timer_manager.h" diff --git a/test/core/transport/chttp2/alpn_test.cc b/test/core/transport/chttp2/alpn_test.cc index 43fbe2e583d..52286d81752 100644 --- a/test/core/transport/chttp2/alpn_test.cc +++ b/test/core/transport/chttp2/alpn_test.cc @@ -21,7 +21,6 @@ #include #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" TEST(AlpnTest, TestAlpnSuccess) { diff --git a/test/core/transport/chttp2/bin_decoder_test.cc b/test/core/transport/chttp2/bin_decoder_test.cc index 40f67db8583..5eca263f44c 100644 --- a/test/core/transport/chttp2/bin_decoder_test.cc +++ b/test/core/transport/chttp2/bin_decoder_test.cc @@ -18,15 +18,13 @@ #include "src/core/ext/transport/chttp2/transport/bin_decoder.h" +#include #include #include #include "absl/log/log.h" #include "gtest/gtest.h" - -#include - #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice_string_helpers.h" diff --git a/test/core/transport/chttp2/bin_encoder_test.cc b/test/core/transport/chttp2/bin_encoder_test.cc index bb52b4bd766..f54407d809a 100644 --- a/test/core/transport/chttp2/bin_encoder_test.cc +++ b/test/core/transport/chttp2/bin_encoder_test.cc @@ -18,17 +18,14 @@ #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include +#include +#include #include #include -#include - #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/util/string.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/chttp2/decode_huff_fuzzer.cc b/test/core/transport/chttp2/decode_huff_fuzzer.cc index 6a9d34d2371..851f023f203 100644 --- a/test/core/transport/chttp2/decode_huff_fuzzer.cc +++ b/test/core/transport/chttp2/decode_huff_fuzzer.cc @@ -23,7 +23,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" #include "absl/types/optional.h" - #include "src/core/ext/transport/chttp2/transport/decode_huff.h" #include "src/core/ext/transport/chttp2/transport/huffsyms.h" diff --git a/test/core/transport/chttp2/encode_decode_huff_fuzzer.cc b/test/core/transport/chttp2/encode_decode_huff_fuzzer.cc index 5d1f9c46718..dfc2c489d04 100644 --- a/test/core/transport/chttp2/encode_decode_huff_fuzzer.cc +++ b/test/core/transport/chttp2/encode_decode_huff_fuzzer.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include #include @@ -24,9 +25,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" #include "absl/types/optional.h" - -#include - #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/ext/transport/chttp2/transport/decode_huff.h" diff --git a/test/core/transport/chttp2/flow_control_fuzzer.cc b/test/core/transport/chttp2/flow_control_fuzzer.cc index b72541d4d38..8d0a8406f11 100644 --- a/test/core/transport/chttp2/flow_control_fuzzer.cc +++ b/test/core/transport/chttp2/flow_control_fuzzer.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include #include #include #include @@ -30,10 +32,6 @@ #include "absl/status/status.h" #include "absl/strings/str_join.h" #include "absl/types/optional.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/lib/experiments/config.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/transport/chttp2/flow_control_test.cc b/test/core/transport/chttp2/flow_control_test.cc index 618cdfb0643..8ed9ea03ed9 100644 --- a/test/core/transport/chttp2/flow_control_test.cc +++ b/test/core/transport/chttp2/flow_control_test.cc @@ -14,14 +14,13 @@ #include "src/core/ext/transport/chttp2/transport/flow_control.h" +#include + #include #include #include "absl/log/check.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/core/transport/chttp2/frame_test.cc b/test/core/transport/chttp2/frame_test.cc index a353d0fa1ef..456d8a01af4 100644 --- a/test/core/transport/chttp2/frame_test.cc +++ b/test/core/transport/chttp2/frame_test.cc @@ -21,7 +21,6 @@ #include "absl/status/status.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/transport/http2_errors.h" namespace grpc_core { diff --git a/test/core/transport/chttp2/graceful_shutdown_test.cc b/test/core/transport/chttp2/graceful_shutdown_test.cc index 7402c2ba28c..47e8524cf81 100644 --- a/test/core/transport/chttp2/graceful_shutdown_test.cc +++ b/test/core/transport/chttp2/graceful_shutdown_test.cc @@ -16,6 +16,12 @@ // // +#include +#include +#include +#include +#include +#include #include #include #include @@ -35,14 +41,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/channelz/channelz.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" diff --git a/test/core/transport/chttp2/hpack_encoder_test.cc b/test/core/transport/chttp2/hpack_encoder_test.cc index 141d38f71c4..947161ecf75 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.cc +++ b/test/core/transport/chttp2/hpack_encoder_test.cc @@ -18,6 +18,8 @@ #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" +#include +#include #include #include @@ -27,10 +29,6 @@ #include "absl/log/log.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/arena.h" diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc index 7954ccbaeca..a76df38bf00 100644 --- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc +++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc @@ -16,6 +16,8 @@ // // +#include +#include #include #include @@ -25,10 +27,6 @@ #include "absl/cleanup/cleanup.h" #include "absl/log/check.h" #include "absl/random/bit_gen_ref.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/lib/experiments/config.h" #include "src/core/lib/iomgr/error.h" diff --git a/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc b/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc index c01dff488a8..7aeda797263 100644 --- a/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc +++ b/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc @@ -15,6 +15,10 @@ // For all inputs, ensure parsing one byte at a time produces the same result as // parsing the entire input at once. +#include +#include +#include +#include #include #include #include @@ -28,12 +32,6 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" - -#include -#include -#include -#include - #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/transport/chttp2/hpack_parser_table_test.cc b/test/core/transport/chttp2/hpack_parser_table_test.cc index 8743b079006..48632fe86cd 100644 --- a/test/core/transport/chttp2/hpack_parser_table_test.cc +++ b/test/core/transport/chttp2/hpack_parser_table_test.cc @@ -18,14 +18,13 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser_table.h" +#include + #include #include #include "absl/strings/str_cat.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice.h" #include "src/core/telemetry/stats.h" diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc index 0439490d7c2..1408cf21404 100644 --- a/test/core/transport/chttp2/hpack_parser_test.cc +++ b/test/core/transport/chttp2/hpack_parser_test.cc @@ -18,6 +18,12 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include +#include +#include +#include +#include + #include #include @@ -29,13 +35,6 @@ #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" diff --git a/test/core/transport/chttp2/hpack_sync_fuzzer.cc b/test/core/transport/chttp2/hpack_sync_fuzzer.cc index dff3b687999..efd041392be 100644 --- a/test/core/transport/chttp2/hpack_sync_fuzzer.cc +++ b/test/core/transport/chttp2/hpack_sync_fuzzer.cc @@ -26,7 +26,6 @@ #include "absl/status/status.h" #include "absl/strings/escaping.h" #include "absl/strings/match.h" - #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder_table.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" diff --git a/test/core/transport/chttp2/hpack_utils_test.cc b/test/core/transport/chttp2/hpack_utils_test.cc index cf40ca2b564..e44987bf535 100644 --- a/test/core/transport/chttp2/hpack_utils_test.cc +++ b/test/core/transport/chttp2/hpack_utils_test.cc @@ -12,16 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/ext/transport/chttp2/transport/hpack_encoder_index.h" namespace grpc_core { diff --git a/test/core/transport/chttp2/ping_abuse_policy_test.cc b/test/core/transport/chttp2/ping_abuse_policy_test.cc index f11e1f268e5..7b0b3c150c6 100644 --- a/test/core/transport/chttp2/ping_abuse_policy_test.cc +++ b/test/core/transport/chttp2/ping_abuse_policy_test.cc @@ -14,13 +14,13 @@ #include "src/core/ext/transport/chttp2/transport/ping_abuse_policy.h" +#include + #include #include #include "gtest/gtest.h" -#include - namespace grpc_core { namespace { diff --git a/test/core/transport/chttp2/ping_callbacks_test.cc b/test/core/transport/chttp2/ping_callbacks_test.cc index 18731f4f761..26962c90ada 100644 --- a/test/core/transport/chttp2/ping_callbacks_test.cc +++ b/test/core/transport/chttp2/ping_callbacks_test.cc @@ -19,7 +19,6 @@ #include "absl/random/random.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/util/crash.h" #include "test/core/event_engine/mock_event_engine.h" diff --git a/test/core/transport/chttp2/ping_configuration_test.cc b/test/core/transport/chttp2/ping_configuration_test.cc index 30873180124..7b85775466b 100644 --- a/test/core/transport/chttp2/ping_configuration_test.cc +++ b/test/core/transport/chttp2/ping_configuration_test.cc @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - -#include "gtest/gtest.h" - #include #include #include +#include + +#include "gtest/gtest.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" diff --git a/test/core/transport/chttp2/ping_rate_policy_test.cc b/test/core/transport/chttp2/ping_rate_policy_test.cc index 46ddd0501fd..0139212de45 100644 --- a/test/core/transport/chttp2/ping_rate_policy_test.cc +++ b/test/core/transport/chttp2/ping_rate_policy_test.cc @@ -18,7 +18,6 @@ #include #include "gtest/gtest.h" - #include "src/core/lib/experiments/experiments.h" namespace grpc_core { diff --git a/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc b/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc index 291add0aaef..42167462efa 100644 --- a/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc +++ b/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc @@ -16,6 +16,17 @@ // // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -25,23 +36,9 @@ #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" diff --git a/test/core/transport/chttp2/settings_timeout_test.cc b/test/core/transport/chttp2/settings_timeout_test.cc index 7e5c5204530..0d6d4037760 100644 --- a/test/core/transport/chttp2/settings_timeout_test.cc +++ b/test/core/transport/chttp2/settings_timeout_test.cc @@ -16,6 +16,16 @@ // // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -30,18 +40,6 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" diff --git a/test/core/transport/chttp2/stream_leak_with_queued_flow_control_update_test.cc b/test/core/transport/chttp2/stream_leak_with_queued_flow_control_update_test.cc index 178e29de625..a38be490af5 100644 --- a/test/core/transport/chttp2/stream_leak_with_queued_flow_control_update_test.cc +++ b/test/core/transport/chttp2/stream_leak_with_queued_flow_control_update_test.cc @@ -12,17 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include - -#include - -#include "absl/base/thread_annotations.h" -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/strings/str_cat.h" -#include "gtest/gtest.h" - #include #include #include @@ -33,7 +22,16 @@ #include #include #include +#include +#include + +#include +#include "absl/base/thread_annotations.h" +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/str_cat.h" +#include "gtest/gtest.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/util/host_port.h" diff --git a/test/core/transport/chttp2/streams_not_seen_test.cc b/test/core/transport/chttp2/streams_not_seen_test.cc index 49a6075cd42..2c435727a54 100644 --- a/test/core/transport/chttp2/streams_not_seen_test.cc +++ b/test/core/transport/chttp2/streams_not_seen_test.cc @@ -16,6 +16,16 @@ // // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -37,18 +47,6 @@ #include "absl/time/time.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/transport/chttp2/too_many_pings_test.cc b/test/core/transport/chttp2/too_many_pings_test.cc index 942268fc967..d027d5ea76d 100644 --- a/test/core/transport/chttp2/too_many_pings_test.cc +++ b/test/core/transport/chttp2/too_many_pings_test.cc @@ -16,6 +16,16 @@ // // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -31,18 +41,6 @@ #include "absl/strings/str_cat.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/core/transport/chttp2/varint_test.cc b/test/core/transport/chttp2/varint_test.cc index f4848b3167b..d4253270afa 100644 --- a/test/core/transport/chttp2/varint_test.cc +++ b/test/core/transport/chttp2/varint_test.cc @@ -18,14 +18,13 @@ #include "src/core/ext/transport/chttp2/transport/varint.h" +#include + #include #include "absl/log/log.h" #include "absl/strings/str_format.h" #include "gtest/gtest.h" - -#include - #include "test/core/test_util/test_config.h" template diff --git a/test/core/transport/connectivity_state_test.cc b/test/core/transport/connectivity_state_test.cc index 40a2a653800..288c446f370 100644 --- a/test/core/transport/connectivity_state_test.cc +++ b/test/core/transport/connectivity_state_test.cc @@ -18,10 +18,9 @@ #include "src/core/lib/transport/connectivity_state.h" -#include "gtest/gtest.h" - #include +#include "gtest/gtest.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tracer_util.h" diff --git a/test/core/transport/error_utils_test.cc b/test/core/transport/error_utils_test.cc index c60b4bf5d79..31e7cd108dc 100644 --- a/test/core/transport/error_utils_test.cc +++ b/test/core/transport/error_utils_test.cc @@ -22,7 +22,6 @@ #include "absl/status/status.h" #include "gtest/gtest.h" - #include "src/core/lib/iomgr/error.h" #include "src/core/util/status_helper.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/interception_chain_test.cc b/test/core/transport/interception_chain_test.cc index c2accf5e85b..8b5442a132b 100644 --- a/test/core/transport/interception_chain_test.cc +++ b/test/core/transport/interception_chain_test.cc @@ -14,15 +14,14 @@ #include "src/core/lib/transport/interception_chain.h" +#include +#include + #include #include "absl/log/log.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "test/core/promise/poll_matcher.h" diff --git a/test/core/transport/metadata_map_test.cc b/test/core/transport/metadata_map_test.cc index 1e985459a74..817c9f5e986 100644 --- a/test/core/transport/metadata_map_test.cc +++ b/test/core/transport/metadata_map_test.cc @@ -14,6 +14,7 @@ // limitations under the License. // +#include #include #include @@ -25,9 +26,6 @@ #include "absl/strings/str_split.h" #include "absl/types/optional.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/core/transport/parsed_metadata_test.cc b/test/core/transport/parsed_metadata_test.cc index df6bc391f84..391135067cf 100644 --- a/test/core/transport/parsed_metadata_test.cc +++ b/test/core/transport/parsed_metadata_test.cc @@ -22,7 +22,6 @@ #include "absl/strings/numbers.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/transport/metadata_batch.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/promise_endpoint_test.cc b/test/core/transport/promise_endpoint_test.cc index e6ad3dd2713..a2b7085e5d1 100644 --- a/test/core/transport/promise_endpoint_test.cc +++ b/test/core/transport/promise_endpoint_test.cc @@ -16,6 +16,10 @@ // IWYU pragma: no_include +#include +#include // IWYU pragma: keep +#include + #include #include #include @@ -24,11 +28,6 @@ #include "absl/functional/any_invocable.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include // IWYU pragma: keep -#include - #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/join.h" #include "src/core/lib/promise/seq.h" diff --git a/test/core/transport/status_conversion_test.cc b/test/core/transport/status_conversion_test.cc index 8af76d6a4b2..85055941884 100644 --- a/test/core/transport/status_conversion_test.cc +++ b/test/core/transport/status_conversion_test.cc @@ -18,12 +18,11 @@ #include "src/core/lib/transport/status_conversion.h" +#include + #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/test_suite/call_content.cc b/test/core/transport/test_suite/call_content.cc index 7c9f26da0f0..84a5f9f1a13 100644 --- a/test/core/transport/test_suite/call_content.cc +++ b/test/core/transport/test_suite/call_content.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "gmock/gmock.h" - #include "test/core/transport/test_suite/transport_test.h" using testing::UnorderedElementsAreArray; diff --git a/test/core/transport/test_suite/chaotic_good_fixture.cc b/test/core/transport/test_suite/chaotic_good_fixture.cc index 0e87280c086..d36e4b1a054 100644 --- a/test/core/transport/test_suite/chaotic_good_fixture.cc +++ b/test/core/transport/test_suite/chaotic_good_fixture.cc @@ -16,7 +16,6 @@ #include "absl/log/check.h" #include "gmock/gmock.h" - #include "src/core/ext/transport/chaotic_good/client_transport.h" #include "src/core/ext/transport/chaotic_good/server_transport.h" #include "src/core/lib/event_engine/memory_allocator_factory.h" diff --git a/test/core/transport/test_suite/stress.cc b/test/core/transport/test_suite/stress.cc index 11f0093ab85..98a2997c1b5 100644 --- a/test/core/transport/test_suite/stress.cc +++ b/test/core/transport/test_suite/stress.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "absl/random/random.h" - #include "test/core/transport/test_suite/transport_test.h" namespace grpc_core { diff --git a/test/core/transport/test_suite/transport_test.h b/test/core/transport/test_suite/transport_test.h index 97e099f348a..68691c21403 100644 --- a/test/core/transport/test_suite/transport_test.h +++ b/test/core/transport/test_suite/transport_test.h @@ -21,7 +21,6 @@ #include "absl/random/bit_gen_ref.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/transport/transport.h" #include "test/core/call/yodel/yodel_test.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" diff --git a/test/core/transport/timeout_encoding_test.cc b/test/core/transport/timeout_encoding_test.cc index 6de2dcd0398..c1e00b6f680 100644 --- a/test/core/transport/timeout_encoding_test.cc +++ b/test/core/transport/timeout_encoding_test.cc @@ -23,7 +23,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "gtest/gtest.h" - #include "src/core/util/time.h" #include "src/core/util/useful.h" diff --git a/test/core/tsi/alts/crypt/aes_gcm_test.cc b/test/core/tsi/alts/crypt/aes_gcm_test.cc index 93ac19732c4..2d55d756d93 100644 --- a/test/core/tsi/alts/crypt/aes_gcm_test.cc +++ b/test/core/tsi/alts/crypt/aes_gcm_test.cc @@ -16,14 +16,12 @@ // // -#include - +#include #include -#include "absl/types/span.h" - -#include +#include +#include "absl/types/span.h" #include "src/core/tsi/alts/crypt/gsec.h" #include "test/core/test_util/test_config.h" #include "test/core/tsi/alts/crypt/gsec_test_util.h" diff --git a/test/core/tsi/alts/crypt/gsec_test_util.cc b/test/core/tsi/alts/crypt/gsec_test_util.cc index 9b6898c3ae7..a6f7209d1a1 100644 --- a/test/core/tsi/alts/crypt/gsec_test_util.cc +++ b/test/core/tsi/alts/crypt/gsec_test_util.cc @@ -18,9 +18,8 @@ #include "test/core/tsi/alts/crypt/gsec_test_util.h" -#include - #include +#include void gsec_test_random_bytes(uint8_t* bytes, size_t length) { srand(time(nullptr)); diff --git a/test/core/tsi/alts/crypt/gsec_test_util.h b/test/core/tsi/alts/crypt/gsec_test_util.h index db49b564f4c..4ce88300a18 100644 --- a/test/core/tsi/alts/crypt/gsec_test_util.h +++ b/test/core/tsi/alts/crypt/gsec_test_util.h @@ -19,13 +19,12 @@ #ifndef GRPC_TEST_CORE_TSI_ALTS_CRYPT_GSEC_TEST_UTIL_H #define GRPC_TEST_CORE_TSI_ALTS_CRYPT_GSEC_TEST_UTIL_H +#include #include #include #include #include -#include - /// /// This method returns random bytes of certain length. /// diff --git a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.cc b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.cc index 1c2c8892e4c..42f6f67ec54 100644 --- a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.cc +++ b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.cc @@ -17,14 +17,6 @@ // #include "test/core/tsi/alts/fake_handshaker/fake_handshaker_server.h" -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/strings/str_format.h" - #include #include #include @@ -33,6 +25,13 @@ #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/str_format.h" #include "src/core/util/crash.h" #include "test/core/tsi/alts/fake_handshaker/handshaker.grpc.pb.h" #include "test/core/tsi/alts/fake_handshaker/handshaker.pb.h" diff --git a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.h b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.h index 2793793d068..6b83b3cbf09 100644 --- a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.h +++ b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.h @@ -19,11 +19,11 @@ #ifndef GRPC_TEST_CORE_TSI_ALTS_FAKE_HANDSHAKER_FAKE_HANDSHAKER_SERVER_H #define GRPC_TEST_CORE_TSI_ALTS_FAKE_HANDSHAKER_FAKE_HANDSHAKER_SERVER_H +#include + #include #include -#include - namespace grpc { namespace gcp { diff --git a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server_main.cc b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server_main.cc index 4e8df4b23f0..a70f55fdbcc 100644 --- a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server_main.cc +++ b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server_main.cc @@ -15,15 +15,14 @@ // limitations under the License. // // +#include +#include + #include #include "absl/flags/flag.h" #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/core/tsi/alts/fake_handshaker/fake_handshaker_server.h" diff --git a/test/core/tsi/alts/frame_protector/alts_counter_test.cc b/test/core/tsi/alts/frame_protector/alts_counter_test.cc index 989530d5e27..2b2961427f3 100644 --- a/test/core/tsi/alts/frame_protector/alts_counter_test.cc +++ b/test/core/tsi/alts/frame_protector/alts_counter_test.cc @@ -18,9 +18,8 @@ #include "src/core/tsi/alts/frame_protector/alts_counter.h" -#include - #include +#include #include "src/core/util/crash.h" #include "test/core/tsi/alts/crypt/gsec_test_util.h" diff --git a/test/core/tsi/alts/frame_protector/alts_crypter_test.cc b/test/core/tsi/alts/frame_protector/alts_crypter_test.cc index 2f834e411b7..cede0ec775d 100644 --- a/test/core/tsi/alts/frame_protector/alts_crypter_test.cc +++ b/test/core/tsi/alts/frame_protector/alts_crypter_test.cc @@ -18,18 +18,15 @@ #include "src/core/tsi/alts/frame_protector/alts_crypter.h" +#include +#include #include #include #include #include -#include - #include "absl/types/span.h" - -#include - #include "test/core/tsi/alts/crypt/gsec_test_util.h" static void alts_crypter_test_random_seal_unseal(alts_crypter* server_seal, diff --git a/test/core/tsi/alts/frame_protector/alts_frame_protector_test.cc b/test/core/tsi/alts/frame_protector/alts_frame_protector_test.cc index 06b18b7f7ae..f1f4186b37a 100644 --- a/test/core/tsi/alts/frame_protector/alts_frame_protector_test.cc +++ b/test/core/tsi/alts/frame_protector/alts_frame_protector_test.cc @@ -18,11 +18,9 @@ #include "src/core/tsi/alts/frame_protector/alts_frame_protector.h" -#include - -#include - #include +#include +#include #include "src/core/tsi/alts/crypt/gsec.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/test/core/tsi/alts/frame_protector/frame_handler_test.cc b/test/core/tsi/alts/frame_protector/frame_handler_test.cc index 2784bc0f74b..d9b66e45b1e 100644 --- a/test/core/tsi/alts/frame_protector/frame_handler_test.cc +++ b/test/core/tsi/alts/frame_protector/frame_handler_test.cc @@ -18,16 +18,14 @@ #include "src/core/tsi/alts/frame_protector/frame_handler.h" +#include +#include #include #include #include #include -#include - -#include - #include "src/core/util/crash.h" #include "src/core/util/useful.h" #include "test/core/tsi/alts/crypt/gsec_test_util.h" diff --git a/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc b/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc index 0b079ebc88e..baf3ce478b6 100644 --- a/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc +++ b/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc @@ -17,6 +17,17 @@ // #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -29,24 +40,10 @@ #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/alts/alts_credentials.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc index 22c42030cb5..8b8a8866a93 100644 --- a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc +++ b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc @@ -18,13 +18,10 @@ #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h" -#include - -#include "upb/mem/arena.hpp" - #include #include #include +#include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/tsi/alts/handshaker/alts_shared_resource.h" @@ -35,6 +32,7 @@ #include "src/core/util/env.h" #include "test/core/test_util/test_config.h" #include "test/core/tsi/alts/handshaker/alts_handshaker_service_api_test_lib.h" +#include "upb/mem/arena.hpp" #define ALTS_HANDSHAKER_CLIENT_TEST_OUT_FRAME "Hello Google" #define ALTS_HANDSHAKER_CLIENT_TEST_TARGET_NAME "bigtable.google.api.com" diff --git a/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc b/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc index 3fb9cc715ec..24d949a8b48 100644 --- a/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc +++ b/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc @@ -18,15 +18,11 @@ #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" -#include -#include - -#include - -#include "upb/mem/arena.hpp" - #include #include +#include +#include +#include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h" @@ -37,6 +33,7 @@ #include "src/proto/grpc/gcp/altscontext.upb.h" #include "test/core/test_util/test_config.h" #include "test/core/tsi/alts/handshaker/alts_handshaker_service_api_test_lib.h" +#include "upb/mem/arena.hpp" #define ALTS_TSI_HANDSHAKER_TEST_RECV_BYTES "Hello World" #define ALTS_TSI_HANDSHAKER_TEST_OUT_FRAME "Hello Google" diff --git a/test/core/tsi/alts/handshaker/alts_tsi_utils_test.cc b/test/core/tsi/alts/handshaker/alts_tsi_utils_test.cc index c3286ebcb40..5887d4c856e 100644 --- a/test/core/tsi/alts/handshaker/alts_tsi_utils_test.cc +++ b/test/core/tsi/alts/handshaker/alts_tsi_utils_test.cc @@ -20,10 +20,9 @@ #include -#include "upb/mem/arena.hpp" - #include "test/core/test_util/test_config.h" #include "test/core/tsi/alts/handshaker/alts_handshaker_service_api_test_lib.h" +#include "upb/mem/arena.hpp" #define ALTS_TSI_UTILS_TEST_OUT_FRAME "Hello Google" diff --git a/test/core/tsi/alts/handshaker/transport_security_common_api_test.cc b/test/core/tsi/alts/handshaker/transport_security_common_api_test.cc index 463d90044ba..1294637f95b 100644 --- a/test/core/tsi/alts/handshaker/transport_security_common_api_test.cc +++ b/test/core/tsi/alts/handshaker/transport_security_common_api_test.cc @@ -18,12 +18,11 @@ #include "src/core/tsi/alts/handshaker/transport_security_common_api.h" +#include #include #include #include -#include - const size_t kMaxRpcVersionMajor = 3; const size_t kMaxRpcVersionMinor = 2; const size_t kMinRpcVersionMajor = 2; diff --git a/test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc b/test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc index 51c08b6cce8..ab27058c606 100644 --- a/test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc +++ b/test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc @@ -18,14 +18,12 @@ #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h" -#include - +#include #include -#include "absl/types/span.h" - -#include +#include +#include "absl/types/span.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h" diff --git a/test/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol_test.cc b/test/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol_test.cc index 248a496bd27..67d47e0a5cd 100644 --- a/test/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol_test.cc +++ b/test/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol_test.cc @@ -18,14 +18,12 @@ #include "src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h" -#include - +#include #include -#include "absl/types/span.h" - -#include +#include +#include "absl/types/span.h" #include "test/core/tsi/alts/crypt/gsec_test_util.h" constexpr size_t kMaxDataSize = 1024; diff --git a/test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc b/test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc index aaab8c892cf..2bdcabcb1ee 100644 --- a/test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc +++ b/test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc @@ -18,13 +18,11 @@ #include "src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h" -#include - -#include "absl/types/span.h" - #include #include +#include +#include "absl/types/span.h" #include "src/core/tsi/alts/crypt/gsec.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h" #include "src/core/tsi/transport_security_grpc.h" diff --git a/test/core/tsi/crl_ssl_transport_security_test.cc b/test/core/tsi/crl_ssl_transport_security_test.cc index 0b8d4cf0811..261ea784bab 100644 --- a/test/core/tsi/crl_ssl_transport_security_test.cc +++ b/test/core/tsi/crl_ssl_transport_security_test.cc @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include +#include +#include #include #include #include @@ -19,18 +24,10 @@ #include #include -#include -#include - #include "absl/log/check.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - -#include -#include -#include - #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security.h" diff --git a/test/core/tsi/fake_transport_security_test.cc b/test/core/tsi/fake_transport_security_test.cc index c61b9a487a7..9a90d7248e4 100644 --- a/test/core/tsi/fake_transport_security_test.cc +++ b/test/core/tsi/fake_transport_security_test.cc @@ -18,15 +18,13 @@ #include "src/core/tsi/fake_transport_security.h" +#include +#include +#include #include #include #include -#include - -#include -#include - #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/transport_security.h" #include "src/core/util/crash.h" diff --git a/test/core/tsi/ssl_session_cache_test.cc b/test/core/tsi/ssl_session_cache_test.cc index 61a5f707e93..63630cbb1ae 100644 --- a/test/core/tsi/ssl_session_cache_test.cc +++ b/test/core/tsi/ssl_session_cache_test.cc @@ -18,15 +18,13 @@ #include "src/core/tsi/ssl/session_cache/ssl_session_cache.h" +#include +#include + #include #include -#include - #include "absl/log/check.h" - -#include - #include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index 228372d86b6..6e2f36c5acf 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -18,22 +18,19 @@ #include "src/core/tsi/ssl_transport_security.h" -#include -#include -#include - +#include +#include +#include #include #include #include #include +#include +#include +#include #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include -#include -#include - #include "src/core/tsi/transport_security.h" #include "src/core/tsi/transport_security_interface.h" #include "src/core/util/memory.h" diff --git a/test/core/tsi/ssl_transport_security_utils_test.cc b/test/core/tsi/ssl_transport_security_utils_test.cc index ac105c42fa5..a8a11d36f5e 100644 --- a/test/core/tsi/ssl_transport_security_utils_test.cc +++ b/test/core/tsi/ssl_transport_security_utils_test.cc @@ -16,10 +16,6 @@ #include "src/core/tsi/ssl_transport_security_utils.h" -#include -#include -#include - #include #include #include @@ -28,12 +24,15 @@ #include #include +#include +#include +#include + #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" - #include "src/core/lib/slice/slice.h" #include "src/core/tsi/transport_security.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/test/core/tsi/transport_security_test.cc b/test/core/tsi/transport_security_test.cc index a0ff0488b93..268d430bee1 100644 --- a/test/core/tsi/transport_security_test.cc +++ b/test/core/tsi/transport_security_test.cc @@ -18,19 +18,16 @@ #include "src/core/tsi/transport_security.h" +#include +#include +#include +#include #include #include -#include -#include - #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/tsi/fake_transport_security.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/util/crash.h" diff --git a/test/core/tsi/transport_security_test_lib.cc b/test/core/tsi/transport_security_test_lib.cc index 1239270a0e6..e4508701110 100644 --- a/test/core/tsi/transport_security_test_lib.cc +++ b/test/core/tsi/transport_security_test_lib.cc @@ -18,10 +18,8 @@ #include "test/core/tsi/transport_security_test_lib.h" -#include -#include -#include - +#include +#include #include #include #include @@ -30,13 +28,12 @@ #include #include #include +#include +#include +#include #include "absl/log/check.h" #include "absl/strings/str_cat.h" - -#include -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/util/crash.h" #include "src/core/util/memory.h" diff --git a/test/core/tsi/transport_security_test_lib.h b/test/core/tsi/transport_security_test_lib.h index 6e3efec2bff..adce54bda13 100644 --- a/test/core/tsi/transport_security_test_lib.h +++ b/test/core/tsi/transport_security_test_lib.h @@ -19,9 +19,8 @@ #ifndef GRPC_TEST_CORE_TSI_TRANSPORT_SECURITY_TEST_LIB_H #define GRPC_TEST_CORE_TSI_TRANSPORT_SECURITY_TEST_LIB_H -#include - #include +#include #include "src/core/tsi/transport_security_interface.h" diff --git a/test/core/util/alloc_test.cc b/test/core/util/alloc_test.cc index d8dafc9c727..55bf93fca5c 100644 --- a/test/core/util/alloc_test.cc +++ b/test/core/util/alloc_test.cc @@ -16,15 +16,13 @@ // // +#include #include #include #include #include "gtest/gtest.h" - -#include - #include "test/core/test_util/test_config.h" TEST(AllocTest, MallocAligned) { diff --git a/test/core/util/backoff_test.cc b/test/core/util/backoff_test.cc index 3ee1cf7fe21..4cd5e6490e5 100644 --- a/test/core/util/backoff_test.cc +++ b/test/core/util/backoff_test.cc @@ -18,14 +18,13 @@ #include "src/core/util/backoff.h" +#include + #include #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/time.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/chunked_vector_fuzzer.cc b/test/core/util/chunked_vector_fuzzer.cc index 37bcc3df4e1..6c2d642886d 100644 --- a/test/core/util/chunked_vector_fuzzer.cc +++ b/test/core/util/chunked_vector_fuzzer.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include @@ -21,9 +22,6 @@ #include #include "absl/log/check.h" - -#include - #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/core/util/chunked_vector_test.cc b/test/core/util/chunked_vector_test.cc index 82f10436edc..8dbb680c1dc 100644 --- a/test/core/util/chunked_vector_test.cc +++ b/test/core/util/chunked_vector_test.cc @@ -14,13 +14,12 @@ #include "src/core/util/chunked_vector.h" +#include + #include #include #include "gtest/gtest.h" - -#include - #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/core/util/cpp_impl_of_test.cc b/test/core/util/cpp_impl_of_test.cc index 49653bee36b..ef1e9a60eb7 100644 --- a/test/core/util/cpp_impl_of_test.cc +++ b/test/core/util/cpp_impl_of_test.cc @@ -14,10 +14,10 @@ #include "src/core/util/cpp_impl_of.h" -#include - #include +#include + typedef struct grpc_foo grpc_foo; namespace grpc_core { diff --git a/test/core/util/cpu_test.cc b/test/core/util/cpu_test.cc index 1c480304f47..00bc201cacd 100644 --- a/test/core/util/cpu_test.cc +++ b/test/core/util/cpu_test.cc @@ -21,6 +21,10 @@ // gpr_cpu_current_cpu() // +#include +#include +#include +#include #include #include #include @@ -28,12 +32,6 @@ #include #include "gtest/gtest.h" - -#include -#include -#include -#include - #include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/directory_reader_test.cc b/test/core/util/directory_reader_test.cc index e117bc2b058..57022e69689 100644 --- a/test/core/util/directory_reader_test.cc +++ b/test/core/util/directory_reader_test.cc @@ -22,7 +22,6 @@ #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" static constexpr absl::string_view kCrlDirectory = diff --git a/test/core/util/dual_ref_counted_test.cc b/test/core/util/dual_ref_counted_test.cc index 4c9e2de162f..150fd39c03b 100644 --- a/test/core/util/dual_ref_counted_test.cc +++ b/test/core/util/dual_ref_counted_test.cc @@ -20,7 +20,6 @@ #include "absl/log/check.h" #include "gtest/gtest.h" - #include "src/core/util/manual_constructor.h" #include "src/core/util/ref_counted.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/env_test.cc b/test/core/util/env_test.cc index df82aa37752..2b497db9106 100644 --- a/test/core/util/env_test.cc +++ b/test/core/util/env_test.cc @@ -20,7 +20,6 @@ #include "absl/log/log.h" #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" TEST(EnvTest, SetenvGetenv) { diff --git a/test/core/util/fork_test.cc b/test/core/util/fork_test.cc index 543c00da713..cce0af99e0b 100644 --- a/test/core/util/fork_test.cc +++ b/test/core/util/fork_test.cc @@ -18,12 +18,10 @@ #include "src/core/util/fork.h" +#include #include #include "gtest/gtest.h" - -#include - #include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/glob_test.cc b/test/core/util/glob_test.cc index 84df18db721..284464f395a 100644 --- a/test/core/util/glob_test.cc +++ b/test/core/util/glob_test.cc @@ -14,11 +14,10 @@ #include "src/core/util/glob.h" -#include "absl/strings/match.h" -#include "gtest/gtest.h" - #include +#include "absl/strings/match.h" +#include "gtest/gtest.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/util/gpr_time_test.cc b/test/core/util/gpr_time_test.cc index 48ea2ce17a2..9ae5d0ed7fb 100644 --- a/test/core/util/gpr_time_test.cc +++ b/test/core/util/gpr_time_test.cc @@ -18,6 +18,7 @@ // Test of gpr time support. +#include #include #include #include @@ -25,9 +26,6 @@ #include #include "gtest/gtest.h" - -#include - #include "test/core/test_util/test_config.h" static void to_fp(void* arg, const char* buf, size_t len) { diff --git a/test/core/util/host_port_test.cc b/test/core/util/host_port_test.cc index 3f7607c0a56..9845d54b203 100644 --- a/test/core/util/host_port_test.cc +++ b/test/core/util/host_port_test.cc @@ -19,7 +19,6 @@ #include "src/core/util/host_port.h" #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" static void join_host_port_expect(const char* host, int port, diff --git a/test/core/util/load_file_test.cc b/test/core/util/load_file_test.cc index 4888749fb40..2c83b2a119b 100644 --- a/test/core/util/load_file_test.cc +++ b/test/core/util/load_file_test.cc @@ -14,15 +14,13 @@ #include "src/core/util/load_file.h" +#include #include #include #include #include "gtest/gtest.h" - -#include - #include "src/core/util/tmpfile.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/mpscq_test.cc b/test/core/util/mpscq_test.cc index 65dce481d43..a0c304ead05 100644 --- a/test/core/util/mpscq_test.cc +++ b/test/core/util/mpscq_test.cc @@ -18,6 +18,8 @@ #include "src/core/util/mpscq.h" +#include +#include #include #include @@ -25,10 +27,6 @@ #include "absl/log/log.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/util/thd.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/orphanable_test.cc b/test/core/util/orphanable_test.cc index 4e38d719d9c..4d21829ad47 100644 --- a/test/core/util/orphanable_test.cc +++ b/test/core/util/orphanable_test.cc @@ -19,7 +19,6 @@ #include "src/core/util/orphanable.h" #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/util/ref_counted_ptr_test.cc b/test/core/util/ref_counted_ptr_test.cc index e2d7cd0f4db..3271aa4b107 100644 --- a/test/core/util/ref_counted_ptr_test.cc +++ b/test/core/util/ref_counted_ptr_test.cc @@ -23,7 +23,6 @@ #include "absl/container/flat_hash_set.h" #include "absl/log/check.h" #include "gtest/gtest.h" - #include "src/core/util/dual_ref_counted.h" #include "src/core/util/ref_counted.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/ref_counted_test.cc b/test/core/util/ref_counted_test.cc index 5b0171d3b4f..2769aec600d 100644 --- a/test/core/util/ref_counted_test.cc +++ b/test/core/util/ref_counted_test.cc @@ -25,7 +25,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/util/ring_buffer_test.cc b/test/core/util/ring_buffer_test.cc index 808018d0538..7c176eabfe2 100644 --- a/test/core/util/ring_buffer_test.cc +++ b/test/core/util/ring_buffer_test.cc @@ -18,10 +18,10 @@ #include "src/core/util/ring_buffer.h" -#include "gtest/gtest.h" - #include +#include "gtest/gtest.h" + namespace grpc_core { constexpr int kBufferCapacity = 1000; diff --git a/test/core/util/spinlock_test.cc b/test/core/util/spinlock_test.cc index da7c4b4ca57..35eb6a42488 100644 --- a/test/core/util/spinlock_test.cc +++ b/test/core/util/spinlock_test.cc @@ -20,16 +20,14 @@ #include "src/core/util/spinlock.h" +#include +#include #include #include #include #include "gtest/gtest.h" - -#include -#include - #include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/stat_test.cc b/test/core/util/stat_test.cc index 4595a6208bd..3c8ad0e5bd5 100644 --- a/test/core/util/stat_test.cc +++ b/test/core/util/stat_test.cc @@ -16,14 +16,12 @@ #include "src/core/util/stat.h" +#include #include #include #include "gtest/gtest.h" - -#include - #include "src/core/util/tmpfile.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/string_test.cc b/test/core/util/string_test.cc index 4ca644d8090..7ba0c920c94 100644 --- a/test/core/util/string_test.cc +++ b/test/core/util/string_test.cc @@ -18,15 +18,13 @@ #include "src/core/util/string.h" +#include +#include #include #include #include #include "gtest/gtest.h" - -#include -#include - #include "test/core/test_util/test_config.h" TEST(StringTest, Strdup) { diff --git a/test/core/util/sync_test.cc b/test/core/util/sync_test.cc index 256664302e2..c29b086d1b0 100644 --- a/test/core/util/sync_test.cc +++ b/test/core/util/sync_test.cc @@ -18,17 +18,15 @@ // Test of gpr synchronization support. +#include +#include +#include #include #include #include #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/util/thd_test.cc b/test/core/util/thd_test.cc index fd93eb278d3..993b6d5ab62 100644 --- a/test/core/util/thd_test.cc +++ b/test/core/util/thd_test.cc @@ -20,13 +20,12 @@ #include "src/core/util/thd.h" -#include - -#include "gtest/gtest.h" - #include #include +#include + +#include "gtest/gtest.h" #include "test/core/test_util/test_config.h" #define NUM_THREADS 100 diff --git a/test/core/util/time_averaged_stats_test.cc b/test/core/util/time_averaged_stats_test.cc index f42f27e3353..2806915dbaf 100644 --- a/test/core/util/time_averaged_stats_test.cc +++ b/test/core/util/time_averaged_stats_test.cc @@ -18,9 +18,8 @@ #include "src/core/util/time_averaged_stats.h" -#include - #include +#include namespace grpc_core { namespace { diff --git a/test/core/util/time_util_test.cc b/test/core/util/time_util_test.cc index 749a6f26ec0..85a1558befb 100644 --- a/test/core/util/time_util_test.cc +++ b/test/core/util/time_util_test.cc @@ -16,14 +16,14 @@ #include "src/core/util/time_util.h" +#include + #include #include #include "absl/time/time.h" #include "gtest/gtest.h" -#include - TEST(TimeUtilTest, ToGprTimeSpecFromAbslDurationWithRegularValues) { std::vector times = {-10, -1, 0, 1, 10}; for (int t : times) { diff --git a/test/core/util/unique_ptr_with_bitset_test.cc b/test/core/util/unique_ptr_with_bitset_test.cc index e5b67a36ff9..16cf91d0252 100644 --- a/test/core/util/unique_ptr_with_bitset_test.cc +++ b/test/core/util/unique_ptr_with_bitset_test.cc @@ -18,6 +18,7 @@ #include "src/core/util/unique_ptr_with_bitset.h" +#include #include #include @@ -25,8 +26,6 @@ #include "gtest/gtest.h" -#include - namespace grpc_core { TEST(UniquePtrWithBitsetTest, Basic) { diff --git a/test/core/util/uri_fuzzer_test.cc b/test/core/util/uri_fuzzer_test.cc index dd4b1c0f861..0b0c689d5ab 100644 --- a/test/core/util/uri_fuzzer_test.cc +++ b/test/core/util/uri_fuzzer_test.cc @@ -16,11 +16,10 @@ // // -#include -#include - #include #include +#include +#include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/uri.h" diff --git a/test/core/util/uri_test.cc b/test/core/util/uri_test.cc index 965d208ae7c..0719b1e5ba2 100644 --- a/test/core/util/uri_test.cc +++ b/test/core/util/uri_test.cc @@ -16,14 +16,13 @@ #include "src/core/util/uri.h" +#include + #include #include "absl/status/status.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "test/core/test_util/test_config.h" using ::testing::ContainerEq; diff --git a/test/core/util/useful_test.cc b/test/core/util/useful_test.cc index 506b2da3040..8efecba0adb 100644 --- a/test/core/util/useful_test.cc +++ b/test/core/util/useful_test.cc @@ -18,6 +18,7 @@ #include "src/core/util/useful.h" +#include #include #include @@ -25,8 +26,6 @@ #include "gtest/gtest.h" -#include - namespace grpc_core { TEST(UsefulTest, ClampWorks) { diff --git a/test/core/util/validation_errors_test.cc b/test/core/util/validation_errors_test.cc index e3222408d2e..8423736f3bd 100644 --- a/test/core/util/validation_errors_test.cc +++ b/test/core/util/validation_errors_test.cc @@ -17,7 +17,6 @@ #include "src/core/util/validation_errors.h" #include "gtest/gtest.h" - #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/util/work_serializer_test.cc b/test/core/util/work_serializer_test.cc index 773255725bb..e32a83bf31d 100644 --- a/test/core/util/work_serializer_test.cc +++ b/test/core/util/work_serializer_test.cc @@ -18,6 +18,9 @@ #include "src/core/util/work_serializer.h" +#include +#include +#include #include #include @@ -30,11 +33,6 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/core/xds/certificate_provider_store_test.cc b/test/core/xds/certificate_provider_store_test.cc index a0b76e521fb..e486fd33dc6 100644 --- a/test/core/xds/certificate_provider_store_test.cc +++ b/test/core/xds/certificate_provider_store_test.cc @@ -18,6 +18,8 @@ #include "src/core/xds/grpc/certificate_provider_store.h" +#include + #include #include #include @@ -25,9 +27,6 @@ #include "absl/log/check.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/util/unique_type_name.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/xds/file_watcher_certificate_provider_factory_test.cc b/test/core/xds/file_watcher_certificate_provider_factory_test.cc index f0eda5d3f55..581a10db148 100644 --- a/test/core/xds/file_watcher_certificate_provider_factory_test.cc +++ b/test/core/xds/file_watcher_certificate_provider_factory_test.cc @@ -18,15 +18,14 @@ #include "src/core/xds/grpc/file_watcher_certificate_provider_factory.h" +#include + #include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/json/json_reader.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/xds/xds_audit_logger_registry_test.cc b/test/core/xds/xds_audit_logger_registry_test.cc index 1d673ff7302..5b10e99abf8 100644 --- a/test/core/xds/xds_audit_logger_registry_test.cc +++ b/test/core/xds/xds_audit_logger_registry_test.cc @@ -18,11 +18,13 @@ #include "src/core/xds/grpc/xds_audit_logger_registry.h" +#include +#include +#include + #include #include -#include - #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" @@ -30,12 +32,6 @@ #include "envoy/config/rbac/v3/rbac.upb.h" #include "google/protobuf/struct.pb.h" #include "gtest/gtest.h" -#include "upb/mem/arena.hpp" -#include "upb/reflection/def.hpp" - -#include -#include - #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/util/crash.h" #include "src/core/util/json/json.h" @@ -46,6 +42,8 @@ #include "src/proto/grpc/testing/xds/v3/rbac.pb.h" #include "src/proto/grpc/testing/xds/v3/typed_struct.pb.h" #include "test/core/test_util/test_config.h" +#include "upb/mem/arena.hpp" +#include "upb/reflection/def.hpp" namespace grpc_core { namespace testing { diff --git a/test/core/xds/xds_bootstrap_test.cc b/test/core/xds/xds_bootstrap_test.cc index cc77846ae13..45dbfefdf4e 100644 --- a/test/core/xds/xds_bootstrap_test.cc +++ b/test/core/xds/xds_bootstrap_test.cc @@ -16,6 +16,10 @@ #include "src/core/xds/xds_client/xds_bootstrap.h" +#include +#include +#include +#include #include #include @@ -29,12 +33,6 @@ #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/security/certificate_provider/certificate_provider_factory.h" #include "src/core/lib/security/credentials/channel_creds_registry.h" diff --git a/test/core/xds/xds_certificate_provider_test.cc b/test/core/xds/xds_certificate_provider_test.cc index a81e03421e8..0d5acb72bd0 100644 --- a/test/core/xds/xds_certificate_provider_test.cc +++ b/test/core/xds/xds_certificate_provider_test.cc @@ -18,13 +18,12 @@ #include "src/core/xds/grpc/xds_certificate_provider.h" +#include + #include "absl/status/status.h" #include "absl/types/optional.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/util/status_helper.h" diff --git a/test/core/xds/xds_client_fuzzer.cc b/test/core/xds/xds_client_fuzzer.cc index 158563429e8..cc8ebc4f0be 100644 --- a/test/core/xds/xds_client_fuzzer.cc +++ b/test/core/xds/xds_client_fuzzer.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include + #include #include #include @@ -27,9 +29,6 @@ #include "absl/strings/string_view.h" #include "absl/time/time.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/util/orphanable.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/core/xds/xds_client_test.cc b/test/core/xds/xds_client_test.cc index c28966f2c23..36ddd7e47a2 100644 --- a/test/core/xds/xds_client_test.cc +++ b/test/core/xds/xds_client_test.cc @@ -20,6 +20,11 @@ #include "src/core/xds/xds_client/xds_client.h" +#include +#include +#include +#include +#include #include #include @@ -31,21 +36,12 @@ #include #include -#include -#include - #include "absl/strings/str_cat.h" #include "absl/time/time.h" #include "absl/types/optional.h" #include "absl/types/variant.h" #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "upb/reflection/def.h" - -#include -#include -#include - #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" @@ -65,6 +61,7 @@ #include "test/core/test_util/test_config.h" #include "test/core/xds/xds_client_test_peer.h" #include "test/core/xds/xds_transport_fake.h" +#include "upb/reflection/def.h" // IWYU pragma: no_include // IWYU pragma: no_include diff --git a/test/core/xds/xds_client_test_peer.h b/test/core/xds/xds_client_test_peer.h index 9c3bfa61f41..d65b9763748 100644 --- a/test/core/xds/xds_client_test_peer.h +++ b/test/core/xds/xds_client_test_peer.h @@ -17,13 +17,12 @@ #ifndef GRPC_TEST_CORE_XDS_XDS_CLIENT_TEST_PEER_H #define GRPC_TEST_CORE_XDS_XDS_CLIENT_TEST_PEER_H +#include + #include #include "absl/functional/function_ref.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/xds/xds_client/xds_client.h" namespace grpc_core { diff --git a/test/core/xds/xds_cluster_resource_type_test.cc b/test/core/xds/xds_cluster_resource_type_test.cc index 804241913e8..8be6ab83171 100644 --- a/test/core/xds/xds_cluster_resource_type_test.cc +++ b/test/core/xds/xds_cluster_resource_type_test.cc @@ -14,14 +14,15 @@ // limitations under the License. // -#include -#include -#include - #include #include #include #include +#include + +#include +#include +#include #include "absl/status/status.h" #include "absl/status/statusor.h" @@ -30,11 +31,6 @@ #include "absl/types/variant.h" #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "upb/mem/arena.hpp" -#include "upb/reflection/def.hpp" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" #include "src/core/load_balancing/outlier_detection/outlier_detection.h" @@ -68,6 +64,8 @@ #include "src/proto/grpc/testing/xds/v3/wrr_locality.pb.h" #include "test/core/test_util/scoped_env_var.h" #include "test/core/test_util/test_config.h" +#include "upb/mem/arena.hpp" +#include "upb/reflection/def.hpp" using envoy::config::cluster::v3::Cluster; using envoy::extensions::clusters::aggregate::v3::ClusterConfig; diff --git a/test/core/xds/xds_common_types_test.cc b/test/core/xds/xds_common_types_test.cc index 45ac7574b75..2877e621f66 100644 --- a/test/core/xds/xds_common_types_test.cc +++ b/test/core/xds/xds_common_types_test.cc @@ -16,14 +16,15 @@ #include "src/core/xds/grpc/xds_common_types.h" +#include +#include +#include + #include #include #include #include -#include -#include - #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" @@ -33,11 +34,6 @@ #include "google/protobuf/duration.upb.h" #include "gtest/gtest.h" #include "re2/re2.h" -#include "upb/mem/arena.hpp" -#include "upb/reflection/def.hpp" - -#include - #include "src/core/lib/debug/trace.h" #include "src/core/util/crash.h" #include "src/core/util/json/json_writer.h" @@ -59,6 +55,8 @@ #include "test/core/test_util/scoped_env_var.h" #include "test/core/test_util/test_config.h" #include "test/cpp/util/config_grpc_cli.h" +#include "upb/mem/arena.hpp" +#include "upb/reflection/def.hpp" using CommonTlsContextProto = envoy::extensions::transport_sockets::tls::v3::CommonTlsContext; diff --git a/test/core/xds/xds_endpoint_resource_type_test.cc b/test/core/xds/xds_endpoint_resource_type_test.cc index 8e9da777bc2..af6f708a558 100644 --- a/test/core/xds/xds_endpoint_resource_type_test.cc +++ b/test/core/xds/xds_endpoint_resource_type_test.cc @@ -14,6 +14,8 @@ // limitations under the License. // +#include +#include #include #include @@ -23,18 +25,11 @@ #include #include -#include - #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "absl/types/optional.h" #include "gtest/gtest.h" -#include "upb/mem/arena.hpp" -#include "upb/reflection/def.hpp" - -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" @@ -58,6 +53,8 @@ #include "src/proto/grpc/testing/xds/v3/percent.pb.h" #include "test/core/test_util/scoped_env_var.h" #include "test/core/test_util/test_config.h" +#include "upb/mem/arena.hpp" +#include "upb/reflection/def.hpp" using envoy::config::endpoint::v3::ClusterLoadAssignment; diff --git a/test/core/xds/xds_http_filters_test.cc b/test/core/xds/xds_http_filters_test.cc index c5a76d01ee2..b32b536bc91 100644 --- a/test/core/xds/xds_http_filters_test.cc +++ b/test/core/xds/xds_http_filters_test.cc @@ -14,13 +14,17 @@ // limitations under the License. // -#include -#include -#include - #include #include #include +#include +#include +#include +#include + +#include +#include +#include #include "absl/log/check.h" #include "absl/status/status.h" @@ -28,14 +32,6 @@ #include "absl/strings/strip.h" #include "absl/types/variant.h" #include "gtest/gtest.h" -#include "upb/mem/arena.hpp" -#include "upb/reflection/def.hpp" - -#include -#include -#include -#include - #include "src/core/ext/filters/fault_injection/fault_injection_filter.h" #include "src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h" #include "src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h" @@ -73,6 +69,8 @@ #include "src/proto/grpc/testing/xds/v3/typed_struct.pb.h" #include "test/core/test_util/scoped_env_var.h" #include "test/core/test_util/test_config.h" +#include "upb/mem/arena.hpp" +#include "upb/reflection/def.hpp" // IWYU pragma: no_include diff --git a/test/core/xds/xds_lb_policy_registry_test.cc b/test/core/xds/xds_lb_policy_registry_test.cc index 34f516e84ef..d50e00c6312 100644 --- a/test/core/xds/xds_lb_policy_registry_test.cc +++ b/test/core/xds/xds_lb_policy_registry_test.cc @@ -18,22 +18,18 @@ #include "src/core/xds/grpc/xds_lb_policy_registry.h" -#include - #include #include #include #include +#include + +#include #include "absl/status/status.h" #include "absl/status/statusor.h" #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "upb/mem/arena.hpp" -#include "upb/reflection/def.hpp" - -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/lb_policy_factory.h" @@ -52,6 +48,8 @@ #include "src/proto/grpc/testing/xds/v3/typed_struct.pb.h" #include "src/proto/grpc/testing/xds/v3/wrr_locality.pb.h" #include "test/core/test_util/test_config.h" +#include "upb/mem/arena.hpp" +#include "upb/reflection/def.hpp" namespace grpc_core { namespace testing { diff --git a/test/core/xds/xds_listener_resource_type_test.cc b/test/core/xds/xds_listener_resource_type_test.cc index 0f3f815faf9..24cbf01ce11 100644 --- a/test/core/xds/xds_listener_resource_type_test.cc +++ b/test/core/xds/xds_listener_resource_type_test.cc @@ -14,16 +14,17 @@ // limitations under the License. // +#include +#include +#include +#include + #include #include #include #include #include -#include -#include -#include - #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" @@ -33,11 +34,6 @@ #include "absl/types/variant.h" #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "upb/mem/arena.hpp" -#include "upb/reflection/def.hpp" - -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" @@ -67,6 +63,8 @@ #include "src/proto/grpc/testing/xds/v3/typed_struct.pb.h" #include "test/core/test_util/scoped_env_var.h" #include "test/core/test_util/test_config.h" +#include "upb/mem/arena.hpp" +#include "upb/reflection/def.hpp" using envoy::config::listener::v3::Listener; using envoy::extensions::filters::http::fault::v3::HTTPFault; diff --git a/test/core/xds/xds_metadata_test.cc b/test/core/xds/xds_metadata_test.cc index 76769ea1b70..4cdfe1fa351 100644 --- a/test/core/xds/xds_metadata_test.cc +++ b/test/core/xds/xds_metadata_test.cc @@ -16,18 +16,17 @@ #include "src/core/xds/grpc/xds_metadata.h" -#include -#include - #include #include +#include +#include + #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - #include "src/core/lib/debug/trace.h" #include "src/core/util/crash.h" #include "src/core/util/json/json.h" diff --git a/test/core/xds/xds_route_config_resource_type_test.cc b/test/core/xds/xds_route_config_resource_type_test.cc index 61311226c52..9493ef58354 100644 --- a/test/core/xds/xds_route_config_resource_type_test.cc +++ b/test/core/xds/xds_route_config_resource_type_test.cc @@ -14,6 +14,11 @@ // limitations under the License. // +#include +#include +#include +#include +#include #include #include @@ -23,10 +28,6 @@ #include #include -#include -#include -#include - #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" @@ -37,12 +38,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "re2/re2.h" -#include "upb/mem/arena.hpp" -#include "upb/reflection/def.hpp" - -#include -#include - #include "src/core/lib/channel/status_util.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" @@ -69,6 +64,8 @@ #include "src/proto/grpc/testing/xds/v3/typed_struct.pb.h" #include "test/core/test_util/scoped_env_var.h" #include "test/core/test_util/test_config.h" +#include "upb/mem/arena.hpp" +#include "upb/reflection/def.hpp" using envoy::config::route::v3::RouteConfiguration; using grpc::lookup::v1::RouteLookupClusterSpecifier; diff --git a/test/core/xds/xds_transport_fake.cc b/test/core/xds/xds_transport_fake.cc index 6369fd60c97..c56124c12ed 100644 --- a/test/core/xds/xds_transport_fake.cc +++ b/test/core/xds/xds_transport_fake.cc @@ -16,6 +16,9 @@ #include "test/core/xds/xds_transport_fake.h" +#include +#include + #include #include #include @@ -25,10 +28,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/orphanable.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/core/xds/xds_transport_fake.h b/test/core/xds/xds_transport_fake.h index ffa4c746551..6a4a3d967b2 100644 --- a/test/core/xds/xds_transport_fake.h +++ b/test/core/xds/xds_transport_fake.h @@ -17,6 +17,7 @@ #ifndef GRPC_TEST_CORE_XDS_XDS_TRANSPORT_FAKE_H #define GRPC_TEST_CORE_XDS_XDS_TRANSPORT_FAKE_H +#include #include #include @@ -31,9 +32,6 @@ #include "absl/strings/string_view.h" #include "absl/time/time.h" #include "absl/types/optional.h" - -#include - #include "src/core/util/orphanable.h" #include "src/core/util/ref_counted.h" #include "src/core/util/ref_counted_ptr.h" diff --git a/test/cpp/client/credentials_test.cc b/test/cpp/client/credentials_test.cc index 866fe098f94..8f81b956775 100644 --- a/test/cpp/client/credentials_test.cc +++ b/test/cpp/client/credentials_test.cc @@ -16,13 +16,7 @@ // // -#include - #include -#include - -#include "absl/log/check.h" - #include #include #include @@ -30,7 +24,11 @@ #include #include #include +#include +#include + +#include "absl/log/check.h" #include "src/core/util/env.h" #include "src/core/util/tmpfile.h" #include "src/cpp/client/secure_credentials.h" diff --git a/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc b/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc index c2777262475..85407fd9afb 100644 --- a/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc +++ b/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc @@ -16,15 +16,7 @@ // // -#include -#include -#include -#include -#include -#include - #include - #include #include #include @@ -36,6 +28,13 @@ #include #include +#include +#include +#include +#include +#include +#include + #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/test/cpp/codegen/codegen_test_full.cc b/test/cpp/codegen/codegen_test_full.cc index b27e1b5fc5d..7ccdd02d690 100644 --- a/test/cpp/codegen/codegen_test_full.cc +++ b/test/cpp/codegen/codegen_test_full.cc @@ -16,10 +16,9 @@ // // -#include - #include #include +#include #include "test/core/test_util/test_config.h" diff --git a/test/cpp/codegen/golden_file_test.cc b/test/cpp/codegen/golden_file_test.cc index 5c45db77f7e..ec3550a6d3b 100644 --- a/test/cpp/codegen/golden_file_test.cc +++ b/test/cpp/codegen/golden_file_test.cc @@ -16,13 +16,12 @@ // // +#include + #include #include -#include - #include "absl/flags/flag.h" - #include "test/core/test_util/test_config.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/codegen/proto_utils_test.cc b/test/cpp/codegen/proto_utils_test.cc index 1a95bee1f8e..fccde1da362 100644 --- a/test/cpp/codegen/proto_utils_test.cc +++ b/test/cpp/codegen/proto_utils_test.cc @@ -16,12 +16,11 @@ // // -#include - #include #include #include #include +#include #include "test/core/test_util/test_config.h" diff --git a/test/cpp/common/alarm_test.cc b/test/cpp/common/alarm_test.cc index 63eb170dfc1..15161fa2b31 100644 --- a/test/cpp/common/alarm_test.cc +++ b/test/cpp/common/alarm_test.cc @@ -16,16 +16,15 @@ // // +#include +#include +#include + #include #include #include #include -#include - -#include -#include - #include "src/core/util/notification.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/common/alts_util_test.cc b/test/cpp/common/alts_util_test.cc index 5fe52338ff4..7bb3f3bf9de 100644 --- a/test/cpp/common/alts_util_test.cc +++ b/test/cpp/common/alts_util_test.cc @@ -16,19 +16,17 @@ // // -#include - -#include "upb/mem/arena.hpp" - #include #include #include +#include #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" #include "src/cpp/common/secure_auth_context.h" #include "src/proto/grpc/gcp/altscontext.upb.h" #include "test/core/test_util/test_config.h" #include "test/cpp/util/string_ref_helper.h" +#include "upb/mem/arena.hpp" namespace grpc { namespace { diff --git a/test/cpp/common/auth_property_iterator_test.cc b/test/cpp/common/auth_property_iterator_test.cc index 7d72a344344..f8c08a90ff9 100644 --- a/test/cpp/common/auth_property_iterator_test.cc +++ b/test/cpp/common/auth_property_iterator_test.cc @@ -16,10 +16,9 @@ // // -#include - #include #include +#include #include "src/core/lib/security/context/security_context.h" #include "src/cpp/common/secure_auth_context.h" diff --git a/test/cpp/common/channel_arguments_test.cc b/test/cpp/common/channel_arguments_test.cc index a6c7167d25e..0857154685c 100644 --- a/test/cpp/common/channel_arguments_test.cc +++ b/test/cpp/common/channel_arguments_test.cc @@ -16,11 +16,10 @@ // // -#include - #include #include #include +#include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/socket_mutator.h" diff --git a/test/cpp/common/secure_auth_context_test.cc b/test/cpp/common/secure_auth_context_test.cc index ca50902377f..719281f9ede 100644 --- a/test/cpp/common/secure_auth_context_test.cc +++ b/test/cpp/common/secure_auth_context_test.cc @@ -18,10 +18,9 @@ #include "src/cpp/common/secure_auth_context.h" -#include - #include #include +#include #include "src/core/lib/security/context/security_context.h" #include "test/cpp/util/string_ref_helper.h" diff --git a/test/cpp/common/time_jump_test.cc b/test/cpp/common/time_jump_test.cc index e1593a59daa..f8a0abef634 100644 --- a/test/cpp/common/time_jump_test.cc +++ b/test/cpp/common/time_jump_test.cc @@ -16,6 +16,8 @@ // // +#include +#include #include #include @@ -23,14 +25,9 @@ #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/time/time.h" - -#include - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/cpp/common/timer_test.cc b/test/cpp/common/timer_test.cc index e3f2a31c1dd..a656e509448 100644 --- a/test/cpp/common/timer_test.cc +++ b/test/cpp/common/timer_test.cc @@ -18,13 +18,11 @@ #include "src/core/lib/iomgr/timer.h" +#include #include #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/cpp/end2end/admin_services_end2end_test.cc b/test/cpp/end2end/admin_services_end2end_test.cc index 95fae195c06..83615c2df22 100644 --- a/test/cpp/end2end/admin_services_end2end_test.cc +++ b/test/cpp/end2end/admin_services_end2end_test.cc @@ -17,14 +17,12 @@ // #include -#include - -#include "absl/strings/str_cat.h" - #include #include #include +#include +#include "absl/strings/str_cat.h" #include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 0f59bcab892..22b46c08f14 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -16,16 +16,6 @@ // // -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/memory/memory.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/str_format.h" - #include #include #include @@ -37,6 +27,15 @@ #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/memory/memory.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/port.h" diff --git a/test/cpp/end2end/cfstream_test.cc b/test/cpp/end2end/cfstream_test.cc index c0139db761f..cba2e4f7ddd 100644 --- a/test/cpp/end2end/cfstream_test.cc +++ b/test/cpp/end2end/cfstream_test.cc @@ -16,17 +16,6 @@ // // -#include -#include -#include -#include -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -38,7 +27,16 @@ #include #include #include +#include + +#include +#include +#include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/iomgr/port.h" #include "src/core/util/backoff.h" #include "src/core/util/crash.h" diff --git a/test/cpp/end2end/channelz_service_test.cc b/test/cpp/end2end/channelz_service_test.cc index 708b4ff53f9..34a89831904 100644 --- a/test/cpp/end2end/channelz_service_test.cc +++ b/test/cpp/end2end/channelz_service_test.cc @@ -17,11 +17,6 @@ // #include -#include - -#include "absl/log/check.h" -#include "absl/memory/memory.h" - #include #include #include @@ -34,7 +29,10 @@ #include #include #include +#include +#include "absl/log/check.h" +#include "absl/memory/memory.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "src/core/lib/security/security_connector/ssl_utils.h" diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index fefcc81a976..1df284f3b66 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -16,19 +16,6 @@ // // -#include -#include -#include -#include -#include -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/memory/memory.h" - #include #include #include @@ -38,7 +25,18 @@ #include #include #include +#include + +#include +#include +#include +#include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/memory/memory.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/util/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc index 39e857562c8..ba3a2414e35 100644 --- a/test/cpp/end2end/client_crash_test.cc +++ b/test/cpp/end2end/client_crash_test.cc @@ -16,11 +16,6 @@ // // -#include - -#include "absl/log/check.h" -#include "absl/memory/memory.h" - #include #include #include @@ -29,7 +24,10 @@ #include #include #include +#include +#include "absl/log/check.h" +#include "absl/memory/memory.h" #include "src/core/util/crash.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/client_crash_test_server.cc b/test/cpp/end2end/client_crash_test_server.cc index 6d166740ee2..517889f4f68 100644 --- a/test/cpp/end2end/client_crash_test_server.cc +++ b/test/cpp/end2end/client_crash_test_server.cc @@ -16,17 +16,16 @@ // // +#include +#include +#include + #include #include #include #include "absl/flags/flag.h" #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/end2end/client_fork_test.cc b/test/cpp/end2end/client_fork_test.cc index c93ff755e83..c004f0d79be 100644 --- a/test/cpp/end2end/client_fork_test.cc +++ b/test/cpp/end2end/client_fork_test.cc @@ -19,13 +19,6 @@ int main(int /* argc */, char** /* argv */) { return 0; } #else // GRPC_ENABLE_FORK_SUPPORT -#include - -#include - -#include "absl/log/log.h" -#include "absl/strings/str_cat.h" - #include #include #include @@ -35,7 +28,11 @@ int main(int /* argc */, char** /* argv */) { return 0; } #include #include #include +#include +#include +#include "absl/log/log.h" +#include "absl/strings/str_cat.h" #include "src/core/util/fork.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/client_interceptors_end2end_test.cc b/test/cpp/end2end/client_interceptors_end2end_test.cc index 812e529dd66..4a17aa0833e 100644 --- a/test/cpp/end2end/client_interceptors_end2end_test.cc +++ b/test/cpp/end2end/client_interceptors_end2end_test.cc @@ -16,14 +16,6 @@ // // -#include -#include - -#include - -#include "absl/log/check.h" -#include "absl/memory/memory.h" - #include #include #include @@ -35,7 +27,13 @@ #include #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/memory/memory.h" #include "src/core/lib/iomgr/port.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index 0b7349ceb26..a72c77b319f 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -12,27 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/memory/memory.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/str_format.h" -#include "absl/strings/str_join.h" -#include "absl/strings/string_view.h" - #include #include #include @@ -48,7 +28,25 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/memory/memory.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" +#include "absl/strings/str_join.h" +#include "absl/strings/string_view.h" #include "src/core/client_channel/backup_poller.h" #include "src/core/client_channel/config_selector.h" #include "src/core/client_channel/global_subchannel_pool.h" diff --git a/test/cpp/end2end/connection_attempt_injector.cc b/test/cpp/end2end/connection_attempt_injector.cc index a7b64bfcea3..c87b73b5666 100644 --- a/test/cpp/end2end/connection_attempt_injector.cc +++ b/test/cpp/end2end/connection_attempt_injector.cc @@ -20,7 +20,6 @@ #include "absl/log/log.h" #include "absl/memory/memory.h" #include "absl/utility/utility.h" - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/cpp/end2end/context_allocator_end2end_test.cc b/test/cpp/end2end/context_allocator_end2end_test.cc index 6b9b7a355e7..a70ad1f2f53 100644 --- a/test/cpp/end2end/context_allocator_end2end_test.cc +++ b/test/cpp/end2end/context_allocator_end2end_test.cc @@ -16,6 +16,16 @@ // // +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -25,20 +35,8 @@ #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/iomgr.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/crl_provider_test.cc b/test/cpp/end2end/crl_provider_test.cc index c8e332b0a12..3ea440294f3 100644 --- a/test/cpp/end2end/crl_provider_test.cc +++ b/test/cpp/end2end/crl_provider_test.cc @@ -15,19 +15,6 @@ // limitations under the License. // // -#include -#include -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/status/statusor.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/string_view.h" -#include "absl/synchronization/notification.h" - #include #include #include @@ -42,7 +29,18 @@ #include #include #include +#include + +#include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/statusor.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" +#include "absl/synchronization/notification.h" #include "src/cpp/client/secure_credentials.h" #include "src/proto/grpc/testing/echo_messages.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/delegating_channel_test.cc b/test/cpp/end2end/delegating_channel_test.cc index d675b2bdc8e..019e98be05e 100644 --- a/test/cpp/end2end/delegating_channel_test.cc +++ b/test/cpp/end2end/delegating_channel_test.cc @@ -16,11 +16,6 @@ // // -#include -#include - -#include - #include #include #include @@ -31,6 +26,10 @@ #include #include #include +#include + +#include +#include #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 1bf43444442..818a643b089 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -16,16 +16,6 @@ // // -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/memory/memory.h" -#include "absl/strings/ascii.h" -#include "absl/strings/match.h" -#include "absl/strings/str_format.h" - #include #include #include @@ -42,6 +32,15 @@ #include #include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/memory/memory.h" +#include "absl/strings/ascii.h" +#include "absl/strings/match.h" +#include "absl/strings/str_format.h" #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/iomgr.h" diff --git a/test/cpp/end2end/exception_test.cc b/test/cpp/end2end/exception_test.cc index d5fa8424b27..395b29b506f 100644 --- a/test/cpp/end2end/exception_test.cc +++ b/test/cpp/end2end/exception_test.cc @@ -16,17 +16,16 @@ // // -#include -#include - -#include - #include #include #include #include #include #include +#include + +#include +#include #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/flaky_network_test.cc b/test/cpp/end2end/flaky_network_test.cc index 3df6f1e080f..58415f620d5 100644 --- a/test/cpp/end2end/flaky_network_test.cc +++ b/test/cpp/end2end/flaky_network_test.cc @@ -16,18 +16,6 @@ // // -#include -#include -#include -#include -#include -#include - -#include - -#include "absl/log/log.h" -#include "absl/memory/memory.h" - #include #include #include @@ -40,7 +28,17 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include + +#include "absl/log/log.h" +#include "absl/memory/memory.h" #include "src/core/util/backoff.h" #include "src/core/util/crash.h" #include "src/core/util/env.h" diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index c853a0bf257..cf933fd107c 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -16,13 +16,6 @@ // // -#include -#include - -#include - -#include "absl/memory/memory.h" - #include #include #include @@ -35,7 +28,12 @@ #include #include #include +#include + +#include +#include +#include "absl/memory/memory.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/grpc_authz_end2end_test.cc b/test/cpp/end2end/grpc_authz_end2end_test.cc index 0d3473c76fa..868ec7bd80a 100644 --- a/test/cpp/end2end/grpc_authz_end2end_test.cc +++ b/test/cpp/end2end/grpc_authz_end2end_test.cc @@ -12,11 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include -#include - #include #include #include @@ -24,6 +20,9 @@ #include #include #include +#include + +#include #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/lib/security/authorization/grpc_authorization_policy_provider.h" diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 34eeb7b5202..f5d4c5da167 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -14,6 +14,18 @@ // limitations under the License. // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -22,9 +34,6 @@ #include #include -#include -#include - #include "absl/cleanup/cleanup.h" #include "absl/log/check.h" #include "absl/log/log.h" @@ -33,17 +42,6 @@ #include "absl/strings/str_format.h" #include "absl/synchronization/notification.h" #include "absl/types/span.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/cpp/end2end/health_service_end2end_test.cc b/test/cpp/end2end/health_service_end2end_test.cc index 167396cad45..b3ebb18c63b 100644 --- a/test/cpp/end2end/health_service_end2end_test.cc +++ b/test/cpp/end2end/health_service_end2end_test.cc @@ -16,13 +16,6 @@ // // -#include -#include -#include -#include - -#include - #include #include #include @@ -32,6 +25,12 @@ #include #include #include +#include + +#include +#include +#include +#include #include "src/core/util/crash.h" #include "src/proto/grpc/health/v1/health.grpc.pb.h" diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index 139dda2eb5d..eb52a780a5a 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -16,14 +16,6 @@ // // -#include -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -32,7 +24,13 @@ #include #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/util/env.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" diff --git a/test/cpp/end2end/interceptors_util.cc b/test/cpp/end2end/interceptors_util.cc index f14ef471b6a..37d039a628b 100644 --- a/test/cpp/end2end/interceptors_util.cc +++ b/test/cpp/end2end/interceptors_util.cc @@ -20,7 +20,6 @@ #include "absl/log/check.h" #include "absl/memory/memory.h" - #include "test/core/test_util/test_config.h" namespace grpc { diff --git a/test/cpp/end2end/interceptors_util.h b/test/cpp/end2end/interceptors_util.h index c16c34cd714..7a890adc944 100644 --- a/test/cpp/end2end/interceptors_util.h +++ b/test/cpp/end2end/interceptors_util.h @@ -19,15 +19,13 @@ #ifndef GRPC_TEST_CPP_END2END_INTERCEPTORS_UTIL_H #define GRPC_TEST_CPP_END2END_INTERCEPTORS_UTIL_H -#include - +#include #include +#include + #include "absl/log/check.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" diff --git a/test/cpp/end2end/message_allocator_end2end_test.cc b/test/cpp/end2end/message_allocator_end2end_test.cc index 5546f5685f5..ca9a5d1aab5 100644 --- a/test/cpp/end2end/message_allocator_end2end_test.cc +++ b/test/cpp/end2end/message_allocator_end2end_test.cc @@ -16,6 +16,17 @@ // // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -25,21 +36,8 @@ #include #include -#include -#include - #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/iomgr.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index 281267a7f9c..d485c31fda7 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -16,15 +16,7 @@ // // -#include -#include - #include -#include - -#include "absl/log/log.h" -#include "absl/types/optional.h" - #include #include #include @@ -35,7 +27,13 @@ #include #include #include +#include +#include +#include + +#include "absl/log/log.h" +#include "absl/types/optional.h" #include "src/core/util/crash.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/nonblocking_test.cc b/test/cpp/end2end/nonblocking_test.cc index 465766afa0a..0d8bcd9ac55 100644 --- a/test/cpp/end2end/nonblocking_test.cc +++ b/test/cpp/end2end/nonblocking_test.cc @@ -16,11 +16,6 @@ // // -#include - -#include "absl/log/check.h" -#include "absl/memory/memory.h" - #include #include #include @@ -28,6 +23,10 @@ #include #include +#include + +#include "absl/log/check.h" +#include "absl/memory/memory.h" #include "src/core/lib/iomgr/port.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/orca_service_end2end_test.cc b/test/cpp/end2end/orca_service_end2end_test.cc index ce88cb19110..5bc12964b20 100644 --- a/test/cpp/end2end/orca_service_end2end_test.cc +++ b/test/cpp/end2end/orca_service_end2end_test.cc @@ -15,12 +15,6 @@ // #include -#include - -#include "absl/log/log.h" -#include "absl/strings/str_cat.h" -#include "absl/types/optional.h" - #include #include #include @@ -31,7 +25,11 @@ #include #include #include +#include +#include "absl/log/log.h" +#include "absl/strings/str_cat.h" +#include "absl/types/optional.h" #include "src/core/util/time.h" #include "src/proto/grpc/testing/xds/v3/orca_service.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/orca_service.pb.h" diff --git a/test/cpp/end2end/port_sharing_end2end_test.cc b/test/cpp/end2end/port_sharing_end2end_test.cc index 93461bd9ff4..0527ffc895b 100644 --- a/test/cpp/end2end/port_sharing_end2end_test.cc +++ b/test/cpp/end2end/port_sharing_end2end_test.cc @@ -16,14 +16,6 @@ // // -#include -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -35,7 +27,13 @@ #include #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset.h" diff --git a/test/cpp/end2end/proto_server_reflection_test.cc b/test/cpp/end2end/proto_server_reflection_test.cc index 478c3c80193..1b4f8d9bd07 100644 --- a/test/cpp/end2end/proto_server_reflection_test.cc +++ b/test/cpp/end2end/proto_server_reflection_test.cc @@ -16,12 +16,7 @@ // // -#include -#include - #include -#include - #include #include #include @@ -32,6 +27,10 @@ #include #include #include +#include + +#include +#include #include "src/proto/grpc/reflection/v1/reflection.grpc.pb.h" #include "src/proto/grpc/reflection/v1/reflection.pb.h" diff --git a/test/cpp/end2end/raw_end2end_test.cc b/test/cpp/end2end/raw_end2end_test.cc index 8b28df798f6..c1e2df79e76 100644 --- a/test/cpp/end2end/raw_end2end_test.cc +++ b/test/cpp/end2end/raw_end2end_test.cc @@ -16,14 +16,6 @@ // // -#include -#include -#include - -#include - -#include "absl/log/check.h" - #include #include #include @@ -33,7 +25,13 @@ #include #include #include +#include +#include +#include +#include + +#include "absl/log/check.h" #include "src/core/lib/iomgr/port.h" #include "src/core/util/crash.h" #include "src/core/util/env.h" diff --git a/test/cpp/end2end/resource_quota_end2end_stress_test.cc b/test/cpp/end2end/resource_quota_end2end_stress_test.cc index 64987700a62..37955f80d40 100644 --- a/test/cpp/end2end/resource_quota_end2end_stress_test.cc +++ b/test/cpp/end2end/resource_quota_end2end_stress_test.cc @@ -12,24 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include +#include +#include +#include + #include #include #include #include #include -#include - #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/time/time.h" - -#include -#include -#include -#include -#include - #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/experiments/config.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" diff --git a/test/cpp/end2end/rls_end2end_test.cc b/test/cpp/end2end/rls_end2end_test.cc index 2ed47362d5e..6a6f1f47a1f 100644 --- a/test/cpp/end2end/rls_end2end_test.cc +++ b/test/cpp/end2end/rls_end2end_test.cc @@ -21,19 +21,7 @@ // fires; request is processed at that point // - find some deterministic way to exercise adaptive throttler code -#include -#include -#include - #include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/strings/str_format.h" -#include "absl/strings/str_join.h" -#include "absl/types/optional.h" - #include #include #include @@ -41,7 +29,17 @@ #include #include #include +#include + +#include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/str_format.h" +#include "absl/strings/str_join.h" +#include "absl/types/optional.h" #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/cpp/end2end/rls_server.cc b/test/cpp/end2end/rls_server.cc index f0b520fe9d6..226823d2942 100644 --- a/test/cpp/end2end/rls_server.cc +++ b/test/cpp/end2end/rls_server.cc @@ -19,7 +19,6 @@ #include #include "absl/log/log.h" - #include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" #include "src/proto/grpc/lookup/v1/rls.pb.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/rls_server.h b/test/cpp/end2end/rls_server.h index 149e38c6395..584991da0c4 100644 --- a/test/cpp/end2end/rls_server.h +++ b/test/cpp/end2end/rls_server.h @@ -18,7 +18,6 @@ #define GRPC_TEST_CPP_END2END_RLS_SERVER_H #include "absl/types/optional.h" - #include "src/core/util/time.h" #include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" #include "src/proto/grpc/lookup/v1/rls.pb.h" diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index 488e4bbaa58..4dabffdc0b1 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -16,12 +16,6 @@ // // -#include - -#include - -#include "absl/memory/memory.h" - #include #include #include @@ -34,7 +28,11 @@ #include #include #include +#include +#include + +#include "absl/memory/memory.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc index bbdea2c1af2..5b784255c5e 100644 --- a/test/cpp/end2end/server_crash_test.cc +++ b/test/cpp/end2end/server_crash_test.cc @@ -16,12 +16,6 @@ // // -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/memory/memory.h" - #include #include #include @@ -30,7 +24,11 @@ #include #include #include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/memory/memory.h" #include "src/core/util/crash.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc index 01b25967be3..ac1918fa6d7 100644 --- a/test/cpp/end2end/server_crash_test_client.cc +++ b/test/cpp/end2end/server_crash_test_client.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include + #include #include #include @@ -24,11 +28,6 @@ #include "absl/flags/flag.h" #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/end2end/server_early_return_test.cc b/test/cpp/end2end/server_early_return_test.cc index ddcc713cb86..ac3aff3d404 100644 --- a/test/cpp/end2end/server_early_return_test.cc +++ b/test/cpp/end2end/server_early_return_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include #include @@ -29,6 +27,7 @@ #include #include #include +#include #include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/server_interceptors_end2end_test.cc b/test/cpp/end2end/server_interceptors_end2end_test.cc index 5c33115312a..380f7ce3806 100644 --- a/test/cpp/end2end/server_interceptors_end2end_test.cc +++ b/test/cpp/end2end/server_interceptors_end2end_test.cc @@ -16,14 +16,6 @@ // // -#include -#include - -#include - -#include "absl/memory/memory.h" -#include "absl/strings/match.h" - #include #include #include @@ -33,7 +25,13 @@ #include #include #include +#include +#include +#include + +#include "absl/memory/memory.h" +#include "absl/strings/match.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/server_load_reporting_end2end_test.cc b/test/cpp/end2end/server_load_reporting_end2end_test.cc index 5365264c5bd..076ca75c7dd 100644 --- a/test/cpp/end2end/server_load_reporting_end2end_test.cc +++ b/test/cpp/end2end/server_load_reporting_end2end_test.cc @@ -16,20 +16,18 @@ // // -#include - #include -#include - -#include "absl/log/log.h" - #include #include #include #include #include #include +#include +#include + +#include "absl/log/log.h" #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/core/util/crash.h" diff --git a/test/cpp/end2end/service_config_end2end_test.cc b/test/cpp/end2end/service_config_end2end_test.cc index 6ff1835aa2f..381440cc61e 100644 --- a/test/cpp/end2end/service_config_end2end_test.cc +++ b/test/cpp/end2end/service_config_end2end_test.cc @@ -16,22 +16,7 @@ // // -#include -#include -#include -#include -#include -#include -#include - #include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/memory/memory.h" -#include "absl/strings/str_cat.h" - #include #include #include @@ -44,7 +29,20 @@ #include #include #include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/memory/memory.h" +#include "absl/strings/str_cat.h" #include "src/core/client_channel/backup_poller.h" #include "src/core/client_channel/global_subchannel_pool.h" #include "src/core/lib/address_utils/parse_address.h" diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc index dcfb52099b6..13dd5b0fa13 100644 --- a/test/cpp/end2end/shutdown_test.cc +++ b/test/cpp/end2end/shutdown_test.cc @@ -16,13 +16,6 @@ // // -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -31,7 +24,12 @@ #include #include #include +#include + +#include +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/util/crash.h" #include "src/core/util/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/ssl_credentials_test.cc b/test/cpp/end2end/ssl_credentials_test.cc index b111e5bfbc2..64ec168f016 100644 --- a/test/cpp/end2end/ssl_credentials_test.cc +++ b/test/cpp/end2end/ssl_credentials_test.cc @@ -15,14 +15,7 @@ // limitations under the License. // // -#include - #include -#include - -#include "absl/log/log.h" -#include "absl/synchronization/notification.h" - #include #include #include @@ -30,7 +23,12 @@ #include #include #include +#include + +#include +#include "absl/log/log.h" +#include "absl/synchronization/notification.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/cpp/end2end/streaming_throughput_test.cc b/test/cpp/end2end/streaming_throughput_test.cc index 8fb9f975349..a52fce46a3d 100644 --- a/test/cpp/end2end/streaming_throughput_test.cc +++ b/test/cpp/end2end/streaming_throughput_test.cc @@ -16,15 +16,6 @@ // // -#include - -#include -#include - -#include - -#include "absl/log/log.h" - #include #include #include @@ -36,7 +27,13 @@ #include #include #include +#include +#include +#include +#include + +#include "absl/log/log.h" #include "src/core/util/crash.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/test_health_check_service_impl.h b/test/cpp/end2end/test_health_check_service_impl.h index 55d53082480..f699a78451d 100644 --- a/test/cpp/end2end/test_health_check_service_impl.h +++ b/test/cpp/end2end/test_health_check_service_impl.h @@ -18,12 +18,12 @@ #ifndef GRPC_TEST_CPP_END2END_TEST_HEALTH_CHECK_SERVICE_IMPL_H #define GRPC_TEST_CPP_END2END_TEST_HEALTH_CHECK_SERVICE_IMPL_H -#include -#include - #include #include +#include +#include + #include "src/proto/grpc/health/v1/health.grpc.pb.h" namespace grpc { diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc index 26810842ac3..b2b347f7aab 100644 --- a/test/cpp/end2end/test_service_impl.cc +++ b/test/cpp/end2end/test_service_impl.cc @@ -18,18 +18,16 @@ #include "test/cpp/end2end/test_service_impl.h" +#include +#include +#include +#include + #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/notification.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/test_service_impl.h b/test/cpp/end2end/test_service_impl.h index c1860573d9e..0ffa3bceac0 100644 --- a/test/cpp/end2end/test_service_impl.h +++ b/test/cpp/end2end/test_service_impl.h @@ -19,22 +19,20 @@ #ifndef GRPC_TEST_CPP_END2END_TEST_SERVICE_IMPL_H #define GRPC_TEST_CPP_END2END_TEST_SERVICE_IMPL_H +#include +#include +#include +#include +#include + #include #include #include #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index b8171015e6c..b471759ce72 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -16,14 +16,6 @@ // // -#include -#include -#include - -#include - -#include "absl/log/log.h" - #include #include #include @@ -34,7 +26,13 @@ #include #include #include +#include +#include +#include +#include + +#include "absl/log/log.h" #include "src/core/util/env.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/time_change_test.cc b/test/cpp/end2end/time_change_test.cc index dd8a9a94441..6c64048903e 100644 --- a/test/cpp/end2end/time_change_test.cc +++ b/test/cpp/end2end/time_change_test.cc @@ -16,15 +16,6 @@ // // -#include - -#include - -#include - -#include "absl/log/check.h" -#include "absl/memory/memory.h" - #include #include #include @@ -33,7 +24,13 @@ #include #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/memory/memory.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/tls_credentials_test.cc b/test/cpp/end2end/tls_credentials_test.cc index 9e9c69b257c..381faad2314 100644 --- a/test/cpp/end2end/tls_credentials_test.cc +++ b/test/cpp/end2end/tls_credentials_test.cc @@ -15,14 +15,7 @@ // limitations under the License. // // -#include - #include -#include - -#include "absl/log/log.h" -#include "absl/synchronization/notification.h" - #include #include #include @@ -31,7 +24,12 @@ #include #include #include +#include + +#include +#include "absl/log/log.h" +#include "absl/synchronization/notification.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/cpp/end2end/tls_key_export_test.cc b/test/cpp/end2end/tls_key_export_test.cc index ad08372f20f..e3db9de2f53 100644 --- a/test/cpp/end2end/tls_key_export_test.cc +++ b/test/cpp/end2end/tls_key_export_test.cc @@ -12,6 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include +#include +#include +#include + #include #include #include // NOLINT @@ -23,14 +30,6 @@ #include "absl/strings/string_view.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/util/tmpfile.h" #include "src/cpp/client/secure_credentials.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/xds/xds_cluster_end2end_test.cc b/test/cpp/end2end/xds/xds_cluster_end2end_test.cc index c10f22d4851..282d8fa3d35 100644 --- a/test/cpp/end2end/xds/xds_cluster_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_cluster_end2end_test.cc @@ -13,17 +13,16 @@ // limitations under the License. // +#include +#include + #include #include #include -#include -#include - #include "absl/log/log.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/config/config_vars.h" diff --git a/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc b/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc index b80b344da03..c03bd0580b1 100644 --- a/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc @@ -13,18 +13,16 @@ // limitations under the License. // -#include - #include +#include #include +#include + #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/config/config_vars.h" diff --git a/test/cpp/end2end/xds/xds_core_end2end_test.cc b/test/cpp/end2end/xds/xds_core_end2end_test.cc index e8d0ed404eb..194ed6d15b0 100644 --- a/test/cpp/end2end/xds/xds_core_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_core_end2end_test.cc @@ -13,18 +13,17 @@ // limitations under the License. // +#include +#include + #include #include #include #include #include -#include -#include - #include "absl/log/log.h" #include "absl/strings/str_cat.h" - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/proto/grpc/testing/xds/v3/listener.pb.h" diff --git a/test/cpp/end2end/xds/xds_credentials_end2end_test.cc b/test/cpp/end2end/xds/xds_credentials_end2end_test.cc index 10e4f5cf80c..6eea137a8ea 100644 --- a/test/cpp/end2end/xds/xds_credentials_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_credentials_end2end_test.cc @@ -17,10 +17,9 @@ // #include -#include - #include #include +#include #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/xds/xds_csds_end2end_test.cc b/test/cpp/end2end/xds/xds_csds_end2end_test.cc index cf498e060f8..3b697adaf80 100644 --- a/test/cpp/end2end/xds/xds_csds_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_csds_end2end_test.cc @@ -13,21 +13,19 @@ // limitations under the License. // +#include +#include +#include +#include + #include #include #include -#include -#include - #include "absl/log/log.h" #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" #include "absl/strings/strip.h" - -#include -#include - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h" diff --git a/test/cpp/end2end/xds/xds_end2end_test.cc b/test/cpp/end2end/xds/xds_end2end_test.cc index cf003274740..428a88c5edc 100644 --- a/test/cpp/end2end/xds/xds_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_end2end_test.cc @@ -18,6 +18,21 @@ // - mTLS functionality on both client and server // - RBAC +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -28,9 +43,6 @@ #include #include -#include -#include - #include "absl/functional/bind_front.h" #include "absl/log/check.h" #include "absl/log/log.h" @@ -42,20 +54,6 @@ #include "absl/strings/str_replace.h" #include "absl/time/time.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/client_channel/backup_poller.h" #include "src/core/ext/filters/http/client/http_client_filter.h" #include "src/core/lib/address_utils/parse_address.h" diff --git a/test/cpp/end2end/xds/xds_end2end_test_lib.cc b/test/cpp/end2end/xds/xds_end2end_test_lib.cc index 1ba85995c09..7ddf6c7b607 100644 --- a/test/cpp/end2end/xds/xds_end2end_test_lib.cc +++ b/test/cpp/end2end/xds/xds_end2end_test_lib.cc @@ -15,6 +15,10 @@ #include "test/cpp/end2end/xds/xds_end2end_test_lib.h" +#include +#include +#include + #include #include #include @@ -23,9 +27,6 @@ #include #include -#include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/memory/memory.h" @@ -34,9 +35,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/ext/filters/http/server/http_server_filter.h" #include "src/core/server/server.h" #include "src/core/util/env.h" diff --git a/test/cpp/end2end/xds/xds_end2end_test_lib.h b/test/cpp/end2end/xds/xds_end2end_test_lib.h index 02e3fcbe50d..82164785750 100644 --- a/test/cpp/end2end/xds/xds_end2end_test_lib.h +++ b/test/cpp/end2end/xds/xds_end2end_test_lib.h @@ -16,30 +16,28 @@ #ifndef GRPC_TEST_CPP_END2END_XDS_XDS_END2END_TEST_LIB_H #define GRPC_TEST_CPP_END2END_XDS_XDS_END2END_TEST_LIB_H +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include #include #include -#include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/cpp/server/secure_server_credentials.h" diff --git a/test/cpp/end2end/xds/xds_fallback_end2end_test.cc b/test/cpp/end2end/xds/xds_fallback_end2end_test.cc index 49e22de0e0b..a1b5c163cc1 100644 --- a/test/cpp/end2end/xds/xds_fallback_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_fallback_end2end_test.cc @@ -12,22 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. // +#include +#include +#include +#include +#include + #include #include #include #include -#include -#include - #include "absl/cleanup/cleanup.h" #include "absl/strings/str_format.h" #include "absl/strings/strip.h" - -#include -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/echo_messages.pb.h" diff --git a/test/cpp/end2end/xds/xds_fault_injection_end2end_test.cc b/test/cpp/end2end/xds/xds_fault_injection_end2end_test.cc index 3c560fc5c5e..40b8ac3c24e 100644 --- a/test/cpp/end2end/xds/xds_fault_injection_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_fault_injection_end2end_test.cc @@ -13,12 +13,12 @@ // limitations under the License. // -#include -#include - #include #include +#include +#include + #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h" diff --git a/test/cpp/end2end/xds/xds_gcp_authn_end2end_test.cc b/test/cpp/end2end/xds/xds_gcp_authn_end2end_test.cc index 775eb60e6fc..19a0bae4a9d 100644 --- a/test/cpp/end2end/xds/xds_gcp_authn_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_gcp_authn_end2end_test.cc @@ -14,14 +14,13 @@ // limitations under the License. // +#include + #include #include #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/core/util/http_client/httpcli.h" diff --git a/test/cpp/end2end/xds/xds_outlier_detection_end2end_test.cc b/test/cpp/end2end/xds/xds_outlier_detection_end2end_test.cc index 17df1d08cac..1c99747b18d 100644 --- a/test/cpp/end2end/xds/xds_outlier_detection_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_outlier_detection_end2end_test.cc @@ -12,16 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include #include #include -#include -#include - #include "absl/log/check.h" - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h" diff --git a/test/cpp/end2end/xds/xds_override_host_end2end_test.cc b/test/cpp/end2end/xds/xds_override_host_end2end_test.cc index 69eb72cbddd..c166b5225a5 100644 --- a/test/cpp/end2end/xds/xds_override_host_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_override_host_end2end_test.cc @@ -12,17 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include - #include #include +#include +#include + #include "absl/log/log.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/str_split.h" - #include "src/core/lib/config/config_vars.h" #include "src/core/util/time.h" #include "src/proto/grpc/testing/xds/v3/stateful_session.pb.h" diff --git a/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc b/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc index f0d6796691d..9feba2fd859 100644 --- a/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc @@ -13,6 +13,10 @@ // limitations under the License. // +#include +#include +#include +#include #include #include @@ -21,14 +25,7 @@ #include #include -#include -#include - #include "absl/strings/str_cat.h" - -#include -#include - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/config/config_vars.h" diff --git a/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc b/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc index 86aba3e8121..8fee5c9c99d 100644 --- a/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc @@ -13,19 +13,17 @@ // limitations under the License. // -#include -#include - #include +#include #include +#include +#include + #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/config/config_vars.h" diff --git a/test/cpp/end2end/xds/xds_rls_end2end_test.cc b/test/cpp/end2end/xds/xds_rls_end2end_test.cc index 2297d159ca9..2f3c9d0f79c 100644 --- a/test/cpp/end2end/xds/xds_rls_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_rls_end2end_test.cc @@ -13,14 +13,13 @@ // limitations under the License. // -#include - #include #include +#include + #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/core/util/env.h" diff --git a/test/cpp/end2end/xds/xds_routing_end2end_test.cc b/test/cpp/end2end/xds/xds_routing_end2end_test.cc index 7b7a2be9a52..022b92660ed 100644 --- a/test/cpp/end2end/xds/xds_routing_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_routing_end2end_test.cc @@ -12,16 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include + #include #include #include #include -#include -#include - #include "absl/log/log.h" - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/proto/grpc/testing/xds/v3/fault.grpc.pb.h" diff --git a/test/cpp/end2end/xds/xds_server.cc b/test/cpp/end2end/xds/xds_server.cc index bbae462c994..4b7450eb171 100644 --- a/test/cpp/end2end/xds/xds_server.cc +++ b/test/cpp/end2end/xds/xds_server.cc @@ -25,7 +25,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/types/optional.h" - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/util/crash.h" #include "src/core/util/sync.h" diff --git a/test/cpp/end2end/xds/xds_server.h b/test/cpp/end2end/xds/xds_server.h index 2b6c508faf7..5ba992abc59 100644 --- a/test/cpp/end2end/xds/xds_server.h +++ b/test/cpp/end2end/xds/xds_server.h @@ -17,6 +17,8 @@ #ifndef GRPC_TEST_CPP_END2END_XDS_XDS_SERVER_H #define GRPC_TEST_CPP_END2END_XDS_XDS_SERVER_H +#include + #include #include #include @@ -26,9 +28,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/types/optional.h" - -#include - #include "src/core/lib/address_utils/parse_address.h" #include "src/core/util/crash.h" #include "src/core/util/sync.h" diff --git a/test/cpp/end2end/xds/xds_utils.cc b/test/cpp/end2end/xds/xds_utils.cc index c52e819172e..28314835ffa 100644 --- a/test/cpp/end2end/xds/xds_utils.cc +++ b/test/cpp/end2end/xds/xds_utils.cc @@ -15,6 +15,8 @@ #include "test/cpp/end2end/xds/xds_utils.h" +#include + #include #include #include @@ -30,9 +32,6 @@ #include "absl/strings/str_replace.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" - -#include - #include "src/core/ext/filters/http/server/http_server_filter.h" #include "src/core/server/server.h" #include "src/core/util/env.h" diff --git a/test/cpp/end2end/xds/xds_utils.h b/test/cpp/end2end/xds/xds_utils.h index 039dd19c53e..7d9a95ffe49 100644 --- a/test/cpp/end2end/xds/xds_utils.h +++ b/test/cpp/end2end/xds/xds_utils.h @@ -20,7 +20,6 @@ #include #include "absl/strings/string_view.h" - #include "src/proto/grpc/testing/xds/v3/cluster.pb.h" #include "src/proto/grpc/testing/xds/v3/endpoint.pb.h" #include "src/proto/grpc/testing/xds/v3/http_connection_manager.pb.h" diff --git a/test/cpp/end2end/xds/xds_wrr_end2end_test.cc b/test/cpp/end2end/xds/xds_wrr_end2end_test.cc index da8cea70f54..bdd42fcedd4 100644 --- a/test/cpp/end2end/xds/xds_wrr_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_wrr_end2end_test.cc @@ -13,19 +13,17 @@ // limitations under the License. // -#include -#include - #include +#include +#include #include +#include +#include + #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" #include "src/proto/grpc/testing/xds/v3/client_side_weighted_round_robin.grpc.pb.h" diff --git a/test/cpp/ext/chaotic_good_test.cc b/test/cpp/ext/chaotic_good_test.cc index d77a3b98d55..c7d7927354d 100644 --- a/test/cpp/ext/chaotic_good_test.cc +++ b/test/cpp/ext/chaotic_good_test.cc @@ -14,10 +14,9 @@ #include "src/cpp/ext/chaotic_good.h" -#include "gtest/gtest.h" - #include +#include "gtest/gtest.h" #include "test/core/test_util/test_config.h" namespace grpc { diff --git a/test/cpp/ext/csm/csm_observability_test.cc b/test/cpp/ext/csm/csm_observability_test.cc index 380c8940b7a..c36b37efee1 100644 --- a/test/cpp/ext/csm/csm_observability_test.cc +++ b/test/cpp/ext/csm/csm_observability_test.cc @@ -18,13 +18,12 @@ #include "src/cpp/ext/csm/csm_observability.h" -#include "google/cloud/opentelemetry/resource_detector.h" -#include "gtest/gtest.h" -#include "opentelemetry/sdk/metrics/meter_provider.h" - #include #include +#include "google/cloud/opentelemetry/resource_detector.h" +#include "gtest/gtest.h" +#include "opentelemetry/sdk/metrics/meter_provider.h" #include "src/core/xds/grpc/xds_enabled_server.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/ext/csm/mesh_id_test.cc b/test/cpp/ext/csm/mesh_id_test.cc index e1a7f86fc80..c18526dbf84 100644 --- a/test/cpp/ext/csm/mesh_id_test.cc +++ b/test/cpp/ext/csm/mesh_id_test.cc @@ -16,10 +16,9 @@ // // -#include "gtest/gtest.h" - #include +#include "gtest/gtest.h" #include "src/core/util/env.h" #include "src/core/util/tmpfile.h" #include "src/cpp/ext/csm/metadata_exchange.h" diff --git a/test/cpp/ext/csm/metadata_exchange_test.cc b/test/cpp/ext/csm/metadata_exchange_test.cc index 1b85eaf185a..08fb8bd9823 100644 --- a/test/cpp/ext/csm/metadata_exchange_test.cc +++ b/test/cpp/ext/csm/metadata_exchange_test.cc @@ -18,6 +18,9 @@ #include "src/cpp/ext/csm/metadata_exchange.h" +#include +#include + #include "absl/functional/any_invocable.h" #include "gmock/gmock.h" #include "google/cloud/opentelemetry/resource_detector.h" @@ -25,10 +28,6 @@ #include "opentelemetry/metrics/provider.h" #include "opentelemetry/sdk/metrics/meter_provider.h" #include "opentelemetry/sdk/metrics/metric_reader.h" - -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/telemetry/call_tracer.h" #include "src/core/util/env.h" diff --git a/test/cpp/ext/filters/census/constant_labels_test.cc b/test/cpp/ext/filters/census/constant_labels_test.cc index 0f7c6128814..0688e5c07b6 100644 --- a/test/cpp/ext/filters/census/constant_labels_test.cc +++ b/test/cpp/ext/filters/census/constant_labels_test.cc @@ -16,6 +16,9 @@ // // +#include +#include + #include #include // NOLINT #include @@ -26,10 +29,6 @@ #include "opencensus/stats/stats.h" #include "opencensus/stats/testing/test_utils.h" #include "opencensus/tags/tag_map.h" - -#include -#include - #include "src/cpp/ext/filters/census/context.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/ext/filters/census/library.h b/test/cpp/ext/filters/census/library.h index 243dd968f64..c1fa9f58f71 100644 --- a/test/cpp/ext/filters/census/library.h +++ b/test/cpp/ext/filters/census/library.h @@ -19,6 +19,9 @@ #ifndef GRPC_TEST_CPP_EXT_FILTERS_CENSUS_LIBRARY_H #define GRPC_TEST_CPP_EXT_FILTERS_CENSUS_LIBRARY_H +#include +#include + #include #include // NOLINT #include @@ -27,10 +30,6 @@ #include "gtest/gtest.h" #include "opencensus/stats/stats.h" #include "opencensus/trace/exporter/span_exporter.h" - -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/cpp/client/client_stats_interceptor.h" #include "src/cpp/ext/filters/census/client_filter.h" diff --git a/test/cpp/ext/filters/census/stats_plugin_end2end_test.cc b/test/cpp/ext/filters/census/stats_plugin_end2end_test.cc index d569b1a41c9..3bad979cd29 100644 --- a/test/cpp/ext/filters/census/stats_plugin_end2end_test.cc +++ b/test/cpp/ext/filters/census/stats_plugin_end2end_test.cc @@ -16,6 +16,9 @@ // // +#include +#include + #include #include // NOLINT #include @@ -29,10 +32,6 @@ #include "opencensus/stats/testing/test_utils.h" #include "opencensus/tags/tag_map.h" #include "opencensus/tags/with_tag_map.h" - -#include -#include - #include "src/core/lib/experiments/experiments.h" #include "src/cpp/ext/filters/census/context.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" diff --git a/test/cpp/ext/filters/logging/library.h b/test/cpp/ext/filters/logging/library.h index f1ca3fc9576..bffa8a18fe7 100644 --- a/test/cpp/ext/filters/logging/library.h +++ b/test/cpp/ext/filters/logging/library.h @@ -19,6 +19,10 @@ #ifndef GRPC_TEST_CPP_EXT_FILTERS_LOGGING_LIBRARY_H #define GRPC_TEST_CPP_EXT_FILTERS_LOGGING_LIBRARY_H +#include +#include +#include + #include #include // NOLINT @@ -29,11 +33,6 @@ #include "gmock/gmock.h" #include "google/protobuf/text_format.h" #include "gtest/gtest.h" - -#include -#include -#include - #include "src/core/ext/filters/logging/logging_filter.h" #include "src/core/util/sync.h" #include "src/cpp/ext/gcp/observability_logging_sink.h" diff --git a/test/cpp/ext/filters/logging/logging_census_integration_test.cc b/test/cpp/ext/filters/logging/logging_census_integration_test.cc index 622c93ffbb4..e6142d4f8fa 100644 --- a/test/cpp/ext/filters/logging/logging_census_integration_test.cc +++ b/test/cpp/ext/filters/logging/logging_census_integration_test.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include + #include #include // NOLINT @@ -25,11 +29,6 @@ #include "google/protobuf/text_format.h" #include "gtest/gtest.h" #include "opencensus/stats/testing/test_utils.h" - -#include -#include -#include - #include "src/core/ext/filters/logging/logging_filter.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/util/sync.h" diff --git a/test/cpp/ext/filters/logging/logging_test.cc b/test/cpp/ext/filters/logging/logging_test.cc index 6441e1cefcf..e94c5c5889e 100644 --- a/test/cpp/ext/filters/logging/logging_test.cc +++ b/test/cpp/ext/filters/logging/logging_test.cc @@ -16,6 +16,9 @@ // // +#include +#include + #include #include // NOLINT @@ -24,10 +27,6 @@ #include "gmock/gmock.h" #include "google/protobuf/text_format.h" #include "gtest/gtest.h" - -#include -#include - #include "src/core/ext/filters/logging/logging_filter.h" #include "src/core/util/dump_args.h" #include "src/core/util/sync.h" diff --git a/test/cpp/ext/gcp/environment_autodetect_test.cc b/test/cpp/ext/gcp/environment_autodetect_test.cc index d466a48ba93..fa707266829 100644 --- a/test/cpp/ext/gcp/environment_autodetect_test.cc +++ b/test/cpp/ext/gcp/environment_autodetect_test.cc @@ -18,6 +18,8 @@ #include "src/cpp/ext/gcp/environment_autodetect.h" +#include + #include #include // NOLINT #include @@ -26,9 +28,6 @@ #include "absl/synchronization/notification.h" #include "gmock/gmock.h" #include "gtest/gtest.h" - -#include - #include "src/core/util/env.h" #include "src/core/util/notification.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/ext/gcp/observability_config_test.cc b/test/cpp/ext/gcp/observability_config_test.cc index 391832b13d5..31ba998455f 100644 --- a/test/cpp/ext/gcp/observability_config_test.cc +++ b/test/cpp/ext/gcp/observability_config_test.cc @@ -16,11 +16,10 @@ #include "src/cpp/ext/gcp/observability_config.h" -#include "gmock/gmock.h" -#include "gtest/gtest.h" - #include +#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/util/env.h" #include "src/core/util/json/json_reader.h" diff --git a/test/cpp/ext/gcp/observability_logging_sink_test.cc b/test/cpp/ext/gcp/observability_logging_sink_test.cc index 2349fe6b60c..f425fb7ac64 100644 --- a/test/cpp/ext/gcp/observability_logging_sink_test.cc +++ b/test/cpp/ext/gcp/observability_logging_sink_test.cc @@ -21,7 +21,6 @@ #include "gmock/gmock.h" #include "google/protobuf/text_format.h" #include "gtest/gtest.h" - #include "src/core/util/json/json_reader.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/ext/gcp/observability_test.cc b/test/cpp/ext/gcp/observability_test.cc index 93779f9da40..ca26f6a9e93 100644 --- a/test/cpp/ext/gcp/observability_test.cc +++ b/test/cpp/ext/gcp/observability_test.cc @@ -14,12 +14,11 @@ // limitations under the License. // -#include "gmock/gmock.h" -#include "gtest/gtest.h" - #include #include +#include "gmock/gmock.h" +#include "gtest/gtest.h" #include "src/core/lib/config/core_configuration.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/echo_messages.pb.h" diff --git a/test/cpp/ext/otel/otel_plugin_test.cc b/test/cpp/ext/otel/otel_plugin_test.cc index d5f95377d00..4c96d0eef26 100644 --- a/test/cpp/ext/otel/otel_plugin_test.cc +++ b/test/cpp/ext/otel/otel_plugin_test.cc @@ -18,6 +18,9 @@ #include "src/cpp/ext/otel/otel_plugin.h" +#include +#include + #include #include #include @@ -34,10 +37,6 @@ #include "opentelemetry/sdk/metrics/data/point_data.h" #include "opentelemetry/sdk/metrics/meter_provider.h" #include "opentelemetry/sdk/metrics/metric_reader.h" - -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/telemetry/call_tracer.h" diff --git a/test/cpp/ext/otel/otel_test_library.cc b/test/cpp/ext/otel/otel_test_library.cc index 131aeef222f..15bc96c63c1 100644 --- a/test/cpp/ext/otel/otel_test_library.cc +++ b/test/cpp/ext/otel/otel_test_library.cc @@ -18,6 +18,8 @@ #include "test/cpp/ext/otel/otel_test_library.h" +#include + #include #include @@ -28,9 +30,6 @@ #include "opentelemetry/sdk/metrics/export/metric_producer.h" #include "opentelemetry/sdk/metrics/meter_provider.h" #include "opentelemetry/sdk/metrics/metric_reader.h" - -#include - #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/telemetry/call_tracer.h" diff --git a/test/cpp/ext/otel/otel_test_library.h b/test/cpp/ext/otel/otel_test_library.h index 38859f68710..78195fe3541 100644 --- a/test/cpp/ext/otel/otel_test_library.h +++ b/test/cpp/ext/otel/otel_test_library.h @@ -19,6 +19,10 @@ #ifndef GRPC_TEST_CPP_EXT_OTEL_OTEL_TEST_LIBRARY_H #define GRPC_TEST_CPP_EXT_OTEL_OTEL_TEST_LIBRARY_H +#include +#include +#include + #include #include @@ -28,11 +32,6 @@ #include "opentelemetry/metrics/provider.h" #include "opentelemetry/sdk/metrics/meter_provider.h" #include "opentelemetry/sdk/metrics/metric_reader.h" - -#include -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/core/telemetry/call_tracer.h" #include "src/cpp/ext/otel/otel_plugin.h" diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index 31298a2c9c2..b7ee1423d77 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -16,20 +16,18 @@ // // +#include +#include #include #include "absl/log/check.h" #include "google/protobuf/duration.upb.h" -#include "upb/mem/arena.hpp" - -#include -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/load_balancing/grpclb/load_balancer_api.h" #include "src/proto/grpc/lb/v1/load_balancer.pb.h" // C++ version #include "test/core/test_util/test_config.h" +#include "upb/mem/arena.hpp" namespace grpc { namespace { diff --git a/test/cpp/interop/backend_metrics_lb_policy.cc b/test/cpp/interop/backend_metrics_lb_policy.cc index 55487bc221b..58be2709fe0 100644 --- a/test/cpp/interop/backend_metrics_lb_policy.cc +++ b/test/cpp/interop/backend_metrics_lb_policy.cc @@ -18,12 +18,11 @@ #include "test/cpp/interop/backend_metrics_lb_policy.h" +#include + #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/load_balancing/delegating_helper.h" #include "src/core/load_balancing/oob_backend_metric.h" diff --git a/test/cpp/interop/backend_metrics_lb_policy_test.cc b/test/cpp/interop/backend_metrics_lb_policy_test.cc index 0a5fb277bab..1d2dc8372d2 100644 --- a/test/cpp/interop/backend_metrics_lb_policy_test.cc +++ b/test/cpp/interop/backend_metrics_lb_policy_test.cc @@ -18,17 +18,16 @@ #include "test/cpp/interop/backend_metrics_lb_policy.h" -#include -#include - #include -#include - #include #include #include #include #include +#include + +#include +#include #include "src/core/lib/config/config_vars.h" #include "src/core/util/sync.h" diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index fe211e71ddb..4802be5786e 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -16,18 +16,17 @@ // // -#include -#include - -#include "absl/flags/flag.h" -#include "absl/log/log.h" - #include #include #include #include #include +#include +#include + +#include "absl/flags/flag.h" +#include "absl/log/log.h" #include "src/core/util/crash.h" #include "src/core/util/string.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index 8963aecc4ff..b5c78dd303a 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -18,6 +18,13 @@ #include "test/cpp/interop/client_helper.h" +#include +#include +#include +#include +#include +#include + #include #include #include @@ -28,14 +35,6 @@ #include "absl/log/log.h" #include "absl/strings/escaping.h" #include "absl/strings/match.h" - -#include -#include -#include -#include -#include -#include - #include "test/core/security/oauth2_utils.h" #include "test/cpp/util/create_test_channel.h" #include "test/cpp/util/test_credentials_provider.h" diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h index 35bd62f5a58..1c1ed0d4223 100644 --- a/test/cpp/interop/client_helper.h +++ b/test/cpp/interop/client_helper.h @@ -19,14 +19,14 @@ #ifndef GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H #define GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H -#include -#include -#include - #include #include #include +#include +#include +#include + #include "src/core/lib/surface/call_test_only.h" #include "src/core/lib/transport/transport.h" diff --git a/test/cpp/interop/grpclb_fallback_test.cc b/test/cpp/interop/grpclb_fallback_test.cc index 7d3c637fee2..2a8a02c6fc3 100644 --- a/test/cpp/interop/grpclb_fallback_test.cc +++ b/test/cpp/interop/grpclb_fallback_test.cc @@ -18,6 +18,12 @@ #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -35,14 +41,6 @@ #include "absl/log/log.h" #include "absl/strings/str_format.h" #include "absl/time/time.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/socket_mutator.h" #include "src/core/util/crash.h" diff --git a/test/cpp/interop/http2_client.cc b/test/cpp/interop/http2_client.cc index d19b0b6616a..76e7794b427 100644 --- a/test/cpp/interop/http2_client.cc +++ b/test/cpp/interop/http2_client.cc @@ -18,17 +18,16 @@ #include "test/cpp/interop/http2_client.h" +#include +#include +#include + #include #include "absl/flags/flag.h" #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/string.h" #include "src/core/util/useful.h" diff --git a/test/cpp/interop/http2_client.h b/test/cpp/interop/http2_client.h index 4eeaaf4125b..d6aeaa2a35a 100644 --- a/test/cpp/interop/http2_client.h +++ b/test/cpp/interop/http2_client.h @@ -19,11 +19,11 @@ #ifndef GRPC_TEST_CPP_INTEROP_HTTP2_CLIENT_H #define GRPC_TEST_CPP_INTEROP_HTTP2_CLIENT_H -#include - #include #include +#include + #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 1190ecd7476..d259cdcfd26 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -18,6 +18,14 @@ #include "test/cpp/interop/interop_client.h" +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -32,15 +40,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/types/optional.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/config/config_vars.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/util/crash.h" diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index cfebf466678..2cf3fa81b10 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -19,12 +19,12 @@ #ifndef GRPC_TEST_CPP_INTEROP_INTEROP_CLIENT_H #define GRPC_TEST_CPP_INTEROP_INTEROP_CLIENT_H -#include -#include - #include #include +#include +#include + #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" #include "test/cpp/interop/backend_metrics_lb_policy.h" diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc index 25f5f633bfc..f22d4bf035c 100644 --- a/test/cpp/interop/interop_server.cc +++ b/test/cpp/interop/interop_server.cc @@ -16,15 +16,6 @@ // // -#include -#include -#include -#include - -#include "absl/flags/flag.h" -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -35,6 +26,14 @@ #include #include +#include +#include +#include +#include + +#include "absl/flags/flag.h" +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/util/crash.h" #include "src/core/util/string.h" #include "src/core/util/sync.h" diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index 1134971371d..74c30d778fd 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -17,6 +17,7 @@ // #include +#include #include #include #include @@ -31,9 +32,6 @@ #include "absl/flags/flag.h" #include "absl/log/log.h" #include "absl/strings/str_cat.h" - -#include - #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/util/crash.h" #include "src/core/util/string.h" diff --git a/test/cpp/interop/istio_echo_server.cc b/test/cpp/interop/istio_echo_server.cc index bb24edcae46..f661911f3e3 100644 --- a/test/cpp/interop/istio_echo_server.cc +++ b/test/cpp/interop/istio_echo_server.cc @@ -14,6 +14,15 @@ // limitations under the License. // +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -34,16 +43,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/str_split.h" - -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/status_util.h" #include "src/core/util/env.h" #include "src/core/util/gethostname.h" diff --git a/test/cpp/interop/istio_echo_server_lib.cc b/test/cpp/interop/istio_echo_server_lib.cc index f0ddd49c80a..8d8949a820b 100644 --- a/test/cpp/interop/istio_echo_server_lib.cc +++ b/test/cpp/interop/istio_echo_server_lib.cc @@ -16,6 +16,9 @@ #include "test/cpp/interop/istio_echo_server_lib.h" +#include +#include + #include #include "absl/log/log.h" @@ -23,10 +26,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_split.h" #include "absl/synchronization/blocking_counter.h" - -#include -#include - #include "src/core/util/host_port.h" #include "src/proto/grpc/testing/istio_echo.pb.h" diff --git a/test/cpp/interop/istio_echo_server_test.cc b/test/cpp/interop/istio_echo_server_test.cc index faa9a47ac57..927103e405e 100644 --- a/test/cpp/interop/istio_echo_server_test.cc +++ b/test/cpp/interop/istio_echo_server_test.cc @@ -14,19 +14,17 @@ // limitations under the License. // -#include - #include -#include - -#include "absl/strings/str_cat.h" -#include "absl/strings/str_format.h" - #include #include #include #include +#include + +#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" #include "src/core/util/crash.h" #include "src/core/util/host_port.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/interop/metrics_client.cc b/test/cpp/interop/metrics_client.cc index 9eb4f488b14..06352eaed6b 100644 --- a/test/cpp/interop/metrics_client.cc +++ b/test/cpp/interop/metrics_client.cc @@ -16,13 +16,12 @@ // is % allowed in string // +#include + #include #include #include "absl/flags/flag.h" - -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/metrics.grpc.pb.h" #include "src/proto/grpc/testing/metrics.pb.h" diff --git a/test/cpp/interop/observability_client.cc b/test/cpp/interop/observability_client.cc index c264aa504ec..8e2132dcd98 100644 --- a/test/cpp/interop/observability_client.cc +++ b/test/cpp/interop/observability_client.cc @@ -16,6 +16,13 @@ // // +#include +#include +#include +#include +#include +#include + #include #include @@ -24,14 +31,6 @@ #include "opentelemetry/exporters/prometheus/exporter_factory.h" #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/string.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/interop/observability_interop_server_bootstrap.cc b/test/cpp/interop/observability_interop_server_bootstrap.cc index f14755b5cd9..097ff933d03 100644 --- a/test/cpp/interop/observability_interop_server_bootstrap.cc +++ b/test/cpp/interop/observability_interop_server_bootstrap.cc @@ -16,13 +16,11 @@ // // +#include #include #include "absl/flags/flag.h" #include "absl/log/log.h" - -#include - #include "test/core/test_util/test_config.h" #include "test/cpp/interop/server_helper.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/interop/pre_stop_hook_server.cc b/test/cpp/interop/pre_stop_hook_server.cc index a00ab791a9d..ea8b7d8b807 100644 --- a/test/cpp/interop/pre_stop_hook_server.cc +++ b/test/cpp/interop/pre_stop_hook_server.cc @@ -18,12 +18,11 @@ #include "test/cpp/interop/pre_stop_hook_server.h" +#include + #include #include "absl/strings/str_format.h" - -#include - #include "src/core/util/sync.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/cpp/interop/pre_stop_hook_server_test.cc b/test/cpp/interop/pre_stop_hook_server_test.cc index 32aa91b1bc2..0097a9e3fbc 100644 --- a/test/cpp/interop/pre_stop_hook_server_test.cc +++ b/test/cpp/interop/pre_stop_hook_server_test.cc @@ -16,17 +16,15 @@ #include "test/cpp/interop/pre_stop_hook_server.h" -#include - #include -#include - -#include "absl/strings/str_format.h" - #include #include #include +#include +#include + +#include "absl/strings/str_format.h" #include "src/core/util/sync.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/cpp/interop/reconnect_interop_client.cc b/test/cpp/interop/reconnect_interop_client.cc index 1c2e4837ec0..bb46bfedd10 100644 --- a/test/cpp/interop/reconnect_interop_client.cc +++ b/test/cpp/interop/reconnect_interop_client.cc @@ -16,18 +16,17 @@ // // +#include +#include +#include +#include + #include #include #include "absl/flags/flag.h" #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc index a5ac668bb29..a118802661c 100644 --- a/test/cpp/interop/reconnect_interop_server.cc +++ b/test/cpp/interop/reconnect_interop_server.cc @@ -18,6 +18,10 @@ // Test description at doc/connection-backoff-interop-test-description.md +#include +#include +#include +#include #include #include @@ -28,12 +32,6 @@ #include "absl/flags/flag.h" #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/cpp/interop/rpc_behavior_lb_policy.cc b/test/cpp/interop/rpc_behavior_lb_policy.cc index 8d8826a03d1..4b8cfc10956 100644 --- a/test/cpp/interop/rpc_behavior_lb_policy.cc +++ b/test/cpp/interop/rpc_behavior_lb_policy.cc @@ -18,11 +18,10 @@ #include "test/cpp/interop/rpc_behavior_lb_policy.h" -#include "absl/log/check.h" -#include "absl/strings/str_format.h" - #include +#include "absl/log/check.h" +#include "absl/strings/str_format.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/load_balancing/delegating_helper.h" #include "src/core/util/json/json_args.h" diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc index 8dfc5576d7a..e79912f3bde 100644 --- a/test/cpp/interop/server_helper.cc +++ b/test/cpp/interop/server_helper.cc @@ -18,13 +18,12 @@ #include "test/cpp/interop/server_helper.h" +#include + #include #include "absl/flags/declare.h" #include "absl/flags/flag.h" - -#include - #include "src/core/lib/surface/call_test_only.h" #include "src/core/lib/transport/transport.h" #include "test/cpp/util/test_credentials_provider.h" diff --git a/test/cpp/interop/server_helper.h b/test/cpp/interop/server_helper.h index 9acb77f624e..bdec6cf4b1e 100644 --- a/test/cpp/interop/server_helper.h +++ b/test/cpp/interop/server_helper.h @@ -19,9 +19,6 @@ #ifndef GRPC_TEST_CPP_INTEROP_SERVER_HELPER_H #define GRPC_TEST_CPP_INTEROP_SERVER_HELPER_H -#include -#include - #include #include #include @@ -29,6 +26,9 @@ #include #include +#include +#include + namespace grpc { namespace testing { diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc index 0ccacfaefb1..cf92bd1ba8b 100644 --- a/test/cpp/interop/stress_interop_client.cc +++ b/test/cpp/interop/stress_interop_client.cc @@ -18,6 +18,8 @@ #include "test/cpp/interop/stress_interop_client.h" +#include + #include #include #include @@ -25,9 +27,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include - #include "src/core/util/crash.h" #include "test/cpp/interop/interop_client.h" #include "test/cpp/util/metrics_server.h" diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h index cdc8bf91727..4744bed86c4 100644 --- a/test/cpp/interop/stress_interop_client.h +++ b/test/cpp/interop/stress_interop_client.h @@ -19,12 +19,12 @@ #ifndef GRPC_TEST_CPP_INTEROP_STRESS_INTEROP_CLIENT_H #define GRPC_TEST_CPP_INTEROP_STRESS_INTEROP_CLIENT_H +#include + #include #include #include -#include - #include "test/cpp/interop/interop_client.h" #include "test/cpp/util/metrics_server.h" diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index 3f27484111c..addf9bfb14f 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -16,6 +16,9 @@ // is % allowed in string // +#include +#include +#include #include #include @@ -28,11 +31,6 @@ #include "absl/log/check.h" #include "absl/log/globals.h" #include "absl/log/log.h" - -#include -#include -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/metrics.grpc.pb.h" #include "src/proto/grpc/testing/metrics.pb.h" diff --git a/test/cpp/interop/xds_federation_client.cc b/test/cpp/interop/xds_federation_client.cc index 8c8c4ffc6b7..2edbf491815 100644 --- a/test/cpp/interop/xds_federation_client.cc +++ b/test/cpp/interop/xds_federation_client.cc @@ -16,6 +16,9 @@ // // +#include +#include + #include #include @@ -23,10 +26,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_split.h" - -#include -#include - #include "src/core/util/string.h" #include "test/core/test_util/test_config.h" #include "test/cpp/interop/client_helper.h" diff --git a/test/cpp/interop/xds_interop_client.cc b/test/cpp/interop/xds_interop_client.cc index f3af46b19f2..d2296032267 100644 --- a/test/cpp/interop/xds_interop_client.cc +++ b/test/cpp/interop/xds_interop_client.cc @@ -16,6 +16,14 @@ // // +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -38,15 +46,6 @@ #include "opentelemetry/exporters/prometheus/exporter_factory.h" #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/lib/channel/status_util.h" #include "src/core/util/env.h" #include "src/proto/grpc/testing/empty.pb.h" diff --git a/test/cpp/interop/xds_interop_server.cc b/test/cpp/interop/xds_interop_server.cc index eb2fa7ad08f..8d70944b4e7 100644 --- a/test/cpp/interop/xds_interop_server.cc +++ b/test/cpp/interop/xds_interop_server.cc @@ -16,6 +16,10 @@ // // +#include +#include +#include + #include #include "absl/flags/flag.h" @@ -23,11 +27,6 @@ #include "opentelemetry/exporters/prometheus/exporter_factory.h" #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" - -#include -#include -#include - #include "src/core/util/gethostname.h" #include "test/core/test_util/test_config.h" #include "test/cpp/interop/xds_interop_server_lib.h" diff --git a/test/cpp/interop/xds_interop_server_lib.cc b/test/cpp/interop/xds_interop_server_lib.cc index 6a4202ff9fa..5a7d4ce3f2c 100644 --- a/test/cpp/interop/xds_interop_server_lib.cc +++ b/test/cpp/interop/xds_interop_server_lib.cc @@ -18,12 +18,6 @@ #include "test/cpp/interop/xds_interop_server_lib.h" -#include - -#include "absl/log/log.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/str_split.h" - #include #include #include @@ -33,6 +27,11 @@ #include #include +#include + +#include "absl/log/log.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_split.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/xds_interop_server_lib.h b/test/cpp/interop/xds_interop_server_lib.h index 01e0b6185b9..5d99413ba55 100644 --- a/test/cpp/interop/xds_interop_server_lib.h +++ b/test/cpp/interop/xds_interop_server_lib.h @@ -18,11 +18,11 @@ #ifndef GRPC_TEST_CPP_INTEROP_XDS_INTEROP_SERVER_LIB_H #define GRPC_TEST_CPP_INTEROP_XDS_INTEROP_SERVER_LIB_H +#include + #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include - namespace grpc { namespace testing { diff --git a/test/cpp/interop/xds_interop_server_test.cc b/test/cpp/interop/xds_interop_server_test.cc index 808924ed0b3..8aeb6e948a4 100644 --- a/test/cpp/interop/xds_interop_server_test.cc +++ b/test/cpp/interop/xds_interop_server_test.cc @@ -14,16 +14,14 @@ // limitations under the License. // -#include - #include -#include - -#include "absl/strings/str_format.h" - #include #include +#include +#include + +#include "absl/strings/str_format.h" #include "src/core/util/sync.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/xds_stats_watcher.h b/test/cpp/interop/xds_stats_watcher.h index 530358dadab..5d92f8517f2 100644 --- a/test/cpp/interop/xds_stats_watcher.h +++ b/test/cpp/interop/xds_stats_watcher.h @@ -19,6 +19,8 @@ #ifndef GRPC_TEST_CPP_INTEROP_XDS_STATS_WATCHER_H #define GRPC_TEST_CPP_INTEROP_XDS_STATS_WATCHER_H +#include + #include #include #include @@ -34,9 +36,6 @@ #include "absl/status/status.h" #include "absl/types/span.h" - -#include - #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/cpp/interop/xds_stats_watcher_test.cc b/test/cpp/interop/xds_stats_watcher_test.cc index 6f29c96002c..65ef8568984 100644 --- a/test/cpp/interop/xds_stats_watcher_test.cc +++ b/test/cpp/interop/xds_stats_watcher_test.cc @@ -16,13 +16,12 @@ #include "test/cpp/interop/xds_stats_watcher.h" -#include -#include - #include +#include #include -#include +#include +#include #include "test/core/test_util/test_config.h" diff --git a/test/cpp/microbenchmarks/bm_alarm.cc b/test/cpp/microbenchmarks/bm_alarm.cc index f72220e9aa6..b64d670129b 100644 --- a/test/cpp/microbenchmarks/bm_alarm.cc +++ b/test/cpp/microbenchmarks/bm_alarm.cc @@ -19,7 +19,6 @@ // This benchmark exists to ensure that immediately-firing alarms are fast #include - #include #include #include diff --git a/test/cpp/microbenchmarks/bm_basic_work_queue.cc b/test/cpp/microbenchmarks/bm_basic_work_queue.cc index c84cd3d1829..c0188e6cb98 100644 --- a/test/cpp/microbenchmarks/bm_basic_work_queue.cc +++ b/test/cpp/microbenchmarks/bm_basic_work_queue.cc @@ -11,15 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include - #include - -#include "absl/log/check.h" - #include #include +#include + +#include "absl/log/check.h" #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" #include "src/core/util/sync.h" diff --git a/test/cpp/microbenchmarks/bm_byte_buffer.cc b/test/cpp/microbenchmarks/bm_byte_buffer.cc index 0de947fbec3..8b0c9a302a8 100644 --- a/test/cpp/microbenchmarks/bm_byte_buffer.cc +++ b/test/cpp/microbenchmarks/bm_byte_buffer.cc @@ -18,18 +18,16 @@ // This benchmark exists to show that byte-buffer copy is size-independent -#include - #include - -#include "absl/log/check.h" - #include #include #include #include #include +#include + +#include "absl/log/check.h" #include "test/core/test_util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/microbenchmarks/bm_channel.cc b/test/cpp/microbenchmarks/bm_channel.cc index 45fc8b64852..7e11dfa14dc 100644 --- a/test/cpp/microbenchmarks/bm_channel.cc +++ b/test/cpp/microbenchmarks/bm_channel.cc @@ -19,7 +19,6 @@ // Benchmark channel #include - #include #include #include diff --git a/test/cpp/microbenchmarks/bm_channel_args.cc b/test/cpp/microbenchmarks/bm_channel_args.cc index f68c2a05428..3ccdcd2039b 100644 --- a/test/cpp/microbenchmarks/bm_channel_args.cc +++ b/test/cpp/microbenchmarks/bm_channel_args.cc @@ -15,14 +15,12 @@ // Benchmark ChannelArgs comparison performance between grpc_channel_args and // grpc_core::ChannelArgs -#include - #include - -#include "absl/container/btree_map.h" - #include +#include + +#include "absl/container/btree_map.h" #include "src/core/lib/channel/channel_args.h" const char kKey[] = "a very long key"; diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 90d4ccee01f..37006f4eede 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -18,20 +18,17 @@ // Microbenchmarks around CHTTP2 HPACK operations +#include +#include +#include #include #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/random/random.h" - -#include -#include - #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc index 1622cc2fc93..41ae38416d0 100644 --- a/test/cpp/microbenchmarks/bm_closure.cc +++ b/test/cpp/microbenchmarks/bm_closure.cc @@ -18,12 +18,11 @@ // Test various closure related operations -#include - #include - #include +#include + #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 6b490df906b..c84a974babe 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -20,13 +20,11 @@ // working #include - -#include "absl/log/check.h" - #include #include #include +#include "absl/log/check.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/completion_queue.h" #include "src/core/util/crash.h" diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc index f504af9f5fe..8acdb307950 100644 --- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc +++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc @@ -16,18 +16,15 @@ // // +#include +#include +#include #include #include -#include - #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/surface/completion_queue.h" diff --git a/test/cpp/microbenchmarks/bm_event_engine_run.cc b/test/cpp/microbenchmarks/bm_event_engine_run.cc index 5f70aea856f..752d9d440e9 100644 --- a/test/cpp/microbenchmarks/bm_event_engine_run.cc +++ b/test/cpp/microbenchmarks/bm_event_engine_run.cc @@ -12,21 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include #include -#include - #include "absl/debugging/leak_check.h" #include "absl/functional/any_invocable.h" #include "absl/log/check.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/util/crash.h" diff --git a/test/cpp/microbenchmarks/bm_exec_ctx.cc b/test/cpp/microbenchmarks/bm_exec_ctx.cc index 4a464856764..f90c558976a 100644 --- a/test/cpp/microbenchmarks/bm_exec_ctx.cc +++ b/test/cpp/microbenchmarks/bm_exec_ctx.cc @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include - #include - #include +#include +#include + #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/notification.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/microbenchmarks/bm_huffman_decode.cc b/test/cpp/microbenchmarks/bm_huffman_decode.cc index 59a684f1298..770082666a5 100644 --- a/test/cpp/microbenchmarks/bm_huffman_decode.cc +++ b/test/cpp/microbenchmarks/bm_huffman_decode.cc @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include -#include - #include "absl/strings/escaping.h" - #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/ext/transport/chttp2/transport/decode_huff.h" #include "src/core/lib/slice/slice.h" diff --git a/test/cpp/microbenchmarks/bm_opencensus_plugin.cc b/test/cpp/microbenchmarks/bm_opencensus_plugin.cc index e2d2adebbe6..8e85213182b 100644 --- a/test/cpp/microbenchmarks/bm_opencensus_plugin.cc +++ b/test/cpp/microbenchmarks/bm_opencensus_plugin.cc @@ -16,19 +16,17 @@ // // +#include +#include +#include +#include + #include #include // NOLINT -#include - #include "absl/base/call_once.h" #include "absl/strings/str_cat.h" #include "opencensus/stats/stats.h" - -#include -#include -#include - #include "src/core/lib/config/core_configuration.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/microbenchmarks/bm_rng.cc b/test/cpp/microbenchmarks/bm_rng.cc index bf84e39910e..fe34430b8e0 100644 --- a/test/cpp/microbenchmarks/bm_rng.cc +++ b/test/cpp/microbenchmarks/bm_rng.cc @@ -21,7 +21,6 @@ #include #include "absl/random/random.h" - #include "src/core/util/sync.h" static void BM_OneRngFromFreshBitSet(benchmark::State& state) { diff --git a/test/cpp/microbenchmarks/bm_stats_plugin.cc b/test/cpp/microbenchmarks/bm_stats_plugin.cc index abc55bf80c2..39dfae190d4 100644 --- a/test/cpp/microbenchmarks/bm_stats_plugin.cc +++ b/test/cpp/microbenchmarks/bm_stats_plugin.cc @@ -12,16 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include +#include + +#include #include "absl/log/absl_check.h" #include "absl/strings/string_view.h" #include "opentelemetry/sdk/metrics/meter_provider.h" - -#include - #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/telemetry/metrics.h" #include "test/core/test_util/fake_stats_plugin.h" diff --git a/test/cpp/microbenchmarks/bm_thread_pool.cc b/test/cpp/microbenchmarks/bm_thread_pool.cc index 620a7ce7d1c..a185c361451 100644 --- a/test/cpp/microbenchmarks/bm_thread_pool.cc +++ b/test/cpp/microbenchmarks/bm_thread_pool.cc @@ -12,19 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include #include #include #include -#include - #include "absl/log/check.h" #include "absl/strings/str_format.h" - -#include -#include - #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/util/crash.h" diff --git a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h index 7987200a245..54deee57868 100644 --- a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h +++ b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h @@ -19,13 +19,12 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_CALLBACK_STREAMING_PING_PONG_H #define GRPC_TEST_CPP_MICROBENCHMARKS_CALLBACK_STREAMING_PING_PONG_H -#include - #include +#include + #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/callback_test_service.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" diff --git a/test/cpp/microbenchmarks/callback_test_service.h b/test/cpp/microbenchmarks/callback_test_service.h index bf907d22c49..09ea69ed8f6 100644 --- a/test/cpp/microbenchmarks/callback_test_service.h +++ b/test/cpp/microbenchmarks/callback_test_service.h @@ -19,13 +19,13 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_CALLBACK_TEST_SERVICE_H #define GRPC_TEST_CPP_MICROBENCHMARKS_CALLBACK_TEST_SERVICE_H +#include + #include #include #include #include -#include - #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" diff --git a/test/cpp/microbenchmarks/callback_unary_ping_pong.h b/test/cpp/microbenchmarks/callback_unary_ping_pong.h index a7188fc1f0d..7f139342da8 100644 --- a/test/cpp/microbenchmarks/callback_unary_ping_pong.h +++ b/test/cpp/microbenchmarks/callback_unary_ping_pong.h @@ -21,12 +21,11 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_CALLBACK_UNARY_PING_PONG_H #define GRPC_TEST_CPP_MICROBENCHMARKS_CALLBACK_UNARY_PING_PONG_H -#include - #include -#include "absl/log/check.h" +#include +#include "absl/log/check.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/callback_test_service.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h index 79e48ae646b..56c205466b4 100644 --- a/test/cpp/microbenchmarks/fullstack_fixtures.h +++ b/test/cpp/microbenchmarks/fullstack_fixtures.h @@ -19,8 +19,6 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_FULLSTACK_FIXTURES_H #define GRPC_TEST_CPP_MICROBENCHMARKS_FULLSTACK_FIXTURES_H -#include "absl/log/check.h" - #include #include #include @@ -30,6 +28,7 @@ #include #include +#include "absl/log/check.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h b/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h index 6fd8ba807fe..fd2e0a001c6 100644 --- a/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h +++ b/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h @@ -21,12 +21,11 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_FULLSTACK_STREAMING_PING_PONG_H #define GRPC_TEST_CPP_MICROBENCHMARKS_FULLSTACK_STREAMING_PING_PONG_H -#include - #include -#include "absl/log/check.h" +#include +#include "absl/log/check.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" #include "test/cpp/microbenchmarks/fullstack_fixtures.h" diff --git a/test/cpp/microbenchmarks/fullstack_streaming_pump.h b/test/cpp/microbenchmarks/fullstack_streaming_pump.h index df0953fd9b0..70187affb2f 100644 --- a/test/cpp/microbenchmarks/fullstack_streaming_pump.h +++ b/test/cpp/microbenchmarks/fullstack_streaming_pump.h @@ -21,12 +21,11 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_FULLSTACK_STREAMING_PUMP_H #define GRPC_TEST_CPP_MICROBENCHMARKS_FULLSTACK_STREAMING_PUMP_H -#include - #include -#include "absl/log/check.h" +#include +#include "absl/log/check.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" #include "test/cpp/microbenchmarks/fullstack_fixtures.h" diff --git a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h index f6a7c8b88aa..5ef7a3f22f1 100644 --- a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h +++ b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h @@ -21,12 +21,11 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_FULLSTACK_UNARY_PING_PONG_H #define GRPC_TEST_CPP_MICROBENCHMARKS_FULLSTACK_UNARY_PING_PONG_H -#include - #include -#include "absl/log/check.h" +#include +#include "absl/log/check.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" #include "test/cpp/microbenchmarks/fullstack_fixtures.h" diff --git a/test/cpp/microbenchmarks/helpers.h b/test/cpp/microbenchmarks/helpers.h index 34105a98d63..99400c05034 100644 --- a/test/cpp/microbenchmarks/helpers.h +++ b/test/cpp/microbenchmarks/helpers.h @@ -19,14 +19,13 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HELPERS_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HELPERS_H -#include -#include - #include - #include #include +#include +#include + #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" diff --git a/test/cpp/naming/address_sorting_test.cc b/test/cpp/naming/address_sorting_test.cc index e1fa4111ed6..00a55c37d7c 100644 --- a/test/cpp/naming/address_sorting_test.cc +++ b/test/cpp/naming/address_sorting_test.cc @@ -16,23 +16,20 @@ // // -#include -#include - -#include - #include #include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" diff --git a/test/cpp/naming/cancel_ares_query_test.cc b/test/cpp/naming/cancel_ares_query_test.cc index b77330ee595..cb05f8d9030 100644 --- a/test/cpp/naming/cancel_ares_query_test.cc +++ b/test/cpp/naming/cancel_ares_query_test.cc @@ -16,24 +16,21 @@ // // -#include -#include - -#include - #include - -#include "absl/log/check.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/str_format.h" - #include #include #include #include #include #include +#include +#include + +#include +#include "absl/log/check.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index f5a4984e98c..050e42dd00e 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -18,28 +18,25 @@ #include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include - #include "absl/flags/flag.h" #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" diff --git a/test/cpp/naming/resolver_component_tests_runner_invoker.cc b/test/cpp/naming/resolver_component_tests_runner_invoker.cc index 26fe87fb600..4c095a7d4bf 100644 --- a/test/cpp/naming/resolver_component_tests_runner_invoker.cc +++ b/test/cpp/naming/resolver_component_tests_runner_invoker.cc @@ -12,15 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include #include -#include - #ifndef GPR_WINDOWS #include #endif // GPR_WINDOWS +#include +#include +#include + #include #include #include @@ -30,11 +33,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - -#include -#include -#include - #include "src/core/util/crash.h" #ifdef __FreeBSD__ diff --git a/test/cpp/performance/writes_per_rpc_test.cc b/test/cpp/performance/writes_per_rpc_test.cc index d540c21a225..c171daeebd6 100644 --- a/test/cpp/performance/writes_per_rpc_test.cc +++ b/test/cpp/performance/writes_per_rpc_test.cc @@ -16,14 +16,6 @@ // // -#include -#include - -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" - #include #include #include @@ -31,7 +23,13 @@ #include #include #include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" diff --git a/test/cpp/qps/benchmark_config.cc b/test/cpp/qps/benchmark_config.cc index 58b4f57be42..007480fe994 100644 --- a/test/cpp/qps/benchmark_config.cc +++ b/test/cpp/qps/benchmark_config.cc @@ -18,12 +18,11 @@ #include "test/cpp/qps/benchmark_config.h" -#include "absl/flags/flag.h" -#include "absl/log/check.h" - #include #include +#include "absl/flags/flag.h" +#include "absl/log/check.h" #include "src/core/util/crash.h" #include "test/cpp/util/test_credentials_provider.h" diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index fe66465bbce..fdc2e8bbff7 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -19,6 +19,11 @@ #ifndef GRPC_TEST_CPP_QPS_CLIENT_H #define GRPC_TEST_CPP_QPS_CLIENT_H +#include +#include +#include +#include +#include #include #include #include @@ -33,13 +38,6 @@ #include "absl/memory/memory.h" #include "absl/strings/match.h" #include "absl/strings/str_format.h" - -#include -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/env.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 889d935f989..855859159cf 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -16,6 +16,13 @@ // // +#include +#include +#include +#include +#include +#include + #include #include #include @@ -30,14 +37,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/memory/memory.h" - -#include -#include -#include -#include -#include -#include - #include "src/core/lib/surface/completion_queue.h" #include "src/core/util/crash.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" diff --git a/test/cpp/qps/client_callback.cc b/test/cpp/qps/client_callback.cc index 29a35676aa4..d34373def15 100644 --- a/test/cpp/qps/client_callback.cc +++ b/test/cpp/qps/client_callback.cc @@ -16,6 +16,12 @@ // // +#include +#include +#include +#include +#include + #include #include #include @@ -27,13 +33,6 @@ #include "absl/log/log.h" #include "absl/memory/memory.h" - -#include -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/client.h" diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 23778475ac7..fd2c6d17589 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -16,6 +16,14 @@ // // +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -26,15 +34,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/client.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 3f015de1236..a2dee89e905 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -18,6 +18,12 @@ #include "test/cpp/qps/driver.h" +#include +#include +#include +#include +#include + #include #include #include @@ -28,13 +34,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "google/protobuf/timestamp.pb.h" - -#include -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/env.h" #include "src/core/util/host_port.h" diff --git a/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc b/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc index 57e826a5dff..766e555c7aa 100644 --- a/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc @@ -19,7 +19,6 @@ #include #include "absl/log/log.h" - #include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/cpp/qps/benchmark_config.h" diff --git a/test/cpp/qps/interarrival.h b/test/cpp/qps/interarrival.h index 3d11b208cba..59af99f2ca1 100644 --- a/test/cpp/qps/interarrival.h +++ b/test/cpp/qps/interarrival.h @@ -19,13 +19,13 @@ #ifndef GRPC_TEST_CPP_QPS_INTERARRIVAL_H #define GRPC_TEST_CPP_QPS_INTERARRIVAL_H +#include + #include #include #include #include -#include - namespace grpc { namespace testing { diff --git a/test/cpp/qps/json_run_localhost.cc b/test/cpp/qps/json_run_localhost.cc index 59d46414bca..c577328637b 100644 --- a/test/cpp/qps/json_run_localhost.cc +++ b/test/cpp/qps/json_run_localhost.cc @@ -30,7 +30,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" - #include "src/core/util/crash.h" #include "src/core/util/env.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/qps/parse_json.cc b/test/cpp/qps/parse_json.cc index 0b6af9f962d..2a28339d384 100644 --- a/test/cpp/qps/parse_json.cc +++ b/test/cpp/qps/parse_json.cc @@ -23,7 +23,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/strings/str_format.h" - #include "src/core/util/crash.h" namespace grpc { diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index c11e9f2bd81..4614eacf663 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -16,6 +16,8 @@ // // +#include + #include #include #include @@ -24,9 +26,6 @@ #include "absl/flags/flag.h" #include "absl/log/check.h" #include "absl/log/log.h" - -#include - #include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/cpp/qps/benchmark_config.h" diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index 92db5ef53c4..5335aab7689 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -19,7 +19,6 @@ #include #include "absl/log/log.h" - #include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/cpp/qps/benchmark_config.h" diff --git a/test/cpp/qps/qps_server_builder.h b/test/cpp/qps/qps_server_builder.h index bf604c00d27..f5f5a6f6180 100644 --- a/test/cpp/qps/qps_server_builder.h +++ b/test/cpp/qps/qps_server_builder.h @@ -19,11 +19,11 @@ #ifndef GRPC_TEST_CPP_QPS_QPS_SERVER_BUILDER_H #define GRPC_TEST_CPP_QPS_QPS_SERVER_BUILDER_H +#include + #include #include -#include - namespace grpc { namespace testing { diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 4f396456c51..7dff6a20c0a 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -18,6 +18,14 @@ #include "test/cpp/qps/qps_worker.h" +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -28,15 +36,6 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/memory/memory.h" - -#include -#include -#include -#include -#include -#include -#include - #include "src/core/util/crash.h" #include "src/core/util/host_port.h" #include "src/proto/grpc/testing/worker_service.grpc.pb.h" diff --git a/test/cpp/qps/qps_worker.h b/test/cpp/qps/qps_worker.h index b0c5af09566..ad8956bf5b3 100644 --- a/test/cpp/qps/qps_worker.h +++ b/test/cpp/qps/qps_worker.h @@ -19,13 +19,13 @@ #ifndef GRPC_TEST_CPP_QPS_QPS_WORKER_H #define GRPC_TEST_CPP_QPS_QPS_WORKER_H -#include - #include #include #include #include +#include + #include "test/cpp/qps/server.h" namespace grpc { diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index e0b0cd646b2..0b3784e4885 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -18,12 +18,11 @@ #include "test/cpp/qps/report.h" +#include + #include #include "absl/log/log.h" - -#include - #include "src/core/util/crash.h" #include "src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h" #include "test/cpp/qps/driver.h" diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index 30539e73f1b..0478a171126 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -19,13 +19,13 @@ #ifndef GRPC_TEST_CPP_QPS_REPORT_H #define GRPC_TEST_CPP_QPS_REPORT_H +#include +#include + #include #include #include -#include -#include - #include "src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h" #include "test/cpp/qps/driver.h" diff --git a/test/cpp/qps/scenario_runner.cc b/test/cpp/qps/scenario_runner.cc index 7ca32f983ca..220a65697fd 100644 --- a/test/cpp/qps/scenario_runner.cc +++ b/test/cpp/qps/scenario_runner.cc @@ -14,7 +14,6 @@ #include "absl/flags/flag.h" #include "absl/log/log.h" - #include "src/core/lib/slice/slice_internal.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" diff --git a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc index d64d40c8e8a..091502f96e3 100644 --- a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc @@ -19,7 +19,6 @@ #include #include "absl/log/log.h" - #include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/cpp/qps/benchmark_config.h" diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 98d0ee1dd6d..4edf5b7531b 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -19,16 +19,15 @@ #ifndef GRPC_TEST_CPP_QPS_SERVER_H #define GRPC_TEST_CPP_QPS_SERVER_H -#include - -#include "absl/log/log.h" - #include #include #include #include #include +#include + +#include "absl/log/log.h" #include "src/core/util/crash.h" #include "src/proto/grpc/testing/control.pb.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index f091c11d69b..2e290ca7e3e 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -16,15 +16,6 @@ // // -#include -#include -#include -#include -#include -#include - -#include "absl/log/log.h" - #include #include #include @@ -35,6 +26,14 @@ #include #include +#include +#include +#include +#include +#include +#include + +#include "absl/log/log.h" #include "src/core/lib/surface/completion_queue.h" #include "src/core/util/crash.h" #include "src/core/util/host_port.h" diff --git a/test/cpp/qps/server_callback.cc b/test/cpp/qps/server_callback.cc index 07c65226872..a3f56541d93 100644 --- a/test/cpp/qps/server_callback.cc +++ b/test/cpp/qps/server_callback.cc @@ -16,14 +16,13 @@ // // -#include "absl/log/log.h" - #include #include #include #include #include +#include "absl/log/log.h" #include "src/core/util/host_port.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/qps_server_builder.h" diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index fe9f8274f52..54aaee5d245 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -16,17 +16,16 @@ // // -#include -#include - -#include "absl/log/log.h" - #include #include #include #include #include +#include +#include + +#include "absl/log/log.h" #include "src/core/util/host_port.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/qps_server_builder.h" diff --git a/test/cpp/qps/usage_timer.cc b/test/cpp/qps/usage_timer.cc index 9bea4846a4f..a44527700a6 100644 --- a/test/cpp/qps/usage_timer.cc +++ b/test/cpp/qps/usage_timer.cc @@ -18,14 +18,13 @@ #include "test/cpp/qps/usage_timer.h" +#include + #include #include #include #include "absl/log/log.h" - -#include - #include "src/core/util/crash.h" #ifdef __linux__ #include diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc index e7aaaf70389..54f08f9a98a 100644 --- a/test/cpp/qps/worker.cc +++ b/test/cpp/qps/worker.cc @@ -16,6 +16,8 @@ // // +#include +#include #include #include @@ -23,10 +25,6 @@ #include #include "absl/flags/flag.h" - -#include -#include - #include "test/core/test_util/test_config.h" #include "test/cpp/qps/qps_worker.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/security/tls_certificate_verifier_test.cc b/test/cpp/security/tls_certificate_verifier_test.cc index 2b370c03667..c0cfa10adfb 100644 --- a/test/cpp/security/tls_certificate_verifier_test.cc +++ b/test/cpp/security/tls_certificate_verifier_test.cc @@ -14,15 +14,14 @@ // limitations under the License. // -#include - #include -#include - #include #include #include #include +#include + +#include #include "src/cpp/client/secure_credentials.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/server/authorization_policy_provider_test.cc b/test/cpp/server/authorization_policy_provider_test.cc index 25784cbb6b5..573f7dec763 100644 --- a/test/cpp/server/authorization_policy_provider_test.cc +++ b/test/cpp/server/authorization_policy_provider_test.cc @@ -12,9 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include +#include #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/cpp/server/credentials_test.cc b/test/cpp/server/credentials_test.cc index 32f14c38752..c7d395bf252 100644 --- a/test/cpp/server/credentials_test.cc +++ b/test/cpp/server/credentials_test.cc @@ -14,19 +14,17 @@ // limitations under the License. // -#include - -#include - -#include "absl/log/check.h" - #include #include #include #include #include #include +#include +#include + +#include "absl/log/check.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" #include "test/cpp/util/tls_test_utils.h" diff --git a/test/cpp/server/load_reporter/get_cpu_stats_test.cc b/test/cpp/server/load_reporter/get_cpu_stats_test.cc index 3f35adba2de..744c4e0968e 100644 --- a/test/cpp/server/load_reporter/get_cpu_stats_test.cc +++ b/test/cpp/server/load_reporter/get_cpu_stats_test.cc @@ -18,10 +18,9 @@ #include "src/cpp/server/load_reporter/get_cpu_stats.h" -#include - #include #include +#include #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/server/load_reporter/load_data_store_test.cc b/test/cpp/server/load_reporter/load_data_store_test.cc index a850de29d75..454a9b6a161 100644 --- a/test/cpp/server/load_reporter/load_data_store_test.cc +++ b/test/cpp/server/load_reporter/load_data_store_test.cc @@ -18,13 +18,12 @@ #include "src/cpp/server/load_reporter/load_data_store.h" -#include -#include - -#include - #include #include +#include + +#include +#include #include "src/cpp/server/load_reporter/constants.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/server/load_reporter/load_reporter_test.cc b/test/cpp/server/load_reporter/load_reporter_test.cc index fd1d4aeef67..c04e1dbb78f 100644 --- a/test/cpp/server/load_reporter/load_reporter_test.cc +++ b/test/cpp/server/load_reporter/load_reporter_test.cc @@ -18,20 +18,18 @@ #include "src/cpp/server/load_reporter/load_reporter.h" -#include -#include - #include +#include +#include #include +#include +#include + #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/memory/memory.h" #include "opencensus/stats/testing/test_utils.h" - -#include -#include - #include "src/core/ext/filters/load_reporting/registered_opencensus_objects.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/cpp/server/load_reporter/constants.h" diff --git a/test/cpp/server/server_builder_test.cc b/test/cpp/server/server_builder_test.cc index 73e02cedbde..c32f55082a4 100644 --- a/test/cpp/server/server_builder_test.cc +++ b/test/cpp/server/server_builder_test.cc @@ -16,15 +16,13 @@ // // -#include - -#include - #include #include #include #include #include +#include +#include #include "src/core/util/notification.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/server/server_builder_with_socket_mutator_test.cc b/test/cpp/server/server_builder_with_socket_mutator_test.cc index e9e148c7793..065f8a8f163 100644 --- a/test/cpp/server/server_builder_with_socket_mutator_test.cc +++ b/test/cpp/server/server_builder_with_socket_mutator_test.cc @@ -16,14 +16,13 @@ // // -#include - -#include - #include #include #include #include +#include + +#include #include "src/core/lib/iomgr/socket_mutator.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/server/server_request_call_test.cc b/test/cpp/server/server_request_call_test.cc index bf781e3e2bf..d32765308ac 100644 --- a/test/cpp/server/server_request_call_test.cc +++ b/test/cpp/server/server_request_call_test.cc @@ -16,19 +16,17 @@ // // -#include - -#include - -#include "absl/log/log.h" -#include "absl/strings/str_format.h" - #include #include #include #include #include +#include + +#include +#include "absl/log/log.h" +#include "absl/strings/str_format.h" #include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/test/client_context_test_peer_test.cc b/test/cpp/test/client_context_test_peer_test.cc index ee1347cdb21..93295f53918 100644 --- a/test/cpp/test/client_context_test_peer_test.cc +++ b/test/cpp/test/client_context_test_peer_test.cc @@ -16,13 +16,12 @@ // // -#include -#include - -#include - #include #include +#include + +#include +#include namespace grpc { namespace testing { diff --git a/test/cpp/test/mock_stream_test.cc b/test/cpp/test/mock_stream_test.cc index f88be58c360..4b972f31b57 100644 --- a/test/cpp/test/mock_stream_test.cc +++ b/test/cpp/test/mock_stream_test.cc @@ -16,12 +16,10 @@ // // +#include #include #include "absl/memory/memory.h" - -#include - #include "src/proto/grpc/testing/echo.grpc.pb.h" using grpc::testing::EchoRequest; diff --git a/test/cpp/test/server_context_test_spouse_test.cc b/test/cpp/test/server_context_test_spouse_test.cc index e778484d88a..0091f101a03 100644 --- a/test/cpp/test/server_context_test_spouse_test.cc +++ b/test/cpp/test/server_context_test_spouse_test.cc @@ -16,13 +16,12 @@ // // -#include -#include - -#include - #include #include +#include + +#include +#include namespace grpc { namespace testing { diff --git a/test/cpp/thread_manager/thread_manager_test.cc b/test/cpp/thread_manager/thread_manager_test.cc index 751ab3977c6..95a392436b6 100644 --- a/test/cpp/thread_manager/thread_manager_test.cc +++ b/test/cpp/thread_manager/thread_manager_test.cc @@ -18,19 +18,17 @@ #include "src/cpp/thread_manager/thread_manager.h" +#include +#include +#include + #include #include #include #include #include -#include - #include "absl/log/log.h" - -#include -#include - #include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/util/byte_buffer_proto_helper.h b/test/cpp/util/byte_buffer_proto_helper.h index ecc0085039a..d70167083c9 100644 --- a/test/cpp/util/byte_buffer_proto_helper.h +++ b/test/cpp/util/byte_buffer_proto_helper.h @@ -19,11 +19,11 @@ #ifndef GRPC_TEST_CPP_UTIL_BYTE_BUFFER_PROTO_HELPER_H #define GRPC_TEST_CPP_UTIL_BYTE_BUFFER_PROTO_HELPER_H -#include - #include #include +#include + namespace grpc { namespace testing { diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index be9a4a75fc3..1dfc17169d7 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -16,16 +16,15 @@ // // -#include -#include - -#include - #include #include #include #include #include +#include + +#include +#include #include "test/core/test_util/test_config.h" diff --git a/test/cpp/util/channel_trace_proto_helper.cc b/test/cpp/util/channel_trace_proto_helper.cc index 0c11284c81a..0566a6cf566 100644 --- a/test/cpp/util/channel_trace_proto_helper.cc +++ b/test/cpp/util/channel_trace_proto_helper.cc @@ -18,12 +18,11 @@ #include "test/cpp/util/channel_trace_proto_helper.h" -#include - #include #include #include #include +#include #include "src/core/lib/iomgr/error.h" #include "src/core/util/crash.h" diff --git a/test/cpp/util/channelz_sampler.cc b/test/cpp/util/channelz_sampler.cc index 043625afa4d..6344dbd272c 100644 --- a/test/cpp/util/channelz_sampler.cc +++ b/test/cpp/util/channelz_sampler.cc @@ -15,6 +15,18 @@ // limitations under the License. // // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -32,20 +44,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "google/protobuf/text_format.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" #include "src/cpp/server/channelz/channelz_service.h" diff --git a/test/cpp/util/channelz_sampler_test.cc b/test/cpp/util/channelz_sampler_test.cc index 5c5f1118d60..eb480e5e143 100644 --- a/test/cpp/util/channelz_sampler_test.cc +++ b/test/cpp/util/channelz_sampler_test.cc @@ -15,20 +15,6 @@ // limitations under the License. // // -#include -#include - -#include -#include -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/strings/str_cat.h" -#include "gtest/gtest.h" - #include #include #include @@ -42,7 +28,19 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include + +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/str_cat.h" +#include "gtest/gtest.h" #include "src/core/util/env.h" #include "src/cpp/server/channelz/channelz_service.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index 9f7df96bf8e..367669fecf1 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -18,18 +18,17 @@ #include "test/cpp/util/cli_call.h" -#include -#include -#include - -#include "absl/log/check.h" - #include #include #include #include #include +#include +#include +#include + +#include "absl/log/check.h" #include "src/core/util/crash.h" namespace grpc { diff --git a/test/cpp/util/cli_call.h b/test/cpp/util/cli_call.h index f2a43f9d789..bb13e5e809c 100644 --- a/test/cpp/util/cli_call.h +++ b/test/cpp/util/cli_call.h @@ -19,14 +19,14 @@ #ifndef GRPC_TEST_CPP_UTIL_CLI_CALL_H #define GRPC_TEST_CPP_UTIL_CLI_CALL_H -#include - #include #include #include #include #include +#include + namespace grpc { class ClientContext; diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc index 8e313aacd28..9a827d78ce7 100644 --- a/test/cpp/util/cli_call_test.cc +++ b/test/cpp/util/cli_call_test.cc @@ -18,8 +18,6 @@ #include "test/cpp/util/cli_call.h" -#include - #include #include #include @@ -27,6 +25,7 @@ #include #include #include +#include #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/util/cli_credentials.cc b/test/cpp/util/cli_credentials.cc index 61e90282ae0..f3df7eb4da1 100644 --- a/test/cpp/util/cli_credentials.cc +++ b/test/cpp/util/cli_credentials.cc @@ -18,12 +18,11 @@ #include "test/cpp/util/cli_credentials.h" -#include "absl/flags/flag.h" -#include "absl/log/log.h" - #include #include +#include "absl/flags/flag.h" +#include "absl/log/log.h" #include "src/core/util/crash.h" #include "src/core/util/load_file.h" diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index 73d92b20ae4..38828ec698a 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -18,12 +18,11 @@ #include "test/cpp/util/create_test_channel.h" -#include "absl/flags/flag.h" -#include "absl/log/check.h" - #include #include +#include "absl/flags/flag.h" +#include "absl/log/check.h" #include "src/core/util/crash.h" #include "test/cpp/util/test_credentials_provider.h" diff --git a/test/cpp/util/create_test_channel.h b/test/cpp/util/create_test_channel.h index 1ed9c44e491..04ea33e4607 100644 --- a/test/cpp/util/create_test_channel.h +++ b/test/cpp/util/create_test_channel.h @@ -19,13 +19,13 @@ #ifndef GRPC_TEST_CPP_UTIL_CREATE_TEST_CHANNEL_H #define GRPC_TEST_CPP_UTIL_CREATE_TEST_CHANNEL_H -#include - #include #include #include #include +#include + namespace grpc { class Channel; diff --git a/test/cpp/util/error_details_test.cc b/test/cpp/util/error_details_test.cc index 271360d66c4..0fa2ac122ce 100644 --- a/test/cpp/util/error_details_test.cc +++ b/test/cpp/util/error_details_test.cc @@ -16,9 +16,8 @@ // // -#include - #include +#include #include "src/proto/grpc/status/status.pb.h" #include "src/proto/grpc/testing/echo_messages.pb.h" diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 48d07b37c79..9790d5ec003 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -61,14 +61,13 @@ // address of the connection that each RPC is made on to stderr. // +#include + #include #include #include #include "absl/flags/flag.h" - -#include - #include "test/cpp/util/cli_credentials.h" #include "test/cpp/util/grpc_tool.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/util/grpc_tool.cc b/test/cpp/util/grpc_tool.cc index 8f171274bb4..9040de69a9b 100644 --- a/test/cpp/util/grpc_tool.cc +++ b/test/cpp/util/grpc_tool.cc @@ -18,6 +18,14 @@ #include "test/cpp/util/grpc_tool.h" +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -31,15 +39,6 @@ #include "absl/strings/numbers.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" - -#include -#include -#include -#include -#include -#include -#include - #include "test/cpp/util/cli_call.h" #include "test/cpp/util/proto_file_parser.h" #include "test/cpp/util/proto_reflection_descriptor_database.h" diff --git a/test/cpp/util/grpc_tool.h b/test/cpp/util/grpc_tool.h index 471830f2fcb..defd8d04516 100644 --- a/test/cpp/util/grpc_tool.h +++ b/test/cpp/util/grpc_tool.h @@ -19,10 +19,10 @@ #ifndef GRPC_TEST_CPP_UTIL_GRPC_TOOL_H #define GRPC_TEST_CPP_UTIL_GRPC_TOOL_H -#include - #include +#include + #include "test/cpp/util/cli_credentials.h" namespace grpc { diff --git a/test/cpp/util/grpc_tool_test.cc b/test/cpp/util/grpc_tool_test.cc index 6d3b6d528da..294df983daf 100644 --- a/test/cpp/util/grpc_tool_test.cc +++ b/test/cpp/util/grpc_tool_test.cc @@ -18,16 +18,7 @@ #include "test/cpp/util/grpc_tool.h" -#include -#include - #include -#include - -#include "absl/flags/declare.h" -#include "absl/flags/flag.h" -#include "absl/strings/str_split.h" - #include #include #include @@ -37,7 +28,14 @@ #include #include #include +#include + +#include +#include +#include "absl/flags/declare.h" +#include "absl/flags/flag.h" +#include "absl/strings/str_split.h" #include "src/core/util/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/echo.pb.h" diff --git a/test/cpp/util/metrics_server.cc b/test/cpp/util/metrics_server.cc index 28dc7e670be..fd149fa76b6 100644 --- a/test/cpp/util/metrics_server.cc +++ b/test/cpp/util/metrics_server.cc @@ -18,11 +18,10 @@ #include "test/cpp/util/metrics_server.h" -#include "absl/log/log.h" - #include #include +#include "absl/log/log.h" #include "src/core/util/crash.h" #include "src/proto/grpc/testing/metrics.grpc.pb.h" #include "src/proto/grpc/testing/metrics.pb.h" diff --git a/test/cpp/util/metrics_server.h b/test/cpp/util/metrics_server.h index 846b542db32..fae7bdf06b5 100644 --- a/test/cpp/util/metrics_server.h +++ b/test/cpp/util/metrics_server.h @@ -18,11 +18,11 @@ #ifndef GRPC_TEST_CPP_UTIL_METRICS_SERVER_H #define GRPC_TEST_CPP_UTIL_METRICS_SERVER_H +#include + #include #include -#include - #include "src/proto/grpc/testing/metrics.grpc.pb.h" #include "src/proto/grpc/testing/metrics.pb.h" diff --git a/test/cpp/util/proto_buffer_reader_test.cc b/test/cpp/util/proto_buffer_reader_test.cc index 46137658f97..b4ffbff3e5a 100644 --- a/test/cpp/util/proto_buffer_reader_test.cc +++ b/test/cpp/util/proto_buffer_reader_test.cc @@ -14,10 +14,9 @@ // limitations under the License. // -#include - #include #include +#include #include "test/core/test_util/test_config.h" diff --git a/test/cpp/util/proto_buffer_writer_test.cc b/test/cpp/util/proto_buffer_writer_test.cc index 77057b5fc33..3de8f6fde0e 100644 --- a/test/cpp/util/proto_buffer_writer_test.cc +++ b/test/cpp/util/proto_buffer_writer_test.cc @@ -14,10 +14,9 @@ // limitations under the License. // -#include - #include #include +#include #include "test/core/test_util/test_config.h" diff --git a/test/cpp/util/proto_file_parser.cc b/test/cpp/util/proto_file_parser.cc index 5e570c57372..0613fd53751 100644 --- a/test/cpp/util/proto_file_parser.cc +++ b/test/cpp/util/proto_file_parser.cc @@ -18,6 +18,8 @@ #include "test/cpp/util/proto_file_parser.h" +#include + #include #include #include @@ -26,8 +28,6 @@ #include "absl/memory/memory.h" #include "absl/strings/str_split.h" -#include - namespace grpc { namespace testing { namespace { diff --git a/test/cpp/util/proto_file_parser.h b/test/cpp/util/proto_file_parser.h index a397aa43eeb..84b43717ac8 100644 --- a/test/cpp/util/proto_file_parser.h +++ b/test/cpp/util/proto_file_parser.h @@ -19,10 +19,10 @@ #ifndef GRPC_TEST_CPP_UTIL_PROTO_FILE_PARSER_H #define GRPC_TEST_CPP_UTIL_PROTO_FILE_PARSER_H -#include - #include +#include + #include "test/cpp/util/config_grpc_cli.h" #include "test/cpp/util/proto_reflection_descriptor_database.h" diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index ac0113fd509..6025a502c42 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -21,7 +21,6 @@ #include #include "absl/log/log.h" - #include "src/core/util/crash.h" using grpc::reflection::v1alpha::ErrorResponse; diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index 2489860be66..a8a9b497246 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -18,14 +18,14 @@ #ifndef GRPC_TEST_CPP_UTIL_PROTO_REFLECTION_DESCRIPTOR_DATABASE_H #define GRPC_TEST_CPP_UTIL_PROTO_REFLECTION_DESCRIPTOR_DATABASE_H +#include +#include + #include #include #include #include -#include -#include - #include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h" namespace grpc { diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index e8d2f3b04e2..1689f2f1cd7 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -16,12 +16,11 @@ // // -#include - #include #include #include #include +#include #include "test/core/test_util/test_config.h" diff --git a/test/cpp/util/string_ref_test.cc b/test/cpp/util/string_ref_test.cc index 6af0e73c632..eddaef5abad 100644 --- a/test/cpp/util/string_ref_test.cc +++ b/test/cpp/util/string_ref_test.cc @@ -16,11 +16,9 @@ // // -#include - -#include - #include +#include +#include #include "test/core/test_util/test_config.h" diff --git a/test/cpp/util/test_config_cc.cc b/test/cpp/util/test_config_cc.cc index cf32dbc0eae..c1eea1502ef 100644 --- a/test/cpp/util/test_config_cc.cc +++ b/test/cpp/util/test_config_cc.cc @@ -19,7 +19,6 @@ #include #include "absl/flags/parse.h" - #include "test/cpp/util/test_config.h" namespace grpc { diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc index b4d3e116cd3..748d1398a96 100644 --- a/test/cpp/util/test_credentials_provider.cc +++ b/test/cpp/util/test_credentials_provider.cc @@ -19,6 +19,9 @@ #include "test/cpp/util/test_credentials_provider.h" +#include +#include + #include #include #include @@ -28,10 +31,6 @@ #include "absl/flags/flag.h" #include "absl/log/check.h" #include "absl/log/log.h" - -#include -#include - #include "src/core/util/crash.h" #include "test/core/end2end/data/ssl_test_data.h" diff --git a/test/cpp/util/test_credentials_provider.h b/test/cpp/util/test_credentials_provider.h index 40f90703237..91fbad33918 100644 --- a/test/cpp/util/test_credentials_provider.h +++ b/test/cpp/util/test_credentials_provider.h @@ -19,12 +19,12 @@ #ifndef GRPC_TEST_CPP_UTIL_TEST_CREDENTIALS_PROVIDER_H #define GRPC_TEST_CPP_UTIL_TEST_CREDENTIALS_PROVIDER_H -#include - #include #include #include +#include + namespace grpc { namespace testing { diff --git a/test/cpp/util/time_test.cc b/test/cpp/util/time_test.cc index 11b141cc70f..01038486f53 100644 --- a/test/cpp/util/time_test.cc +++ b/test/cpp/util/time_test.cc @@ -16,10 +16,9 @@ // // -#include - #include #include +#include #include "test/core/test_util/test_config.h" diff --git a/test/cpp/util/tls_test_utils.h b/test/cpp/util/tls_test_utils.h index 9b4e69bcd80..52b9cf1e25c 100644 --- a/test/cpp/util/tls_test_utils.h +++ b/test/cpp/util/tls_test_utils.h @@ -17,12 +17,12 @@ #ifndef GRPC_TEST_CPP_UTIL_TLS_TEST_UTILS_H #define GRPC_TEST_CPP_UTIL_TLS_TEST_UTILS_H -#include - #include #include #include +#include + #include "src/core/util/thd.h" namespace grpc { diff --git a/test/cpp/util/windows/manifest_file.cc b/test/cpp/util/windows/manifest_file.cc index 85ac3d7eb37..d983f74bcc3 100644 --- a/test/cpp/util/windows/manifest_file.cc +++ b/test/cpp/util/windows/manifest_file.cc @@ -28,7 +28,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" - #include "src/core/util/crash.h" namespace grpc { diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/main.cc b/tools/distrib/python/grpcio_tools/grpc_tools/main.cc index 866b1e2866b..6ccdafaae29 100644 --- a/tools/distrib/python/grpcio_tools/grpc_tools/main.cc +++ b/tools/distrib/python/grpcio_tools/grpc_tools/main.cc @@ -14,13 +14,6 @@ #include "grpc_tools/main.h" -#include -#include -#include -#include -#include -#include - #include #include #include @@ -29,8 +22,14 @@ #include #include -#include "absl/strings/string_view.h" +#include +#include +#include +#include +#include +#include +#include "absl/strings/string_view.h" #include "src/compiler/python_generator.h" using ::google::protobuf::FileDescriptor; From 64b7fce68c4e450f07b3b78c8774f1d724984e55 Mon Sep 17 00:00:00 2001 From: Alisha Nanda Date: Mon, 7 Oct 2024 10:16:48 -0700 Subject: [PATCH 37/74] Add new function to EventEngineSupportsFdExtension query extension that takes in a configured and bound but unconnected fd, connects to the given remote peer, and returns a resulting EventEngine::Endpoint. PiperOrigin-RevId: 683229732 --- .../lib/event_engine/extensions/supports_fd.h | 17 +++++++ .../event_engine/posix_engine/posix_engine.cc | 51 ++++++++++++------- .../event_engine/posix_engine/posix_engine.h | 15 +++--- 3 files changed, 60 insertions(+), 23 deletions(-) diff --git a/src/core/lib/event_engine/extensions/supports_fd.h b/src/core/lib/event_engine/extensions/supports_fd.h index c7a1bfdcd4f..070bce175de 100644 --- a/src/core/lib/event_engine/extensions/supports_fd.h +++ b/src/core/lib/event_engine/extensions/supports_fd.h @@ -119,6 +119,23 @@ class EventEngineSupportsFdExtension { virtual std::unique_ptr CreateEndpointFromFd( int fd, const EndpointConfig& config) = 0; + /// Creates an EventEngine::Endpoint from a file descriptor that is configured + /// and bound locally but not yet connected to a remote peer. Returns a + /// connection handle to cancel the connection attempt if needed. Created + /// endpoint will be returned through `on_connect` callback. + /// \a fd - The socket file descriptor. + /// \a on_connect - The callback to invoke once fd is connected to peer. + /// \a addr - The remote peer to connect to. This should be the mapped peer + /// address returned when creating a new socket. + /// \a config - Additional configuration to be applied to the endpoint. + /// \a memory_allocator - The endpoint may use the provided memory allocator + /// to track memory allocations. + /// \a timeout - The timeout to use for the connection attempt. + virtual EventEngine::ConnectionHandle CreateEndpointFromUnconnectedFd( + int fd, EventEngine::OnConnectCallback on_connect, + const EventEngine::ResolvedAddress& addr, const EndpointConfig& config, + MemoryAllocator memory_allocator, EventEngine::Duration timeout) = 0; + /// Called when the posix listener has accepted a new client connection. /// \a listener_fd - The listening socket fd that accepted the new client /// connection. diff --git a/src/core/lib/event_engine/posix_engine/posix_engine.cc b/src/core/lib/event_engine/posix_engine/posix_engine.cc index f2275975b0d..1c7f6df10b1 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine.cc +++ b/src/core/lib/event_engine/posix_engine/posix_engine.cc @@ -238,14 +238,16 @@ void AsyncConnect::OnWritable(absl::Status status) } } -EventEngine::ConnectionHandle PosixEventEngine::ConnectInternal( - PosixSocketWrapper sock, OnConnectCallback on_connect, ResolvedAddress addr, - MemoryAllocator&& allocator, const PosixTcpOptions& options, - Duration timeout) { +EventEngine::ConnectionHandle +PosixEventEngine::CreateEndpointFromUnconnectedFdInternal( + int fd, EventEngine::OnConnectCallback on_connect, + const EventEngine::ResolvedAddress& addr, + const PosixTcpOptions& tcp_options, MemoryAllocator memory_allocator, + EventEngine::Duration timeout) { int err; int connect_errno; do { - err = connect(sock.Fd(), addr.address(), addr.size()); + err = connect(fd, addr.address(), addr.size()); } while (err < 0 && errno == EINTR); connect_errno = (err < 0) ? errno : 0; @@ -261,16 +263,15 @@ EventEngine::ConnectionHandle PosixEventEngine::ConnectInternal( std::string name = absl::StrCat("tcp-client:", addr_uri.value()); PosixEventPoller* poller = poller_manager_->Poller(); EventHandle* handle = - poller->CreateHandle(sock.Fd(), name, poller->CanTrackErrors()); + poller->CreateHandle(fd, name, poller->CanTrackErrors()); if (connect_errno == 0) { - // Connection already succeded. Return 0 to discourage any cancellation + // Connection already succeeded. Return 0 to discourage any cancellation // attempts. Run([on_connect = std::move(on_connect), - ep = CreatePosixEndpoint(handle, nullptr, shared_from_this(), - std::move(allocator), options)]() mutable { - on_connect(std::move(ep)); - }); + ep = CreatePosixEndpoint( + handle, nullptr, shared_from_this(), std::move(memory_allocator), + tcp_options)]() mutable { on_connect(std::move(ep)); }); return EventEngine::ConnectionHandle::kInvalid; } if (connect_errno != EWOULDBLOCK && connect_errno != EINPROGRESS) { @@ -288,9 +289,10 @@ EventEngine::ConnectionHandle PosixEventEngine::ConnectInternal( // Connection is still in progress. int64_t connection_id = last_connection_id_.fetch_add(1, std::memory_order_acq_rel); - AsyncConnect* ac = new AsyncConnect( - std::move(on_connect), shared_from_this(), executor_.get(), handle, - std::move(allocator), options, addr_uri.value(), connection_id); + AsyncConnect* ac = + new AsyncConnect(std::move(on_connect), shared_from_this(), + executor_.get(), handle, std::move(memory_allocator), + tcp_options, addr_uri.value(), connection_id); int shard_number = connection_id % connection_shards_.size(); struct ConnectionShard* shard = &connection_shards_[shard_number]; { @@ -635,14 +637,29 @@ EventEngine::ConnectionHandle PosixEventEngine::Connect( status = socket.status()]() mutable { on_connect(status); }); return EventEngine::ConnectionHandle::kInvalid; } - return ConnectInternal((*socket).sock, std::move(on_connect), - (*socket).mapped_target_addr, - std::move(memory_allocator), options, timeout); + return CreateEndpointFromUnconnectedFdInternal( + (*socket).sock.Fd(), std::move(on_connect), (*socket).mapped_target_addr, + options, std::move(memory_allocator), timeout); #else // GRPC_PLATFORM_SUPPORTS_POSIX_POLLING grpc_core::Crash("EventEngine::Connect is not supported on this platform"); #endif // GRPC_PLATFORM_SUPPORTS_POSIX_POLLING } +EventEngine::ConnectionHandle PosixEventEngine::CreateEndpointFromUnconnectedFd( + int fd, EventEngine::OnConnectCallback on_connect, + const EventEngine::ResolvedAddress& addr, const EndpointConfig& config, + MemoryAllocator memory_allocator, EventEngine::Duration timeout) { +#if GRPC_PLATFORM_SUPPORTS_POSIX_POLLING + return CreateEndpointFromUnconnectedFdInternal( + fd, std::move(on_connect), addr, TcpOptionsFromEndpointConfig(config), + std::move(memory_allocator), timeout); +#else // GRPC_PLATFORM_SUPPORTS_POSIX_POLLING + grpc_core::Crash( + "EventEngine::CreateEndpointFromUnconnectedFd is not supported on this " + "platform"); +#endif // GRPC_PLATFORM_SUPPORTS_POSIX_POLLING +} + std::unique_ptr PosixEventEngine::CreatePosixEndpointFromFd(int fd, const EndpointConfig& config, diff --git a/src/core/lib/event_engine/posix_engine/posix_engine.h b/src/core/lib/event_engine/posix_engine/posix_engine.h index 82be0bdd0e5..63a142a11f2 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine.h +++ b/src/core/lib/event_engine/posix_engine/posix_engine.h @@ -174,6 +174,11 @@ class PosixEventEngine final : public PosixEventEngineWithFdSupport, std::unique_ptr CreateEndpointFromFd( int fd, const EndpointConfig& config) override; + ConnectionHandle CreateEndpointFromUnconnectedFd( + int fd, EventEngine::OnConnectCallback on_connect, + const EventEngine::ResolvedAddress& addr, const EndpointConfig& config, + MemoryAllocator memory_allocator, EventEngine::Duration timeout) override; + absl::StatusOr> CreateListener( Listener::AcceptCallback on_accept, absl::AnyInvocable on_shutdown, @@ -235,12 +240,10 @@ class PosixEventEngine final : public PosixEventEngineWithFdSupport, static void PollerWorkInternal( std::shared_ptr poller_manager); - ConnectionHandle ConnectInternal( - grpc_event_engine::experimental::PosixSocketWrapper sock, - OnConnectCallback on_connect, ResolvedAddress addr, - MemoryAllocator&& allocator, - const grpc_event_engine::experimental::PosixTcpOptions& options, - Duration timeout); + ConnectionHandle CreateEndpointFromUnconnectedFdInternal( + int fd, EventEngine::OnConnectCallback on_connect, + const EventEngine::ResolvedAddress& addr, const PosixTcpOptions& options, + MemoryAllocator memory_allocator, EventEngine::Duration timeout); void OnConnectFinishInternal(int connection_handle); From e6ad69e1dd7de6336e9521fad0259bc5be2ee8f2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 7 Oct 2024 11:18:58 -0700 Subject: [PATCH 38/74] Remove `work_serializer_clears_time_cache` experiment (#37851) This was put in as a temporary kludge to carry us until `work_serializer_dispatch` was ready, however since #37637 this is a no-op for all known use cases (and I think it's time for `work_serializer_dispatch` to stick). Closes #37851 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37851 from ctiller:tc 8ae59415bda496143240b76be1a126436ecec397 PiperOrigin-RevId: 683255110 --- bazel/experiments.bzl | 1 - src/core/lib/experiments/experiments.cc | 24 ----------------------- src/core/lib/experiments/experiments.h | 11 ----------- src/core/lib/experiments/experiments.yaml | 6 ------ src/core/util/work_serializer.cc | 3 --- 5 files changed, 45 deletions(-) diff --git a/bazel/experiments.bzl b/bazel/experiments.bzl index 830d4a076d2..5ea1cd99f37 100644 --- a/bazel/experiments.bzl +++ b/bazel/experiments.bzl @@ -38,7 +38,6 @@ EXPERIMENT_ENABLES = { "time_caching_in_party": "time_caching_in_party", "trace_record_callops": "trace_record_callops", "unconstrained_max_quota_buffer_size": "unconstrained_max_quota_buffer_size", - "work_serializer_clears_time_cache": "work_serializer_clears_time_cache", "work_serializer_dispatch": "work_serializer_dispatch", } diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index 8464f0756a0..8c9675e0dd2 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -94,10 +94,6 @@ const char* const description_unconstrained_max_quota_buffer_size = "Discard the cap on the max free pool size for one memory allocator"; const char* const additional_constraints_unconstrained_max_quota_buffer_size = "{}"; -const char* const description_work_serializer_clears_time_cache = - "Have the work serializer clear the time cache when it dispatches work."; -const char* const additional_constraints_work_serializer_clears_time_cache = - "{}"; const char* const description_work_serializer_dispatch = "Have the work serializer dispatch work to event engine for every " "callback, instead of running things inline in the first thread that " @@ -159,10 +155,6 @@ const ExperimentMetadata g_experiment_metadata[] = { description_unconstrained_max_quota_buffer_size, additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0, false, true}, - {"work_serializer_clears_time_cache", - description_work_serializer_clears_time_cache, - additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, - true}, {"work_serializer_dispatch", description_work_serializer_dispatch, additional_constraints_work_serializer_dispatch, nullptr, 0, false, true}, }; @@ -243,10 +235,6 @@ const char* const description_unconstrained_max_quota_buffer_size = "Discard the cap on the max free pool size for one memory allocator"; const char* const additional_constraints_unconstrained_max_quota_buffer_size = "{}"; -const char* const description_work_serializer_clears_time_cache = - "Have the work serializer clear the time cache when it dispatches work."; -const char* const additional_constraints_work_serializer_clears_time_cache = - "{}"; const char* const description_work_serializer_dispatch = "Have the work serializer dispatch work to event engine for every " "callback, instead of running things inline in the first thread that " @@ -308,10 +296,6 @@ const ExperimentMetadata g_experiment_metadata[] = { description_unconstrained_max_quota_buffer_size, additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0, false, true}, - {"work_serializer_clears_time_cache", - description_work_serializer_clears_time_cache, - additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, - true}, {"work_serializer_dispatch", description_work_serializer_dispatch, additional_constraints_work_serializer_dispatch, nullptr, 0, false, true}, }; @@ -392,10 +376,6 @@ const char* const description_unconstrained_max_quota_buffer_size = "Discard the cap on the max free pool size for one memory allocator"; const char* const additional_constraints_unconstrained_max_quota_buffer_size = "{}"; -const char* const description_work_serializer_clears_time_cache = - "Have the work serializer clear the time cache when it dispatches work."; -const char* const additional_constraints_work_serializer_clears_time_cache = - "{}"; const char* const description_work_serializer_dispatch = "Have the work serializer dispatch work to event engine for every " "callback, instead of running things inline in the first thread that " @@ -457,10 +437,6 @@ const ExperimentMetadata g_experiment_metadata[] = { description_unconstrained_max_quota_buffer_size, additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0, false, true}, - {"work_serializer_clears_time_cache", - description_work_serializer_clears_time_cache, - additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, - true}, {"work_serializer_dispatch", description_work_serializer_dispatch, additional_constraints_work_serializer_dispatch, nullptr, 0, true, true}, }; diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index 8aa59e12f9b..afc86b9ce51 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h @@ -84,8 +84,6 @@ inline bool IsTimeCachingInPartyEnabled() { return true; } #define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS inline bool IsTraceRecordCallopsEnabled() { return true; } inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } -#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE -inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; } inline bool IsWorkSerializerDispatchEnabled() { return false; } #elif defined(GPR_WINDOWS) @@ -119,8 +117,6 @@ inline bool IsTimeCachingInPartyEnabled() { return true; } #define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS inline bool IsTraceRecordCallopsEnabled() { return true; } inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } -#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE -inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; } inline bool IsWorkSerializerDispatchEnabled() { return false; } #else @@ -153,8 +149,6 @@ inline bool IsTimeCachingInPartyEnabled() { return true; } #define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS inline bool IsTraceRecordCallopsEnabled() { return true; } inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } -#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE -inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; } #define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_DISPATCH inline bool IsWorkSerializerDispatchEnabled() { return true; } #endif @@ -182,7 +176,6 @@ enum ExperimentIds { kExperimentIdTimeCachingInParty, kExperimentIdTraceRecordCallops, kExperimentIdUnconstrainedMaxQuotaBufferSize, - kExperimentIdWorkSerializerClearsTimeCache, kExperimentIdWorkSerializerDispatch, kNumExperiments }; @@ -270,10 +263,6 @@ inline bool IsTraceRecordCallopsEnabled() { inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return IsExperimentEnabled(); } -#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE -inline bool IsWorkSerializerClearsTimeCacheEnabled() { - return IsExperimentEnabled(); -} #define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_DISPATCH inline bool IsWorkSerializerDispatchEnabled() { return IsExperimentEnabled(); diff --git a/src/core/lib/experiments/experiments.yaml b/src/core/lib/experiments/experiments.yaml index ff4bf3869d4..a8f2105f7a5 100644 --- a/src/core/lib/experiments/experiments.yaml +++ b/src/core/lib/experiments/experiments.yaml @@ -165,12 +165,6 @@ expiry: 2024/09/09 owner: ctiller@google.com test_tags: [resource_quota_test] -- name: work_serializer_clears_time_cache - description: - Have the work serializer clear the time cache when it dispatches work. - expiry: 2024/10/01 - owner: ctiller@google.com - test_tags: [] - name: work_serializer_dispatch description: Have the work serializer dispatch work to event engine for every callback, diff --git a/src/core/util/work_serializer.cc b/src/core/util/work_serializer.cc index c9e0b1d9f45..38ee82303a2 100644 --- a/src/core/util/work_serializer.cc +++ b/src/core/util/work_serializer.cc @@ -243,9 +243,6 @@ void WorkSerializer::LegacyWorkSerializer::DrainQueueOwned() { } // There is at least one callback on the queue. Pop the callback from the // queue and execute it. - if (IsWorkSerializerClearsTimeCacheEnabled() && ExecCtx::Get() != nullptr) { - ExecCtx::Get()->InvalidateNow(); - } CallbackWrapper* cb_wrapper = nullptr; bool empty_unused; while ((cb_wrapper = reinterpret_cast( From 204dc57345bb25325c11a5539d1448a0a08cb91f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 7 Oct 2024 15:35:29 -0700 Subject: [PATCH 39/74] [experiments] Push out the expiry of some WIP experiments (#37850) Closes #37850 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37850 from ctiller:fmt aa31cf9d7d8156ab61fbec2e0ca2272af1415e81 PiperOrigin-RevId: 683349868 --- src/core/lib/experiments/experiments.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/experiments/experiments.yaml b/src/core/lib/experiments/experiments.yaml index a8f2105f7a5..7362efde841 100644 --- a/src/core/lib/experiments/experiments.yaml +++ b/src/core/lib/experiments/experiments.yaml @@ -109,7 +109,7 @@ - name: multiping description: Allow more than one ping to be in flight at a time by default. - expiry: 2024/09/15 + expiry: 2025/03/03 owner: ctiller@google.com test_tags: [flow_control_test] - name: pick_first_new @@ -120,7 +120,7 @@ - name: promise_based_inproc_transport description: Use promises for the in-process transport. - expiry: 2024/09/15 + expiry: 2025/03/03 owner: ctiller@google.com test_tags: [] allow_in_fuzzing_config: false # experiment currently crashes if enabled @@ -162,7 +162,7 @@ test_tags: [] - name: unconstrained_max_quota_buffer_size description: Discard the cap on the max free pool size for one memory allocator - expiry: 2024/09/09 + expiry: 2025/03/03 owner: ctiller@google.com test_tags: [resource_quota_test] - name: work_serializer_dispatch From 2e0eea1e643900f5e79bbbdb6044ee411a5924f2 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 8 Oct 2024 08:21:31 -0700 Subject: [PATCH 40/74] [tests] restrict visibility of our internal test-only copy of the xDS protos We really should not have our own copy of these protos in the first place, but there's some tech debt here that hasn't been cleaned up yet. Until we do that, we should at least ensure that this tech debt doesn't spread by having more code depend on them. PiperOrigin-RevId: 683631165 --- bazel/grpc_build_system.bzl | 2 +- src/proto/grpc/testing/xds/v3/BUILD | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 50bd830ef21..a90113e2f29 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -725,7 +725,7 @@ def grpc_package(name, visibility = "private", features = []): features: The features to enable. """ if visibility == "tests": - visibility = ["//test:__subpackages__"] + visibility = ["//test:__subpackages__", "//src/proto/grpc/testing:__subpackages__"] elif visibility == "public": visibility = ["//visibility:public"] elif visibility == "private": diff --git a/src/proto/grpc/testing/xds/v3/BUILD b/src/proto/grpc/testing/xds/v3/BUILD index 15b8e0796c0..cc04d3d20fa 100644 --- a/src/proto/grpc/testing/xds/v3/BUILD +++ b/src/proto/grpc/testing/xds/v3/BUILD @@ -23,7 +23,7 @@ exports_files([ grpc_package( name = "xds_v3", - visibility = "public", + visibility = "tests", ) grpc_proto_library( @@ -331,6 +331,8 @@ grpc_proto_library( srcs = [ "csds.proto", ], + # Needs to be visible to //:grpcpp_csds + visibility = ["//:__subpackages__"], well_known_protos = True, deps = [ "base_proto", From d56d89f6911e2e85c04d119dbeae44a52831321e Mon Sep 17 00:00:00 2001 From: AJ Heller Date: Tue, 8 Oct 2024 09:09:59 -0700 Subject: [PATCH 41/74] [EventEngine] Remove invalid IOCP closed socket test (#37864) The [CreateIoCompletionPort ](https://learn.microsoft.com/en-us/windows/win32/fileio/createiocompletionport) API specifies that the handle must either be open, or explicitly the `INVALID_HANDLE_VALUE` value. Testing the API with a closed socket is apparently UB. Closes #37864 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37864 from drfloob:rm-iocp-ub-test 514e89989988456b94ddee1a3f2582c1f9885bf0 PiperOrigin-RevId: 683647143 --- test/core/event_engine/windows/iocp_test.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test/core/event_engine/windows/iocp_test.cc b/test/core/event_engine/windows/iocp_test.cc index 9e798ff7e21..2eaaccdc494 100644 --- a/test/core/event_engine/windows/iocp_test.cc +++ b/test/core/event_engine/windows/iocp_test.cc @@ -250,16 +250,6 @@ TEST_F(IOCPTest, KickThenShutdownCasusesNextWorkerToBeKicked) { thread_pool->Quiesce(); } -TEST_F(IOCPTest, CrashOnWatchingAClosedSocket) { - auto thread_pool = grpc_event_engine::experimental::MakeThreadPool(8); - IOCP iocp(thread_pool.get()); - SOCKET sockpair[2]; - CreateSockpair(sockpair, iocp.GetDefaultSocketFlags()); - closesocket(sockpair[0]); - ASSERT_DEATH({ auto wrapped_client_socket = iocp.Watch(sockpair[0]); }, ""); - thread_pool->Quiesce(); -} - TEST_F(IOCPTest, StressTestThousandsOfSockets) { // Start 10 threads, each with their own IOCP // On each thread, create 50 socket pairs (100 sockets) and have them exchange From 49d63f686aa983c33e04723bbd0095ce8aec1b94 Mon Sep 17 00:00:00 2001 From: AJ Heller Date: Tue, 8 Oct 2024 11:07:55 -0700 Subject: [PATCH 42/74] Delete Binder test artifacts and examples (#37862) With the CL-first approach, the docker test configs for Binder need to be deleted before the Binder code and tests themselves can be deleted in the next step. Sanity checks fail otherwise. Closes #37862 PiperOrigin-RevId: 683691175 --- .../binder/java/io/grpc/binder/cpp/README.md | 24 ----- .../cpp/exampleclient/AndroidManifest.xml | 25 ------ .../io/grpc/binder/cpp/exampleclient/BUILD | 51 ----------- .../cpp/exampleclient/ButtonPressHandler.java | 15 ---- .../cpp/exampleclient/MainActivity.java | 26 ------ .../grpc/binder/cpp/exampleclient/native.cc | 72 --------------- .../res/layout/activity_main.xml | 24 ----- .../cpp/exampleclient/res/values/strings.xml | 5 -- .../cpp/exampleserver/AndroidManifest.xml | 21 ----- .../AndroidManifest_endpoint.xml | 10 --- .../io/grpc/binder/cpp/exampleserver/BUILD | 61 ------------- .../cpp/exampleserver/ButtonPressHandler.java | 13 --- .../ExportedEndpointService.java | 26 ------ .../cpp/exampleserver/MainActivity.java | 27 ------ .../grpc/binder/cpp/exampleserver/native.cc | 82 ----------------- .../res/layout/activity_main.xml | 24 ----- .../cpp/exampleserver/res/values/strings.xml | 5 -- .../binder_transport_apk/Dockerfile.template | 49 ----------- .../bazel/test_single_bazel_version.sh | 3 - .../dockerimage_current_versions.bzl | 1 - tools/bazelify_tests/test/strict_tests.bzl | 2 +- .../clang_format_all_the_things.sh | 2 +- .../test/binder_transport_apk.current_version | 1 - .../test/binder_transport_apk/Dockerfile | 87 ------------------- .../linux/grpc_bazel_build_in_docker.sh | 2 - .../linux/grpc_binder_transport_apk.cfg | 30 ------- .../linux/grpc_binder_transport_apk.sh | 27 ------ 27 files changed, 2 insertions(+), 713 deletions(-) delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/README.md delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleclient/AndroidManifest.xml delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleclient/BUILD delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleclient/ButtonPressHandler.java delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleclient/MainActivity.java delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleclient/native.cc delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleclient/res/layout/activity_main.xml delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleclient/res/values/strings.xml delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleserver/AndroidManifest.xml delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleserver/AndroidManifest_endpoint.xml delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleserver/BUILD delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleserver/ButtonPressHandler.java delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleserver/ExportedEndpointService.java delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleserver/MainActivity.java delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleserver/native.cc delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleserver/res/layout/activity_main.xml delete mode 100644 examples/android/binder/java/io/grpc/binder/cpp/exampleserver/res/values/strings.xml delete mode 100644 templates/tools/dockerfile/test/binder_transport_apk/Dockerfile.template delete mode 100644 tools/dockerfile/test/binder_transport_apk.current_version delete mode 100644 tools/dockerfile/test/binder_transport_apk/Dockerfile delete mode 100644 tools/internal_ci/linux/grpc_binder_transport_apk.cfg delete mode 100755 tools/internal_ci/linux/grpc_binder_transport_apk.sh diff --git a/examples/android/binder/java/io/grpc/binder/cpp/README.md b/examples/android/binder/java/io/grpc/binder/cpp/README.md deleted file mode 100644 index 8a9ba6ec26f..00000000000 --- a/examples/android/binder/java/io/grpc/binder/cpp/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# gRPC-core BinderTransport example apps - -## Build Instruction - -1. Install Android SDK and NDK. Only NDK version >= 25 is supported. We tested against SDK Platform `33` and NDK `26.2.11394342`. -2. Make sure Bazel is at least `7.0`. Use `export OVERRIDE_BAZEL_VERSION=7.3.1` to selected a supported version listed in `bazel/supported_versions.txt` if necessary. -3. Point environment variables to install locations of SDK and NDK - ``` - export ANDROID_HOME=$HOME/android-sdk - export ANDROID_NDK_HOME=$HOME/android-sdk/ndk/26.2.11394342 - ``` -4. To build a fat APK that supports `x86_64`, `armv7`, and `arm64`: - ``` - bazel build \ - --extra_toolchains=@androidndk//:all \ - --android_platforms=//bazel/platforms/android:x86_64,//bazel/platforms/android:armeabi-v7a,//bazel/platforms/android:arm64-v8a \ - --copt=-Wno-unknown-warning-option \ - //examples/android/binder/java/io/grpc/binder/cpp/exampleserver:app \ - //examples/android/binder/java/io/grpc/binder/cpp/exampleclient:app - ``` -5. `adb install - bazel-bin/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/app.apk` -6. `adb install - bazel-bin/examples/android/binder/java/io/grpc/binder/cpp/exampleserver/app.apk` diff --git a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/AndroidManifest.xml b/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/AndroidManifest.xml deleted file mode 100644 index 8dea1553faf..00000000000 --- a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/AndroidManifest.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/BUILD b/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/BUILD deleted file mode 100644 index 8b11ebb383a..00000000000 --- a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2021 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -cc_library( - name = "jni_lib", - srcs = ["native.cc"], - linkopts = [ - "-ldl", - "-llog", - "-lm", - "-Wl,--no-undefined", - ], - deps = [ - "//:grpc++", - "//examples/protos:helloworld_cc_grpc", - ], - alwayslink = True, -) - -android_library( - name = "activity", - srcs = [ - "ButtonPressHandler.java", - "MainActivity.java", - ], - manifest = "AndroidManifest.xml", - resource_files = glob(["res/**"]), - deps = [ - ":jni_lib", - "@binder_transport_android_helper//io/grpc/binder/cpp:connection_helper", - ], -) - -android_binary( - name = "app", - manifest = "AndroidManifest.xml", - deps = [ - ":activity", - ], -) diff --git a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/ButtonPressHandler.java b/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/ButtonPressHandler.java deleted file mode 100644 index ed9d11a404b..00000000000 --- a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/ButtonPressHandler.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.grpc.binder.cpp.exampleclient; - -import android.app.Application; - -public class ButtonPressHandler { - static { - System.loadLibrary("app"); - } - - public native String native_entry(Application application); - - public String onPressed(Application application) { - return native_entry(application); - } -} diff --git a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/MainActivity.java b/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/MainActivity.java deleted file mode 100644 index 3cbf70d1e65..00000000000 --- a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/MainActivity.java +++ /dev/null @@ -1,26 +0,0 @@ -package io.grpc.binder.cpp.exampleclient; - -import android.app.Activity; -import android.os.Bundle; -import android.util.Log; -import android.widget.Button; -import android.widget.TextView; - -/** Main class for the example app. */ -public class MainActivity extends Activity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - Log.v("Example", "hello, world"); - - setContentView(R.layout.activity_main); - - Button clickMeButton = findViewById(R.id.clickMeButton); - TextView exampleTextView = findViewById(R.id.exampleTextView); - - ButtonPressHandler h = new ButtonPressHandler(); - - clickMeButton.setOnClickListener( - v -> exampleTextView.setText(h.onPressed(getApplication()))); - } -} diff --git a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/native.cc b/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/native.cc deleted file mode 100644 index 3cb8637eb69..00000000000 --- a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/native.cc +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2021 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include -#include -#include -#include - -#include "examples/protos/helloworld.grpc.pb.h" -#include "examples/protos/helloworld.pb.h" - -extern "C" JNIEXPORT jstring JNICALL -Java_io_grpc_binder_cpp_exampleclient_ButtonPressHandler_native_1entry( - JNIEnv* env, jobject /*this*/, jobject application) { - // Lower the gRPC logging level, here it is just for demo and debugging - // purpose. - setenv("GRPC_VERBOSITY", "INFO", true); - if (grpc::experimental::InitializeBinderChannelJavaClass(env)) { - __android_log_print(ANDROID_LOG_INFO, "DemoClient", - "InitializeBinderChannelJavaClass succeed"); - } else { - __android_log_print(ANDROID_LOG_INFO, "DemoClient", - "InitializeBinderChannelJavaClass failed"); - } - static bool first = true; - static std::shared_ptr channel; - if (first) { - first = false; - JavaVM* jvm; - { - jint result = env->GetJavaVM(&jvm); - assert(result == 0); - } - grpc::ChannelArguments ch_args; - // This is not required since "grpc.io.action.BIND" is already the default. - ch_args.SetString("grpc.binder.custom_android_intent_action_name", - "grpc.io.action.BIND"); - channel = grpc::experimental::CreateCustomBinderChannel( - env, application, "io.grpc.binder.cpp.exampleserver", - "io.grpc.binder.cpp.exampleserver.ExportedEndpointService", - std::make_shared< - grpc::experimental::binder::SameSignatureSecurityPolicy>( - jvm, application), - ch_args); - return env->NewStringUTF("Clicked 1 time, channel created"); - } else { - auto stub = helloworld::Greeter::NewStub(channel); - grpc::ClientContext context; - helloworld::HelloRequest request; - helloworld::HelloReply response; - request.set_name("BinderTransportClient"); - grpc::Status status = stub->SayHello(&context, request, &response); - if (status.ok()) { - return env->NewStringUTF(response.message().c_str()); - } - return env->NewStringUTF( - std::string("Clicked more than 1 time. Status not ok " + - std::to_string(status.error_code())) - .c_str()); - } -} diff --git a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/res/layout/activity_main.xml b/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/res/layout/activity_main.xml deleted file mode 100644 index e866d8df894..00000000000 --- a/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/res/layout/activity_main.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - -