Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump com.google.protobuf:protobuf-bom from 3.21.12 to 3.22.0 #5237

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions buildSrc/src/main/kotlin/otel.japicmp-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import com.google.auto.value.AutoValue
import japicmp.model.JApiChangeStatus
import japicmp.model.JApiClass
import japicmp.model.JApiCompatibility
import japicmp.model.JApiCompatibilityChange
import japicmp.model.JApiMethod
Expand Down Expand Up @@ -44,6 +45,21 @@ class AllowNewAbstractMethodOnAutovalueClasses : AbstractRecordingSeenMembers()
}
}

// TODO: remove after protobuf 3.22.0 upgrade
class Protobuf3_22_Exception : AbstractRecordingSeenMembers() {
override fun maybeAddViolation(member: JApiCompatibility): Violation? {
if ((member is JApiMethod && isGeneratedMessageV3Builder(member.getjApiClass())) ||
member is JApiClass && isGeneratedMessageV3Builder(member)) {
return Violation.accept(member, "Methods moved to superlass")
}
return null
}

fun isGeneratedMessageV3Builder(member: JApiClass): Boolean {
return member.superclass.newSuperclassName.get().equals("com.google.protobuf.GeneratedMessageV3\$Builder")
}
}

class SourceIncompatibleRule : AbstractRecordingSeenMembers() {
override fun maybeAddViolation(member: JApiCompatibility): Violation? {
if (!member.isSourceCompatible()) {
Expand Down Expand Up @@ -123,6 +139,7 @@ if (!project.hasProperty("otel.release") && !project.name.startsWith("bom")) {
addRule(JApiChangeStatus.UNCHANGED, UnchangedMemberRule::class.java)
// Allow new abstract methods on autovalue
addRule(AllowNewAbstractMethodOnAutovalueClasses::class.java)
addRule(Protobuf3_22_Exception::class.java)
addRule(BinaryIncompatibleRule::class.java)
// Disallow source incompatible changes, which are allowed by default for some reason
addRule(SourceIncompatibleRule::class.java)
Expand Down
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rootProject.extra["versions"] = dependencyVersions
val DEPENDENCY_BOMS = listOf(
"com.fasterxml.jackson:jackson-bom:2.14.2",
"com.google.guava:guava-bom:31.1-jre",
"com.google.protobuf:protobuf-bom:3.21.12",
"com.google.protobuf:protobuf-bom:3.22.0",
"com.linecorp.armeria:armeria-bom:1.22.1",
"com.squareup.okhttp3:okhttp-bom:4.10.0",
"com.squareup.okio:okio-bom:3.3.0", // applies to transitive dependencies of okhttp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,67 @@
Comparing source compatibility of against
No changes.
*** MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$OperationSamplingStrategy (compatible)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
--- REMOVED METHOD: PUBLIC(-) FINAL(-) com.google.protobuf.UnknownFieldSet getUnknownFields()
***! MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$OperationSamplingStrategy$Builder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$OperationSamplingStrategy$Builder addRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$OperationSamplingStrategy$Builder clearField(com.google.protobuf.Descriptors$FieldDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$OperationSamplingStrategy$Builder clearOneof(com.google.protobuf.Descriptors$OneofDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$OperationSamplingStrategy$Builder clone()
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$OperationSamplingStrategy$Builder setField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$OperationSamplingStrategy$Builder setRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, int, java.lang.Object)
*** MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$PerOperationSamplingStrategies (compatible)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
--- REMOVED METHOD: PUBLIC(-) FINAL(-) com.google.protobuf.UnknownFieldSet getUnknownFields()
***! MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$PerOperationSamplingStrategies$Builder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$PerOperationSamplingStrategies$Builder addRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$PerOperationSamplingStrategies$Builder clearField(com.google.protobuf.Descriptors$FieldDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$PerOperationSamplingStrategies$Builder clearOneof(com.google.protobuf.Descriptors$OneofDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$PerOperationSamplingStrategies$Builder clone()
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$PerOperationSamplingStrategies$Builder setField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$PerOperationSamplingStrategies$Builder setRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, int, java.lang.Object)
*** MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$ProbabilisticSamplingStrategy (compatible)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
--- REMOVED METHOD: PUBLIC(-) FINAL(-) com.google.protobuf.UnknownFieldSet getUnknownFields()
***! MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$ProbabilisticSamplingStrategy$Builder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$ProbabilisticSamplingStrategy$Builder addRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$ProbabilisticSamplingStrategy$Builder clearField(com.google.protobuf.Descriptors$FieldDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$ProbabilisticSamplingStrategy$Builder clearOneof(com.google.protobuf.Descriptors$OneofDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$ProbabilisticSamplingStrategy$Builder clone()
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$ProbabilisticSamplingStrategy$Builder setField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$ProbabilisticSamplingStrategy$Builder setRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, int, java.lang.Object)
*** MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$RateLimitingSamplingStrategy (compatible)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
--- REMOVED METHOD: PUBLIC(-) FINAL(-) com.google.protobuf.UnknownFieldSet getUnknownFields()
***! MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$RateLimitingSamplingStrategy$Builder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$RateLimitingSamplingStrategy$Builder addRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$RateLimitingSamplingStrategy$Builder clearField(com.google.protobuf.Descriptors$FieldDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$RateLimitingSamplingStrategy$Builder clearOneof(com.google.protobuf.Descriptors$OneofDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$RateLimitingSamplingStrategy$Builder clone()
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$RateLimitingSamplingStrategy$Builder setField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$RateLimitingSamplingStrategy$Builder setRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, int, java.lang.Object)
*** MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyParameters (compatible)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
--- REMOVED METHOD: PUBLIC(-) FINAL(-) com.google.protobuf.UnknownFieldSet getUnknownFields()
***! MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyParameters$Builder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyParameters$Builder addRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyParameters$Builder clearField(com.google.protobuf.Descriptors$FieldDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyParameters$Builder clearOneof(com.google.protobuf.Descriptors$OneofDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyParameters$Builder clone()
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyParameters$Builder setField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyParameters$Builder setRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, int, java.lang.Object)
*** MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyResponse (compatible)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
--- REMOVED METHOD: PUBLIC(-) FINAL(-) com.google.protobuf.UnknownFieldSet getUnknownFields()
***! MODIFIED CLASS: PUBLIC STATIC FINAL io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyResponse$Builder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyResponse$Builder addRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyResponse$Builder clearField(com.google.protobuf.Descriptors$FieldDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyResponse$Builder clearOneof(com.google.protobuf.Descriptors$OneofDescriptor)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyResponse$Builder clone()
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyResponse$Builder setField(com.google.protobuf.Descriptors$FieldDescriptor, java.lang.Object)
---! REMOVED METHOD: PUBLIC(-) io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling$SamplingStrategyResponse$Builder setRepeatedField(com.google.protobuf.Descriptors$FieldDescriptor, int, java.lang.Object)
6 changes: 3 additions & 3 deletions sdk-extensions/jaeger-remote-sampler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ dependencies {

testImplementation(project(":sdk:testing"))
testImplementation(project(":sdk-extensions:autoconfigure"))
testImplementation("com.google.protobuf:protobuf-java-util")
testImplementation("com.google.guava:guava:31.1-jre")
testImplementation("com.google.protobuf:protobuf-java")
testImplementation("com.linecorp.armeria:armeria-junit5")
testImplementation("com.linecorp.armeria:armeria-grpc-protocol")
testImplementation("org.testcontainers:junit-jupiter")
Expand All @@ -37,8 +38,7 @@ testing {
dependencies {
implementation(project(":sdk:testing"))
implementation(project(":exporters:common"))

implementation("com.google.protobuf:protobuf-java-util")
implementation("com.google.protobuf:protobuf-java")
implementation("com.linecorp.armeria:armeria-junit5")
implementation("com.linecorp.armeria:armeria-grpc-protocol")
implementation("org.testcontainers:junit-jupiter")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.sdk.extension.trace.jaeger.sampler;

import com.google.protobuf.Descriptors;
import io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2.Sampling;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

class JApiCmpTest {

// TODO: delete before merging
@Test
@SuppressWarnings({"ModifiedButNotUsed", "ReturnValueIgnored"})
@Disabled
void compatibility() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test confirms what @anuraaga asserts, which is that the methods have been moved to the parent class.

I've added an exception for this condition to japicmp. If folks agree, I'll delete this test before merging, and remove the japicmp exception after the next release.

Sampling.OperationSamplingStrategy.newBuilder()
.addRepeatedField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.OperationSamplingStrategy.newBuilder().clearField((Descriptors.FieldDescriptor) null);
Sampling.OperationSamplingStrategy.newBuilder().clearOneof((Descriptors.OneofDescriptor) null);
Sampling.OperationSamplingStrategy.newBuilder().clone();
Sampling.OperationSamplingStrategy.newBuilder()
.setField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.OperationSamplingStrategy.newBuilder()
.setRepeatedField((Descriptors.FieldDescriptor) null, 0, (Object) null);

Sampling.PerOperationSamplingStrategies.newBuilder()
.addRepeatedField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.PerOperationSamplingStrategies.newBuilder()
.clearField((Descriptors.FieldDescriptor) null);
Sampling.PerOperationSamplingStrategies.newBuilder()
.clearOneof((Descriptors.OneofDescriptor) null);
Sampling.PerOperationSamplingStrategies.newBuilder().clone();
Sampling.PerOperationSamplingStrategies.newBuilder()
.setField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.PerOperationSamplingStrategies.newBuilder()
.setRepeatedField((Descriptors.FieldDescriptor) null, 0, (Object) null);

Sampling.ProbabilisticSamplingStrategy.newBuilder()
.addRepeatedField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.ProbabilisticSamplingStrategy.newBuilder()
.clearField((Descriptors.FieldDescriptor) null);
Sampling.ProbabilisticSamplingStrategy.newBuilder()
.clearOneof((Descriptors.OneofDescriptor) null);
Sampling.ProbabilisticSamplingStrategy.newBuilder().clone();
Sampling.ProbabilisticSamplingStrategy.newBuilder()
.setField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.ProbabilisticSamplingStrategy.newBuilder()
.setRepeatedField((Descriptors.FieldDescriptor) null, 0, (Object) null);

Sampling.RateLimitingSamplingStrategy.newBuilder()
.addRepeatedField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.RateLimitingSamplingStrategy.newBuilder()
.clearField((Descriptors.FieldDescriptor) null);
Sampling.RateLimitingSamplingStrategy.newBuilder()
.clearOneof((Descriptors.OneofDescriptor) null);
Sampling.RateLimitingSamplingStrategy.newBuilder().clone();
Sampling.RateLimitingSamplingStrategy.newBuilder()
.setField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.RateLimitingSamplingStrategy.newBuilder()
.setRepeatedField((Descriptors.FieldDescriptor) null, 0, (Object) null);

Sampling.SamplingStrategyParameters.newBuilder()
.addRepeatedField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.SamplingStrategyParameters.newBuilder().clearField((Descriptors.FieldDescriptor) null);
Sampling.SamplingStrategyParameters.newBuilder().clearOneof((Descriptors.OneofDescriptor) null);
Sampling.SamplingStrategyParameters.newBuilder().clone();
Sampling.SamplingStrategyParameters.newBuilder()
.setField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.SamplingStrategyParameters.newBuilder()
.setRepeatedField((Descriptors.FieldDescriptor) null, 0, (Object) null);

Sampling.SamplingStrategyResponse.newBuilder()
.addRepeatedField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.SamplingStrategyResponse.newBuilder().clearField((Descriptors.FieldDescriptor) null);
Sampling.SamplingStrategyResponse.newBuilder().clearOneof((Descriptors.OneofDescriptor) null);
Sampling.SamplingStrategyResponse.newBuilder().clone();
Sampling.SamplingStrategyResponse.newBuilder()
.setField((Descriptors.FieldDescriptor) null, (Object) null);
Sampling.SamplingStrategyResponse.newBuilder()
.setRepeatedField((Descriptors.FieldDescriptor) null, 0, (Object) null);
}
}