Adapted from PR #40420
The original author left team and the PR couldn't be merged due to CLA check.
<!--
If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.
If your pull request is for a specific language, please add the appropriate
lang label.
-->
Closes#41355
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41355 from yuanweiz:workspace adb60674979a5d722f45e13e7c75291f22722f41
PiperOrigin-RevId: 853745450
gRPC is currently getting formatted with two different clang-format implementations, and due to some weirdness they have different include file orderings. This change introduces clang-format configuration to ensure that the two systems align - it's *highly* expected that this will need some maintenance going forward as the two systems evolve.
Closes#40905
PiperOrigin-RevId: 819606209
See `grpc_check.h`. This code redefines the abseil `CHECK*` macros using custom gRPC macros when building tests. In `bazel test ...` builds, on check failure, `PostMortemEmit()` will dump state to the log before crashing.
Caveat: to prevent circular dependencies, code that `postmortem` relies on cannot use the custom gRPC CHECK macros. This is not much code, ~50 source files. grep for the `absl/log:check` bazel dependency.
Closes#39945
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39945 from drfloob:grpc_check ca8e46718f2021e0df79aa67a3a0b0c751b3ce44
PiperOrigin-RevId: 807452496
Includes:
- An experiment for the v1 service, start using only the v2 api from channelz, and downgrade using the conversion library.
- An experiment to move the C APIs that wrapped languages can use to implement channelz v1.
PiperOrigin-RevId: 786039931
We have a set of C APIs that wrapped languages can use to implement channelz v1.
Migrate these to use the conversion library, and isolate them into a new file.
An experiment is added so we can do a gradual rollout.
PiperOrigin-RevId: 783581214
This includes the following moves from src/core/lib/security:
- certificate_provider/* → src/core/credentials/transport/tls/
- context/* → split between src/core/call/security_context* and src/core/transport/auth_context*
- credentials/
- composite/ → split between src/core/credentials/call/composite/ and src/core/credentials/transport/composite/
- alts, google_default, insecure, local, ssl, tls, xds → src/core/credentials/transport/
- fake/ → split between test/core/test_util/test_call_creds* and src/core/credentials/transport/fake
- external, iam, jwt, oauth2, plugin, token_fetcher → src/core/credentials/call/
- call_creds_utils.* → src/core/credentials/call/
- channel_creds_registry* → src/core/credentials/transport/
- credentials.* → split between src/core/credentials/call/call_credentials.* and src/core/credentials/transport/transport_credentials.*
- security_connector/
- alts, fake, insecure, local, ssl, tls → src/core/credentials/transport/
- security_connector* → src/core/credentials/transport/
- ssl_utils*, load_system_roots* → src/core/credentials/transport/tls/
- transport/ → src/core/filter/auth/
- util/* → src/core/credentials/call/
The only thing left in src/core/lib/security is the authz code, which I will move in a separate PR.
I have also moved the tests from test/core/security into a similar structure. Some specific notes:
- I have removed print_google_default_creds_token.cc, since it does not appear in any build file and appears to be completely unused.
- I moved secure_endpoint_test.cc to test/core/handshaker, to match where the implementation lives in the tree.
Closes#38825
PiperOrigin-RevId: 731487339
Maybe in some of these cases, `{}` would work instead of `std::pair`, but I'm just doing a simple find and replace here.
Closes#38636
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38636 from yashykt:NoMakePair d819f6a74be2fb2859083436297f79ed3139a1b7
PiperOrigin-RevId: 722772621
This is only ever set to C++, so removing it from bazel.
There are remnants left in cmakefile generation that I'm not planning on cleaning up (looked like some of the yaml/python pieces still use this)
Closes#38501
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38501 from ctiller:language c8aee06a01a449483b7585a367ff793fde47f68a
PiperOrigin-RevId: 718198572
This test incorrectly assumes that a gRPC status of OK can include Status-Details. However, according to https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md, Status-Details are not permitted when the Status is OK. To align this test with the specification, we should remove the test case that checks for Status-Details with an OK status.
Closes#38233
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38233 from veblush:status-details 706693f91a848f7bf58770d3b9cdd083f366af28
PiperOrigin-RevId: 704453063
This removes all xDS protos except for 5 of them that have services. We still have some limitations in our internal build system that make it hard to use the real xDS protos for those files, but we're now using the real xDS protos for the rest.
(Note: discovery.proto is actually a special case. While it does have services, we don't actually use those services, so that's not the reason we need a copy of this file. Unfortunately, the xDS BUILD files group discovery.proto into the same build target as ads.proto, which has services that we actually use, thus requiring us to have our own copy. This means that depending on the real discovery.proto causes us to also depend on the real ads.proto, which causes a conflict in the protobuf registry by linking two copies of ads.proto. However, we *are* using the real discovery.proto in unit tests, which do not depend on ads.proto.)
PiperOrigin-RevId: 693907782
This change upgrades the sanity test to use Clang 19, including clang-format and clang-tidy. (It's a partial implementation of the changes proposed in #38038)
Key updates:
- Docker images now utilize Clang 19.
- Code has been reformatted using the updated clang-format.
- Resolved `readability-math-missing-parentheses` warnings raised by clang-tidy.
Note that the other part of the clang-19 upgrade, "using clang-19 for C++ test" will be done once opentelemetry-cpp fixes the clang-19 build error.
Closes#38070
PiperOrigin-RevId: 693833548
Protobuf 6.30.0 will change the return types of Descriptor::name() and other methods to absl::string_view. This makes the code work both before and after such a change.
PiperOrigin-RevId: 692216341
Continuation of #37541 but focused on C++.
Closes#37755
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37755 from NathanBaulch:typos-cpp 9a7fd9d65fa97a689d529772534df1a501031e9f
PiperOrigin-RevId: 684600898
The following files have been moved:
- src/core/lib/avl/*
- src/core/lib/backoff/*
- src/core/lib/debug/event_log*
- src/core/lib/iomgr/gethostname*
- src/core/lib/iomgr/grpc_if_nametoindex*
- src/core/lib/matchers/*
- src/core/lib/uri/* (renamed from uri_parser.* to uri.*)
- src/core/lib/gprpp/* (existing src/core/util/time.cc was renamed to gpr_time.cc to avoid conflict)
Closes#36792
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36792 from markdroth:reorg_util d4e8996f481c611ffbb06a8b04924ff81bc1bc2b
PiperOrigin-RevId: 676947640