[Protobuf] Upgrade third_party/protobuf to 23.4 (#33695)

This was done manually due to a problem with
`tools/distrib/python/make_grpcio_tools.py`. ~I fixed it in this PR
(depends on cl/547979185), so there is a fair chance this upgrade will
work normally for the next release.~ The fix may be problematic for
upgrading protobuf on older release branches, so the improvement will be
worked on separately. CC @jtattermusch

This also updates the UPB dep to the latest commit on the 23.x branch.
create-pull-request/patch-c81bdf7
AJ Heller 1 year ago committed by GitHub
parent 5c92de01dc
commit c81bdf7a83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      bazel/grpc_deps.bzl
  2. 2
      build_handwritten.yaml
  3. 2
      src/csharp/build/dependencies.props
  4. 2
      src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec
  5. 2
      src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
  6. 2
      src/objective-c/!ProtoCompiler.podspec
  7. BIN
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/Messages.php
  8. 88
      src/php/tests/interop/Grpc/Testing/SimpleRequest.php
  9. 44
      src/php/tests/interop/Grpc/Testing/StreamingOutputCallRequest.php
  10. 143
      src/php/tests/interop/Grpc/Testing/TestOrcaReport.php
  11. 42
      src/ruby/bin/math_pb.rb
  12. 37
      src/ruby/pb/grpc/health/v1/health_pb.rb
  13. 27
      src/ruby/pb/src/proto/grpc/testing/empty_pb.rb
  14. 136
      src/ruby/pb/src/proto/grpc/testing/messages_pb.rb
  15. 27
      src/ruby/pb/src/proto/grpc/testing/test_pb.rb
  16. 27
      src/ruby/qps/src/proto/grpc/testing/benchmark_service_pb.rb
  17. 182
      src/ruby/qps/src/proto/grpc/testing/control_pb.rb
  18. 136
      src/ruby/qps/src/proto/grpc/testing/messages_pb.rb
  19. 42
      src/ruby/qps/src/proto/grpc/testing/payloads_pb.rb
  20. 27
      src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_pb.rb
  21. 57
      src/ruby/qps/src/proto/grpc/testing/stats_pb.rb
  22. 27
      src/ruby/qps/src/proto/grpc/testing/worker_service_pb.rb
  23. 2
      third_party/protobuf
  24. 2
      third_party/protobuf.patch
  25. 4
      third_party/upb/bazel/workspace_deps.bzl
  26. 6
      third_party/upb/upb/collections/map.c
  27. 19
      third_party/upb/upb/collections/test.cc
  28. 2
      tools/distrib/python/grpc_version.py
  29. 2
      tools/distrib/python/grpcio_tools/grpc_version.py
  30. 2
      tools/distrib/python/grpcio_tools/protoc_lib_deps.py
  31. 2
      tools/run_tests/sanity/check_submodules.sh

@ -253,12 +253,12 @@ def grpc_deps():
if "com_google_protobuf" not in native.existing_rules():
http_archive(
name = "com_google_protobuf",
sha256 = "209385d3c08252e320196b628584c8007f849f9ec8a26c2796a886345ee58bb6",
strip_prefix = "protobuf-2dca62f7296e5b49d729f7384f975cecb38382a0",
sha256 = "76a33e2136f23971ce46c72fd697cd94dc9f73d56ab23b753c3e16854c90ddfd",
strip_prefix = "protobuf-2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a",
urls = [
# https://github.com/protocolbuffers/protobuf/commits/v23.1
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/2dca62f7296e5b49d729f7384f975cecb38382a0.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/2dca62f7296e5b49d729f7384f975cecb38382a0.tar.gz",
# https://github.com/protocolbuffers/protobuf/commits/v23.4
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a.tar.gz",
],
patches = [
"@com_github_grpc_grpc//third_party:protobuf.patch",
@ -393,12 +393,12 @@ def grpc_deps():
if "upb" not in native.existing_rules():
http_archive(
name = "upb",
sha256 = "7d19f2ac9c1e508a86a272913d9aa67c8147827f949035828910bb05d9f2cf03",
strip_prefix = "upb-61a97efa24a5ce01fb8cc73c9d1e6e7060f8ea98",
sha256 = "c29fbd26eb19f388a1894099fae5ae599210be22926e1e1694c0ed1284f1c151",
strip_prefix = "upb-455cfdb8ae60a1763e6d924e36851c6897a781bb",
urls = [
# https://github.com/protocolbuffers/upb/commits/23.x
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/61a97efa24a5ce01fb8cc73c9d1e6e7060f8ea98.tar.gz",
"https://github.com/protocolbuffers/upb/archive/61a97efa24a5ce01fb8cc73c9d1e6e7060f8ea98.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/455cfdb8ae60a1763e6d924e36851c6897a781bb.tar.gz",
"https://github.com/protocolbuffers/upb/archive/455cfdb8ae60a1763e6d924e36851c6897a781bb.tar.gz",
],
)

@ -15,7 +15,7 @@ settings:
core_version: 33.0.0
csharp_major_version: 2
g_stands_for: grounded
protobuf_version: 3.23.1
protobuf_version: 3.23.4
version: 1.57.0-dev
configs:
asan:

@ -2,6 +2,6 @@
<Project>
<PropertyGroup>
<GrpcCsharpVersion>2.57.0-dev</GrpcCsharpVersion>
<GoogleProtobufVersion>3.23.1</GoogleProtobufVersion>
<GoogleProtobufVersion>3.23.4</GoogleProtobufVersion>
</PropertyGroup>
</Project>

@ -100,7 +100,7 @@ Pod::Spec.new do |s|
s.preserve_paths = plugin
# Restrict the protoc version to the one supported by this plugin.
s.dependency '!ProtoCompiler', '3.23.1'
s.dependency '!ProtoCompiler', '3.23.4'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'

@ -102,7 +102,7 @@ Pod::Spec.new do |s|
s.preserve_paths = plugin
# Restrict the protoc version to the one supported by this plugin.
s.dependency '!ProtoCompiler', '3.23.1'
s.dependency '!ProtoCompiler', '3.23.4'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'

@ -36,7 +36,7 @@ Pod::Spec.new do |s|
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
# before them.
s.name = '!ProtoCompiler'
v = '3.23.1'
v = '3.23.4'
s.version = v
s.summary = 'The Protobuf Compiler (protoc) generates Objective-C files from .proto files'
s.description = <<-DESC

@ -79,6 +79,18 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
* Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code>
*/
protected $fill_grpclb_route_type = false;
/**
* If set the server should record this metrics report data for the current RPC.
*
* Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_per_query_report = 11;</code>
*/
protected $orca_per_query_report = null;
/**
* If set the server should update this metrics report data at the OOB server.
*
* Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_oob_report = 12;</code>
*/
protected $orca_oob_report = null;
/**
* Constructor.
@ -110,6 +122,10 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
* Whether SimpleResponse should include server_id.
* @type bool $fill_grpclb_route_type
* Whether SimpleResponse should include grpclb_route_type.
* @type \Grpc\Testing\TestOrcaReport $orca_per_query_report
* If set the server should record this metrics report data for the current RPC.
* @type \Grpc\Testing\TestOrcaReport $orca_oob_report
* If set the server should update this metrics report data at the OOB server.
* }
*/
public function __construct($data = NULL) {
@ -425,5 +441,77 @@ class SimpleRequest extends \Google\Protobuf\Internal\Message
return $this;
}
/**
* If set the server should record this metrics report data for the current RPC.
*
* Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_per_query_report = 11;</code>
* @return \Grpc\Testing\TestOrcaReport|null
*/
public function getOrcaPerQueryReport()
{
return $this->orca_per_query_report;
}
public function hasOrcaPerQueryReport()
{
return isset($this->orca_per_query_report);
}
public function clearOrcaPerQueryReport()
{
unset($this->orca_per_query_report);
}
/**
* If set the server should record this metrics report data for the current RPC.
*
* Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_per_query_report = 11;</code>
* @param \Grpc\Testing\TestOrcaReport $var
* @return $this
*/
public function setOrcaPerQueryReport($var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\TestOrcaReport::class);
$this->orca_per_query_report = $var;
return $this;
}
/**
* If set the server should update this metrics report data at the OOB server.
*
* Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_oob_report = 12;</code>
* @return \Grpc\Testing\TestOrcaReport|null
*/
public function getOrcaOobReport()
{
return $this->orca_oob_report;
}
public function hasOrcaOobReport()
{
return isset($this->orca_oob_report);
}
public function clearOrcaOobReport()
{
unset($this->orca_oob_report);
}
/**
* If set the server should update this metrics report data at the OOB server.
*
* Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_oob_report = 12;</code>
* @param \Grpc\Testing\TestOrcaReport $var
* @return $this
*/
public function setOrcaOobReport($var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\TestOrcaReport::class);
$this->orca_oob_report = $var;
return $this;
}
}

@ -42,6 +42,12 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
* Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
*/
protected $response_status = null;
/**
* If set the server should update this metrics report data at the OOB server.
*
* Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_oob_report = 8;</code>
*/
protected $orca_oob_report = null;
/**
* Constructor.
@ -60,6 +66,8 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
* Optional input payload sent along with the request.
* @type \Grpc\Testing\EchoStatus $response_status
* Whether server should return a given status
* @type \Grpc\Testing\TestOrcaReport $orca_oob_report
* If set the server should update this metrics report data at the OOB server.
* }
*/
public function __construct($data = NULL) {
@ -197,5 +205,41 @@ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
return $this;
}
/**
* If set the server should update this metrics report data at the OOB server.
*
* Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_oob_report = 8;</code>
* @return \Grpc\Testing\TestOrcaReport|null
*/
public function getOrcaOobReport()
{
return $this->orca_oob_report;
}
public function hasOrcaOobReport()
{
return isset($this->orca_oob_report);
}
public function clearOrcaOobReport()
{
unset($this->orca_oob_report);
}
/**
* If set the server should update this metrics report data at the OOB server.
*
* Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_oob_report = 8;</code>
* @param \Grpc\Testing\TestOrcaReport $var
* @return $this
*/
public function setOrcaOobReport($var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\TestOrcaReport::class);
$this->orca_oob_report = $var;
return $this;
}
}

@ -0,0 +1,143 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Metrics data the server will update and send to the client. It mirrors orca load report
* https://github.com/cncf/xds/blob/eded343319d09f30032952beda9840bbd3dcf7ac/xds/data/orca/v3/orca_load_report.proto#L15,
* but avoids orca dependency. Used by both per-query and out-of-band reporting tests.
*
* Generated from protobuf message <code>grpc.testing.TestOrcaReport</code>
*/
class TestOrcaReport extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>double cpu_utilization = 1;</code>
*/
protected $cpu_utilization = 0.0;
/**
* Generated from protobuf field <code>double memory_utilization = 2;</code>
*/
protected $memory_utilization = 0.0;
/**
* Generated from protobuf field <code>map<string, double> request_cost = 3;</code>
*/
private $request_cost;
/**
* Generated from protobuf field <code>map<string, double> utilization = 4;</code>
*/
private $utilization;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type float $cpu_utilization
* @type float $memory_utilization
* @type array|\Google\Protobuf\Internal\MapField $request_cost
* @type array|\Google\Protobuf\Internal\MapField $utilization
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>double cpu_utilization = 1;</code>
* @return float
*/
public function getCpuUtilization()
{
return $this->cpu_utilization;
}
/**
* Generated from protobuf field <code>double cpu_utilization = 1;</code>
* @param float $var
* @return $this
*/
public function setCpuUtilization($var)
{
GPBUtil::checkDouble($var);
$this->cpu_utilization = $var;
return $this;
}
/**
* Generated from protobuf field <code>double memory_utilization = 2;</code>
* @return float
*/
public function getMemoryUtilization()
{
return $this->memory_utilization;
}
/**
* Generated from protobuf field <code>double memory_utilization = 2;</code>
* @param float $var
* @return $this
*/
public function setMemoryUtilization($var)
{
GPBUtil::checkDouble($var);
$this->memory_utilization = $var;
return $this;
}
/**
* Generated from protobuf field <code>map<string, double> request_cost = 3;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getRequestCost()
{
return $this->request_cost;
}
/**
* Generated from protobuf field <code>map<string, double> request_cost = 3;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setRequestCost($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE);
$this->request_cost = $arr;
return $this;
}
/**
* Generated from protobuf field <code>map<string, double> utilization = 4;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getUtilization()
{
return $this->utilization;
}
/**
* Generated from protobuf field <code>map<string, double> utilization = 4;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setUtilization($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE);
$this->utilization = $arr;
return $this;
}
}

@ -1,28 +1,34 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: math.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("math.proto", :syntax => :proto3) do
add_message "math.DivArgs" do
optional :dividend, :int64, 1
optional :divisor, :int64, 2
end
add_message "math.DivReply" do
optional :quotient, :int64, 1
optional :remainder, :int64, 2
end
add_message "math.FibArgs" do
optional :limit, :int64, 1
end
add_message "math.Num" do
optional :num, :int64, 1
end
add_message "math.FibReply" do
optional :count, :int64, 1
descriptor_data = "\n\nmath.proto\x12\x04math\",\n\x07\x44ivArgs\x12\x10\n\x08\x64ividend\x18\x01 \x01(\x03\x12\x0f\n\x07\x64ivisor\x18\x02 \x01(\x03\"/\n\x08\x44ivReply\x12\x10\n\x08quotient\x18\x01 \x01(\x03\x12\x11\n\tremainder\x18\x02 \x01(\x03\"\x18\n\x07\x46ibArgs\x12\r\n\x05limit\x18\x01 \x01(\x03\"\x12\n\x03Num\x12\x0b\n\x03num\x18\x01 \x01(\x03\"\x19\n\x08\x46ibReply\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x32\xa4\x01\n\x04Math\x12&\n\x03\x44iv\x12\r.math.DivArgs\x1a\x0e.math.DivReply\"\x00\x12.\n\x07\x44ivMany\x12\r.math.DivArgs\x1a\x0e.math.DivReply\"\x00(\x01\x30\x01\x12#\n\x03\x46ib\x12\r.math.FibArgs\x1a\t.math.Num\"\x00\x30\x01\x12\x1f\n\x03Sum\x12\t.math.Num\x1a\t.math.Num\"\x00(\x01\x62\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError => e
# Compatibility code: will be removed in the next major version.
require 'google/protobuf/descriptor_pb'
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
parsed.clear_dependency
serialized = parsed.class.encode(parsed)
file = pool.add_serialized_file(serialized)
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
imports = [
]
imports.each do |type_name, expected_filename|
import_file = pool.lookup(type_name).file_descriptor
if import_file.name != expected_filename
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
end
warn "Each proto file must use a consistent fully-qualified name."
warn "This will become an error in the next major version."
end
module Math

@ -1,23 +1,34 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: grpc/health/v1/health.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("grpc/health/v1/health.proto", :syntax => :proto3) do
add_message "grpc.health.v1.HealthCheckRequest" do
optional :service, :string, 1
end
add_message "grpc.health.v1.HealthCheckResponse" do
optional :status, :enum, 1, "grpc.health.v1.HealthCheckResponse.ServingStatus"
end
add_enum "grpc.health.v1.HealthCheckResponse.ServingStatus" do
value :UNKNOWN, 0
value :SERVING, 1
value :NOT_SERVING, 2
value :SERVICE_UNKNOWN, 3
descriptor_data = "\n\x1bgrpc/health/v1/health.proto\x12\x0egrpc.health.v1\"%\n\x12HealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\"\xa9\x01\n\x13HealthCheckResponse\x12\x41\n\x06status\x18\x01 \x01(\x0e\x32\x31.grpc.health.v1.HealthCheckResponse.ServingStatus\"O\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x12\x13\n\x0fSERVICE_UNKNOWN\x10\x03\x32\xae\x01\n\x06Health\x12P\n\x05\x43heck\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse\x12R\n\x05Watch\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse0\x01\x42\x61\n\x11io.grpc.health.v1B\x0bHealthProtoP\x01Z,google.golang.org/grpc/health/grpc_health_v1\xaa\x02\x0eGrpc.Health.V1b\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError => e
# Compatibility code: will be removed in the next major version.
require 'google/protobuf/descriptor_pb'
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
parsed.clear_dependency
serialized = parsed.class.encode(parsed)
file = pool.add_serialized_file(serialized)
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
imports = [
]
imports.each do |type_name, expected_filename|
import_file = pool.lookup(type_name).file_descriptor
if import_file.name != expected_filename
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
end
warn "Each proto file must use a consistent fully-qualified name."
warn "This will become an error in the next major version."
end
module Grpc

@ -1,13 +1,34 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/empty.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("src/proto/grpc/testing/empty.proto", :syntax => :proto3) do
add_message "grpc.testing.Empty" do
descriptor_data = "\n\"src/proto/grpc/testing/empty.proto\x12\x0cgrpc.testing\"\x07\n\x05\x45mptyb\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError => e
# Compatibility code: will be removed in the next major version.
require 'google/protobuf/descriptor_pb'
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
parsed.clear_dependency
serialized = parsed.class.encode(parsed)
file = pool.add_serialized_file(serialized)
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
imports = [
]
imports.each do |type_name, expected_filename|
import_file = pool.lookup(type_name).file_descriptor
if import_file.name != expected_filename
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
end
warn "Each proto file must use a consistent fully-qualified name."
warn "This will become an error in the next major version."
end
module Grpc

File diff suppressed because one or more lines are too long

@ -1,3 +1,4 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/test.proto
@ -6,9 +7,31 @@ require 'google/protobuf'
require 'src/proto/grpc/testing/empty_pb'
require 'src/proto/grpc/testing/messages_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("src/proto/grpc/testing/test.proto", :syntax => :proto3) do
descriptor_data = "\n!src/proto/grpc/testing/test.proto\x12\x0cgrpc.testing\x1a\"src/proto/grpc/testing/empty.proto\x1a%src/proto/grpc/testing/messages.proto2\xcb\x05\n\x0bTestService\x12\x35\n\tEmptyCall\x12\x13.grpc.testing.Empty\x1a\x13.grpc.testing.Empty\x12\x46\n\tUnaryCall\x12\x1b.grpc.testing.SimpleRequest\x1a\x1c.grpc.testing.SimpleResponse\x12O\n\x12\x43\x61\x63heableUnaryCall\x12\x1b.grpc.testing.SimpleRequest\x1a\x1c.grpc.testing.SimpleResponse\x12l\n\x13StreamingOutputCall\x12(.grpc.testing.StreamingOutputCallRequest\x1a).grpc.testing.StreamingOutputCallResponse0\x01\x12i\n\x12StreamingInputCall\x12\'.grpc.testing.StreamingInputCallRequest\x1a(.grpc.testing.StreamingInputCallResponse(\x01\x12i\n\x0e\x46ullDuplexCall\x12(.grpc.testing.StreamingOutputCallRequest\x1a).grpc.testing.StreamingOutputCallResponse(\x01\x30\x01\x12i\n\x0eHalfDuplexCall\x12(.grpc.testing.StreamingOutputCallRequest\x1a).grpc.testing.StreamingOutputCallResponse(\x01\x30\x01\x12=\n\x11UnimplementedCall\x12\x13.grpc.testing.Empty\x1a\x13.grpc.testing.Empty2U\n\x14UnimplementedService\x12=\n\x11UnimplementedCall\x12\x13.grpc.testing.Empty\x1a\x13.grpc.testing.Empty2\x89\x01\n\x10ReconnectService\x12;\n\x05Start\x12\x1d.grpc.testing.ReconnectParams\x1a\x13.grpc.testing.Empty\x12\x38\n\x04Stop\x12\x13.grpc.testing.Empty\x1a\x1b.grpc.testing.ReconnectInfo2\x86\x02\n\x18LoadBalancerStatsService\x12\x63\n\x0eGetClientStats\x12&.grpc.testing.LoadBalancerStatsRequest\x1a\'.grpc.testing.LoadBalancerStatsResponse\"\x00\x12\x84\x01\n\x19GetClientAccumulatedStats\x12\x31.grpc.testing.LoadBalancerAccumulatedStatsRequest\x1a\x32.grpc.testing.LoadBalancerAccumulatedStatsResponse\"\x00\x32\x8b\x01\n\x16XdsUpdateHealthService\x12\x36\n\nSetServing\x12\x13.grpc.testing.Empty\x1a\x13.grpc.testing.Empty\x12\x39\n\rSetNotServing\x12\x13.grpc.testing.Empty\x1a\x13.grpc.testing.Empty2{\n\x1fXdsUpdateClientConfigureService\x12X\n\tConfigure\x12$.grpc.testing.ClientConfigureRequest\x1a%.grpc.testing.ClientConfigureResponseb\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError => e
# Compatibility code: will be removed in the next major version.
require 'google/protobuf/descriptor_pb'
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
parsed.clear_dependency
serialized = parsed.class.encode(parsed)
file = pool.add_serialized_file(serialized)
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
imports = [
]
imports.each do |type_name, expected_filename|
import_file = pool.lookup(type_name).file_descriptor
if import_file.name != expected_filename
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
end
warn "Each proto file must use a consistent fully-qualified name."
warn "This will become an error in the next major version."
end
module Grpc

@ -1,3 +1,4 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/benchmark_service.proto
@ -5,9 +6,31 @@ require 'google/protobuf'
require 'src/proto/grpc/testing/messages_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("src/proto/grpc/testing/benchmark_service.proto", :syntax => :proto3) do
descriptor_data = "\n.src/proto/grpc/testing/benchmark_service.proto\x12\x0cgrpc.testing\x1a%src/proto/grpc/testing/messages.proto2\xf2\x03\n\x10\x42\x65nchmarkService\x12\x46\n\tUnaryCall\x12\x1b.grpc.testing.SimpleRequest\x1a\x1c.grpc.testing.SimpleResponse\x12N\n\rStreamingCall\x12\x1b.grpc.testing.SimpleRequest\x1a\x1c.grpc.testing.SimpleResponse(\x01\x30\x01\x12R\n\x13StreamingFromClient\x12\x1b.grpc.testing.SimpleRequest\x1a\x1c.grpc.testing.SimpleResponse(\x01\x12R\n\x13StreamingFromServer\x12\x1b.grpc.testing.SimpleRequest\x1a\x1c.grpc.testing.SimpleResponse0\x01\x12R\n\x11StreamingBothWays\x12\x1b.grpc.testing.SimpleRequest\x1a\x1c.grpc.testing.SimpleResponse(\x01\x30\x01\x12J\n\x11GetBeforeSnapshot\x12\x1b.grpc.testing.SimpleRequest\x1a\x18.grpc.testing.MemorySizeb\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError => e
# Compatibility code: will be removed in the next major version.
require 'google/protobuf/descriptor_pb'
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
parsed.clear_dependency
serialized = parsed.class.encode(parsed)
file = pool.add_serialized_file(serialized)
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
imports = [
]
imports.each do |type_name, expected_filename|
import_file = pool.lookup(type_name).file_descriptor
if import_file.name != expected_filename
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
end
warn "Each proto file must use a consistent fully-qualified name."
warn "This will become an error in the next major version."
end
module Grpc

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,28 +1,34 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/payloads.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("src/proto/grpc/testing/payloads.proto", :syntax => :proto3) do
add_message "grpc.testing.ByteBufferParams" do
optional :req_size, :int32, 1
optional :resp_size, :int32, 2
end
add_message "grpc.testing.SimpleProtoParams" do
optional :req_size, :int32, 1
optional :resp_size, :int32, 2
end
add_message "grpc.testing.ComplexProtoParams" do
end
add_message "grpc.testing.PayloadConfig" do
oneof :payload do
optional :bytebuf_params, :message, 1, "grpc.testing.ByteBufferParams"
optional :simple_params, :message, 2, "grpc.testing.SimpleProtoParams"
optional :complex_params, :message, 3, "grpc.testing.ComplexProtoParams"
end
descriptor_data = "\n%src/proto/grpc/testing/payloads.proto\x12\x0cgrpc.testing\"7\n\x10\x42yteBufferParams\x12\x10\n\x08req_size\x18\x01 \x01(\x05\x12\x11\n\tresp_size\x18\x02 \x01(\x05\"8\n\x11SimpleProtoParams\x12\x10\n\x08req_size\x18\x01 \x01(\x05\x12\x11\n\tresp_size\x18\x02 \x01(\x05\"\x14\n\x12\x43omplexProtoParams\"\xca\x01\n\rPayloadConfig\x12\x38\n\x0e\x62ytebuf_params\x18\x01 \x01(\x0b\x32\x1e.grpc.testing.ByteBufferParamsH\x00\x12\x38\n\rsimple_params\x18\x02 \x01(\x0b\x32\x1f.grpc.testing.SimpleProtoParamsH\x00\x12:\n\x0e\x63omplex_params\x18\x03 \x01(\x0b\x32 .grpc.testing.ComplexProtoParamsH\x00\x42\t\n\x07payloadb\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError => e
# Compatibility code: will be removed in the next major version.
require 'google/protobuf/descriptor_pb'
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
parsed.clear_dependency
serialized = parsed.class.encode(parsed)
file = pool.add_serialized_file(serialized)
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
imports = [
]
imports.each do |type_name, expected_filename|
import_file = pool.lookup(type_name).file_descriptor
if import_file.name != expected_filename
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
end
warn "Each proto file must use a consistent fully-qualified name."
warn "This will become an error in the next major version."
end
module Grpc

@ -1,3 +1,4 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/report_qps_scenario_service.proto
@ -5,9 +6,31 @@ require 'google/protobuf'
require 'src/proto/grpc/testing/control_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("src/proto/grpc/testing/report_qps_scenario_service.proto", :syntax => :proto3) do
descriptor_data = "\n8src/proto/grpc/testing/report_qps_scenario_service.proto\x12\x0cgrpc.testing\x1a$src/proto/grpc/testing/control.proto2^\n\x18ReportQpsScenarioService\x12\x42\n\x0eReportScenario\x12\x1c.grpc.testing.ScenarioResult\x1a\x12.grpc.testing.Voidb\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError => e
# Compatibility code: will be removed in the next major version.
require 'google/protobuf/descriptor_pb'
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
parsed.clear_dependency
serialized = parsed.class.encode(parsed)
file = pool.add_serialized_file(serialized)
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
imports = [
]
imports.each do |type_name, expected_filename|
import_file = pool.lookup(type_name).file_descriptor
if import_file.name != expected_filename
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
end
warn "Each proto file must use a consistent fully-qualified name."
warn "This will become an error in the next major version."
end
module Grpc

@ -1,43 +1,34 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/stats.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("src/proto/grpc/testing/stats.proto", :syntax => :proto3) do
add_message "grpc.testing.ServerStats" do
optional :time_elapsed, :double, 1
optional :time_user, :double, 2
optional :time_system, :double, 3
optional :total_cpu_time, :uint64, 4
optional :idle_cpu_time, :uint64, 5
optional :cq_poll_count, :uint64, 6
end
add_message "grpc.testing.HistogramParams" do
optional :resolution, :double, 1
optional :max_possible, :double, 2
end
add_message "grpc.testing.HistogramData" do
repeated :bucket, :uint32, 1
optional :min_seen, :double, 2
optional :max_seen, :double, 3
optional :sum, :double, 4
optional :sum_of_squares, :double, 5
optional :count, :double, 6
end
add_message "grpc.testing.RequestResultCount" do
optional :status_code, :int32, 1
optional :count, :int64, 2
end
add_message "grpc.testing.ClientStats" do
optional :latencies, :message, 1, "grpc.testing.HistogramData"
optional :time_elapsed, :double, 2
optional :time_user, :double, 3
optional :time_system, :double, 4
repeated :request_results, :message, 5, "grpc.testing.RequestResultCount"
optional :cq_poll_count, :uint64, 6
descriptor_data = "\n\"src/proto/grpc/testing/stats.proto\x12\x0cgrpc.testing\"\x91\x01\n\x0bServerStats\x12\x14\n\x0ctime_elapsed\x18\x01 \x01(\x01\x12\x11\n\ttime_user\x18\x02 \x01(\x01\x12\x13\n\x0btime_system\x18\x03 \x01(\x01\x12\x16\n\x0etotal_cpu_time\x18\x04 \x01(\x04\x12\x15\n\ridle_cpu_time\x18\x05 \x01(\x04\x12\x15\n\rcq_poll_count\x18\x06 \x01(\x04\";\n\x0fHistogramParams\x12\x12\n\nresolution\x18\x01 \x01(\x01\x12\x14\n\x0cmax_possible\x18\x02 \x01(\x01\"w\n\rHistogramData\x12\x0e\n\x06\x62ucket\x18\x01 \x03(\r\x12\x10\n\x08min_seen\x18\x02 \x01(\x01\x12\x10\n\x08max_seen\x18\x03 \x01(\x01\x12\x0b\n\x03sum\x18\x04 \x01(\x01\x12\x16\n\x0esum_of_squares\x18\x05 \x01(\x01\x12\r\n\x05\x63ount\x18\x06 \x01(\x01\"8\n\x12RequestResultCount\x12\x13\n\x0bstatus_code\x18\x01 \x01(\x05\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xcd\x01\n\x0b\x43lientStats\x12.\n\tlatencies\x18\x01 \x01(\x0b\x32\x1b.grpc.testing.HistogramData\x12\x14\n\x0ctime_elapsed\x18\x02 \x01(\x01\x12\x11\n\ttime_user\x18\x03 \x01(\x01\x12\x13\n\x0btime_system\x18\x04 \x01(\x01\x12\x39\n\x0frequest_results\x18\x05 \x03(\x0b\x32 .grpc.testing.RequestResultCount\x12\x15\n\rcq_poll_count\x18\x06 \x01(\x04\x62\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError => e
# Compatibility code: will be removed in the next major version.
require 'google/protobuf/descriptor_pb'
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
parsed.clear_dependency
serialized = parsed.class.encode(parsed)
file = pool.add_serialized_file(serialized)
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
imports = [
]
imports.each do |type_name, expected_filename|
import_file = pool.lookup(type_name).file_descriptor
if import_file.name != expected_filename
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
end
warn "Each proto file must use a consistent fully-qualified name."
warn "This will become an error in the next major version."
end
module Grpc

@ -1,3 +1,4 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/worker_service.proto
@ -5,9 +6,31 @@ require 'google/protobuf'
require 'src/proto/grpc/testing/control_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("src/proto/grpc/testing/worker_service.proto", :syntax => :proto3) do
descriptor_data = "\n+src/proto/grpc/testing/worker_service.proto\x12\x0cgrpc.testing\x1a$src/proto/grpc/testing/control.proto2\x97\x02\n\rWorkerService\x12\x45\n\tRunServer\x12\x18.grpc.testing.ServerArgs\x1a\x1a.grpc.testing.ServerStatus(\x01\x30\x01\x12\x45\n\tRunClient\x12\x18.grpc.testing.ClientArgs\x1a\x1a.grpc.testing.ClientStatus(\x01\x30\x01\x12\x42\n\tCoreCount\x12\x19.grpc.testing.CoreRequest\x1a\x1a.grpc.testing.CoreResponse\x12\x34\n\nQuitWorker\x12\x12.grpc.testing.Void\x1a\x12.grpc.testing.Voidb\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError => e
# Compatibility code: will be removed in the next major version.
require 'google/protobuf/descriptor_pb'
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
parsed.clear_dependency
serialized = parsed.class.encode(parsed)
file = pool.add_serialized_file(serialized)
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
imports = [
]
imports.each do |type_name, expected_filename|
import_file = pool.lookup(type_name).file_descriptor
if import_file.name != expected_filename
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
end
end
warn "Each proto file must use a consistent fully-qualified name."
warn "This will become an error in the next major version."
end
module Grpc

@ -1 +1 @@
Subproject commit 2dca62f7296e5b49d729f7384f975cecb38382a0
Subproject commit 2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a

@ -5,7 +5,7 @@ index 97ac28028..8b7585d9d 100644
@@ -31,3 +31,9 @@
# Copyright 2007 Google Inc. All Rights Reserved.
__version__ = '4.23.1'
__version__ = '4.23.4'
+
+if __name__ != '__main__':
+ try:

@ -23,8 +23,8 @@ def upb_deps():
_github_archive,
name = "com_google_protobuf",
repo = "https://github.com/protocolbuffers/protobuf",
commit = "71fca0ca15ca6f0cfe12c6593e7fc840f7ae0809",
sha256 = "0b467b7c0b34515cf88a20c2fe5a550ae18cb55dcc76f8e2e659349c1169d48f",
commit = "571fae48b0370722e26abb267da5699694ca46e8",
sha256 = "74bc7f6ed83927ba2e32fc60ebab9aac28ab40ddffd8922a271a259f4f79911b",
patches = ["@upb//bazel:protobuf.patch"],
)

@ -73,9 +73,9 @@ upb_MapInsertStatus upb_Map_Insert(upb_Map* map, upb_MessageValue key,
bool upb_Map_Delete(upb_Map* map, upb_MessageValue key, upb_MessageValue* val) {
upb_value v;
const bool ok = _upb_Map_Delete(map, &key, map->key_size, &v);
if (val) val->uint64_val = v.val;
return ok;
const bool removed = _upb_Map_Delete(map, &key, map->key_size, &v);
if (val) _upb_map_fromvalue(v, val, map->val_size);
return removed;
}
bool upb_Map_Next(const upb_Map* map, upb_MessageValue* key,

@ -27,7 +27,9 @@
#include "gtest/gtest.h"
#include "upb/base/descriptor_constants.h"
#include "upb/base/string_view.h"
#include "upb/collections/array.h"
#include "upb/collections/map.h"
#include "upb/upb.hpp"
TEST(CollectionsTest, Arrays) {
@ -58,3 +60,20 @@ TEST(CollectionsTest, Arrays) {
EXPECT_EQ(upb_Array_Get(array, 4).int32_val, 0);
EXPECT_EQ(upb_Array_Get(array, 5).int32_val, 0);
}
TEST(CollectionsTest, MapDeleteRegression) {
upb::Arena arena;
upb_Map* map = upb_Map_New(arena.ptr(), kUpb_CType_Int32, kUpb_CType_String);
upb_MessageValue key = {.int32_val = 0};
const char str[] = "abcde";
upb_MessageValue insert_value = {.str_val = upb_StringView_FromString(str)};
upb_MapInsertStatus st = upb_Map_Insert(map, key, insert_value, arena.ptr());
EXPECT_EQ(kUpb_MapInsertStatus_Inserted, st);
upb_MessageValue delete_value;
bool removed = upb_Map_Delete(map, key, &delete_value);
EXPECT_TRUE(removed);
EXPECT_TRUE(
upb_StringView_IsEqual(insert_value.str_val, delete_value.str_val));
}

@ -15,4 +15,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!!
VERSION = '1.57.0.dev0'
PROTOBUF_VERSION = '3.23.1'
PROTOBUF_VERSION = '3.23.4'

@ -15,4 +15,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!!
VERSION = '1.57.0.dev0'
PROTOBUF_VERSION = '3.23.1'
PROTOBUF_VERSION = '3.23.4'

@ -303,4 +303,4 @@ CC_INCLUDES=[
]
PROTO_INCLUDE='third_party/protobuf/src'
PROTOBUF_SUBMODULE_VERSION="2dca62f7296e5b49d729f7384f975cecb38382a0"
PROTOBUF_SUBMODULE_VERSION="2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a"

@ -36,7 +36,7 @@ third_party/googletest 0e402173c97aea7a00749e825b194bfede4f2e45
third_party/libuv 02a9e1be252b623ee032a3137c0b0c94afbe6809
third_party/opencensus-proto 4aa53e15cbf1a47bc9087e6cfdca214c1eea4e89
third_party/opentelemetry 60fa8754d890b5c55949a8c68dcfd7ab5c2395df
third_party/protobuf 2dca62f7296e5b49d729f7384f975cecb38382a0
third_party/protobuf 2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a
third_party/re2 0c5616df9c0aaa44c9440d87422012423d91c7d1
third_party/xds e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7
third_party/zlib 04f42ceca40f73e2978b50e93806c2a18c1281fc

Loading…
Cancel
Save