grpc 1.52.0 → 1.52.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9261d80895011c14c1c5fc9bf89a1b38f1fee8717cdd253cb35ff84855c20e59
4
- data.tar.gz: 1e32ea1b2588172249ffdeb096b1162fcb5bdfcc0c8620304b122c0bfd85b919
3
+ metadata.gz: ede82d2332827ff2e0a2caa359b802c02b62ae52af6cb1462d0db7a9b38d3e26
4
+ data.tar.gz: 7ddaaa8cf0ff96ba0497baf0d1150ce7959291389321fb63beb95f7bdcd40401
5
5
  SHA512:
6
- metadata.gz: 35b96956be20a1c0afb8207771c3451d0d26e69af74850d5aa0c3311967d4ba0c2aeb87c3453b2080003ad8dad1146f728126cce6a651a49559763f22cede4a5
7
- data.tar.gz: 6c65e9cf34cd2ba89b53fae1845a72ad6f2a9864dabcf9c270685b739944dcd70cbd5d8e91bb7fa2aa2b36e632420e6ebf4fb2c6f4e1b01bd3aea73e70b64730
6
+ metadata.gz: cc52c2d667ffa02472589ea9d9e8aaddb04223febe9768f26f118c2475a218a2380dea6c9c47424194f485fa9b44422e21c4f8438b6deb129264c4bd1068baff
7
+ data.tar.gz: 982295322329e66a2719ed12465db552efb5139cb6c6388cde88b24d4a59324a9a30455917eaf43c162a2138526b4a0563476bb7e34e9727ea16a39d96a25285
data/Makefile CHANGED
@@ -411,8 +411,8 @@ Q = @
411
411
  endif
412
412
 
413
413
  CORE_VERSION = 30.0.0
414
- CPP_VERSION = 1.52.0
415
- CSHARP_VERSION = 2.52.0
414
+ CPP_VERSION = 1.52.2
415
+ CSHARP_VERSION = 2.52.2
416
416
 
417
417
  CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
418
418
  CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -641,8 +641,8 @@ void WeightedTargetLb::WeightedChild::OnConnectivityStateUpdateLocked(
641
641
  state == GRPC_CHANNEL_READY) {
642
642
  connectivity_state_ = state;
643
643
  }
644
- // Notify the LB policy.
645
- weighted_target_policy_->UpdateStateLocked();
644
+ // Update the LB policy's state if this child is not deactivated.
645
+ if (weight_ != 0) weighted_target_policy_->UpdateStateLocked();
646
646
  }
647
647
 
648
648
  void WeightedTargetLb::WeightedChild::DeactivateLocked() {
@@ -1198,7 +1198,7 @@ class HPackParser::Parser {
1198
1198
 
1199
1199
  template <typename Key, typename Value>
1200
1200
  void Encode(Key, const Value& value) {
1201
- AddToSummary(Key::key(), Key::Encode(value).size());
1201
+ AddToSummary(Key::key(), EncodedSizeOfKey(Key(), value));
1202
1202
  }
1203
1203
 
1204
1204
  private:
@@ -538,8 +538,12 @@ const char* BaseCallData::ReceiveMessage::StateString(State state) {
538
538
  return "CANCELLED";
539
539
  case State::kCancelledWhilstForwarding:
540
540
  return "CANCELLED_WHILST_FORWARDING";
541
+ case State::kCancelledWhilstForwardingNoPipe:
542
+ return "CANCELLED_WHILST_FORWARDING_NO_PIPE";
541
543
  case State::kBatchCompletedButCancelled:
542
544
  return "BATCH_COMPLETED_BUT_CANCELLED";
545
+ case State::kBatchCompletedButCancelledNoPipe:
546
+ return "BATCH_COMPLETED_BUT_CANCELLED_NO_PIPE";
543
547
  case State::kCancelledWhilstIdle:
544
548
  return "CANCELLED_WHILST_IDLE";
545
549
  case State::kCompletedWhilePulledFromPipe:
@@ -563,7 +567,9 @@ void BaseCallData::ReceiveMessage::StartOp(CapturedBatch& batch) {
563
567
  state_ = State::kForwardedBatch;
564
568
  break;
565
569
  case State::kCancelledWhilstForwarding:
570
+ case State::kCancelledWhilstForwardingNoPipe:
566
571
  case State::kBatchCompletedButCancelled:
572
+ case State::kBatchCompletedButCancelledNoPipe:
567
573
  case State::kForwardedBatch:
568
574
  case State::kForwardedBatchNoPipe:
569
575
  case State::kBatchCompleted:
@@ -611,8 +617,10 @@ void BaseCallData::ReceiveMessage::GotPipe(PipeSender<MessageHandle>* sender) {
611
617
  case State::kCompletedWhilePulledFromPipe:
612
618
  case State::kCompletedWhilePushedToPipe:
613
619
  case State::kCancelledWhilstForwarding:
620
+ case State::kCancelledWhilstForwardingNoPipe:
614
621
  case State::kCancelledWhilstIdle:
615
622
  case State::kBatchCompletedButCancelled:
623
+ case State::kBatchCompletedButCancelledNoPipe:
616
624
  Crash(absl::StrFormat("ILLEGAL STATE: %s", StateString(state_)));
617
625
  case State::kCancelled:
618
626
  return;
@@ -635,6 +643,7 @@ void BaseCallData::ReceiveMessage::OnComplete(absl::Status status) {
635
643
  case State::kBatchCompletedNoPipe:
636
644
  case State::kCancelled:
637
645
  case State::kBatchCompletedButCancelled:
646
+ case State::kBatchCompletedButCancelledNoPipe:
638
647
  case State::kCancelledWhilstIdle:
639
648
  case State::kCompletedWhilePulledFromPipe:
640
649
  case State::kCompletedWhilePushedToPipe:
@@ -648,6 +657,9 @@ void BaseCallData::ReceiveMessage::OnComplete(absl::Status status) {
648
657
  case State::kCancelledWhilstForwarding:
649
658
  state_ = State::kBatchCompletedButCancelled;
650
659
  break;
660
+ case State::kCancelledWhilstForwardingNoPipe:
661
+ state_ = State::kBatchCompletedButCancelledNoPipe;
662
+ break;
651
663
  }
652
664
  completed_status_ = status;
653
665
  Flusher flusher(base_);
@@ -670,9 +682,11 @@ void BaseCallData::ReceiveMessage::Done(const ServerMetadata& metadata,
670
682
  state_ = State::kCancelledWhilstIdle;
671
683
  break;
672
684
  case State::kForwardedBatch:
673
- case State::kForwardedBatchNoPipe:
674
685
  state_ = State::kCancelledWhilstForwarding;
675
686
  break;
687
+ case State::kForwardedBatchNoPipe:
688
+ state_ = State::kCancelledWhilstForwardingNoPipe;
689
+ break;
676
690
  case State::kCompletedWhilePulledFromPipe:
677
691
  case State::kCompletedWhilePushedToPipe:
678
692
  case State::kPulledFromPipe:
@@ -697,9 +711,11 @@ void BaseCallData::ReceiveMessage::Done(const ServerMetadata& metadata,
697
711
  case State::kBatchCompleted:
698
712
  case State::kBatchCompletedNoPipe:
699
713
  case State::kBatchCompletedButCancelled:
714
+ case State::kBatchCompletedButCancelledNoPipe:
700
715
  Crash(absl::StrFormat("ILLEGAL STATE: %s", StateString(state_)));
701
716
  case State::kCancelledWhilstIdle:
702
717
  case State::kCancelledWhilstForwarding:
718
+ case State::kCancelledWhilstForwardingNoPipe:
703
719
  case State::kCancelled:
704
720
  break;
705
721
  }
@@ -719,6 +735,7 @@ void BaseCallData::ReceiveMessage::WakeInsideCombiner(Flusher* flusher) {
719
735
  case State::kForwardedBatch:
720
736
  case State::kCancelled:
721
737
  case State::kCancelledWhilstForwarding:
738
+ case State::kCancelledWhilstForwardingNoPipe:
722
739
  case State::kBatchCompletedNoPipe:
723
740
  break;
724
741
  case State::kCancelledWhilstIdle:
@@ -731,6 +748,11 @@ void BaseCallData::ReceiveMessage::WakeInsideCombiner(Flusher* flusher) {
731
748
  flusher->AddClosure(std::exchange(intercepted_on_complete_, nullptr),
732
749
  completed_status_, "recv_message");
733
750
  break;
751
+ case State::kBatchCompletedButCancelledNoPipe:
752
+ state_ = State::kCancelled;
753
+ flusher->AddClosure(std::exchange(intercepted_on_complete_, nullptr),
754
+ completed_status_, "recv_message");
755
+ break;
734
756
  case State::kBatchCompleted:
735
757
  if (completed_status_.ok() && intercepted_slice_buffer_->has_value()) {
736
758
  state_ = State::kPushedToPipe;
@@ -403,12 +403,17 @@ class BaseCallData : public Activity, private Wakeable {
403
403
  // stack: we need to keep track of that until we get the completion so
404
404
  // that we do the right thing in OnComplete.
405
405
  kCancelledWhilstForwarding,
406
+ // The same, but before we got the pipe
407
+ kCancelledWhilstForwardingNoPipe,
406
408
  // Call got terminated whilst we had a recv_message batch completed, and
407
409
  // we've now received the completion.
408
410
  // On the next poll we'll close things out and forward on completions,
409
411
  // then transition to cancelled.
410
412
  kBatchCompletedButCancelled,
411
- // Completed successfully while we're processing a recv message.
413
+ // The same, but before we got the pipe
414
+ kBatchCompletedButCancelledNoPipe,
415
+ // Completed successfully while we're processing a recv message - see
416
+ // kPushedToPipe.
412
417
  kCompletedWhilePushedToPipe,
413
418
  kCompletedWhilePulledFromPipe,
414
419
  };
@@ -168,6 +168,17 @@ StaticSlice HttpSchemeMetadata::Encode(ValueType x) {
168
168
  }
169
169
  }
170
170
 
171
+ size_t EncodedSizeOfKey(HttpSchemeMetadata, HttpSchemeMetadata::ValueType x) {
172
+ switch (x) {
173
+ case HttpSchemeMetadata::kHttp:
174
+ return 4;
175
+ case HttpSchemeMetadata::kHttps:
176
+ return 5;
177
+ default:
178
+ return 0;
179
+ }
180
+ }
181
+
171
182
  const char* HttpSchemeMetadata::DisplayValue(MementoType content_type) {
172
183
  switch (content_type) {
173
184
  case kHttp:
@@ -49,6 +49,16 @@
49
49
 
50
50
  namespace grpc_core {
51
51
 
52
+ // Given a metadata key and a value, return the encoded size.
53
+ // Defaults to calling the key's Encode() method and then calculating the size
54
+ // of that, but can be overridden for specific keys if there's a better way of
55
+ // doing this.
56
+ // May return 0 if the size is unknown/unknowable.
57
+ template <typename Key>
58
+ size_t EncodedSizeOfKey(Key, const typename Key::ValueType& value) {
59
+ return Key::Encode(value).size();
60
+ }
61
+
52
62
  // grpc-timeout metadata trait.
53
63
  // ValueType is defined as Timestamp - an absolute timestamp (i.e. a
54
64
  // deadline!), that is converted to a duration by transports before being
@@ -88,6 +98,10 @@ struct TeMetadata {
88
98
  static const char* DisplayValue(MementoType te);
89
99
  };
90
100
 
101
+ inline size_t EncodedSizeOfKey(TeMetadata, TeMetadata::ValueType x) {
102
+ return x == TeMetadata::kTrailers ? 8 : 0;
103
+ }
104
+
91
105
  // content-type metadata trait.
92
106
  struct ContentTypeMetadata {
93
107
  static constexpr bool kRepeatable = false;
@@ -132,6 +146,8 @@ struct HttpSchemeMetadata {
132
146
  static const char* DisplayValue(MementoType content_type);
133
147
  };
134
148
 
149
+ size_t EncodedSizeOfKey(HttpSchemeMetadata, HttpSchemeMetadata::ValueType x);
150
+
135
151
  // method metadata trait.
136
152
  struct HttpMethodMetadata {
137
153
  static constexpr bool kRepeatable = false;
@@ -339,6 +355,11 @@ struct GrpcLbClientStatsMetadata {
339
355
  }
340
356
  };
341
357
 
358
+ inline size_t EncodedSizeOfKey(GrpcLbClientStatsMetadata,
359
+ GrpcLbClientStatsMetadata::ValueType) {
360
+ return 0;
361
+ }
362
+
342
363
  // lb-token metadata
343
364
  struct LbTokenMetadata : public SimpleSliceBasedMetadata {
344
365
  static constexpr bool kRepeatable = false;
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.52.0'
17
+ VERSION = '1.52.2'
18
18
  end
@@ -129,7 +129,7 @@ int GENERAL_NAME_cmp(const GENERAL_NAME *a, const GENERAL_NAME *b)
129
129
 
130
130
  switch (a->type) {
131
131
  case GEN_X400:
132
- return ASN1_TYPE_cmp(a->d.x400Address, b->d.x400Address);
132
+ return ASN1_STRING_cmp(a->d.x400Address, b->d.x400Address);
133
133
 
134
134
  case GEN_EDIPARTY:
135
135
  return edipartyname_cmp(a->d.ediPartyName, b->d.ediPartyName);
@@ -187,7 +187,7 @@ typedef struct GENERAL_NAME_st {
187
187
  OTHERNAME *otherName; // otherName
188
188
  ASN1_IA5STRING *rfc822Name;
189
189
  ASN1_IA5STRING *dNSName;
190
- ASN1_TYPE *x400Address;
190
+ ASN1_STRING *x400Address;
191
191
  X509_NAME *directoryName;
192
192
  EDIPARTYNAME *ediPartyName;
193
193
  ASN1_IA5STRING *uniformResourceIdentifier;
@@ -199,7 +199,6 @@ typedef struct GENERAL_NAME_st {
199
199
  X509_NAME *dirn; // dirn
200
200
  ASN1_IA5STRING *ia5; // rfc822Name, dNSName, uniformResourceIdentifier
201
201
  ASN1_OBJECT *rid; // registeredID
202
- ASN1_TYPE *other; // x400Address
203
202
  } d;
204
203
  } GENERAL_NAME;
205
204
 
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.52.0
4
+ version: 1.52.2
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: 2023-02-03 00:00:00.000000000 Z
11
+ date: 2023-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -2993,7 +2993,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2993
2993
  - !ruby/object:Gem::Version
2994
2994
  version: '0'
2995
2995
  requirements: []
2996
- rubygems_version: 3.4.6
2996
+ rubygems_version: 3.4.13
2997
2997
  signing_key:
2998
2998
  specification_version: 4
2999
2999
  summary: GRPC system in Ruby