grpc 1.30.2-x64-mingw32 → 1.31.0.pre1-x64-mingw32

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: 35da91db3d74564a8a671c76dd790380f99e79d2c0efa85e550c758c4a5bb944
4
- data.tar.gz: 305c241bd86216a121da861d6f57731760fbcb23c1343c6bfc6947178807d138
3
+ metadata.gz: '08dd57a0f9eac818f92b2306339bcffb9866965aff2c6382f8862e107c3f9711'
4
+ data.tar.gz: 23a0f962789df4014d159aa28fd3a6e5eba2988ba49cc1b8b1e5e5f8cd06ab9d
5
5
  SHA512:
6
- metadata.gz: cd4c52bc1804f98a5385cb7afd5ef98e5fcff887e18a0db7f6420e2ea41af2065b81f9e5674377a2e0d51d321c0cf8b1bb54805081e7b75e981e66d2639259b3
7
- data.tar.gz: 76b1ae0235b4376c73115d5cabc1430286bfe4d0fc432efe23f2f73fd0dd413b12c8d5e1abef337b4f05d0cf4a5f18566bbc4617164760dd696e638d41d82b48
6
+ metadata.gz: 364bef0a79e784ded154c4c008cc6b98f3c76628c8785ffc02980d7966101bafd88fb98bd7163913e6ad685b3a7c571982e6792fedc03862a256f2baa8da221e
7
+ data.tar.gz: '09ea17c695bb89a7afa219fe5bec698bc25ecf862c2f0088e65a63b7a619c7624ddb35c823f5d38cfaa2f1616b3d4cd1f90ab05d844bc52a2f122e0e504d2035'
Binary file
Binary file
@@ -25,7 +25,7 @@ grpc_config = ENV['GRPC_CONFIG'] || 'opt'
25
25
  ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.7'
26
26
 
27
27
  if ENV['AR'].nil? || ENV['AR'].size == 0
28
- ENV['AR'] = RbConfig::CONFIG['AR'] + ' rcs'
28
+ ENV['AR'] = RbConfig::CONFIG['AR']
29
29
  end
30
30
  if ENV['CC'].nil? || ENV['CC'].size == 0
31
31
  ENV['CC'] = RbConfig::CONFIG['CC']
@@ -37,7 +37,10 @@ if ENV['LD'].nil? || ENV['LD'].size == 0
37
37
  ENV['LD'] = ENV['CC']
38
38
  end
39
39
 
40
- ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/
40
+ if RUBY_PLATFORM =~ /darwin/
41
+ ENV['AR'] = 'libtool'
42
+ ENV['ARFLAGS'] = '-o'
43
+ end
41
44
 
42
45
  ENV['EMBED_OPENSSL'] = 'true'
43
46
  ENV['EMBED_ZLIB'] = 'true'
@@ -48,7 +48,7 @@ static VALUE grpc_rb_sBatchResult;
48
48
 
49
49
  /* grpc_rb_cMdAry is the MetadataArray class whose instances proxy
50
50
  * grpc_metadata_array. */
51
- static VALUE grpc_rb_cMdAry;
51
+ VALUE grpc_rb_cMdAry;
52
52
 
53
53
  /* id_credentials is the name of the hidden ivar that preserves the value
54
54
  * of the credentials added to the call */
@@ -103,7 +103,7 @@ static void grpc_rb_call_destroy(void* p) {
103
103
  xfree(p);
104
104
  }
105
105
 
106
- static const rb_data_type_t grpc_rb_md_ary_data_type = {
106
+ const rb_data_type_t grpc_rb_md_ary_data_type = {
107
107
  "grpc_metadata_array",
108
108
  {GRPC_RB_GC_NOT_MARKED,
109
109
  GRPC_RB_GC_DONT_FREE,
@@ -489,6 +489,7 @@ static int grpc_rb_md_ary_capacity_hash_cb(VALUE key, VALUE val,
489
489
 
490
490
  /* grpc_rb_md_ary_convert converts a ruby metadata hash into
491
491
  a grpc_metadata_array.
492
+ Note that this function may throw exceptions.
492
493
  */
493
494
  void grpc_rb_md_ary_convert(VALUE md_ary_hash, grpc_metadata_array* md_ary) {
494
495
  VALUE md_ary_obj = Qnil;
@@ -23,6 +23,10 @@
23
23
 
24
24
  #include <grpc/grpc.h>
25
25
 
26
+ extern const rb_data_type_t grpc_rb_md_ary_data_type;
27
+
28
+ extern VALUE grpc_rb_cMdAry;
29
+
26
30
  /* Gets the wrapped call from a VALUE. */
27
31
  grpc_call* grpc_rb_get_wrapped_call(VALUE v);
28
32
 
@@ -54,10 +54,41 @@ typedef struct callback_params {
54
54
  grpc_credentials_plugin_metadata_cb callback;
55
55
  } callback_params;
56
56
 
57
- static VALUE grpc_rb_call_credentials_callback(VALUE callback_args) {
57
+ static VALUE grpc_rb_call_credentials_callback(VALUE args) {
58
58
  VALUE result = rb_hash_new();
59
- VALUE metadata = rb_funcall(rb_ary_entry(callback_args, 0), rb_intern("call"),
60
- 1, rb_ary_entry(callback_args, 1));
59
+ VALUE callback_func = rb_ary_entry(args, 0);
60
+ VALUE callback_args = rb_ary_entry(args, 1);
61
+ VALUE md_ary_obj = rb_ary_entry(args, 2);
62
+ if (gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) {
63
+ VALUE callback_func_str = rb_funcall(callback_func, rb_intern("to_s"), 0);
64
+ VALUE callback_args_str = rb_funcall(callback_args, rb_intern("to_s"), 0);
65
+ VALUE callback_source_info =
66
+ rb_funcall(callback_func, rb_intern("source_location"), 0);
67
+ if (callback_source_info != Qnil) {
68
+ VALUE source_filename = rb_ary_entry(callback_source_info, 0);
69
+ VALUE source_line_number = rb_funcall(
70
+ rb_ary_entry(callback_source_info, 1), rb_intern("to_s"), 0);
71
+ gpr_log(GPR_DEBUG,
72
+ "GRPC_RUBY: grpc_rb_call_credentials invoking user callback:|%s| "
73
+ "source_filename:%s line_number:%s with arguments:|%s|",
74
+ StringValueCStr(callback_func_str),
75
+ StringValueCStr(source_filename),
76
+ StringValueCStr(source_line_number),
77
+ StringValueCStr(callback_args_str));
78
+ } else {
79
+ gpr_log(GPR_DEBUG,
80
+ "GRPC_RUBY: grpc_rb_call_credentials invoking user callback:|%s| "
81
+ "(failed to get source filename and line) with arguments:|%s|",
82
+ StringValueCStr(callback_func_str),
83
+ StringValueCStr(callback_args_str));
84
+ }
85
+ }
86
+ VALUE metadata =
87
+ rb_funcall(callback_func, rb_intern("call"), 1, callback_args);
88
+ grpc_metadata_array* md_ary = NULL;
89
+ TypedData_Get_Struct(md_ary_obj, grpc_metadata_array,
90
+ &grpc_rb_md_ary_data_type, md_ary);
91
+ grpc_rb_md_ary_convert(metadata, md_ary);
61
92
  rb_hash_aset(result, rb_str_new2("metadata"), metadata);
62
93
  rb_hash_aset(result, rb_str_new2("status"), INT2NUM(GRPC_STATUS_OK));
63
94
  rb_hash_aset(result, rb_str_new2("details"), rb_str_new2(""));
@@ -67,14 +98,23 @@ static VALUE grpc_rb_call_credentials_callback(VALUE callback_args) {
67
98
  static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args,
68
99
  VALUE exception_object) {
69
100
  VALUE result = rb_hash_new();
70
- VALUE backtrace =
71
- rb_funcall(rb_funcall(exception_object, rb_intern("backtrace"), 0),
72
- rb_intern("join"), 1, rb_str_new2("\n\tfrom "));
101
+ VALUE backtrace = rb_funcall(exception_object, rb_intern("backtrace"), 0);
102
+ VALUE backtrace_str;
103
+ if (backtrace != Qnil) {
104
+ backtrace_str =
105
+ rb_funcall(backtrace, rb_intern("join"), 1, rb_str_new2("\n\tfrom "));
106
+ } else {
107
+ backtrace_str = rb_str_new2(
108
+ "failed to get backtrace, this exception was likely thrown from native "
109
+ "code");
110
+ }
73
111
  VALUE rb_exception_info =
74
112
  rb_funcall(exception_object, rb_intern("inspect"), 0);
75
113
  (void)args;
76
- gpr_log(GPR_INFO, "Call credentials callback failed: %s\n%s",
77
- StringValueCStr(rb_exception_info), StringValueCStr(backtrace));
114
+ gpr_log(GPR_INFO,
115
+ "GRPC_RUBY call credentials callback failed, exception inspect:|%s| "
116
+ "backtrace:|%s|",
117
+ StringValueCStr(rb_exception_info), StringValueCStr(backtrace_str));
78
118
  rb_hash_aset(result, rb_str_new2("metadata"), Qnil);
79
119
  rb_hash_aset(result, rb_str_new2("status"),
80
120
  INT2NUM(GRPC_STATUS_UNAUTHENTICATED));
@@ -98,11 +138,15 @@ static void grpc_rb_call_credentials_callback_with_gil(void* param) {
98
138
  rb_hash_aset(args, ID2SYM(rb_intern("jwt_aud_uri")), auth_uri);
99
139
  rb_ary_push(callback_args, params->get_metadata);
100
140
  rb_ary_push(callback_args, args);
141
+ // Wrap up the grpc_metadata_array into a ruby object and do the conversion
142
+ // from hash to grpc_metadata_array within the rescue block, because the
143
+ // conversion can throw exceptions.
144
+ rb_ary_push(callback_args,
145
+ TypedData_Wrap_Struct(grpc_rb_cMdAry, &grpc_rb_md_ary_data_type,
146
+ &md_ary));
101
147
  result = rb_rescue(grpc_rb_call_credentials_callback, callback_args,
102
148
  grpc_rb_call_credentials_callback_rescue, Qnil);
103
149
  // Both callbacks return a hash, so result should be a hash
104
- grpc_rb_md_ary_convert(rb_hash_aref(result, rb_str_new2("metadata")),
105
- &md_ary);
106
150
  status = NUM2INT(rb_hash_aref(result, rb_str_new2("status")));
107
151
  details = rb_hash_aref(result, rb_str_new2("details"));
108
152
  error_details = StringValueCStr(details);
@@ -172,7 +172,7 @@ module GRPC
172
172
  i = @interceptors.pop
173
173
  return yield unless i
174
174
 
175
- i.send(type, args) do
175
+ i.send(type, **args) do
176
176
  if @interceptors.any?
177
177
  intercept!(type, args) do
178
178
  yield
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.30.2'
17
+ VERSION = '1.31.0.pre1'
18
18
  end
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.2
4
+ version: 1.31.0.pre1
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2020-07-21 00:00:00.000000000 Z
11
+ date: 2020-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -343,52 +343,52 @@ required_ruby_version: !ruby/object:Gem::Requirement
343
343
  version: 2.8.dev
344
344
  required_rubygems_version: !ruby/object:Gem::Requirement
345
345
  requirements:
346
- - - ">="
346
+ - - ">"
347
347
  - !ruby/object:Gem::Version
348
- version: '0'
348
+ version: 1.3.1
349
349
  requirements: []
350
350
  rubygems_version: 3.1.4
351
351
  signing_key:
352
352
  specification_version: 4
353
353
  summary: GRPC system in Ruby
354
354
  test_files:
355
- - src/ruby/spec/pb/health/checker_spec.rb
355
+ - src/ruby/spec/support/services.rb
356
+ - src/ruby/spec/support/helpers.rb
357
+ - src/ruby/spec/testdata/README
358
+ - src/ruby/spec/testdata/server1.pem
359
+ - src/ruby/spec/testdata/ca.pem
360
+ - src/ruby/spec/testdata/client.pem
361
+ - src/ruby/spec/testdata/client.key
362
+ - src/ruby/spec/testdata/server1.key
363
+ - src/ruby/spec/client_server_spec.rb
364
+ - src/ruby/spec/call_credentials_spec.rb
365
+ - src/ruby/spec/call_spec.rb
366
+ - src/ruby/spec/debug_message_spec.rb
367
+ - src/ruby/spec/channel_connection_spec.rb
368
+ - src/ruby/spec/spec_helper.rb
369
+ - src/ruby/spec/google_rpc_status_utils_spec.rb
370
+ - src/ruby/spec/server_spec.rb
371
+ - src/ruby/spec/time_consts_spec.rb
372
+ - src/ruby/spec/client_auth_spec.rb
373
+ - src/ruby/spec/channel_spec.rb
374
+ - src/ruby/spec/pb/duplicate/codegen_spec.rb
375
+ - src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto
376
+ - src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto
356
377
  - src/ruby/spec/pb/codegen/grpc/testing/package_options_import2.proto
357
378
  - src/ruby/spec/pb/codegen/grpc/testing/package_options.proto
358
- - src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto
359
- - src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto
360
379
  - src/ruby/spec/pb/codegen/package_option_spec.rb
361
- - src/ruby/spec/pb/duplicate/codegen_spec.rb
362
- - src/ruby/spec/client_auth_spec.rb
363
- - src/ruby/spec/server_spec.rb
364
- - src/ruby/spec/channel_connection_spec.rb
380
+ - src/ruby/spec/pb/health/checker_spec.rb
381
+ - src/ruby/spec/error_sanity_spec.rb
382
+ - src/ruby/spec/errors_spec.rb
383
+ - src/ruby/spec/server_credentials_spec.rb
384
+ - src/ruby/spec/compression_options_spec.rb
365
385
  - src/ruby/spec/generic/rpc_server_pool_spec.rb
366
- - src/ruby/spec/generic/client_interceptors_spec.rb
367
386
  - src/ruby/spec/generic/server_interceptors_spec.rb
368
- - src/ruby/spec/generic/active_call_spec.rb
369
- - src/ruby/spec/generic/interceptor_registry_spec.rb
370
- - src/ruby/spec/generic/service_spec.rb
387
+ - src/ruby/spec/generic/client_interceptors_spec.rb
371
388
  - src/ruby/spec/generic/rpc_server_spec.rb
372
- - src/ruby/spec/generic/rpc_desc_spec.rb
389
+ - src/ruby/spec/generic/interceptor_registry_spec.rb
373
390
  - src/ruby/spec/generic/client_stub_spec.rb
374
- - src/ruby/spec/spec_helper.rb
391
+ - src/ruby/spec/generic/active_call_spec.rb
392
+ - src/ruby/spec/generic/rpc_desc_spec.rb
393
+ - src/ruby/spec/generic/service_spec.rb
375
394
  - src/ruby/spec/channel_credentials_spec.rb
376
- - src/ruby/spec/compression_options_spec.rb
377
- - src/ruby/spec/testdata/ca.pem
378
- - src/ruby/spec/testdata/server1.pem
379
- - src/ruby/spec/testdata/client.pem
380
- - src/ruby/spec/testdata/README
381
- - src/ruby/spec/testdata/server1.key
382
- - src/ruby/spec/testdata/client.key
383
- - src/ruby/spec/google_rpc_status_utils_spec.rb
384
- - src/ruby/spec/errors_spec.rb
385
- - src/ruby/spec/channel_spec.rb
386
- - src/ruby/spec/client_server_spec.rb
387
- - src/ruby/spec/time_consts_spec.rb
388
- - src/ruby/spec/support/helpers.rb
389
- - src/ruby/spec/support/services.rb
390
- - src/ruby/spec/error_sanity_spec.rb
391
- - src/ruby/spec/server_credentials_spec.rb
392
- - src/ruby/spec/call_spec.rb
393
- - src/ruby/spec/debug_message_spec.rb
394
- - src/ruby/spec/call_credentials_spec.rb