From 4f074ec6be85f4c99f2daac7ce979ad401e3c954 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 09:14:04 +0200 Subject: [PATCH 1/4] chore(deps): update github actions (#12859) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build-common.yml | 2 +- .github/workflows/codeql-daily.yml | 4 ++-- .github/workflows/reusable-test-indy.yml | 2 +- .github/workflows/reusable-test-latest-deps.yml | 2 +- .github/workflows/scorecard.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-common.yml b/.github/workflows/build-common.yml index ae12e9456022..62890396ea43 100644 --- a/.github/workflows/build-common.yml +++ b/.github/workflows/build-common.yml @@ -230,7 +230,7 @@ jobs: # vaadin tests use pnpm - name: Cache pnpm modules - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ~/.pnpm-store key: ${{ runner.os }}-test-cache-pnpm-modules diff --git a/.github/workflows/codeql-daily.yml b/.github/workflows/codeql-daily.yml index 7409888185e3..e12b1f0d512d 100644 --- a/.github/workflows/codeql-daily.yml +++ b/.github/workflows/codeql-daily.yml @@ -30,7 +30,7 @@ jobs: java-version-file: .java-version - name: Initialize CodeQL - uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 + uses: github/codeql-action/init@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6 with: languages: java # using "latest" helps to keep up with the latest Kotlin support @@ -45,7 +45,7 @@ jobs: run: ./gradlew assemble -x javadoc --no-build-cache --no-daemon - name: Perform CodeQL analysis - uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 + uses: github/codeql-action/analyze@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6 workflow-notification: needs: diff --git a/.github/workflows/reusable-test-indy.yml b/.github/workflows/reusable-test-indy.yml index ab085def4ee0..807af02af7a1 100644 --- a/.github/workflows/reusable-test-indy.yml +++ b/.github/workflows/reusable-test-indy.yml @@ -52,7 +52,7 @@ jobs: # vaadin tests use pnpm - name: Cache pnpm modules - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ~/.pnpm-store key: ${{ runner.os }}-test-latest-cache-pnpm-modules diff --git a/.github/workflows/reusable-test-latest-deps.yml b/.github/workflows/reusable-test-latest-deps.yml index 3c30ec2515ae..bff9320d69e2 100644 --- a/.github/workflows/reusable-test-latest-deps.yml +++ b/.github/workflows/reusable-test-latest-deps.yml @@ -46,7 +46,7 @@ jobs: # vaadin tests use pnpm - name: Cache pnpm modules - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ~/.pnpm-store key: ${{ runner.os }}-test-latest-cache-pnpm-modules diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 002c91742a37..51337fa2ff9a 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -64,6 +64,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5 + uses: github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6 with: sarif_file: results.sarif From 265cbe47fbb4a398805b6f4b8ca846b1096846ee Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 9 Dec 2024 07:14:09 -0800 Subject: [PATCH 2/4] Remove public method (#12857) --- .../spring/webmvc/v5_3/SpringWebMvcTelemetryBuilder.java | 7 +------ .../spring/webmvc/v6_0/SpringWebMvcTelemetryBuilder.java | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcTelemetryBuilder.java b/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcTelemetryBuilder.java index 0c31ace56234..a24abdad8105 100644 --- a/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcTelemetryBuilder.java +++ b/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcTelemetryBuilder.java @@ -27,7 +27,7 @@ public final class SpringWebMvcTelemetryBuilder { builder; static { - SpringMvcBuilderUtil.setBuilderExtractor(SpringWebMvcTelemetryBuilder::getBuilder); + SpringMvcBuilderUtil.setBuilderExtractor(builder -> builder.builder); } SpringWebMvcTelemetryBuilder(OpenTelemetry openTelemetry) { @@ -122,9 +122,4 @@ public SpringWebMvcTelemetryBuilder setEmitExperimentalHttpServerMetrics( public SpringWebMvcTelemetry build() { return new SpringWebMvcTelemetry(builder.build()); } - - public DefaultHttpServerInstrumenterBuilder - getBuilder() { - return builder; - } } diff --git a/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcTelemetryBuilder.java b/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcTelemetryBuilder.java index 1c34c847a3b2..7f768b057cbb 100644 --- a/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcTelemetryBuilder.java +++ b/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcTelemetryBuilder.java @@ -26,7 +26,7 @@ public final class SpringWebMvcTelemetryBuilder { builder; static { - SpringMvcBuilderUtil.setBuilderExtractor(SpringWebMvcTelemetryBuilder::getBuilder); + SpringMvcBuilderUtil.setBuilderExtractor(builder -> builder.builder); } SpringWebMvcTelemetryBuilder(OpenTelemetry openTelemetry) { @@ -121,9 +121,4 @@ public SpringWebMvcTelemetryBuilder setEmitExperimentalHttpServerMetrics( public SpringWebMvcTelemetry build() { return new SpringWebMvcTelemetry(builder.build()); } - - public DefaultHttpServerInstrumenterBuilder - getBuilder() { - return builder; - } } From 9cf097364c56b9e78bcf3da7db5e9322fefe9a2a Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Mon, 9 Dec 2024 17:42:42 +0200 Subject: [PATCH 3/4] Retry opening couchbase 3.1 bucket (#12865) --- .../couchbase/v3_1/CouchbaseClient31Test.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/instrumentation/couchbase/couchbase-3.1/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1/CouchbaseClient31Test.java b/instrumentation/couchbase/couchbase-3.1/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1/CouchbaseClient31Test.java index d853cffcf031..c53e2d662fca 100644 --- a/instrumentation/couchbase/couchbase-3.1/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1/CouchbaseClient31Test.java +++ b/instrumentation/couchbase/couchbase-3.1/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/couchbase/v3_1/CouchbaseClient31Test.java @@ -5,8 +5,11 @@ package io.opentelemetry.javaagent.instrumentation.couchbase.v3_1; +import static org.awaitility.Awaitility.await; + import com.couchbase.client.core.env.TimeoutConfig; import com.couchbase.client.core.error.DocumentNotFoundException; +import com.couchbase.client.core.error.UnambiguousTimeoutException; import com.couchbase.client.java.Bucket; import com.couchbase.client.java.Cluster; import com.couchbase.client.java.ClusterOptions; @@ -62,11 +65,18 @@ static void setup() { ClusterOptions.clusterOptions(couchbase.getUsername(), couchbase.getPassword()) .environment(environment)); - Bucket bucket = cluster.bucket("test"); - collection = bucket.defaultCollection(); + // wait and retry in the hope that it will help against test flakiness + await() + .atMost(Duration.ofMinutes(2)) + .ignoreException(UnambiguousTimeoutException.class) + .until( + () -> { + Bucket bucket = cluster.bucket("test"); + collection = bucket.defaultCollection(); - // Wait 1 minute due to slow startup contributing to flakiness - bucket.waitUntilReady(Duration.ofMinutes(1)); + bucket.waitUntilReady(Duration.ofSeconds(30)); + return true; + }); } @AfterAll From d26c1f6d5102b2c1d7a7fd93586a33f62dedcc3a Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Mon, 9 Dec 2024 17:46:07 +0200 Subject: [PATCH 4/4] Fix gradle deprecation warnings (#12864) --- bom-alpha/build.gradle.kts | 2 +- custom-checks/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bom-alpha/build.gradle.kts b/bom-alpha/build.gradle.kts index ccb2917b11eb..b4bd0cced028 100644 --- a/bom-alpha/build.gradle.kts +++ b/bom-alpha/build.gradle.kts @@ -16,7 +16,7 @@ dependencies { api(platform(project(":bom"))) // Get the semconv version from :dependencyManagement - val semconvConstraint = project(":dependencyManagement").dependencyProject.configurations["api"].allDependencyConstraints + val semconvConstraint = project.project(project(":dependencyManagement").path).configurations["api"].allDependencyConstraints .find { it.group.equals("io.opentelemetry.semconv") && it.name.equals("opentelemetry-semconv") } ?: throw Exception("semconv constraint not found") diff --git a/custom-checks/build.gradle.kts b/custom-checks/build.gradle.kts index 049bd43818eb..b8e2875067ee 100644 --- a/custom-checks/build.gradle.kts +++ b/custom-checks/build.gradle.kts @@ -73,7 +73,7 @@ tasks.withType().configureEach { configurations { named("errorprone") { dependencies.removeIf { - it is ProjectDependency && it.dependencyProject == project + it is ProjectDependency && it.group == project.group && it.name == project.name } } }