Skip to content

Commit fcab189

Browse files
committed
deps: update grpc to 1.76.0
PR-URL: #390 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent 1f41f13 commit fcab189

483 files changed

Lines changed: 14271 additions & 5267 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deps/grpc/Makefile

Lines changed: 18 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/grpc/grpc.gyp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@
409409
'src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.c',
410410
'src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.c',
411411
'src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.c',
412+
'src/core/ext/upb-gen/src/proto/grpc/channelz/v2/service.upb_minitable.c',
412413
'src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c',
413414
'src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c',
414415
'src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c',
@@ -571,8 +572,10 @@
571572
'src/core/ext/upbdefs-gen/google/protobuf/timestamp.upbdefs.c',
572573
'src/core/ext/upbdefs-gen/google/protobuf/wrappers.upbdefs.c',
573574
'src/core/ext/upbdefs-gen/google/rpc/status.upbdefs.c',
575+
'src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/channelz.upbdefs.c',
574576
'src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.c',
575577
'src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.c',
578+
'src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/service.upbdefs.c',
576579
'src/core/ext/upbdefs-gen/src/proto/grpc/lookup/v1/rls_config.upbdefs.c',
577580
'src/core/ext/upbdefs-gen/udpa/annotations/migrate.upbdefs.c',
578581
'src/core/ext/upbdefs-gen/udpa/annotations/security.upbdefs.c',
@@ -806,6 +809,7 @@
806809
'src/core/lib/iomgr/event_engine_shims/closure.cc',
807810
'src/core/lib/iomgr/event_engine_shims/endpoint.cc',
808811
'src/core/lib/iomgr/event_engine_shims/tcp_client.cc',
812+
'src/core/lib/resource_tracker/resource_tracker.cc',
809813
'src/core/lib/security/authorization/audit_logging.cc',
810814
'src/core/lib/security/authorization/authorization_policy_provider_vtable.cc',
811815
'src/core/lib/security/authorization/cel_authorization_engine.cc',
@@ -878,6 +882,7 @@
878882
'src/core/telemetry/context_list_entry.cc',
879883
'src/core/telemetry/default_tcp_tracer.cc',
880884
'src/core/telemetry/histogram_view.cc',
885+
'src/core/telemetry/instrument.cc',
881886
'src/core/telemetry/metrics.cc',
882887
'src/core/telemetry/stats.cc',
883888
'src/core/telemetry/stats_data.cc',
@@ -1008,6 +1013,8 @@
10081013
'src/core/xds/grpc/xds_lb_policy_registry.cc',
10091014
'src/core/xds/grpc/xds_listener.cc',
10101015
'src/core/xds/grpc/xds_listener_parser.cc',
1016+
'src/core/xds/grpc/xds_matcher_context.cc',
1017+
'src/core/xds/grpc/xds_matcher_input.cc',
10111018
'src/core/xds/grpc/xds_metadata.cc',
10121019
'src/core/xds/grpc/xds_metadata_parser.cc',
10131020
'src/core/xds/grpc/xds_route_config.cc',

deps/grpc/include/grpc/credentials.h

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,19 +214,27 @@ GRPCAPI void grpc_call_credentials_release(grpc_call_credentials* creds);
214214
identity of the default service account of the machine. Supplying any other
215215
sort of call credential will result in undefined behavior, up to and
216216
including the sudden and unexpected failure of RPCs.
217+
It is in the caller's responsibility to ensure that both specified
218+
credentials assert the correct identities.
217219
218220
If nullptr is supplied, the returned channel credentials object will use a
219221
default call credentials object based on the Application Default Credentials
220222
mechanism.
221223
222224
The caller may choose to create the default credential with a secondary alts
223-
credentials object to attach to the channel for ALTS connections. If an alts
224-
credentials object is specified, it will be used if the underlying channel
225-
type is ALTS.
225+
credentials object to attach to the channel for ALTS connections. If
226+
credentials options are specified, it will be used to configure an underlying
227+
channel which type is ALTS. If the field create_hard_bound_credentials is
228+
true, the call_creds_for_alts field will be ignored.
226229
*/
230+
typedef struct {
231+
bool create_hard_bound_credentials;
232+
grpc_call_credentials* call_creds_for_alts;
233+
} grpc_google_default_credentials_options;
234+
227235
GRPCAPI grpc_channel_credentials* grpc_google_default_credentials_create(
228236
grpc_call_credentials* call_creds_for_tls,
229-
grpc_call_credentials* call_creds_for_alts);
237+
grpc_google_default_credentials_options* options);
230238

231239
/** Server certificate config object holds the server's public certificates and
232240
associated private keys, as well as any CA certificates needed for client
@@ -485,11 +493,19 @@ GRPCAPI grpc_call_credentials* grpc_composite_call_credentials_create(
485493
grpc_call_credentials* creds1, grpc_call_credentials* creds2,
486494
void* reserved);
487495

496+
/** Context that can be used by the google compute engine create credentials api
497+
in order to configure the desired credentials. */
498+
typedef struct {
499+
/// Indicates if the created credentials should be ALTS with hard bound
500+
/// tokens.
501+
bool alts_hard_bound;
502+
} grpc_google_compute_engine_credentials_options;
503+
488504
/** Creates a compute engine credentials object for connecting to Google.
489505
WARNING: Do NOT use this credentials to connect to a non-google service as
490506
this could result in an oauth2 token leak. */
491507
GRPCAPI grpc_call_credentials* grpc_google_compute_engine_credentials_create(
492-
void* reserved);
508+
grpc_google_compute_engine_credentials_options* options);
493509

494510
/** Creates a composite channel credentials object. The security level of
495511
* resulting connection is determined by channel_creds. */

deps/grpc/include/grpcpp/security/credentials.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,27 @@ struct SslCredentialsOptions {
166166
grpc::string pem_cert_chain;
167167
};
168168

169+
/// Options used to build GoogleDefaultCredentials.
170+
struct GoogleDefaultCredentialsOptions {
171+
/// Indicates if the created credentials should also contain ALTS specific
172+
/// credentials. By default, the created credentials will be used for TLS.
173+
bool use_alts_call_credentials = false;
174+
};
175+
169176
// Factories for building different types of Credentials The functions may
170177
// return empty shared_ptr when credentials cannot be created. If a
171178
// Credentials pointer is returned, it can still be invalid when used to create
172179
// a channel. A lame channel will be created then and all rpcs will fail on it.
173180

174-
/// Builds credentials with reasonable defaults.
181+
/// Builds google default credentials with the given options.
175182
///
176183
/// \warning Only use these credentials when connecting to a Google endpoint.
177184
/// Using these credentials to connect to any other service may result in this
178185
/// service being able to impersonate your client for requests to Google
179186
/// services.
180-
std::shared_ptr<ChannelCredentials> GoogleDefaultCredentials();
187+
std::shared_ptr<ChannelCredentials> GoogleDefaultCredentials(
188+
const GoogleDefaultCredentialsOptions& options =
189+
GoogleDefaultCredentialsOptions());
181190

182191
/// Builds SSL Credentials given SSL specific options
183192
std::shared_ptr<ChannelCredentials> SslCredentials(

deps/grpc/include/grpcpp/version_info.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#define GRPCPP_VERSION_INFO_H
2020

2121
#define GRPC_CPP_VERSION_MAJOR 1
22-
#define GRPC_CPP_VERSION_MINOR 75
22+
#define GRPC_CPP_VERSION_MINOR 76
2323
#define GRPC_CPP_VERSION_PATCH 0
2424
#define GRPC_CPP_VERSION_TAG ""
25-
#define GRPC_CPP_VERSION_STRING "1.75.0"
25+
#define GRPC_CPP_VERSION_STRING "1.76.0"
2626

2727
#endif // GRPCPP_VERSION_INFO_H

deps/grpc/src/compiler/BUILD

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ grpc_cc_library(
8080
],
8181
deps = [
8282
"proto_parser_helper",
83+
"//:gpr_platform",
8384
"//:grpc++_config_proto",
85+
"@com_google_protobuf//src/google/protobuf/compiler:code_generator",
86+
"@com_google_protobuf//src/google/protobuf/compiler:plugin",
87+
"@com_google_protobuf//src/google/protobuf/io",
88+
"@com_google_protobuf//src/google/protobuf/io:printer",
8489
],
8590
)
8691

@@ -105,7 +110,12 @@ grpc_proto_plugin(
105110
grpc_proto_plugin(
106111
name = "grpc_objective_c_plugin",
107112
srcs = ["objective_c_plugin.cc"],
108-
deps = [":grpc_plugin_support"],
113+
deps = [
114+
":grpc_plugin_support",
115+
"@com_google_protobuf//:protobuf",
116+
"@com_google_protobuf//src/google/protobuf/compiler:code_generator",
117+
"@com_google_protobuf//src/google/protobuf/compiler/objectivec:names",
118+
],
109119
)
110120

111121
grpc_proto_plugin(

deps/grpc/src/compiler/generator_helpers.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,18 @@
3030

3131
namespace grpc_generator {
3232

33+
inline std::string ToLower(std::string s) {
34+
std::transform(s.begin(), s.end(), s.begin(),
35+
[](unsigned char c) { return std::tolower(c); });
36+
return s;
37+
}
38+
3339
inline bool StripSuffix(std::string* filename, const std::string& suffix) {
3440
if (filename->length() >= suffix.length()) {
3541
size_t suffix_pos = filename->length() - suffix.length();
36-
if (filename->compare(suffix_pos, std::string::npos, suffix) == 0) {
42+
std::string filename_suffix = filename->substr(suffix_pos);
43+
44+
if (ToLower(filename_suffix) == ToLower(suffix)) {
3745
filename->resize(filename->size() - suffix.size());
3846
return true;
3947
}

deps/grpc/src/compiler/python_generator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ bool PrivateGenerator::PrintPreamble(grpc_generator::Printer* out) {
767767
out->Print(
768768
var,
769769
"f'The grpc package installed is at version {GRPC_VERSION},'\n"
770-
"+ f' but the generated code in $Pb2GrpcFileName$_pb2_grpc.py "
770+
"+ ' but the generated code in $Pb2GrpcFileName$_pb2_grpc.py "
771771
"depends on'\n"
772772
"+ f' grpcio>={GRPC_GENERATED_VERSION}.'\n"
773773
"+ f' Please upgrade your grpc module to "

0 commit comments

Comments
 (0)