Skip to content

Commit d7db9d2

Browse files
committed
Merge branch 'main' into opentelemetrybot/update-opentelemetry-sdk-to-1.47.0
2 parents 82638a7 + 85a52ca commit d7db9d2

16 files changed

+1676
-477
lines changed

.fossa.yml

+1,101
Large diffs are not rendered by default.

.github/repository-settings.md

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ settings](https://github.com/open-telemetry/community/blob/main/docs/how-to-conf
125125

126126
### Organization secrets
127127

128+
- `FOSSA_API_KEY`
128129
- `OTELBOT_PRIVATE_KEY`
129130

130131
### Organization variables

.github/workflows/build-common.yml

+37
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,43 @@ jobs:
8787
exit 1
8888
fi
8989
90+
fossa-configuration-check:
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
94+
95+
- name: Free disk space
96+
run: .github/scripts/gha-free-disk-space.sh
97+
98+
- name: Set up JDK for running Gradle
99+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
100+
with:
101+
distribution: temurin
102+
java-version-file: .java-version
103+
104+
- name: Setup Gradle
105+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
106+
with:
107+
cache-read-only: ${{ inputs.cache-read-only }}
108+
109+
- name: Generate FOSSA configuration
110+
run: ./gradlew generateFossaConfiguration
111+
112+
- name: Check configuration
113+
run: |
114+
git add .fossa.yml
115+
if [[ $(git diff --cached --shortstat .fossa.yml) == "" ]]
116+
then
117+
echo "FOSSA configuration is up-to-date."
118+
else
119+
echo "FOSSA configuration is not up-to-date, please run './gradlew generateFossaConfiguration' locally and commit."
120+
echo
121+
git diff --cached --stat .fossa.yml
122+
echo
123+
git diff --cached .fossa.yml
124+
exit 1
125+
fi
126+
90127
# this is needed because we don't auto-update dependencies in instrumentation/**
91128
# and so we want to enforce that all "real" dependencies are dependency managed
92129
extra-dependency-management-enforcement:

.github/workflows/fossa.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: FOSSA
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
fossa:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
18+
with:
19+
api-key: ${{secrets.FOSSA_API_KEY}}

build.gradle.kts

+33
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,36 @@ if (gradle.startParameter.taskNames.contains("listTestsInPartition")) {
106106
}
107107
}
108108
}
109+
110+
tasks {
111+
val generateFossaConfiguration by registering {
112+
group = "Help"
113+
description = "Generate .fossa.yml configuration file"
114+
115+
doLast {
116+
File(".fossa.yml").printWriter().use { writer ->
117+
writer.println("version: 3")
118+
writer.println()
119+
writer.println("targets:")
120+
writer.println(" only:")
121+
writer.println(" # only scanning the modules which are published")
122+
writer.println(" # (as opposed to internal testing modules")
123+
rootProject.subprojects
124+
.sortedBy { it.findProperty("archivesName") as String? }
125+
.filter { !it.name.startsWith("bom") }
126+
.filter { it.plugins.hasPlugin("maven-publish") }
127+
.forEach {
128+
writer.println(" - type: gradle")
129+
writer.println(" path: ./")
130+
writer.println(" target: '${it.path}'")
131+
}
132+
writer.println()
133+
writer.println("experimental:")
134+
writer.println(" gradle:")
135+
writer.println(" configurations-only:")
136+
writer.println(" # consumer will only be exposed to these dependencies")
137+
writer.println(" - runtimeClasspath")
138+
}
139+
}
140+
}
141+
}

dependencyManagement/build.gradle.kts

+8-12
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ plugins {
44

55
data class DependencySet(val group: String, val version: String, val modules: List<String>)
66

7-
val dependencyVersions = hashMapOf<String, String>()
8-
rootProject.extra["versions"] = dependencyVersions
9-
107
// this line is managed by .github/scripts/update-sdk-version.sh
118
val otelSdkVersion = "1.47.0"
129
val otelContribVersion = "1.43.0-alpha"
@@ -27,15 +24,16 @@ val groovyVersion = "4.0.25"
2724
// configurations.testRuntimeClasspath.resolutionStrategy.force "com.google.guava:guava:19.0"
2825

2926
val DEPENDENCY_BOMS = listOf(
27+
// for some reason boms show up as runtime dependencies in license and vulnerability scans
28+
// even if they are only used by test dependencies, so not using junit bom since it is LGPL
29+
3030
"com.fasterxml.jackson:jackson-bom:2.18.2",
3131
"com.squareup.okio:okio-bom:3.10.2", // see https://github.com/open-telemetry/opentelemetry-java/issues/5637
3232
"com.google.guava:guava-bom:33.4.0-jre",
3333
"org.apache.groovy:groovy-bom:${groovyVersion}",
3434
"io.opentelemetry:opentelemetry-bom:${otelSdkVersion}",
3535
"io.opentelemetry:opentelemetry-bom-alpha:${otelSdkAlphaVersion}",
36-
"org.junit:junit-bom:5.11.4",
37-
"org.testcontainers:testcontainers-bom:1.20.4",
38-
"org.spockframework:spock-bom:2.4-M5-groovy-4.0"
36+
"org.testcontainers:testcontainers-bom:1.20.4"
3937
)
4038

4139
val autoServiceVersion = "1.1.1"
@@ -83,6 +81,10 @@ val CORE_DEPENDENCIES = listOf(
8381
// There are dependencies included here that appear to have no usages, but are maintained at
8482
// this top level to help consistently satisfy large numbers of transitive dependencies.
8583
val DEPENDENCIES = listOf(
84+
"org.junit.jupiter:junit-jupiter-api:5.11.4",
85+
"org.spockframework:spock-core:2.4-M5-groovy-4.0",
86+
"org.spockframework:spock-junit4:2.4-M5-groovy-4.0",
87+
8688
"io.r2dbc:r2dbc-proxy:1.1.5.RELEASE",
8789
"ch.qos.logback:logback-classic:1.3.15", // 1.4+ requires Java 11+
8890
"com.github.stefanbirkner:system-lambda:1.2.1",
@@ -127,19 +129,13 @@ javaPlatform {
127129
dependencies {
128130
for (bom in DEPENDENCY_BOMS) {
129131
api(enforcedPlatform(bom))
130-
val split = bom.split(':')
131-
dependencyVersions[split[0]] = split[2]
132132
}
133133
constraints {
134134
for (dependency in CORE_DEPENDENCIES) {
135135
api(dependency)
136-
val split = dependency.split(':')
137-
dependencyVersions[split[0]] = split[2]
138136
}
139137
for (dependency in DEPENDENCIES) {
140138
api(dependency)
141-
val split = dependency.split(':')
142-
dependencyVersions[split[0]] = split[2]
143139
}
144140
}
145141
}

instrumentation/spring/starters/zipkin-spring-boot-starter/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ group = "io.opentelemetry.instrumentation"
88
val springBootVersion = "2.6.15"
99

1010
dependencies {
11-
api("org.springframework.boot:spring-boot-starter:$springBootVersion")
11+
compileOnly("org.springframework.boot:spring-boot-starter:$springBootVersion")
1212
api(project(":instrumentation:spring:starters:spring-boot-starter"))
1313
api("io.opentelemetry:opentelemetry-exporter-zipkin")
1414
}

testing-common/integration-tests/build.gradle.kts

+2-15
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dependencies {
1111
testCompileOnly(project(":javaagent-bootstrap"))
1212
testCompileOnly(project(":javaagent-extension-api"))
1313
testCompileOnly(project(":muzzle"))
14+
testCompileOnly("com.google.auto.service:auto-service-annotations")
15+
testCompileOnly("com.google.code.findbugs:annotations")
1416

1517
testImplementation("net.bytebuddy:byte-buddy")
1618
testImplementation("net.bytebuddy:byte-buddy-agent")
@@ -47,25 +49,10 @@ tasks {
4749
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
4850
}
4951

50-
val testIndyModuleOldBytecodeInstrumentation by registering(Test::class) {
51-
filter {
52-
includeTestsMatching("InstrumentOldBytecode")
53-
}
54-
include("**/InstrumentOldBytecode.*")
55-
}
56-
57-
val testInlineModuleOldBytecodeInstrumentation by registering(Test::class) {
58-
filter {
59-
includeTestsMatching("InstrumentOldBytecode")
60-
}
61-
include("**/InstrumentOldBytecode.*")
62-
}
63-
6452
test {
6553
filter {
6654
excludeTestsMatching("context.FieldInjectionDisabledTest")
6755
excludeTestsMatching("context.FieldBackedImplementationTest")
68-
excludeTestsMatching("InstrumentOldBytecode")
6956
}
7057
// this is needed for AgentInstrumentationSpecificationTest
7158
jvmArgs("-Dotel.javaagent.exclude-classes=config.exclude.packagename.*,config.exclude.SomeClass,config.exclude.SomeClass\$NestedClass")

testing-common/integration-tests/src/test/groovy/AgentInstrumentationSpecificationTest.groovy

-154
This file was deleted.

testing-common/integration-tests/src/test/groovy/InstrumentOldBytecode.groovy

-14
This file was deleted.

0 commit comments

Comments
 (0)