grpc 1.20.0.pre1 → 1.20.0
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/Makefile +2 -2
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +0 -4
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +19 -7
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +0 -1
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +4 -13
- data/src/core/lib/transport/transport.cc +9 -7
- data/src/core/lib/transport/transport.h +13 -13
- data/src/ruby/lib/grpc/version.rb +1 -1
- metadata +24 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63b1384fd0d9000c7824719ce8c26de9a34411ea0e83f84a788d6934987328b0
|
4
|
+
data.tar.gz: 42960ee54e14592a653bbf07d638b456927695e04a8d76f99afd26c2c88f35dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4265b5f33870c79271750b0e346beaef6400271ff4d95aacead82405b8007c35070267ad5ed55e02183e54c4c9bc866917f760752b0782d9d1f545c53e6548b6
|
7
|
+
data.tar.gz: 83598cdcd097ded46d048b3b352ede8e5304e9f4209512f463d0914ec3b2fac3cf98bca4484da243d72b77f3448d69bd3b3d6467fb684a28e5a96d9fe8bb1bb8
|
data/Makefile
CHANGED
@@ -460,8 +460,8 @@ Q = @
|
|
460
460
|
endif
|
461
461
|
|
462
462
|
CORE_VERSION = 7.0.0
|
463
|
-
CPP_VERSION = 1.20.0
|
464
|
-
CSHARP_VERSION = 1.20.0
|
463
|
+
CPP_VERSION = 1.20.0
|
464
|
+
CSHARP_VERSION = 1.20.0
|
465
465
|
|
466
466
|
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
|
467
467
|
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
|
@@ -349,7 +349,6 @@ void HealthCheckClient::CallState::StartCall() {
|
|
349
349
|
return;
|
350
350
|
}
|
351
351
|
// Initialize payload and batch.
|
352
|
-
memset(&batch_, 0, sizeof(batch_));
|
353
352
|
payload_.context = context_;
|
354
353
|
batch_.payload = &payload_;
|
355
354
|
// on_complete callback takes ref, handled manually.
|
@@ -401,8 +400,6 @@ void HealthCheckClient::CallState::StartCall() {
|
|
401
400
|
// Start batch.
|
402
401
|
StartBatch(&batch_);
|
403
402
|
// Initialize recv_trailing_metadata batch.
|
404
|
-
memset(&recv_trailing_metadata_batch_, 0,
|
405
|
-
sizeof(recv_trailing_metadata_batch_));
|
406
403
|
recv_trailing_metadata_batch_.payload = &payload_;
|
407
404
|
// Add recv_trailing_metadata op.
|
408
405
|
grpc_metadata_batch_init(&recv_trailing_metadata_);
|
@@ -507,7 +504,6 @@ void HealthCheckClient::CallState::DoneReadingRecvMessage(grpc_error* error) {
|
|
507
504
|
// This re-uses the ref we're holding.
|
508
505
|
// Note: Can't just reuse batch_ here, since we don't know that all
|
509
506
|
// callbacks from the original batch have completed yet.
|
510
|
-
memset(&recv_message_batch_, 0, sizeof(recv_message_batch_));
|
511
507
|
recv_message_batch_.payload = &payload_;
|
512
508
|
payload_.recv_message.recv_message = &recv_message_;
|
513
509
|
payload_.recv_message.recv_message_ready = GRPC_CLOSURE_INIT(
|
@@ -188,8 +188,14 @@ void PickFirst::ShutdownLocked() {
|
|
188
188
|
void PickFirst::ExitIdleLocked() {
|
189
189
|
if (idle_) {
|
190
190
|
idle_ = false;
|
191
|
-
if (subchannel_list_
|
192
|
-
subchannel_list_->num_subchannels()
|
191
|
+
if (subchannel_list_ == nullptr ||
|
192
|
+
subchannel_list_->num_subchannels() == 0) {
|
193
|
+
grpc_error* error =
|
194
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("No addresses to connect to");
|
195
|
+
channel_control_helper()->UpdateState(
|
196
|
+
GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_ERROR_REF(error),
|
197
|
+
UniquePtr<SubchannelPicker>(New<TransientFailurePicker>(error)));
|
198
|
+
} else {
|
193
199
|
subchannel_list_->subchannel(0)
|
194
200
|
->CheckConnectivityStateAndStartWatchingLocked();
|
195
201
|
}
|
@@ -253,13 +259,19 @@ void PickFirst::UpdateLocked(UpdateArgs args) {
|
|
253
259
|
grpc_channel_args_destroy(new_args);
|
254
260
|
if (subchannel_list->num_subchannels() == 0) {
|
255
261
|
// Empty update or no valid subchannels. Unsubscribe from all current
|
256
|
-
// subchannels
|
262
|
+
// subchannels.
|
257
263
|
subchannel_list_ = std::move(subchannel_list); // Empty list.
|
258
264
|
selected_ = nullptr;
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
265
|
+
// If not idle, put the channel in TRANSIENT_FAILURE.
|
266
|
+
// (If we are idle, then this will happen in ExitIdleLocked() if we
|
267
|
+
// haven't gotten a non-empty update by the time the application tries
|
268
|
+
// to start a new call.)
|
269
|
+
if (!idle_) {
|
270
|
+
grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Empty update");
|
271
|
+
channel_control_helper()->UpdateState(
|
272
|
+
GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_ERROR_REF(error),
|
273
|
+
UniquePtr<SubchannelPicker>(New<TransientFailurePicker>(error)));
|
274
|
+
}
|
263
275
|
return;
|
264
276
|
}
|
265
277
|
// If one of the subchannels in the new list is already in state
|
@@ -172,7 +172,6 @@ static int is_metadata_server_reachable() {
|
|
172
172
|
detector.pollent = grpc_polling_entity_create_from_pollset(pollset);
|
173
173
|
detector.is_done = 0;
|
174
174
|
detector.success = 0;
|
175
|
-
memset(&detector.response, 0, sizeof(detector.response));
|
176
175
|
memset(&request, 0, sizeof(grpc_httpcli_request));
|
177
176
|
request.host = (char*)GRPC_COMPUTE_ENGINE_DETECTION_HOST;
|
178
177
|
request.http.path = (char*)"/";
|
@@ -44,24 +44,15 @@ namespace {
|
|
44
44
|
grpc_error* ssl_check_peer(
|
45
45
|
const char* peer_name, const tsi_peer* peer,
|
46
46
|
grpc_core::RefCountedPtr<grpc_auth_context>* auth_context) {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
tsi_peer_get_property_by_name(peer, TSI_SSL_ALPN_SELECTED_PROTOCOL);
|
51
|
-
if (p == nullptr) {
|
52
|
-
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
53
|
-
"Cannot check peer: missing selected ALPN property.");
|
54
|
-
}
|
55
|
-
if (!grpc_chttp2_is_alpn_version_supported(p->value.data, p->value.length)) {
|
56
|
-
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
57
|
-
"Cannot check peer: invalid ALPN value.");
|
47
|
+
grpc_error* error = grpc_ssl_check_alpn(peer);
|
48
|
+
if (error != GRPC_ERROR_NONE) {
|
49
|
+
return error;
|
58
50
|
}
|
59
|
-
#endif /* TSI_OPENSSL_ALPN_SUPPORT */
|
60
51
|
/* Check the peer name if specified. */
|
61
52
|
if (peer_name != nullptr && !grpc_ssl_host_matches_name(peer, peer_name)) {
|
62
53
|
char* msg;
|
63
54
|
gpr_asprintf(&msg, "Peer name %s is not in peer certificate", peer_name);
|
64
|
-
|
55
|
+
error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
|
65
56
|
gpr_free(msg);
|
66
57
|
return error;
|
67
58
|
}
|
@@ -29,6 +29,7 @@
|
|
29
29
|
|
30
30
|
#include "src/core/lib/gpr/alloc.h"
|
31
31
|
#include "src/core/lib/gpr/string.h"
|
32
|
+
#include "src/core/lib/gprpp/memory.h"
|
32
33
|
#include "src/core/lib/iomgr/executor.h"
|
33
34
|
#include "src/core/lib/iomgr/iomgr.h"
|
34
35
|
#include "src/core/lib/slice/slice_internal.h"
|
@@ -243,25 +244,26 @@ void grpc_transport_stream_op_batch_finish_with_failure(
|
|
243
244
|
GRPC_ERROR_UNREF(error);
|
244
245
|
}
|
245
246
|
|
246
|
-
|
247
|
+
struct made_transport_op {
|
247
248
|
grpc_closure outer_on_complete;
|
248
|
-
grpc_closure* inner_on_complete;
|
249
|
+
grpc_closure* inner_on_complete = nullptr;
|
249
250
|
grpc_transport_op op;
|
250
|
-
|
251
|
+
made_transport_op() {
|
252
|
+
memset(&outer_on_complete, 0, sizeof(outer_on_complete));
|
253
|
+
}
|
254
|
+
};
|
251
255
|
|
252
256
|
static void destroy_made_transport_op(void* arg, grpc_error* error) {
|
253
257
|
made_transport_op* op = static_cast<made_transport_op*>(arg);
|
254
258
|
GRPC_CLOSURE_SCHED(op->inner_on_complete, GRPC_ERROR_REF(error));
|
255
|
-
|
259
|
+
grpc_core::Delete<made_transport_op>(op);
|
256
260
|
}
|
257
261
|
|
258
262
|
grpc_transport_op* grpc_make_transport_op(grpc_closure* on_complete) {
|
259
|
-
made_transport_op* op =
|
260
|
-
static_cast<made_transport_op*>(gpr_malloc(sizeof(*op)));
|
263
|
+
made_transport_op* op = grpc_core::New<made_transport_op>();
|
261
264
|
GRPC_CLOSURE_INIT(&op->outer_on_complete, destroy_made_transport_op, op,
|
262
265
|
grpc_schedule_on_exec_ctx);
|
263
266
|
op->inner_on_complete = on_complete;
|
264
|
-
memset(&op->op, 0, sizeof(op->op));
|
265
267
|
op->op.on_consumed = &op->outer_on_complete;
|
266
268
|
return &op->op;
|
267
269
|
}
|
@@ -273,40 +273,40 @@ struct grpc_transport_stream_op_batch_payload {
|
|
273
273
|
/** Transport op: a set of operations to perform on a transport as a whole */
|
274
274
|
typedef struct grpc_transport_op {
|
275
275
|
/** Called when processing of this op is done. */
|
276
|
-
grpc_closure* on_consumed;
|
276
|
+
grpc_closure* on_consumed = nullptr;
|
277
277
|
/** connectivity monitoring - set connectivity_state to NULL to unsubscribe */
|
278
|
-
grpc_closure* on_connectivity_state_change;
|
279
|
-
grpc_connectivity_state* connectivity_state;
|
278
|
+
grpc_closure* on_connectivity_state_change = nullptr;
|
279
|
+
grpc_connectivity_state* connectivity_state = nullptr;
|
280
280
|
/** should the transport be disconnected
|
281
281
|
* Error contract: the transport that gets this op must cause
|
282
282
|
* disconnect_with_error to be unref'ed after processing it */
|
283
|
-
grpc_error* disconnect_with_error;
|
283
|
+
grpc_error* disconnect_with_error = nullptr;
|
284
284
|
/** what should the goaway contain?
|
285
285
|
* Error contract: the transport that gets this op must cause
|
286
286
|
* goaway_error to be unref'ed after processing it */
|
287
|
-
grpc_error* goaway_error;
|
287
|
+
grpc_error* goaway_error = nullptr;
|
288
288
|
/** set the callback for accepting new streams;
|
289
289
|
this is a permanent callback, unlike the other one-shot closures.
|
290
290
|
If true, the callback is set to set_accept_stream_fn, with its
|
291
291
|
user_data argument set to set_accept_stream_user_data */
|
292
|
-
bool set_accept_stream;
|
292
|
+
bool set_accept_stream = false;
|
293
293
|
void (*set_accept_stream_fn)(void* user_data, grpc_transport* transport,
|
294
|
-
const void* server_data);
|
295
|
-
void* set_accept_stream_user_data;
|
294
|
+
const void* server_data) = nullptr;
|
295
|
+
void* set_accept_stream_user_data = nullptr;
|
296
296
|
/** add this transport to a pollset */
|
297
|
-
grpc_pollset* bind_pollset;
|
297
|
+
grpc_pollset* bind_pollset = nullptr;
|
298
298
|
/** add this transport to a pollset_set */
|
299
|
-
grpc_pollset_set* bind_pollset_set;
|
299
|
+
grpc_pollset_set* bind_pollset_set = nullptr;
|
300
300
|
/** send a ping, if either on_initiate or on_ack is not NULL */
|
301
301
|
struct {
|
302
302
|
/** Ping may be delayed by the transport, on_initiate callback will be
|
303
303
|
called when the ping is actually being sent. */
|
304
|
-
grpc_closure* on_initiate;
|
304
|
+
grpc_closure* on_initiate = nullptr;
|
305
305
|
/** Called when the ping ack is received */
|
306
|
-
grpc_closure* on_ack;
|
306
|
+
grpc_closure* on_ack = nullptr;
|
307
307
|
} send_ping;
|
308
308
|
// If true, will reset the channel's connection backoff.
|
309
|
-
bool reset_connect_backoff;
|
309
|
+
bool reset_connect_backoff = false;
|
310
310
|
|
311
311
|
/***************************************************************************
|
312
312
|
* remaining fields are initialized and used at the discretion of the
|
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.20.0
|
4
|
+
version: 1.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gRPC Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: src/ruby/bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -1591,9 +1591,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1591
1591
|
version: 2.0.0
|
1592
1592
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1593
1593
|
requirements:
|
1594
|
-
- - "
|
1594
|
+
- - ">="
|
1595
1595
|
- !ruby/object:Gem::Version
|
1596
|
-
version:
|
1596
|
+
version: '0'
|
1597
1597
|
requirements: []
|
1598
1598
|
rubygems_version: 3.0.3
|
1599
1599
|
signing_key:
|
@@ -1602,36 +1602,36 @@ summary: GRPC system in Ruby
|
|
1602
1602
|
test_files:
|
1603
1603
|
- src/ruby/spec/google_rpc_status_utils_spec.rb
|
1604
1604
|
- src/ruby/spec/server_spec.rb
|
1605
|
-
- src/ruby/spec/server_credentials_spec.rb
|
1606
|
-
- src/ruby/spec/channel_spec.rb
|
1607
|
-
- src/ruby/spec/channel_credentials_spec.rb
|
1608
|
-
- src/ruby/spec/client_auth_spec.rb
|
1609
|
-
- src/ruby/spec/error_sanity_spec.rb
|
1610
1605
|
- src/ruby/spec/spec_helper.rb
|
1606
|
+
- src/ruby/spec/call_spec.rb
|
1611
1607
|
- src/ruby/spec/testdata/client.pem
|
1608
|
+
- src/ruby/spec/testdata/ca.pem
|
1609
|
+
- src/ruby/spec/testdata/server1.pem
|
1610
|
+
- src/ruby/spec/testdata/server1.key
|
1612
1611
|
- src/ruby/spec/testdata/README
|
1613
1612
|
- src/ruby/spec/testdata/client.key
|
1614
|
-
- src/ruby/spec/
|
1615
|
-
- src/ruby/spec/
|
1616
|
-
- src/ruby/spec/testdata/ca.pem
|
1617
|
-
- src/ruby/spec/support/services.rb
|
1613
|
+
- src/ruby/spec/server_credentials_spec.rb
|
1614
|
+
- src/ruby/spec/channel_spec.rb
|
1618
1615
|
- src/ruby/spec/support/helpers.rb
|
1616
|
+
- src/ruby/spec/support/services.rb
|
1619
1617
|
- src/ruby/spec/compression_options_spec.rb
|
1618
|
+
- src/ruby/spec/client_server_spec.rb
|
1619
|
+
- src/ruby/spec/pb/health/checker_spec.rb
|
1620
|
+
- src/ruby/spec/pb/duplicate/codegen_spec.rb
|
1621
|
+
- src/ruby/spec/pb/codegen/package_option_spec.rb
|
1622
|
+
- src/ruby/spec/pb/codegen/grpc/testing/package_options.proto
|
1623
|
+
- src/ruby/spec/error_sanity_spec.rb
|
1624
|
+
- src/ruby/spec/channel_credentials_spec.rb
|
1625
|
+
- src/ruby/spec/client_auth_spec.rb
|
1626
|
+
- src/ruby/spec/generic/rpc_desc_spec.rb
|
1620
1627
|
- src/ruby/spec/generic/rpc_server_spec.rb
|
1621
|
-
- src/ruby/spec/generic/rpc_server_pool_spec.rb
|
1622
|
-
- src/ruby/spec/generic/server_interceptors_spec.rb
|
1623
|
-
- src/ruby/spec/generic/interceptor_registry_spec.rb
|
1624
1628
|
- src/ruby/spec/generic/client_stub_spec.rb
|
1625
1629
|
- src/ruby/spec/generic/client_interceptors_spec.rb
|
1626
|
-
- src/ruby/spec/generic/
|
1630
|
+
- src/ruby/spec/generic/rpc_server_pool_spec.rb
|
1627
1631
|
- src/ruby/spec/generic/service_spec.rb
|
1632
|
+
- src/ruby/spec/generic/server_interceptors_spec.rb
|
1633
|
+
- src/ruby/spec/generic/interceptor_registry_spec.rb
|
1628
1634
|
- src/ruby/spec/generic/active_call_spec.rb
|
1629
|
-
- src/ruby/spec/client_server_spec.rb
|
1630
|
-
- src/ruby/spec/channel_connection_spec.rb
|
1631
|
-
- src/ruby/spec/call_spec.rb
|
1632
|
-
- src/ruby/spec/pb/duplicate/codegen_spec.rb
|
1633
|
-
- src/ruby/spec/pb/codegen/package_option_spec.rb
|
1634
|
-
- src/ruby/spec/pb/codegen/grpc/testing/package_options.proto
|
1635
|
-
- src/ruby/spec/pb/health/checker_spec.rb
|
1636
1635
|
- src/ruby/spec/time_consts_spec.rb
|
1636
|
+
- src/ruby/spec/channel_connection_spec.rb
|
1637
1637
|
- src/ruby/spec/call_credentials_spec.rb
|