Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into add-attributes-extr…
Browse files Browse the repository at this point in the history
…actor
  • Loading branch information
trask committed Dec 9, 2024
2 parents 7b26f87 + d26c1f6 commit cd7d933
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-test-indy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-test-latest-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion bom-alpha/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion custom-checks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ tasks.withType<Javadoc>().configureEach {
configurations {
named("errorprone") {
dependencies.removeIf {
it is ProjectDependency && it.dependencyProject == project
it is ProjectDependency && it.group == project.group && it.name == project.name
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final class SpringWebMvcTelemetryBuilder {
builder;

static {
SpringMvcBuilderUtil.setBuilderExtractor(SpringWebMvcTelemetryBuilder::getBuilder);
SpringMvcBuilderUtil.setBuilderExtractor(builder -> builder.builder);
}

SpringWebMvcTelemetryBuilder(OpenTelemetry openTelemetry) {
Expand Down Expand Up @@ -126,9 +126,4 @@ public SpringWebMvcTelemetryBuilder setEmitExperimentalHttpServerMetrics(
public SpringWebMvcTelemetry build() {
return new SpringWebMvcTelemetry(builder.build());
}

public DefaultHttpServerInstrumenterBuilder<HttpServletRequest, HttpServletResponse>
getBuilder() {
return builder;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public final class SpringWebMvcTelemetryBuilder {
builder;

static {
SpringMvcBuilderUtil.setBuilderExtractor(SpringWebMvcTelemetryBuilder::getBuilder);
SpringMvcBuilderUtil.setBuilderExtractor(builder -> builder.builder);
}

SpringWebMvcTelemetryBuilder(OpenTelemetry openTelemetry) {
Expand Down Expand Up @@ -125,9 +125,4 @@ public SpringWebMvcTelemetryBuilder setEmitExperimentalHttpServerMetrics(
public SpringWebMvcTelemetry build() {
return new SpringWebMvcTelemetry(builder.build());
}

public DefaultHttpServerInstrumenterBuilder<HttpServletRequest, HttpServletResponse>
getBuilder() {
return builder;
}
}

0 comments on commit cd7d933

Please sign in to comment.