grpc 1.62.3-arm64-darwin → 1.63.0-arm64-darwin

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: 2c59085e6d07a7708750f151d6e2c139a2f76046b09046cdc8934fe23873df9c
4
- data.tar.gz: 7592f47c674210283cd2ec9c61aa91c9e33af7bbc7089c4401c76bf720d0ff21
3
+ metadata.gz: 0bfee5d02075534b9c0c29d2db4085fd4dc6443b25069d2962ad7df5be8f32a3
4
+ data.tar.gz: 7e94cddcde4a685d66e4f71a973a833e2ad71baf96a614092365d12faaaf001d
5
5
  SHA512:
6
- metadata.gz: e29d6dfe018e91cfc7abf8275d9d0f9e214b08ce7b80041f216ec6a29d80ba90cfffc29b8eafcc5d0ed8c1468a6c01456d1f324e2e449f4faffda3ed91bed93f
7
- data.tar.gz: fa943083430c4357d894ed53eb44cf4724bb990843e5424d226537c69a64774d894206f2c6a6296ba771a97683a48b0a1a7e9166a4b271d455f39aa0a8c112c5
6
+ metadata.gz: c8d463e533acfef64679497c825b92bd6cd4992fb59dc1481a0908b3227704fd42539cea77b30eb68ee7ae5f9526f83b3272b0fecda77dcc3a3d25f48094e919
7
+ data.tar.gz: 85b661ca1fd4b2f8749dda162e70747e8bbf5bd8f509f5c8583c24e0add2ddad84bd63741cbbc9e3d69a8b11278080db3553b09e7a796968c9469563b3c748a4
@@ -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.3'
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.3
4
+ version: 1.63.0
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2024-08-02 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.17
356
+ rubygems_version: 3.5.9
357
357
  signing_key:
358
358
  specification_version: 4
359
359
  summary: GRPC system in Ruby