grpc 1.30.0 → 1.30.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a626e5d9956360cf66dfa01ae83510163e51b0d4b1d9719fad76ff737a614a42
4
- data.tar.gz: 315005aad77b80976e3d761a0fb8ce27beae82e3e01a2ba3dd28ea1441d8c464
3
+ metadata.gz: dd037aab6d97cafedb4df68e41b940fc0719ac334ebcb1902086b841d6659bf1
4
+ data.tar.gz: a0bfc2994f703c9972222480ec411a03901b762af47f546dd8281904e506ddd6
5
5
  SHA512:
6
- metadata.gz: 100ee4966c00faf05befefb6a8ef94d91e7a5acfc6bf521cdbef7a964ee11c66cd827c18d7e87356341e2a269aaba602fe2f9247796ab50a46e5f24c23c433e2
7
- data.tar.gz: 05230ac2839bd9a65cfa6119790a0688a7c2b69df9de1bd1b0e4ef40c3f32b6e589c3bb7bcbf55fff14100a7e87ebd5dc9ea7a653ae4a90bcf86ea54d4355bd2
6
+ metadata.gz: 70bdb409835f60b1cd060a5ce2044b43d6df06593835a7a54fe8ee14609487734c2fd0e001331eb7370067650f425d57e82712bbb28a20c1f99f3135fbe4ae5b
7
+ data.tar.gz: 1b0cc8536e91c224b709e4440c9b7a2645bdc4b1903071551c8d42472603165faabcc0f53612170438f2a8f4aae18e58fd3e740e909b7696cf7c41ca9e160ef0
data/Makefile CHANGED
@@ -470,8 +470,8 @@ Q = @
470
470
  endif
471
471
 
472
472
  CORE_VERSION = 10.0.0
473
- CPP_VERSION = 1.30.0
474
- CSHARP_VERSION = 2.30.0
473
+ CPP_VERSION = 1.30.1
474
+ CSHARP_VERSION = 2.30.1
475
475
 
476
476
  CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
477
477
  CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -390,6 +390,14 @@ typedef struct {
390
390
  void* reserved;
391
391
  } grpc_auth_metadata_context;
392
392
 
393
+ /** Performs a deep copy from \a from to \a to. **/
394
+ GRPCAPI void grpc_auth_metadata_context_copy(grpc_auth_metadata_context* from,
395
+ grpc_auth_metadata_context* to);
396
+
397
+ /** Releases internal resources held by \a context. **/
398
+ GRPCAPI void grpc_auth_metadata_context_reset(
399
+ grpc_auth_metadata_context* context);
400
+
393
401
  /** Maximum number of metadata entries returnable by a credentials plugin via
394
402
  a synchronous return. */
395
403
  #define GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX 4
@@ -179,12 +179,16 @@ class ChannelData {
179
179
 
180
180
  void RemoveExternalConnectivityWatcher(grpc_closure* on_complete,
181
181
  bool cancel) {
182
- MutexLock lock(&external_watchers_mu_);
183
- auto it = external_watchers_.find(on_complete);
184
- if (it != external_watchers_.end()) {
185
- if (cancel) it->second->Cancel();
186
- external_watchers_.erase(it);
182
+ ExternalConnectivityWatcher* watcher = nullptr;
183
+ {
184
+ MutexLock lock(&external_watchers_mu_);
185
+ auto it = external_watchers_.find(on_complete);
186
+ if (it != external_watchers_.end()) {
187
+ watcher = it->second;
188
+ external_watchers_.erase(it);
189
+ }
187
190
  }
191
+ if (watcher != nullptr && cancel) watcher->Cancel();
188
192
  }
189
193
 
190
194
  int NumExternalConnectivityWatchers() const {
@@ -32,9 +32,4 @@ void grpc_auth_metadata_context_build(
32
32
  const grpc_slice& call_method, grpc_auth_context* auth_context,
33
33
  grpc_auth_metadata_context* auth_md_context);
34
34
 
35
- void grpc_auth_metadata_context_copy(grpc_auth_metadata_context* from,
36
- grpc_auth_metadata_context* to);
37
-
38
- void grpc_auth_metadata_context_reset(grpc_auth_metadata_context* context);
39
-
40
35
  #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H */
@@ -109,6 +109,7 @@ static void grpc_rb_call_credentials_callback_with_gil(void* param) {
109
109
  params->callback(params->user_data, md_ary.metadata, md_ary.count, status,
110
110
  error_details);
111
111
  grpc_rb_metadata_array_destroy_including_entries(&md_ary);
112
+ grpc_auth_metadata_context_reset(&params->context);
112
113
  gpr_free(params);
113
114
  }
114
115
 
@@ -118,9 +119,9 @@ static int grpc_rb_call_credentials_plugin_get_metadata(
118
119
  grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
119
120
  size_t* num_creds_md, grpc_status_code* status,
120
121
  const char** error_details) {
121
- callback_params* params = gpr_malloc(sizeof(callback_params));
122
+ callback_params* params = gpr_zalloc(sizeof(callback_params));
122
123
  params->get_metadata = (VALUE)state;
123
- params->context = context;
124
+ grpc_auth_metadata_context_copy(&context, &params->context);
124
125
  params->user_data = user_data;
125
126
  params->callback = cb;
126
127
 
@@ -135,6 +135,8 @@ grpc_google_refresh_token_credentials_create_type grpc_google_refresh_token_cred
135
135
  grpc_access_token_credentials_create_type grpc_access_token_credentials_create_import;
136
136
  grpc_google_iam_credentials_create_type grpc_google_iam_credentials_create_import;
137
137
  grpc_sts_credentials_create_type grpc_sts_credentials_create_import;
138
+ grpc_auth_metadata_context_copy_type grpc_auth_metadata_context_copy_import;
139
+ grpc_auth_metadata_context_reset_type grpc_auth_metadata_context_reset_import;
138
140
  grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_create_from_plugin_import;
139
141
  grpc_secure_channel_create_type grpc_secure_channel_create_import;
140
142
  grpc_server_credentials_release_type grpc_server_credentials_release_import;
@@ -407,6 +409,8 @@ void grpc_rb_load_imports(HMODULE library) {
407
409
  grpc_access_token_credentials_create_import = (grpc_access_token_credentials_create_type) GetProcAddress(library, "grpc_access_token_credentials_create");
408
410
  grpc_google_iam_credentials_create_import = (grpc_google_iam_credentials_create_type) GetProcAddress(library, "grpc_google_iam_credentials_create");
409
411
  grpc_sts_credentials_create_import = (grpc_sts_credentials_create_type) GetProcAddress(library, "grpc_sts_credentials_create");
412
+ grpc_auth_metadata_context_copy_import = (grpc_auth_metadata_context_copy_type) GetProcAddress(library, "grpc_auth_metadata_context_copy");
413
+ grpc_auth_metadata_context_reset_import = (grpc_auth_metadata_context_reset_type) GetProcAddress(library, "grpc_auth_metadata_context_reset");
410
414
  grpc_metadata_credentials_create_from_plugin_import = (grpc_metadata_credentials_create_from_plugin_type) GetProcAddress(library, "grpc_metadata_credentials_create_from_plugin");
411
415
  grpc_secure_channel_create_import = (grpc_secure_channel_create_type) GetProcAddress(library, "grpc_secure_channel_create");
412
416
  grpc_server_credentials_release_import = (grpc_server_credentials_release_type) GetProcAddress(library, "grpc_server_credentials_release");
@@ -380,6 +380,12 @@ extern grpc_google_iam_credentials_create_type grpc_google_iam_credentials_creat
380
380
  typedef grpc_call_credentials*(*grpc_sts_credentials_create_type)(const grpc_sts_credentials_options* options, void* reserved);
381
381
  extern grpc_sts_credentials_create_type grpc_sts_credentials_create_import;
382
382
  #define grpc_sts_credentials_create grpc_sts_credentials_create_import
383
+ typedef void(*grpc_auth_metadata_context_copy_type)(grpc_auth_metadata_context* from, grpc_auth_metadata_context* to);
384
+ extern grpc_auth_metadata_context_copy_type grpc_auth_metadata_context_copy_import;
385
+ #define grpc_auth_metadata_context_copy grpc_auth_metadata_context_copy_import
386
+ typedef void(*grpc_auth_metadata_context_reset_type)(grpc_auth_metadata_context* context);
387
+ extern grpc_auth_metadata_context_reset_type grpc_auth_metadata_context_reset_import;
388
+ #define grpc_auth_metadata_context_reset grpc_auth_metadata_context_reset_import
383
389
  typedef grpc_call_credentials*(*grpc_metadata_credentials_create_from_plugin_type)(grpc_metadata_credentials_plugin plugin, grpc_security_level min_security_level, void* reserved);
384
390
  extern grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_create_from_plugin_import;
385
391
  #define grpc_metadata_credentials_create_from_plugin grpc_metadata_credentials_create_from_plugin_import
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.30.0'
17
+ VERSION = '1.30.1'
18
18
  end
@@ -17,12 +17,18 @@ require 'spec_helper'
17
17
 
18
18
  # A test message
19
19
  class EchoMsg
20
- def self.marshal(_o)
21
- ''
20
+ attr_reader :msg
21
+
22
+ def initialize(msg: '')
23
+ @msg = msg
22
24
  end
23
25
 
24
- def self.unmarshal(_o)
25
- EchoMsg.new
26
+ def self.marshal(o)
27
+ o.msg
28
+ end
29
+
30
+ def self.unmarshal(msg)
31
+ EchoMsg.new(msg: msg)
26
32
  end
27
33
  end
28
34
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.30.0
4
+ version: 1.30.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2020-06-22 00:00:00.000000000 Z
11
+ date: 2020-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -1987,41 +1987,41 @@ specification_version: 4
1987
1987
  summary: GRPC system in Ruby
1988
1988
  test_files:
1989
1989
  - src/ruby/spec/spec_helper.rb
1990
- - src/ruby/spec/client_auth_spec.rb
1991
- - src/ruby/spec/server_spec.rb
1992
- - src/ruby/spec/errors_spec.rb
1993
- - src/ruby/spec/generic/client_stub_spec.rb
1994
- - src/ruby/spec/generic/interceptor_registry_spec.rb
1995
- - src/ruby/spec/generic/rpc_server_pool_spec.rb
1996
- - src/ruby/spec/generic/rpc_server_spec.rb
1997
- - src/ruby/spec/generic/rpc_desc_spec.rb
1998
- - src/ruby/spec/generic/active_call_spec.rb
1999
- - src/ruby/spec/generic/server_interceptors_spec.rb
2000
- - src/ruby/spec/generic/service_spec.rb
2001
- - src/ruby/spec/generic/client_interceptors_spec.rb
2002
- - src/ruby/spec/channel_credentials_spec.rb
2003
- - src/ruby/spec/time_consts_spec.rb
2004
- - src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto
2005
- - src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto
2006
- - src/ruby/spec/pb/codegen/grpc/testing/package_options.proto
2007
- - src/ruby/spec/pb/codegen/package_option_spec.rb
2008
1990
  - src/ruby/spec/pb/health/checker_spec.rb
2009
1991
  - src/ruby/spec/pb/duplicate/codegen_spec.rb
1992
+ - src/ruby/spec/pb/codegen/package_option_spec.rb
1993
+ - src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto
1994
+ - src/ruby/spec/pb/codegen/grpc/testing/package_options.proto
1995
+ - src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto
1996
+ - src/ruby/spec/errors_spec.rb
2010
1997
  - src/ruby/spec/call_spec.rb
1998
+ - src/ruby/spec/compression_options_spec.rb
1999
+ - src/ruby/spec/server_credentials_spec.rb
2011
2000
  - src/ruby/spec/call_credentials_spec.rb
2012
2001
  - src/ruby/spec/client_server_spec.rb
2013
- - src/ruby/spec/compression_options_spec.rb
2002
+ - src/ruby/spec/error_sanity_spec.rb
2014
2003
  - src/ruby/spec/channel_spec.rb
2015
- - src/ruby/spec/server_credentials_spec.rb
2016
- - src/ruby/spec/debug_message_spec.rb
2017
- - src/ruby/spec/channel_connection_spec.rb
2018
- - src/ruby/spec/support/services.rb
2019
- - src/ruby/spec/support/helpers.rb
2020
- - src/ruby/spec/google_rpc_status_utils_spec.rb
2004
+ - src/ruby/spec/server_spec.rb
2005
+ - src/ruby/spec/generic/client_stub_spec.rb
2006
+ - src/ruby/spec/generic/rpc_server_spec.rb
2007
+ - src/ruby/spec/generic/active_call_spec.rb
2008
+ - src/ruby/spec/generic/rpc_server_pool_spec.rb
2009
+ - src/ruby/spec/generic/client_interceptors_spec.rb
2010
+ - src/ruby/spec/generic/rpc_desc_spec.rb
2011
+ - src/ruby/spec/generic/interceptor_registry_spec.rb
2012
+ - src/ruby/spec/generic/service_spec.rb
2013
+ - src/ruby/spec/generic/server_interceptors_spec.rb
2021
2014
  - src/ruby/spec/testdata/client.key
2015
+ - src/ruby/spec/testdata/client.pem
2022
2016
  - src/ruby/spec/testdata/ca.pem
2023
2017
  - src/ruby/spec/testdata/server1.key
2024
2018
  - src/ruby/spec/testdata/server1.pem
2025
- - src/ruby/spec/testdata/client.pem
2026
2019
  - src/ruby/spec/testdata/README
2027
- - src/ruby/spec/error_sanity_spec.rb
2020
+ - src/ruby/spec/support/helpers.rb
2021
+ - src/ruby/spec/support/services.rb
2022
+ - src/ruby/spec/debug_message_spec.rb
2023
+ - src/ruby/spec/google_rpc_status_utils_spec.rb
2024
+ - src/ruby/spec/time_consts_spec.rb
2025
+ - src/ruby/spec/channel_credentials_spec.rb
2026
+ - src/ruby/spec/channel_connection_spec.rb
2027
+ - src/ruby/spec/client_auth_spec.rb