Skip to content

Commit

Permalink
Native source sync at revision @a527461
Browse files Browse the repository at this point in the history
  • Loading branch information
dennycd authored and HannahShiSFB committed Sep 18, 2024
1 parent a527461 commit 6ae523d
Show file tree
Hide file tree
Showing 77 changed files with 2,694 additions and 1,022 deletions.
12 changes: 11 additions & 1 deletion gRPC-C++.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-C++'
# TODO (mxyan): use version that match gRPC version when pod is stabilized
version = '1.67.0-dev'
version = '1.68.0-dev'
s.version = version
s.summary = 'gRPC C++ library'
s.homepage = 'https://grpc.io'
Expand Down Expand Up @@ -302,6 +302,8 @@ Pod::Spec.new do |s|
'src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h',
'src/core/ext/filters/fault_injection/fault_injection_filter.h',
'src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h',
'src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h',
'src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h',
'src/core/ext/filters/http/client/http_client_filter.h',
'src/core/ext/filters/http/client_authority_filter.h',
'src/core/ext/filters/http/message_compress/compression_filter.h',
Expand Down Expand Up @@ -1145,6 +1147,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/credentials/external/file_external_account_credentials.h',
'src/core/lib/security/credentials/external/url_external_account_credentials.h',
'src/core/lib/security/credentials/fake/fake_credentials.h',
'src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h',
'src/core/lib/security/credentials/google_default/google_default_credentials.h',
'src/core/lib/security/credentials/iam/iam_credentials.h',
'src/core/lib/security/credentials/insecure/insecure_credentials.h',
Expand Down Expand Up @@ -1327,6 +1330,7 @@ Pod::Spec.new do |s|
'src/core/util/json/json_util.h',
'src/core/util/json/json_writer.h',
'src/core/util/latent_see.h',
'src/core/util/lru_cache.h',
'src/core/util/ring_buffer.h',
'src/core/util/spinlock.h',
'src/core/util/string.h',
Expand All @@ -1353,6 +1357,7 @@ Pod::Spec.new do |s|
'src/core/xds/grpc/xds_http_fault_filter.h',
'src/core/xds/grpc/xds_http_filter.h',
'src/core/xds/grpc/xds_http_filter_registry.h',
'src/core/xds/grpc/xds_http_gcp_authn_filter.h',
'src/core/xds/grpc/xds_http_rbac_filter.h',
'src/core/xds/grpc/xds_http_stateful_session_filter.h',
'src/core/xds/grpc/xds_lb_policy_registry.h',
Expand Down Expand Up @@ -1612,6 +1617,8 @@ Pod::Spec.new do |s|
'src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h',
'src/core/ext/filters/fault_injection/fault_injection_filter.h',
'src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h',
'src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h',
'src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h',
'src/core/ext/filters/http/client/http_client_filter.h',
'src/core/ext/filters/http/client_authority_filter.h',
'src/core/ext/filters/http/message_compress/compression_filter.h',
Expand Down Expand Up @@ -2437,6 +2444,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/credentials/external/file_external_account_credentials.h',
'src/core/lib/security/credentials/external/url_external_account_credentials.h',
'src/core/lib/security/credentials/fake/fake_credentials.h',
'src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h',
'src/core/lib/security/credentials/google_default/google_default_credentials.h',
'src/core/lib/security/credentials/iam/iam_credentials.h',
'src/core/lib/security/credentials/insecure/insecure_credentials.h',
Expand Down Expand Up @@ -2619,6 +2627,7 @@ Pod::Spec.new do |s|
'src/core/util/json/json_util.h',
'src/core/util/json/json_writer.h',
'src/core/util/latent_see.h',
'src/core/util/lru_cache.h',
'src/core/util/ring_buffer.h',
'src/core/util/spinlock.h',
'src/core/util/string.h',
Expand All @@ -2645,6 +2654,7 @@ Pod::Spec.new do |s|
'src/core/xds/grpc/xds_http_fault_filter.h',
'src/core/xds/grpc/xds_http_filter.h',
'src/core/xds/grpc/xds_http_filter_registry.h',
'src/core/xds/grpc/xds_http_gcp_authn_filter.h',
'src/core/xds/grpc/xds_http_rbac_filter.h',
'src/core/xds/grpc/xds_http_stateful_session_filter.h',
'src/core/xds/grpc/xds_lb_policy_registry.h',
Expand Down
18 changes: 16 additions & 2 deletions gRPC-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC-Core'
version = '1.67.0-dev'
version = '1.68.0-dev'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'https://grpc.io'
Expand Down Expand Up @@ -199,7 +199,7 @@ Pod::Spec.new do |s|
ss.libraries = 'z'
ss.dependency "#{s.name}/Interface", version
ss.dependency "#{s.name}/Privacy", version
ss.dependency 'BoringSSL-GRPC', '0.0.36'
ss.dependency 'BoringSSL-GRPC', '0.0.37'
ss.dependency 'abseil/algorithm/container', abseil_version
ss.dependency 'abseil/base/base', abseil_version
ss.dependency 'abseil/base/config', abseil_version
Expand Down Expand Up @@ -297,6 +297,10 @@ Pod::Spec.new do |s|
'src/core/ext/filters/fault_injection/fault_injection_filter.h',
'src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc',
'src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h',
'src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc',
'src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h',
'src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.cc',
'src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h',
'src/core/ext/filters/http/client/http_client_filter.cc',
'src/core/ext/filters/http/client/http_client_filter.h',
'src/core/ext/filters/http/client_authority_filter.cc',
Expand Down Expand Up @@ -1686,6 +1690,8 @@ Pod::Spec.new do |s|
'src/core/lib/security/credentials/external/url_external_account_credentials.h',
'src/core/lib/security/credentials/fake/fake_credentials.cc',
'src/core/lib/security/credentials/fake/fake_credentials.h',
'src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.cc',
'src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h',
'src/core/lib/security/credentials/google_default/credentials_generic.cc',
'src/core/lib/security/credentials/google_default/google_default_credentials.cc',
'src/core/lib/security/credentials/google_default/google_default_credentials.h',
Expand Down Expand Up @@ -2056,6 +2062,7 @@ Pod::Spec.new do |s|
'src/core/util/latent_see.h',
'src/core/util/linux/cpu.cc',
'src/core/util/log.cc',
'src/core/util/lru_cache.h',
'src/core/util/msys/tmpfile.cc',
'src/core/util/posix/cpu.cc',
'src/core/util/posix/string.cc',
Expand Down Expand Up @@ -2114,6 +2121,8 @@ Pod::Spec.new do |s|
'src/core/xds/grpc/xds_http_filter.h',
'src/core/xds/grpc/xds_http_filter_registry.cc',
'src/core/xds/grpc/xds_http_filter_registry.h',
'src/core/xds/grpc/xds_http_gcp_authn_filter.cc',
'src/core/xds/grpc/xds_http_gcp_authn_filter.h',
'src/core/xds/grpc/xds_http_rbac_filter.cc',
'src/core/xds/grpc/xds_http_rbac_filter.h',
'src/core/xds/grpc/xds_http_stateful_session_filter.cc',
Expand Down Expand Up @@ -2412,6 +2421,8 @@ Pod::Spec.new do |s|
'src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h',
'src/core/ext/filters/fault_injection/fault_injection_filter.h',
'src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h',
'src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h',
'src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h',
'src/core/ext/filters/http/client/http_client_filter.h',
'src/core/ext/filters/http/client_authority_filter.h',
'src/core/ext/filters/http/message_compress/compression_filter.h',
Expand Down Expand Up @@ -3217,6 +3228,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/credentials/external/file_external_account_credentials.h',
'src/core/lib/security/credentials/external/url_external_account_credentials.h',
'src/core/lib/security/credentials/fake/fake_credentials.h',
'src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h',
'src/core/lib/security/credentials/google_default/google_default_credentials.h',
'src/core/lib/security/credentials/iam/iam_credentials.h',
'src/core/lib/security/credentials/insecure/insecure_credentials.h',
Expand Down Expand Up @@ -3399,6 +3411,7 @@ Pod::Spec.new do |s|
'src/core/util/json/json_util.h',
'src/core/util/json/json_writer.h',
'src/core/util/latent_see.h',
'src/core/util/lru_cache.h',
'src/core/util/ring_buffer.h',
'src/core/util/spinlock.h',
'src/core/util/string.h',
Expand All @@ -3424,6 +3437,7 @@ Pod::Spec.new do |s|
'src/core/xds/grpc/xds_http_fault_filter.h',
'src/core/xds/grpc/xds_http_filter.h',
'src/core/xds/grpc/xds_http_filter_registry.h',
'src/core/xds/grpc/xds_http_gcp_authn_filter.h',
'src/core/xds/grpc/xds_http_rbac_filter.h',
'src/core/xds/grpc/xds_http_stateful_session_filter.h',
'src/core/xds/grpc/xds_lb_policy_registry.h',
Expand Down
2 changes: 1 addition & 1 deletion gRPC-ProtoRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
version = '1.67.0-dev'
version = '1.68.0-dev'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'https://grpc.io'
Expand Down
2 changes: 1 addition & 1 deletion gRPC-RxLibrary.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
version = '1.67.0-dev'
version = '1.68.0-dev'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'https://grpc.io'
Expand Down
2 changes: 1 addition & 1 deletion gRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

Pod::Spec.new do |s|
s.name = 'gRPC'
version = '1.67.0-dev'
version = '1.68.0-dev'
s.version = version
s.summary = 'gRPC client library for iOS/OSX'
s.homepage = 'https://grpc.io'
Expand Down
15 changes: 12 additions & 3 deletions include/grpc/support/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,21 @@ typedef enum gpr_log_severity {
/**
* EXPERIMENTAL. API stability not guaranteed.
* Should only be used from gRPC PHP and RUBY.
* Equivalent to ABSL_LOG(severity) << message_str;
* This will be removed once Ruby and PHP can start using C++ APIs.
* We would replace this with calls to absl LOG functions.
* grpc_absl_log is equivalent to
* ABSL_LOG(severity) << message_str;
* **/
GPRAPI void grpc_absl_log(const char* file, int line, gpr_log_severity severity,
const char* message_str);

/**
* EXPERIMENTAL. API stability not guaranteed.
* Should only be used from gRPC PHP and RUBY.
* Equivalent to ABSL_LOG(severity) << message_str << num;
* This will be removed once Ruby and PHP can start using C++ APIs.
* We would replace this with calls to absl LOG functions.
* grpc_absl_log_int is equivalent to
* ABSL_LOG(severity) << message_str << num;
* **/
GPRAPI void grpc_absl_log_int(const char* file, int line,
gpr_log_severity severity,
Expand All @@ -61,7 +67,10 @@ GPRAPI void grpc_absl_log_int(const char* file, int line,
/**
* EXPERIMENTAL. API stability not guaranteed.
* Should only be used from gRPC PHP and RUBY.
* Equivalent to ABSL_LOG(severity) << message_str1 << message_str2;
* This will be removed once Ruby and PHP can start using C++ APIs.
* We would replace this with calls to absl LOG functions.
* grpc_absl_log_str is equivalent to
* ABSL_LOG(severity) << message_str1 << message_str2;
* **/
GPRAPI void grpc_absl_log_str(const char* file, int line,
gpr_log_severity severity,
Expand Down
4 changes: 2 additions & 2 deletions include/grpcpp/version_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#define GRPCPP_VERSION_INFO_H

#define GRPC_CPP_VERSION_MAJOR 1
#define GRPC_CPP_VERSION_MINOR 67
#define GRPC_CPP_VERSION_MINOR 68
#define GRPC_CPP_VERSION_PATCH 0
#define GRPC_CPP_VERSION_TAG "dev"
#define GRPC_CPP_VERSION_STRING "1.67.0-dev"
#define GRPC_CPP_VERSION_STRING "1.68.0-dev"

#endif // GRPCPP_VERSION_INFO_H
17 changes: 10 additions & 7 deletions src/core/client_channel/client_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,10 @@ void ClientChannel::OnResolverResultChangedLocked(Resolver::Result result) {
service_config = std::move(*result.service_config);
config_selector = result.args.GetObjectRef<ConfigSelector>();
}
// Remove the config selector from channel args so that we're not holding
// unnecessary refs that cause it to be destroyed somewhere other than in
// the WorkSerializer.
result.args = result.args.Remove(GRPC_ARG_CONFIG_SELECTOR);
// Note: The only case in which service_config is null here is if the
// resolver returned a service config error and we don't have a previous
// service config to fall back to.
Expand Down Expand Up @@ -1138,6 +1142,7 @@ void ClientChannel::OnResolverResultChangedLocked(Resolver::Result result) {
<< "client_channel=" << this << ": service config not changed";
}
// Create or update LB policy, as needed.
ChannelArgs new_args = result.args;
resolver_result_status = CreateOrUpdateLbPolicyLocked(
std::move(lb_policy_config),
parsed_service_config->health_check_service_name(), std::move(result));
Expand All @@ -1146,7 +1151,7 @@ void ClientChannel::OnResolverResultChangedLocked(Resolver::Result result) {
// the ConfigSelector may need the LB policy to know about new
// destinations before it can send RPCs to those destinations.
if (service_config_changed || config_selector_changed) {
UpdateServiceConfigInDataPlaneLocked();
UpdateServiceConfigInDataPlaneLocked(new_args);
}
}
// Invoke resolver callback if needed.
Expand Down Expand Up @@ -1196,10 +1201,7 @@ absl::Status ClientChannel::CreateOrUpdateLbPolicyLocked(
}
update_args.config = std::move(lb_policy_config);
update_args.resolution_note = std::move(result.resolution_note);
// Remove the config selector from channel args so that we're not holding
// unnecessary refs that cause it to be destroyed somewhere other than in
// the WorkSerializer.
update_args.args = result.args.Remove(GRPC_ARG_CONFIG_SELECTOR);
update_args.args = std::move(result.args);
// Add health check service name to channel args.
if (health_check_service_name.has_value()) {
update_args.args = update_args.args.Set(GRPC_ARG_HEALTH_CHECK_SERVICE_NAME,
Expand Down Expand Up @@ -1264,7 +1266,8 @@ void ClientChannel::UpdateServiceConfigInControlPlaneLocked(
}
}

void ClientChannel::UpdateServiceConfigInDataPlaneLocked() {
void ClientChannel::UpdateServiceConfigInDataPlaneLocked(
const ChannelArgs& args) {
GRPC_TRACE_LOG(client_channel, INFO)
<< "client_channel=" << this << ": switching to ConfigSelector "
<< saved_config_selector_.get();
Expand All @@ -1275,7 +1278,7 @@ void ClientChannel::UpdateServiceConfigInDataPlaneLocked() {
MakeRefCounted<DefaultConfigSelector>(saved_service_config_);
}
// Construct filter stack.
InterceptionChainBuilder builder(channel_args_.SetObject(this));
InterceptionChainBuilder builder(args.SetObject(this));
if (idle_timeout_ != Duration::Zero()) {
builder.AddOnServerTrailingMetadata([this](ServerMetadata&) {
if (idle_state_.DecreaseCallCount()) StartIdleTimer();
Expand Down
2 changes: 1 addition & 1 deletion src/core/client_channel/client_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class ClientChannel : public Channel {
RefCountedPtr<ConfigSelector> config_selector, std::string lb_policy_name)
ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_);

void UpdateServiceConfigInDataPlaneLocked()
void UpdateServiceConfigInDataPlaneLocked(const ChannelArgs& args)
ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_);

void UpdateStateLocked(grpc_connectivity_state state,
Expand Down
Loading

0 comments on commit 6ae523d

Please sign in to comment.