all: upgrade protobuf to v3.11.4

This introduces some conformance test failures,
which occur not because our implementation changed behavior,
but because new cases were added.

Future work will be to investigate these failuress.

Change-Id: Ifb17465883c417acd46865744572f8cd0c858383
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/222857
Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
Joe Tsai 2020-03-01 03:01:46 -08:00
parent f75a338d9c
commit f92988f900
4 changed files with 49 additions and 45 deletions

View File

@ -32,7 +32,7 @@ var (
regenerate = flag.Bool("regenerate", false, "regenerate files") regenerate = flag.Bool("regenerate", false, "regenerate files")
buildRelease = flag.Bool("buildRelease", false, "build release binaries") buildRelease = flag.Bool("buildRelease", false, "build release binaries")
protobufVersion = "3.9.1" protobufVersion = "3.11.4"
golangVersions = []string{"1.9.7", "1.10.8", "1.11.13", "1.12.17", "1.13.8", "1.14"} golangVersions = []string{"1.9.7", "1.10.8", "1.11.13", "1.12.17", "1.13.8", "1.14"}
golangLatest = golangVersions[len(golangVersions)-1] golangLatest = golangVersions[len(golangVersions)-1]
@ -218,27 +218,6 @@ func mustInitDeps(t *testing.T) {
command{Dir: protobufPath}.mustRun(t, "make") command{Dir: protobufPath}.mustRun(t, "make")
command{Dir: filepath.Join(protobufPath, "conformance")}.mustRun(t, "make") command{Dir: filepath.Join(protobufPath, "conformance")}.mustRun(t, "make")
} }
// The benchmark directory isn't present in the release download,
// so fetch needed files directly.
for _, path := range benchmarkProtos {
src := fmt.Sprintf("https://raw.githubusercontent.com/protocolbuffers/protobuf/v%v/%v", protobufVersion, path)
dst := filepath.Join(protobufPath, path)
if _, err := os.Stat(dst); err != nil {
downloadFile(check, dst, src)
}
}
benchdataPath := filepath.Join(testDir, "benchdata")
for _, path := range []string{
"benchmarks/datasets/google_message1/proto2/dataset.google_message1_proto2.pb",
"benchmarks/datasets/google_message1/proto3/dataset.google_message1_proto3.pb",
"benchmarks/datasets/google_message2/dataset.google_message2.pb",
} {
src := fmt.Sprintf("https://raw.githubusercontent.com/protocolbuffers/protobuf/v%v/%v", protobufVersion, path)
dst := filepath.Join(benchdataPath, filepath.Base(path))
if _, err := os.Stat(dst); err != nil {
downloadFile(check, dst, src)
}
}
check(os.Setenv("PROTOBUF_ROOT", protobufPath)) // for generate-protos check(os.Setenv("PROTOBUF_ROOT", protobufPath)) // for generate-protos
registerBinary("conform-test-runner", filepath.Join(protobufPath, "conformance", "conformance-test-runner")) registerBinary("conform-test-runner", filepath.Join(protobufPath, "conformance", "conformance-test-runner"))
registerBinary("protoc", filepath.Join(protobufPath, "src", "protoc")) registerBinary("protoc", filepath.Join(protobufPath, "src", "protoc"))
@ -452,23 +431,3 @@ func mustRunCommand(t *testing.T, args ...string) string {
t.Helper() t.Helper()
return command{}.mustRun(t, args...) return command{}.mustRun(t, args...)
} }
var benchmarkProtos = []string{
"benchmarks/benchmarks.proto",
"benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.proto",
"benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.proto",
"benchmarks/datasets/google_message2/benchmark_message2.proto",
"benchmarks/datasets/google_message3/benchmark_message3.proto",
"benchmarks/datasets/google_message3/benchmark_message3_1.proto",
"benchmarks/datasets/google_message3/benchmark_message3_2.proto",
"benchmarks/datasets/google_message3/benchmark_message3_3.proto",
"benchmarks/datasets/google_message3/benchmark_message3_4.proto",
"benchmarks/datasets/google_message3/benchmark_message3_5.proto",
"benchmarks/datasets/google_message3/benchmark_message3_6.proto",
"benchmarks/datasets/google_message3/benchmark_message3_7.proto",
"benchmarks/datasets/google_message3/benchmark_message3_8.proto",
"benchmarks/datasets/google_message4/benchmark_message4.proto",
"benchmarks/datasets/google_message4/benchmark_message4_1.proto",
"benchmarks/datasets/google_message4/benchmark_message4_2.proto",
"benchmarks/datasets/google_message4/benchmark_message4_3.proto",
}

View File

@ -3,9 +3,15 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
# Download large benchmark datasets.
cd "$(git rev-parse --show-toplevel)" cd "$(git rev-parse --show-toplevel)"
mkdir -p .cache/benchdata mkdir -p .cache/benchdata
cd .cache/benchdata cd .cache/benchdata
# Download small benchmark datasets.
PROTOBUF_VERSION=v3.11.4
curl -s -O https://raw.githubusercontent.com/protocolbuffers/protobuf/$PROTOBUF_VERSION/benchmarks/datasets/google_message1/proto2/dataset.google_message1_proto2.pb
curl -s -O https://raw.githubusercontent.com/protocolbuffers/protobuf/$PROTOBUF_VERSION/benchmarks/datasets/google_message1/proto3/dataset.google_message1_proto3.pb
curl -s -O https://raw.githubusercontent.com/protocolbuffers/protobuf/$PROTOBUF_VERSION/benchmarks/datasets/google_message2/dataset.google_message2.pb
# Download large benchmark datasets.
curl -s https://storage.googleapis.com/protobuf_opensource_benchmark_data/datasets.tar.gz | tar zx curl -s https://storage.googleapis.com/protobuf_opensource_benchmark_data/datasets.tar.gz | tar zx

View File

@ -1 +1,40 @@
Recommended.Proto2.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.DOUBLE.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.FIXED32.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.FIXED64.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.INT32.PackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.INT64.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.SFIXED32.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.SFIXED64.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.SINT64.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto2.ProtobufInput.ValidDataRepeated.UINT64.UnpackedInput.PackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.BOOL.UnpackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.ENUM.UnpackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT32.UnpackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.INT64.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT32.UnpackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.SINT64.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT32.UnpackedInput.UnpackedOutput.ProtobufOutput
Recommended.Proto3.ProtobufInput.ValidDataRepeated.UINT64.PackedInput.UnpackedOutput.ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataOneof.MESSAGE.Merge.JsonOutput
Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter

View File

@ -238,7 +238,7 @@ import (
// //
// The implementation of any API method which has a FieldMask type field in the // The implementation of any API method which has a FieldMask type field in the
// request should verify the included field paths, and return an // request should verify the included field paths, and return an
// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. // `INVALID_ARGUMENT` error if any path is unmappable.
type FieldMask struct { type FieldMask struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache