Skip to content

Commit 292ad41

Browse files
committed
Fix CI: handle empty jar in NoSharedInternalCodeTest, add snakeyaml to testConvertToModel
- NoSharedInternalCodeTest: skip check when jar has no OpenTelemetry classes; autoconfigure-config is a dependency-only convenience module with no Java sources - api/incubator testConvertToModel: add snakeyaml-engine to runtime deps; DeclarativeConfigurationParser (now in autoconfigure) uses snakeyaml internally but autoconfigure declares it compileOnly so it doesn't flow transitively Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 199db3c commit 292ad41

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

all/src/test/java/io/opentelemetry/all/NoSharedInternalCodeTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ void noSharedInternalCode(String artifactId, String absolutePath) throws IOExcep
6969
.filter(packageName -> packageName.startsWith(OTEL_BASE_PACKAGE))
7070
.collect(Collectors.toSet());
7171

72+
if (artifactOtelPackages.isEmpty()) {
73+
logger.log(Level.INFO, artifactId + " has no OpenTelemetry classes, skipping check");
74+
return;
75+
}
76+
7277
ClassesShouldConjunction noSharedInternalCodeRule =
7378
noClasses()
7479
.that()

api/incubator/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ testing {
3636
register<JvmTestSuite>("testConvertToModel") {
3737
dependencies {
3838
implementation("com.fasterxml.jackson.core:jackson-databind")
39+
implementation("org.snakeyaml:snakeyaml-engine")
3940
implementation(project(":sdk-extensions:incubator"))
4041
implementation(project(":sdk-extensions:autoconfigure"))
4142
implementation("com.google.guava:guava")

0 commit comments

Comments
 (0)