grpc 1.62.0-x64-mingw32 → 1.63.2-x64-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a91e3e0932caaad44ec70553951d9455edeac1e0c7699df0c434b579f8f5e6c3
4
- data.tar.gz: 143f6d25392d8bef6902a40119aa100fd6c9a413f27d47188bff133af994b7d1
3
+ metadata.gz: fc5929b8058fb6038188b507bb03eb6f6346ad1985638d1a9cd5634f62966bcb
4
+ data.tar.gz: 390277dc1e19f3f4294a1add0dd8364ed98d76e005e50d0fec99093383d327a5
5
5
  SHA512:
6
- metadata.gz: 6d2505cc9485a98a55294d312bad301ac4040a1a4f73995f06ca3d0a4e3671f4f9027ab0acae3708ffc609c4e46c5c05b69b12bd450ef417e38c0812c295d0dd
7
- data.tar.gz: 9b50e8b1ad640fa0c1b4441bd297c93e8d1b505299447887a2ecaa04a64c0842ec85869926aeb2e632a7d2cfaf0d5831cc1e4b8153057b71dce72ee06363cb7a
6
+ metadata.gz: af6974629b001df7432dbb121872a3ad708d0cdd6f9dc4d0bb8fbe8ad66781faf45026d6fd83b615771f099a57784523a4474395e24c1327340a5023e27da1e0
7
+ data.tar.gz: ff615e8bcf39853cd198e1e4078ed402cef512141c69ad2b498b0f37955b6800a451876960d3b839a9eadde382ace0ed078f8f0fbd59211f609fe2af4b7c67ae
Binary file
@@ -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
@@ -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.2'
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.2
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: 2024-02-20 00:00:00.000000000 Z
11
+ date: 2024-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -350,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
350
350
  - !ruby/object:Gem::Version
351
351
  version: '0'
352
352
  requirements: []
353
- rubygems_version: 3.5.6
353
+ rubygems_version: 3.5.17
354
354
  signing_key:
355
355
  specification_version: 4
356
356
  summary: GRPC system in Ruby