grpc 1.62.0-x86_64-linux → 1.63.0-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/ruby/ext/grpc/extconf.rb +0 -3
- data/src/ruby/ext/grpc/rb_grpc.c +1 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +0 -2
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +0 -3
- data/src/ruby/lib/grpc/2.7/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.0/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.1/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.2/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.3/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/generic/active_call.rb +8 -2
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/generic/rpc_server_spec.rb +25 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b97d4bd449ef26ed57ef579d49a864008114c350bef9f9f4514e630b2387a7a
|
4
|
+
data.tar.gz: 7bd4fa6edb99fa517f8a386cd8dd71a35c82732d5d79640cf4b20a8d553ec2ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4e6d3a51b6dd657f294c1bcaafe1d827ce75841c27be1a899c519419cd03d53f5b250b43eab3639c8ca6822ec8442d5b9610c557cdc0e06ea6192e5a8ff2d18
|
7
|
+
data.tar.gz: 6a097294c3871ad54ffdf3aaa220db800a3368a3a30b4ff040785c348d5a771b0173116cf5ea2788528f51e6be5fa7561dd00811693652c42920f6d167c28767
|
@@ -100,8 +100,6 @@ ENV['EMBED_OPENSSL'] = (RUBY_ENGINE != 'truffleruby').to_s
|
|
100
100
|
# Don't embed on TruffleRuby (the system zlib is already linked for the zlib C extension, slow build times)
|
101
101
|
ENV['EMBED_ZLIB'] = (RUBY_ENGINE != 'truffleruby').to_s
|
102
102
|
|
103
|
-
ENV['EMBED_CARES'] = 'true'
|
104
|
-
|
105
103
|
ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG']
|
106
104
|
if apple_toolchain && !cross_compiling
|
107
105
|
if RUBY_PLATFORM =~ /arm64/
|
@@ -192,7 +190,6 @@ if grpc_config == 'dbg'
|
|
192
190
|
$CFLAGS << ' -O0'
|
193
191
|
end
|
194
192
|
|
195
|
-
$LDFLAGS << ' -Wl,-wrap,memcpy' if linux
|
196
193
|
# Do not statically link standard libraries on TruffleRuby as this does not work when compiling to bitcode
|
197
194
|
if linux && RUBY_ENGINE != 'truffleruby'
|
198
195
|
$LDFLAGS << ' -static-libgcc -static-libstdc++'
|
data/src/ruby/ext/grpc/rb_grpc.c
CHANGED
@@ -467,6 +467,7 @@ void Init_grpc_c() {
|
|
467
467
|
grpc_rb_mGrpcCore = rb_define_module_under(grpc_rb_mGRPC, "Core");
|
468
468
|
grpc_rb_sNewServerRpc = rb_struct_define(
|
469
469
|
"NewServerRpc", "method", "host", "deadline", "metadata", "call", NULL);
|
470
|
+
rb_global_variable(&grpc_rb_sStatus);
|
470
471
|
grpc_rb_sStatus = rb_const_get(rb_cStruct, rb_intern("Status"));
|
471
472
|
sym_code = ID2SYM(rb_intern("code"));
|
472
473
|
sym_details = ID2SYM(rb_intern("details"));
|
@@ -64,7 +64,6 @@ grpc_completion_queue_destroy_type grpc_completion_queue_destroy_import;
|
|
64
64
|
grpc_completion_queue_thread_local_cache_init_type grpc_completion_queue_thread_local_cache_init_import;
|
65
65
|
grpc_completion_queue_thread_local_cache_flush_type grpc_completion_queue_thread_local_cache_flush_import;
|
66
66
|
grpc_channel_check_connectivity_state_type grpc_channel_check_connectivity_state_import;
|
67
|
-
grpc_channel_num_external_connectivity_watchers_type grpc_channel_num_external_connectivity_watchers_import;
|
68
67
|
grpc_channel_watch_connectivity_state_type grpc_channel_watch_connectivity_state_import;
|
69
68
|
grpc_channel_support_connectivity_watcher_type grpc_channel_support_connectivity_watcher_import;
|
70
69
|
grpc_channel_create_call_type grpc_channel_create_call_import;
|
@@ -355,7 +354,6 @@ void grpc_rb_load_imports(HMODULE library) {
|
|
355
354
|
grpc_completion_queue_thread_local_cache_init_import = (grpc_completion_queue_thread_local_cache_init_type) GetProcAddress(library, "grpc_completion_queue_thread_local_cache_init");
|
356
355
|
grpc_completion_queue_thread_local_cache_flush_import = (grpc_completion_queue_thread_local_cache_flush_type) GetProcAddress(library, "grpc_completion_queue_thread_local_cache_flush");
|
357
356
|
grpc_channel_check_connectivity_state_import = (grpc_channel_check_connectivity_state_type) GetProcAddress(library, "grpc_channel_check_connectivity_state");
|
358
|
-
grpc_channel_num_external_connectivity_watchers_import = (grpc_channel_num_external_connectivity_watchers_type) GetProcAddress(library, "grpc_channel_num_external_connectivity_watchers");
|
359
357
|
grpc_channel_watch_connectivity_state_import = (grpc_channel_watch_connectivity_state_type) GetProcAddress(library, "grpc_channel_watch_connectivity_state");
|
360
358
|
grpc_channel_support_connectivity_watcher_import = (grpc_channel_support_connectivity_watcher_type) GetProcAddress(library, "grpc_channel_support_connectivity_watcher");
|
361
359
|
grpc_channel_create_call_import = (grpc_channel_create_call_type) GetProcAddress(library, "grpc_channel_create_call");
|
@@ -167,9 +167,6 @@ extern grpc_completion_queue_thread_local_cache_flush_type grpc_completion_queue
|
|
167
167
|
typedef grpc_connectivity_state(*grpc_channel_check_connectivity_state_type)(grpc_channel* channel, int try_to_connect);
|
168
168
|
extern grpc_channel_check_connectivity_state_type grpc_channel_check_connectivity_state_import;
|
169
169
|
#define grpc_channel_check_connectivity_state grpc_channel_check_connectivity_state_import
|
170
|
-
typedef int(*grpc_channel_num_external_connectivity_watchers_type)(grpc_channel* channel);
|
171
|
-
extern grpc_channel_num_external_connectivity_watchers_type grpc_channel_num_external_connectivity_watchers_import;
|
172
|
-
#define grpc_channel_num_external_connectivity_watchers grpc_channel_num_external_connectivity_watchers_import
|
173
170
|
typedef void(*grpc_channel_watch_connectivity_state_type)(grpc_channel* channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue* cq, void* tag);
|
174
171
|
extern grpc_channel_watch_connectivity_state_type grpc_channel_watch_connectivity_state_import;
|
175
172
|
#define grpc_channel_watch_connectivity_state grpc_channel_watch_connectivity_state_import
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -169,10 +169,13 @@ module GRPC
|
|
169
169
|
batch_result = @call.run_batch(ops)
|
170
170
|
unless @metadata_received
|
171
171
|
@call.metadata = batch_result.metadata
|
172
|
-
@metadata_received = true
|
173
172
|
end
|
174
173
|
set_input_stream_done
|
175
174
|
attach_status_results_and_complete_call(batch_result)
|
175
|
+
ensure
|
176
|
+
# Ensure we don't attempt to request the initial metadata again
|
177
|
+
# in case an exception occurs.
|
178
|
+
@metadata_received = true
|
176
179
|
end
|
177
180
|
|
178
181
|
def attach_status_results_and_complete_call(recv_status_batch_result)
|
@@ -258,12 +261,15 @@ module GRPC
|
|
258
261
|
batch_result = @call.run_batch(ops)
|
259
262
|
unless @metadata_received
|
260
263
|
@call.metadata = batch_result.metadata
|
261
|
-
@metadata_received = true
|
262
264
|
end
|
263
265
|
get_message_from_batch_result(batch_result)
|
264
266
|
rescue GRPC::Core::CallError => e
|
265
267
|
GRPC.logger.info("remote_read: #{e}")
|
266
268
|
nil
|
269
|
+
ensure
|
270
|
+
# Ensure we don't attempt to request the initial metadata again
|
271
|
+
# in case an exception occurs.
|
272
|
+
@metadata_received = true
|
267
273
|
end
|
268
274
|
|
269
275
|
def get_message_from_batch_result(recv_message_batch_result)
|
@@ -61,6 +61,7 @@ FailingStub = FailingService.rpc_stub_class
|
|
61
61
|
class SlowService
|
62
62
|
include GRPC::GenericService
|
63
63
|
rpc :an_rpc, EchoMsg, EchoMsg
|
64
|
+
rpc :a_server_streaming_rpc, EchoMsg, stream(EchoMsg)
|
64
65
|
attr_reader :received_md, :delay
|
65
66
|
|
66
67
|
def initialize(_default_var = 'ignored')
|
@@ -74,6 +75,13 @@ class SlowService
|
|
74
75
|
@received_md << call.metadata unless call.metadata.nil?
|
75
76
|
req # send back the req as the response
|
76
77
|
end
|
78
|
+
|
79
|
+
def a_server_streaming_rpc(_, call)
|
80
|
+
GRPC.logger.info("starting a slow #{@delay} server streaming rpc")
|
81
|
+
sleep @delay
|
82
|
+
@received_md << call.metadata unless call.metadata.nil?
|
83
|
+
[EchoMsg.new, EchoMsg.new]
|
84
|
+
end
|
77
85
|
end
|
78
86
|
|
79
87
|
SlowStub = SlowService.rpc_stub_class
|
@@ -410,6 +418,23 @@ describe GRPC::RpcServer do
|
|
410
418
|
t.join
|
411
419
|
end
|
412
420
|
|
421
|
+
it 'should raise DeadlineExceeded', server: true do
|
422
|
+
service = SlowService.new
|
423
|
+
@srv.handle(service)
|
424
|
+
t = Thread.new { @srv.run }
|
425
|
+
@srv.wait_till_running
|
426
|
+
req = EchoMsg.new
|
427
|
+
stub = SlowStub.new(@host, :this_channel_is_insecure, **client_opts)
|
428
|
+
timeout = service.delay - 0.1
|
429
|
+
deadline = GRPC::Core::TimeConsts.from_relative_time(timeout)
|
430
|
+
responses = stub.a_server_streaming_rpc(req,
|
431
|
+
deadline: deadline,
|
432
|
+
metadata: { k1: 'v1', k2: 'v2' })
|
433
|
+
expect { responses.to_a }.to raise_error(GRPC::DeadlineExceeded)
|
434
|
+
@srv.stop
|
435
|
+
t.join
|
436
|
+
end
|
437
|
+
|
413
438
|
it 'should handle cancellation correctly', server: true do
|
414
439
|
request_received = false
|
415
440
|
request_received_mu = Mutex.new
|
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.63.0
|
5
5
|
platform: x86_64-linux
|
6
6
|
authors:
|
7
7
|
- gRPC Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: src/ruby/bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -353,7 +353,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
353
353
|
- !ruby/object:Gem::Version
|
354
354
|
version: '0'
|
355
355
|
requirements: []
|
356
|
-
rubygems_version: 3.5.
|
356
|
+
rubygems_version: 3.5.9
|
357
357
|
signing_key:
|
358
358
|
specification_version: 4
|
359
359
|
summary: GRPC system in Ruby
|