From f0999859c581b516924aebebc319b1fe61b6e4bc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 22 Jul 2024 14:35:53 -0700 Subject: [PATCH] fix: Regenerate test proto files using protoc v25.3 --- .../cloud/conformance/bigtable/v2/tests_pb.rb | 50 +++++++++++-------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/google-cloud-bigtable/conformance/v2/proto/google/cloud/conformance/bigtable/v2/tests_pb.rb b/google-cloud-bigtable/conformance/v2/proto/google/cloud/conformance/bigtable/v2/tests_pb.rb index 812c48c9284f..a8c3a76f6366 100644 --- a/google-cloud-bigtable/conformance/v2/proto/google/cloud/conformance/bigtable/v2/tests_pb.rb +++ b/google-cloud-bigtable/conformance/v2/proto/google/cloud/conformance/bigtable/v2/tests_pb.rb @@ -1,27 +1,37 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/conformance/bigtable/v2/tests.proto require 'google/protobuf' require 'google/bigtable/v2/bigtable_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_message "google.cloud.conformance.bigtable.v2.TestFile" do - repeated :read_rows_tests, :message, 1, "google.cloud.conformance.bigtable.v2.ReadRowsTest" - end - add_message "google.cloud.conformance.bigtable.v2.ReadRowsTest" do - optional :description, :string, 1 - repeated :chunks, :message, 2, "google.bigtable.v2.ReadRowsResponse.CellChunk" - repeated :results, :message, 3, "google.cloud.conformance.bigtable.v2.ReadRowsTest.Result" - end - add_message "google.cloud.conformance.bigtable.v2.ReadRowsTest.Result" do - optional :row_key, :string, 1 - optional :family_name, :string, 2 - optional :qualifier, :string, 3 - optional :timestamp_micros, :int64, 4 - optional :value, :string, 5 - optional :label, :string, 6 - optional :error, :bool, 7 + + +descriptor_data = "\n0google/cloud/conformance/bigtable/v2/tests.proto\x12$google.cloud.conformance.bigtable.v2\x1a!google/bigtable/v2/bigtable.proto\"W\n\x08TestFile\x12K\n\x0fread_rows_tests\x18\x01 \x03(\x0b\x32\x32.google.cloud.conformance.bigtable.v2.ReadRowsTest\"\xba\x02\n\x0cReadRowsTest\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12>\n\x06\x63hunks\x18\x02 \x03(\x0b\x32..google.bigtable.v2.ReadRowsResponse.CellChunk\x12J\n\x07results\x18\x03 \x03(\x0b\x32\x39.google.cloud.conformance.bigtable.v2.ReadRowsTest.Result\x1a\x88\x01\n\x06Result\x12\x0f\n\x07row_key\x18\x01 \x01(\t\x12\x13\n\x0b\x66\x61mily_name\x18\x02 \x01(\t\x12\x11\n\tqualifier\x18\x03 \x01(\t\x12\x18\n\x10timestamp_micros\x18\x04 \x01(\x03\x12\r\n\x05value\x18\x05 \x01(\t\x12\r\n\x05label\x18\x06 \x01(\t\x12\r\n\x05\x65rror\x18\x07 \x01(\x08\x42g\n(com.google.cloud.conformance.bigtable.v2B\x0eTestDefinition\xaa\x02*Google.Cloud.Bigtable.V2.Tests.Conformanceb\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 = [ + ["google.bigtable.v2.ReadRowsResponse.CellChunk", "google/bigtable/v2/bigtable.proto"], + ] + 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 Google @@ -29,9 +39,9 @@ module Cloud module Conformance module Bigtable module V2 - TestFile = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.conformance.bigtable.v2.TestFile").msgclass - ReadRowsTest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.conformance.bigtable.v2.ReadRowsTest").msgclass - ReadRowsTest::Result = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.conformance.bigtable.v2.ReadRowsTest.Result").msgclass + TestFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.conformance.bigtable.v2.TestFile").msgclass + ReadRowsTest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.conformance.bigtable.v2.ReadRowsTest").msgclass + ReadRowsTest::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.conformance.bigtable.v2.ReadRowsTest.Result").msgclass end end end