grpc 1.30.2-x86-linux → 1.31.0.pre1-x86-linux
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 +4 -4
- data/grpc_c.32.ruby +0 -0
- data/grpc_c.64.ruby +0 -0
- data/src/ruby/ext/grpc/extconf.rb +5 -2
- data/src/ruby/ext/grpc/rb_call.c +3 -2
- data/src/ruby/ext/grpc/rb_call.h +4 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +54 -10
- data/src/ruby/lib/grpc/2.3/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.4/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.5/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.6/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.7/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/generic/interceptors.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- metadata +36 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62f8c0d65f56ade416c6956da117c2a49e007d330e7652a423e9bd2a449a51c9
|
4
|
+
data.tar.gz: d8cd95311532e1f563523fc2ddecf9e8dbd5efd9864dc7852ba451d399fa5a6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08d03e4cd384efe73b531d75bfd88dd63dfa18cd2c377c28ec86f9776d9e67621bdc2f60054de6aaa3aee33c8be37ecc4e07a8e97ad80f121bf26495b09f548a'
|
7
|
+
data.tar.gz: 564e65e0ccccda252f12cdb18aff7710b98ef049d7cdfe82fcb8df51556e76d3e8002aaa54ec24e80bda105d7418d4574e2dda6d4d1b15137d9deb8d07194827
|
data/grpc_c.32.ruby
CHANGED
Binary file
|
data/grpc_c.64.ruby
CHANGED
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']
|
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
|
-
|
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'
|
data/src/ruby/ext/grpc/rb_call.c
CHANGED
@@ -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
|
-
|
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
|
-
|
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;
|
data/src/ruby/ext/grpc/rb_call.h
CHANGED
@@ -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
|
57
|
+
static VALUE grpc_rb_call_credentials_callback(VALUE args) {
|
58
58
|
VALUE result = rb_hash_new();
|
59
|
-
VALUE
|
60
|
-
|
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
|
-
|
72
|
-
|
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,
|
77
|
-
|
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);
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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.
|
4
|
+
version: 1.31.0.pre1
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- gRPC Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: src/ruby/bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
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:
|
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/
|
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/
|
362
|
-
- src/ruby/spec/
|
363
|
-
- src/ruby/spec/
|
364
|
-
- src/ruby/spec/
|
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/
|
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/
|
389
|
+
- src/ruby/spec/generic/interceptor_registry_spec.rb
|
373
390
|
- src/ruby/spec/generic/client_stub_spec.rb
|
374
|
-
- src/ruby/spec/
|
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
|