grpc 1.62.0-x86-linux → 1.63.0-x86-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2acbe1523cf3e6bd330134b4989dd66b3927ee5f2889a90f158f927bc150a613
4
- data.tar.gz: 8c35f87791f87b9ef7eb7cd471c27d4fead01eb7a795de215719dadea1b2b432
3
+ metadata.gz: 7212c9b768f35bfdfa374e234e55a780017fe20b7fc958e1f39d135a2020435a
4
+ data.tar.gz: b567e51647677338abebef457ba4976fb33d5bbc22eedbc4c10ee1e635b4347b
5
5
  SHA512:
6
- metadata.gz: b811dd479d258003bf424b9cc2b50e32068da396dd0b594e887e27ad2080edc15bec6464a7e81cdd334a9065cf6365ac3b9cfc2d56e9f0437c04e62321d2921c
7
- data.tar.gz: 3ccc244f956b212f65b26ba93e65c44b8c83699d2ca0321c40774c3b0ba96a25cf3ecd25025449d709734b7db5b2671a58ab328b2ff71d7d88b49085adffa49e
6
+ metadata.gz: 18ea54f9519199bf1bdfc29c5b5434c4be9f318caa964c0470c4b73b16c14602dc5b35a63b2a08d38b6ee4661ed1bd28ba6f9e22021d2d57fa948f431d6d1e38
7
+ data.tar.gz: d52a2e07d259be3bb5782f74fea59345d712f32c79106c2545a5cc17916538225110ae2ade2a732b9be83f1bfa7cf43e93c9fcfe4874da20ac601b5228d2943f
@@ -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++'
@@ -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)
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.62.0'
17
+ VERSION = '1.63.0'
18
18
  end
@@ -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.62.0
4
+ version: 1.63.0
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: 2024-02-20 00:00:00.000000000 Z
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.6
356
+ rubygems_version: 3.5.9
357
357
  signing_key:
358
358
  specification_version: 4
359
359
  summary: GRPC system in Ruby