Skip to content

Module cleanup (run 25289766144)#18539

Merged
trask merged 12 commits into
mainfrom
otelbot/module-cleanup-25289766144
May 4, 2026
Merged

Module cleanup (run 25289766144)#18539
trask merged 12 commits into
mainfrom
otelbot/module-cleanup-25289766144

Conversation

@otelbot

@otelbot otelbot Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Automated module cleanup walked the following modules in order
and stopped after accumulating at least 10 modified files:

  • cassandra-4.4:testing
  • cassandra-common-4.0:testing
  • clickhouse-client-common-0.5:javaagent
  • clickhouse-client-v1-0.5:javaagent
  • clickhouse-client-v2-0.8:javaagent
  • couchbase-2.0:javaagent
  • couchbase-2.6:javaagent
  • couchbase-3.1.6:javaagent
  • couchbase-3.1.6:tracing-opentelemetry-shaded
  • couchbase-3.1:javaagent
  • couchbase-3.1:tracing-opentelemetry-shaded
  • couchbase-3.2:javaagent
  • couchbase-3.2:tracing-opentelemetry-shaded
  • couchbase-3.4:javaagent
  • couchbase-3.4:tracing-opentelemetry-shaded
  • couchbase-common-2.0:javaagent
  • couchbase-common-2.0:javaagent-unit-tests
  • couchbase-common:testing
  • dropwizard-metrics-4.0:javaagent
  • dropwizard:dropwizard-testing
  • dropwizard-views-0.7:javaagent
  • elasticsearch-api-client-7.16:javaagent

Module: cassandra-4.4:testing

Module path: instrumentation/cassandra/cassandra-4.4/testing

Summary

No safe repository-guideline fixes were found in instrumentation/cassandra/cassandra-4.4/testing; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: cassandra-common-4.0:testing

Module path: instrumentation/cassandra/cassandra-common-4.0/testing

Summary

Applied one safe cleanup in cassandra-common-4.0/testing and committed it as f7a76f73.

Applied Changes

Nullability

File: AbstractCassandraTest.java:328
Change: Added `@Nullable` to `Parameter.keyspace`, `Parameter.table`, matching constructor parameters, and `getSession(String keyspace)`.
Reason: Repository nullability guidance requires annotating values that can actually be `null`; this test helper passes `null` from parameter data and `testMetrics()` into `getSession`, and uses `null` table/keyspace values to represent absent Cassandra attributes.

Module: clickhouse-client-common-0.5:javaagent

Module path: instrumentation/clickhouse/clickhouse-client-common-0.5/javaagent

Summary

No safe repository-guideline fixes were applied under instrumentation/clickhouse/clickhouse-client-common-0.5/javaagent. The in-scope files already match the applicable Javaagent, style, Gradle, nullability, and shared-module caller requirements reviewed.

Applied Changes

No safe automated changes were applied.

Module: clickhouse-client-v1-0.5:javaagent

Module path: instrumentation/clickhouse/clickhouse-client-v1-0.5/javaagent

Summary

Applied safe cleanup fixes for clickhouse-client-v1-0.5 javaagent and committed them in c21a1be2.

Applied Changes

Config

File: ClickHouseInstrumenterFactory.java:32
Change: Wired `SqlClientAttributesExtractor` to `DbConfig.isQuerySanitizationEnabled(GlobalOpenTelemetry.get(), "clickhouse")`.
Reason: `metadata-yaml-format.md` requires documented `metadata.yaml` configuration to match actual code usage; this makes `otel.instrumentation.common.db.query-sanitization.enabled` effective for ClickHouse via the established DB config helper.

Testing

File: ClickHouseClientV1Test.java:54
Change: Converted class-scoped `ClickHouseClient` and container cleanup from `@AfterAll` to `AutoCleanupExtension.deferAfterAll(...)`, made the extension static, and normalized constant-like test fields to `DATABASE_NAME` and `TABLE_NAME`.
Reason: `testing-general-patterns.md` prefers colocating class-scoped cleanup with resource creation via `AutoCleanupExtension.deferAfterAll(...)`; the style guide requires uppercase names for constant-like `static final` values.

Module: clickhouse-client-v2-0.8:javaagent

Module path: instrumentation/clickhouse/clickhouse-client-v2-0.8/javaagent

Summary

Applied safe cleanup in clickhouse-client-v2-0.8 javaagent tests and committed it as ea3d42e9.

Applied Changes

Testing

File: ClickHouseClientV2Test.java:281
Change: Wrapped short-lived `CommandResponse` and `Records` response resources in try-with-resources where assertions use the resource.
Reason: Repository test resource guidance keeps short-lived response bodies scoped with try-with-resources, and this prevents leaking `AutoCloseable` ClickHouse response resources.

Module: couchbase-2.0:javaagent

Module path: instrumentation/couchbase/couchbase-2.0/javaagent

Summary

No safe fixes were applied. The only deterministic cleanup candidate, adding testExperimental wiring for otel.instrumentation.couchbase.experimental-span-attributes, was reverted because it caused the module :check task to fail.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: build.gradle.kts
Reason: Missing `testExperimental` coverage for `otel.instrumentation.couchbase.experimental-span-attributes` could not be safely fixed: adding the canonical task made shared Couchbase tests fail because `couchbase-2.0` spans do not populate `couchbase.local.address`/`couchbase.operation_id`; next action is to decide whether to implement 2.0 attribute population or remove/adjust the experimental metadata/tests.

Module: couchbase-2.6:javaagent

Module path: instrumentation/couchbase/couchbase-2.6/javaagent

Summary

No safe repository-guideline fixes were found under instrumentation/couchbase/couchbase-2.6/javaagent; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.1.6:javaagent

Module path: instrumentation/couchbase/couchbase-3.1.6/javaagent

Summary

No safe repository-guideline fixes were needed for instrumentation/couchbase/couchbase-3.1.6/javaagent; no source changes were applied.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.1.6:tracing-opentelemetry-shaded

Module path: instrumentation/couchbase/couchbase-3.1.6/tracing-opentelemetry-shaded

Summary

No safe repository-guideline fixes were applied. Reviewed instrumentation/couchbase/couchbase-3.1.6/tracing-opentelemetry-shaded; build.gradle.kts already matches the established Couchbase shaded-module pattern, parent metadata.yaml has no config entries requiring changes, and remaining in-scope files are generated shaded-jar artifacts or binaries.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.1:javaagent

Module path: instrumentation/couchbase/couchbase-3.1/javaagent

Summary

No issues found. Reviewed tracked files under instrumentation/couchbase/couchbase-3.1/javaagent and validated the associated metadata.yaml; no safe repository-guideline fixes were needed.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.1:tracing-opentelemetry-shaded

Module path: instrumentation/couchbase/couchbase-3.1/tracing-opentelemetry-shaded

Summary

No safe repository-guideline fixes were applied under instrumentation/couchbase/couchbase-3.1/tracing-opentelemetry-shaded; the only tracked in-scope file is build.gradle.kts, and it matches the established Couchbase shaded-module pattern. The parent metadata.yaml has no 3.x Couchbase-specific config entries to update because the 3.x javaagent does not read Couchbase instrumentation config properties.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.2:javaagent

Module path: instrumentation/couchbase/couchbase-3.2/javaagent

Summary

Applied one safe cleanup in instrumentation/couchbase/couchbase-3.2/javaagent and committed it as Cleanup for couchbase-3.2 javaagent.

Applied Changes

Javaagent

File: CouchbaseInstrumentationModule.java:28
Change: Moved the `3.4.0` version-boundary comment from inside the `hasClassesNamed(...)` argument list to the chained matcher call.
Reason: `javaagent-module-patterns.md` says chained single-class `hasClassesNamed(...)` landmark checks should keep the class string inline and place the version comment on the chained matcher line.

Module: couchbase-3.2:tracing-opentelemetry-shaded

Module path: instrumentation/couchbase/couchbase-3.2/tracing-opentelemetry-shaded

Summary

No safe repository-guideline fixes were found under instrumentation/couchbase/couchbase-3.2/tracing-opentelemetry-shaded; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.4:javaagent

Module path: instrumentation/couchbase/couchbase-3.4/javaagent

Summary

No safe repository-guideline fixes remain for instrumentation/couchbase/couchbase-3.4/javaagent. One candidate classLoaderMatcher() style cleanup was reverted because spotlessJavaCheck rejects it and restores the existing formatting.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.4:tracing-opentelemetry-shaded

Module path: instrumentation/couchbase/couchbase-3.4/tracing-opentelemetry-shaded

Summary

No safe repository-guideline fixes were applied under instrumentation/couchbase/couchbase-3.4/tracing-opentelemetry-shaded; the only tracked reviewable file, build.gradle.kts, already matches the established shaded-module Gradle pattern, and no target-local metadata.yaml exists.

Applied Changes

No safe automated changes were applied.

Module: couchbase-common-2.0:javaagent

Module path: instrumentation/couchbase/couchbase-common-2.0/javaagent

Summary

No safe repository-guideline fixes were applied under instrumentation/couchbase/couchbase-common-2.0/javaagent; the reviewed source and build.gradle.kts already matched the applicable cleanup rules, and no substantive diff remains.

Applied Changes

No safe automated changes were applied.

Module: couchbase-common-2.0:javaagent-unit-tests

Module path: instrumentation/couchbase/couchbase-common-2.0/javaagent-unit-tests

Summary

No safe repository-guideline fixes were needed for instrumentation/couchbase/couchbase-common-2.0/javaagent-unit-tests; the scoped build.gradle.kts and CouchbaseQuerySanitizerTest.java already conform to the applicable build and testing review rules.

Applied Changes

No safe automated changes were applied.

Module: couchbase-common:testing

Module path: instrumentation/couchbase/couchbase-common/testing

Summary

Applied one safe cleanup and committed it as 6dc08f5c (Cleanup for couchbase-common testing).

Applied Changes

Testing

File: AbstractCouchbaseAsyncClientTest.java:98
Change: Replaced checked `CompletableFuture.get(timeout, unit)` assertions with AssertJ `succeedsWithin(...)` assertions and removed checked `throws` clauses from JUnit test entry points.
Reason: Repository testing guidance says JUnit test entry points should avoid multi-exception `throws` clauses and prefer direct AssertJ assertions; `succeedsWithin(...)` preserves the timeout behavior without broad `throws Exception`, which Error Prone rejects for `InterruptedException`.

Module: dropwizard-metrics-4.0:javaagent

Module path: instrumentation/dropwizard/dropwizard-metrics-4.0/javaagent

Summary

Applied safe cleanup fixes for instrumentation/dropwizard/dropwizard-metrics-4.0/javaagent and committed them as 63d0c46f.

Applied Changes

Javaagent

File: DropwizardSingletons.java:12
Change: Renamed the private `DropwizardMetricsAdapter` field from `metricsAdapter` to `metrics` so it matches the `metrics()` singleton accessor.
Reason: `javaagent-singletons-patterns.md` requires exported singleton accessor methods to have the exact same lower-camel name as the backing collaborator field.

Testing

File: DropwizardMetricsTest.java:32
Change: Removed fixed `Thread.sleep(100)` metric-export waits and the resulting `throws InterruptedException` clauses from `@Test` methods.
Reason: `testing-general-patterns.md` prefers `InstrumentationExtension.waitAndAssertMetrics(...)` for metric assertions and discourages fixed exporter-interval sleeps; test throws clauses should be narrowed when checked exceptions are no longer needed.

Module: dropwizard:dropwizard-testing

Module path: instrumentation/dropwizard/dropwizard-testing

Summary

No safe repository-guideline fixes were found under instrumentation/dropwizard/dropwizard-testing; no source changes were applied.

Applied Changes

No safe automated changes were applied.

Module: dropwizard-views-0.7:javaagent

Module path: instrumentation/dropwizard/dropwizard-views-0.7/javaagent

Summary

Applied one safe cleanup in dropwizard-views-0.7 javaagent tests and committed it as def9846e.

Applied Changes

Testing

File: ViewRenderTest.java:62
Change: Replaced `Thread.sleep(500)` plus a final empty-span assertion with `await().during(Duration.ofMillis(500)).untilAsserted(...)`, narrowing `testDoesNotCreateSpanWithoutParent()` from `throws Exception` to `throws IOException`.
Reason: `testing-general-patterns.md` requires `@Test` methods to use a single, specific checked exception type when possible; removing the fixed sleep avoids `InterruptedException` and keeps the negative span assertion stable for the wait duration.

Module: elasticsearch-api-client-7.16:javaagent

Module path: instrumentation/elasticsearch/elasticsearch-api-client-7.16/javaagent

Summary

Applied and committed one safe cleanup in elasticsearch-api-client-7.16 javaagent. One build cleanup remains unresolved because the canonical assertInverse.set(true) form conflicts with this module's multi-range muzzle setup.

Applied Changes

Style

File: ElasticsearchEndpointMap.java:17
Change: Renamed immutable static endpoint map field from `routesMap` to `ROUTES_MAP` and moved the private utility constructor after methods.
Reason: Repository style guide says constant-like immutable static fields use `SCREAMING_SNAKE_CASE`, and static utility class constructors should appear after methods.

Unresolved Items

File: build.gradle.kts
Reason: Adding `assertInverse.set(true)` to the two `muzzle` `pass` blocks is recommended by Gradle conventions, but it caused `:muzzle` configuration to fail with duplicate `muzzle-AssertFail-co.elastic.clients-elasticsearch-java-7.15.0` configurations because both pass ranges target the same artifact; this needs a broader muzzle configuration/plugin decision.


Download module cleanup diagnostics

otelbot Bot added 8 commits May 3, 2026 21:02
Automated module cleanup of instrumentation/cassandra/cassandra-common-4.0/testing.
Automated module cleanup of instrumentation/clickhouse/clickhouse-client-v1-0.5/javaagent.
Automated module cleanup of instrumentation/clickhouse/clickhouse-client-v2-0.8/javaagent.
Automated module cleanup of instrumentation/couchbase/couchbase-3.2/javaagent.
Automated module cleanup of instrumentation/couchbase/couchbase-common/testing.
Automated module cleanup of instrumentation/dropwizard/dropwizard-metrics-4.0/javaagent.
Automated module cleanup of instrumentation/dropwizard/dropwizard-views-0.7/javaagent.
Automated module cleanup of instrumentation/elasticsearch/elasticsearch-api-client-7.16/javaagent.
@otelbot otelbot Bot requested a review from a team as a code owner May 3, 2026 22:14
@trask trask enabled auto-merge (squash) May 4, 2026 00:10
The Couchbase async client test cleanup path used Duration.getSeconds(),
which Error Prone flags under -Werror. Use the Java 8-compatible
Duration.toMillis() value with MILLISECONDS to preserve the same timeout
without triggering the JavaDurationGetSecondsToToSeconds warning.

Validation: .\gradlew.bat :instrumentation:couchbase:couchbase-common:testing:compileJava
@trask trask merged commit b9b76a4 into main May 4, 2026
93 checks passed
@trask trask deleted the otelbot/module-cleanup-25289766144 branch May 4, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant