[ruby] Update google-protobuf dep to allow 3.x and 4.x versions (#36982)

As title

`_pb.rb` protos regenerated using `grpc-tools` 1.64, which has a more recent `protoc`. (otherwise tests fail b/c we can't load the older generated code with google-protobuf 4.x - also see https://github.com/grpc/grpc/pull/36900#issuecomment-2163871696

cc @dazuma @alto-ruby

Closes #36982

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36982 from apolcyn:update_dep 84de585b42
PiperOrigin-RevId: 645189362
pull/36946/head
apolcyn 5 months ago committed by Copybara-Service
parent b18636ef21
commit e1530b1c88
  1. 2
      grpc.gemspec
  2. 23
      src/ruby/bin/math_pb.rb
  3. 18
      src/ruby/end2end/lib/client_control_pb.rb
  4. 4
      src/ruby/end2end/lib/client_control_services_pb.rb
  5. 16
      src/ruby/end2end/lib/echo_pb.rb
  6. 2
      src/ruby/end2end/lib/echo_services_pb.rb
  7. 23
      src/ruby/pb/grpc/health/v1/health_pb.rb
  8. 10
      src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services_pb.rb
  9. 29
      src/ruby/pb/grpc/testing/metrics_pb.rb
  10. 10
      src/ruby/pb/grpc/testing/metrics_services_pb.rb
  11. 23
      src/ruby/pb/src/proto/grpc/testing/empty_pb.rb
  12. 23
      src/ruby/pb/src/proto/grpc/testing/messages_pb.rb
  13. 23
      src/ruby/pb/src/proto/grpc/testing/test_pb.rb
  14. 35
      src/ruby/qps/src/proto/grpc/core/stats_pb.rb
  15. 23
      src/ruby/qps/src/proto/grpc/testing/benchmark_service_pb.rb
  16. 26
      src/ruby/qps/src/proto/grpc/testing/control_pb.rb
  17. 23
      src/ruby/qps/src/proto/grpc/testing/messages_pb.rb
  18. 23
      src/ruby/qps/src/proto/grpc/testing/payloads_pb.rb
  19. 14
      src/ruby/qps/src/proto/grpc/testing/proxy-service_pb.rb
  20. 8
      src/ruby/qps/src/proto/grpc/testing/proxy-service_services_pb.rb
  21. 23
      src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_pb.rb
  22. 23
      src/ruby/qps/src/proto/grpc/testing/stats_pb.rb
  23. 23
      src/ruby/qps/src/proto/grpc/testing/worker_service_pb.rb
  24. 2
      templates/grpc.gemspec.template

2
grpc.gemspec generated

@ -30,7 +30,7 @@ Gem::Specification.new do |s|
s.require_paths = %w( src/ruby/lib src/ruby/bin src/ruby/pb )
s.platform = Gem::Platform::RUBY
s.add_dependency 'google-protobuf', '~> 3.25'
s.add_dependency 'google-protobuf', '>= 3.25', '< 5.0'
s.add_dependency 'googleapis-common-protos-types', '~> 1.0'
s.add_development_dependency 'bundler', '>= 1.9'

@ -8,28 +8,7 @@ require 'google/protobuf'
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
# 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
pool.add_serialized_file(descriptor_data)
module Math
DivArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("math.DivArgs").msgclass

@ -1,20 +1,14 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: client_control.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("client_control.proto", :syntax => :proto3) do
add_message "client_control.DoEchoRpcRequest" do
optional :request, :string, 1
end
add_message "client_control.Void" do
end
add_message "client_control.Port" do
optional :port, :int32, 1
end
end
end
descriptor_data = "\n\x14\x63lient_control.proto\x12\x0e\x63lient_control\"#\n\x10\x44oEchoRpcRequest\x12\x0f\n\x07request\x18\x01 \x01(\t\"\x06\n\x04Void\"\x14\n\x04Port\x12\x0c\n\x04port\x18\x01 \x01(\x05\x32\x93\x01\n\x10\x43lientController\x12\x45\n\tDoEchoRpc\x12 .client_control.DoEchoRpcRequest\x1a\x14.client_control.Void\"\x00\x12\x38\n\x08Shutdown\x12\x14.client_control.Void\x1a\x14.client_control.Void\"\x00\x32[\n\x10ParentController\x12G\n\x17SetClientControllerPort\x12\x14.client_control.Port\x1a\x14.client_control.Void\"\x00\x62\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
pool.add_serialized_file(descriptor_data)
module ClientControl
DoEchoRpcRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("client_control.DoEchoRpcRequest").msgclass

@ -23,7 +23,7 @@ module ClientControl
module ClientController
class Service
include GRPC::GenericService
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
@ -38,7 +38,7 @@ module ClientControl
module ParentController
class Service
include GRPC::GenericService
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode

@ -1,18 +1,14 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: echo.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("echo.proto", :syntax => :proto3) do
add_message "echo.EchoRequest" do
optional :request, :string, 1
end
add_message "echo.EchoReply" do
optional :response, :string, 1
end
end
end
descriptor_data = "\n\necho.proto\x12\x04\x65\x63ho\"\x1e\n\x0b\x45\x63hoRequest\x12\x0f\n\x07request\x18\x01 \x01(\t\"\x1d\n\tEchoReply\x12\x10\n\x08response\x18\x01 \x01(\t2:\n\nEchoServer\x12,\n\x04\x45\x63ho\x12\x11.echo.EchoRequest\x1a\x0f.echo.EchoReply\"\x00\x62\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
pool.add_serialized_file(descriptor_data)
module Echo
EchoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("echo.EchoRequest").msgclass

@ -23,7 +23,7 @@ module Echo
module EchoServer
class Service
include GRPC::GenericService
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode

@ -8,28 +8,7 @@ require 'google/protobuf'
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
# 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
pool.add_serialized_file(descriptor_data)
module Grpc
module Health

@ -1,5 +1,5 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: src/proto/grpc/testing/duplicate/echo_duplicate.proto for package 'grpc.testing.duplicate'
# Source: grpc/testing/duplicate/echo_duplicate.proto for package 'grpc.testing.duplicate'
# Original file comments:
# Copyright 2015 gRPC authors.
#
@ -19,7 +19,7 @@
#
require 'grpc'
require 'src/proto/grpc/testing/duplicate/echo_duplicate_pb'
require 'grpc/testing/duplicate/echo_duplicate_pb'
module Grpc
module Testing
@ -27,14 +27,14 @@ module Grpc
module EchoTestService
class Service
include GRPC::GenericService
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'grpc.testing.duplicate.EchoTestService'
rpc :Echo, Grpc::Testing::EchoRequest, Grpc::Testing::EchoResponse
rpc :ResponseStream, Grpc::Testing::EchoRequest, stream(Grpc::Testing::EchoResponse)
rpc :Echo, ::Grpc::Testing::EchoRequest, ::Grpc::Testing::EchoResponse
rpc :ResponseStream, ::Grpc::Testing::EchoRequest, stream(::Grpc::Testing::EchoResponse)
end
Stub = Service.rpc_stub_class

@ -1,28 +1,19 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/metrics.proto
# source: grpc/testing/metrics.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "grpc.testing.GaugeResponse" do
optional :name, :string, 1
oneof :value do
optional :long_value, :int64, 2
optional :double_value, :double, 3
optional :string_value, :string, 4
end
end
add_message "grpc.testing.GaugeRequest" do
optional :name, :string, 1
end
add_message "grpc.testing.EmptyMessage" do
end
end
descriptor_data = "\n\x1agrpc/testing/metrics.proto\x12\x0cgrpc.testing\"l\n\rGaugeResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\nlong_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x42\x07\n\x05value\"\x1c\n\x0cGaugeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x0e\n\x0c\x45mptyMessage2\xa0\x01\n\x0eMetricsService\x12I\n\x0cGetAllGauges\x12\x1a.grpc.testing.EmptyMessage\x1a\x1b.grpc.testing.GaugeResponse0\x01\x12\x43\n\x08GetGauge\x12\x1a.grpc.testing.GaugeRequest\x1a\x1b.grpc.testing.GaugeResponseb\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
pool.add_serialized_file(descriptor_data)
module Grpc
module Testing
GaugeResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.GaugeResponse").msgclass
GaugeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.GaugeRequest").msgclass
EmptyMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.EmptyMessage").msgclass
GaugeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.GaugeResponse").msgclass
GaugeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.GaugeRequest").msgclass
EmptyMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.EmptyMessage").msgclass
end
end

@ -1,5 +1,5 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: src/proto/grpc/testing/metrics.proto for package 'grpc.testing'
# Source: grpc/testing/metrics.proto for package 'grpc.testing'
# Original file comments:
# Copyright 2015-2016 gRPC authors.
#
@ -23,14 +23,14 @@
# service.
require 'grpc'
require 'src/proto/grpc/testing/metrics_pb'
require 'grpc/testing/metrics_pb'
module Grpc
module Testing
module MetricsService
class Service
include GRPC::GenericService
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
@ -38,9 +38,9 @@ module Grpc
# Returns the values of all the gauges that are currently being maintained by
# the service
rpc :GetAllGauges, EmptyMessage, stream(GaugeResponse)
rpc :GetAllGauges, ::Grpc::Testing::EmptyMessage, stream(::Grpc::Testing::GaugeResponse)
# Returns the value of one gauge
rpc :GetGauge, GaugeRequest, GaugeResponse
rpc :GetGauge, ::Grpc::Testing::GaugeRequest, ::Grpc::Testing::GaugeResponse
end
Stub = Service.rpc_stub_class

@ -8,28 +8,7 @@ require 'google/protobuf'
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
# 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
pool.add_serialized_file(descriptor_data)
module Grpc
module Testing

File diff suppressed because one or more lines are too long

@ -11,28 +11,7 @@ require 'src/proto/grpc/testing/messages_pb'
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\xcc\x01\n\x0bHookService\x12\x30\n\x04Hook\x12\x13.grpc.testing.Empty\x1a\x13.grpc.testing.Empty\x12L\n\x0fSetReturnStatus\x12$.grpc.testing.SetReturnStatusRequest\x1a\x13.grpc.testing.Empty\x12=\n\x11\x43learReturnStatus\x12\x13.grpc.testing.Empty\x1a\x13.grpc.testing.Empty2\xd5\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.Empty\x12H\n\x0fSendHookRequest\x12\x19.grpc.testing.HookRequest\x1a\x1a.grpc.testing.HookResponse2{\n\x1fXdsUpdateClientConfigureService\x12X\n\tConfigure\x12$.grpc.testing.ClientConfigureRequest\x1a%.grpc.testing.ClientConfigureResponseB\x1d\n\x1bio.grpc.testing.integrationb\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
begin
pool.add_serialized_file(descriptor_data)
rescue TypeError
# 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
pool.add_serialized_file(descriptor_data)
module Grpc
module Testing

@ -1,35 +0,0 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/core/stats.proto
require 'google/protobuf'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("src/proto/grpc/core/stats.proto", :syntax => :proto3) do
add_message "grpc.core.Bucket" do
optional :start, :double, 1
optional :count, :uint64, 2
end
add_message "grpc.core.Histogram" do
repeated :buckets, :message, 1, "grpc.core.Bucket"
end
add_message "grpc.core.Metric" do
optional :name, :string, 1
oneof :value do
optional :count, :uint64, 10
optional :histogram, :message, 11, "grpc.core.Histogram"
end
end
add_message "grpc.core.Stats" do
repeated :metrics, :message, 1, "grpc.core.Metric"
end
end
end
module Grpc
module Core
Bucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Bucket").msgclass
Histogram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Histogram").msgclass
Metric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Metric").msgclass
Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Stats").msgclass
end
end

@ -10,28 +10,7 @@ require 'src/proto/grpc/testing/messages_pb'
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
# 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
pool.add_serialized_file(descriptor_data)
module Grpc
module Testing

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -8,28 +8,7 @@ require 'google/protobuf'
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
# 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
pool.add_serialized_file(descriptor_data)
module Grpc
module Testing

@ -1,3 +1,4 @@
# frozen_string_literal: true
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/proxy-service.proto
@ -5,14 +6,15 @@ require 'google/protobuf'
require 'src/proto/grpc/testing/control_pb'
require 'src/proto/grpc/testing/stats_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "grpc.testing.ProxyStat" do
optional :latency, :double, 1
end
end
descriptor_data = "\n*src/proto/grpc/testing/proxy-service.proto\x12\x0cgrpc.testing\x1a$src/proto/grpc/testing/control.proto\x1a\"src/proto/grpc/testing/stats.proto\"\x1c\n\tProxyStat\x12\x0f\n\x07latency\x18\x01 \x01(\x01\x32\xcf\x01\n\x12ProxyClientService\x12;\n\tGetConfig\x12\x12.grpc.testing.Void\x1a\x1a.grpc.testing.ClientConfig\x12;\n\nReportTime\x12\x17.grpc.testing.ProxyStat\x1a\x12.grpc.testing.Void(\x01\x12?\n\nReportHist\x12\x1b.grpc.testing.HistogramData\x1a\x12.grpc.testing.Void(\x01\x62\x06proto3"
pool = Google::Protobuf::DescriptorPool.generated_pool
pool.add_serialized_file(descriptor_data)
module Grpc
module Testing
ProxyStat = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ProxyStat").msgclass
ProxyStat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ProxyStat").msgclass
end
end

@ -24,15 +24,15 @@ module Grpc
module ProxyClientService
class Service
include GRPC::GenericService
include ::GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'grpc.testing.ProxyClientService'
rpc :GetConfig, Void, ClientConfig
rpc :ReportTime, stream(ProxyStat), Void
rpc :ReportHist, stream(HistogramData), Void
rpc :GetConfig, ::Grpc::Testing::Void, ::Grpc::Testing::ClientConfig
rpc :ReportTime, stream(::Grpc::Testing::ProxyStat), ::Grpc::Testing::Void
rpc :ReportHist, stream(::Grpc::Testing::HistogramData), ::Grpc::Testing::Void
end
Stub = Service.rpc_stub_class

@ -10,28 +10,7 @@ require 'src/proto/grpc/testing/control_pb'
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
# 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
pool.add_serialized_file(descriptor_data)
module Grpc
module Testing

@ -8,28 +8,7 @@ require 'google/protobuf'
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
# 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
pool.add_serialized_file(descriptor_data)
module Grpc
module Testing

@ -10,28 +10,7 @@ require 'src/proto/grpc/testing/control_pb'
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
# 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
pool.add_serialized_file(descriptor_data)
module Grpc
module Testing

@ -35,7 +35,7 @@
## Once protobuf 4.x is working with other dependencies,
## please replace the following fixed 3.25 version with
## '~> 4.${settings.protobuf_version.split(".")[1]}'
s.add_dependency 'google-protobuf', '~> 3.25'
s.add_dependency 'google-protobuf', '>= 3.25', '< 5.0'
s.add_dependency 'googleapis-common-protos-types', '~> 1.0'
s.add_development_dependency 'bundler', '>= 1.9'

Loading…
Cancel
Save