Skip to content

Code review sweep (run 25244636897)#18505

Merged
trask merged 9 commits into
mainfrom
otelbot/code-review-sweep-25244636897
May 2, 2026
Merged

Code review sweep (run 25244636897)#18505
trask merged 9 commits into
mainfrom
otelbot/code-review-sweep-25244636897

Conversation

@otelbot

@otelbot otelbot Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Automated code review sweep walked the following modules in order
and stopped after accumulating at least 10 modified files:

  • spring-boot-resources:javaagent
  • spring-boot-resources:javaagent-unit-tests
  • spring-cloud-aws-3.0:javaagent
  • spring-cloud-gateway-2.0:javaagent
  • spring-cloud-gateway-2.2:testing
  • spring-cloud-gateway-common:javaagent
  • spring-cloud-gateway-common:testing
  • spring-cloud-gateway-webflux-4.3:testing
  • spring-cloud-gateway-webmvc-4.3:javaagent
  • spring-core-2.0:javaagent
  • spring-data-1.8:javaagent
  • spring-data-3.0:kotlin-testing
  • spring-data-3.0:testing
  • spring-data-common:testing
  • spring-integration-4.1:javaagent
  • spring-integration-4.1:library
  • spring-integration-4.1:testing

Module: spring-boot-resources:javaagent

Module path: instrumentation/spring/spring-boot-resources/javaagent

Summary

Applied one safe repository-guideline fix and committed it in f60c03ce (Review fixes for spring-boot-resources javaagent).

Applied Changes

Style

File: SystemHelper.java:35
Change: Added `@Nullable` to `SystemHelper.getenv()`, `getProperty()`, `openClasspathResource()`, and `openJarRootResource()` return types.
Reason: Repository nullability guidance requires annotating return types that can actually return `null`; these methods delegate to JDK APIs (`System.getenv()`, `System.getProperty()`, and `ClassLoader.getResourceAsStream()`) that return `null` when values or resources are absent.

Module: spring-boot-resources:javaagent-unit-tests

Module path: instrumentation/spring/spring-boot-resources/javaagent-unit-tests

Summary

No safe repository-guideline fixes were applied under instrumentation/spring/spring-boot-resources/javaagent-unit-tests; the reviewed metadata.yaml has no config entries requiring declarative-name validation fixes.

Applied Changes

No safe automated changes were applied.

Module: spring-cloud-aws-3.0:javaagent

Module path: instrumentation/spring/spring-cloud-aws-3.0/javaagent

Summary

Applied one safe repository-guideline fix in spring-cloud-aws-3.0 javaagent tests and committed it.

Applied Changes

Testing

File: AwsSqsTest.java:72
Change: Collapsed the `@Test` method `sqsListener()` from three checked exception types to a single `throws Exception` clause and removed now-unused exception imports.
Reason: `testing-general-patterns.md` requires `@Test` methods to keep `throws` clauses to a single exception type; the timeout-based `CompletableFuture.get(...)` path does not have a narrower clean single checked type.

Module: spring-cloud-gateway-2.0:javaagent

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-2.0/javaagent

Summary

Reviewed spring-cloud-gateway-2.0/javaagent; no safe repository-guideline fixes were applied.

Applied Changes

No safe automated changes were applied.

Module: spring-cloud-gateway-2.2:testing

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-2.2/testing

Summary

Applied 1 safe repository-guideline fix under spring-cloud-gateway-2.2/testing; 1 larger experimental-test-task issue remains unresolved because the review workflow says not to auto-fix missing testExperimental tasks.

Applied Changes

Build

File: build.gradle.kts:20
Change: Changed `tasks.withType<Test>().configureEach` to `tasks.test`.
Reason: `gradle-conventions.md` says single-test-task modules should prefer `tasks.test`; implicit `latestDepTest` does not count as an additional custom `Test` task.

Unresolved Items

File: build.gradle.kts
Reason: The default `test` task still enables experimental JVM args without a dedicated `testExperimental` task; `testing-experimental-flags.md` requires a dedicated task, but the review instructions classify missing `testExperimental` as report-only rather than auto-fix.

Module: spring-cloud-gateway-common:javaagent

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-common/javaagent

Summary

No safe repository-guideline fixes were found in the tracked files under instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-common/javaagent.

Applied Changes

No safe automated changes were applied.

Module: spring-cloud-gateway-common:testing

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-common/testing

Summary

No safe fixes were applied. The only deterministic candidate, replacing hasAttributesSatisfying(...) with hasAttributesSatisfyingExactly(...), was reverted because dependent :instrumentation:spring:spring-cloud-gateway:spring-cloud-gateway-2.0:javaagent:check tests failed: the assertions intentionally cover only Spring Cloud Gateway-enriched attributes while server spans also include HTTP/server attributes.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: AbstractRouteMappingTest.java
Reason: `hasAttributesSatisfying(...)` is less precise than the testing guideline preference for `hasAttributesSatisfyingExactly(...)`, but converting it is not safe without also defining all expected server-span attributes across gateway variants; the attempted change failed dependent tests and was reverted.

Module: spring-cloud-gateway-webflux-4.3:testing

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-webflux-4.3/testing

Summary

No safe repository-guideline fixes were applied in the requested testing directory.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: build.gradle.kts
Reason: Experimental JVM flags are applied directly to the default `test` task without a dedicated `testExperimental` task; the review workflow classifies missing `testExperimental` wiring as not auto-fixable and requires reporting instead.

Module: spring-cloud-gateway-webmvc-4.3:javaagent

Module path: instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-webmvc-4.3/javaagent

Summary

No safe repository-guideline fixes were applied. Reviewed the requested javaagent files and mandatory metadata.yaml; no deterministic issues were found in scope.

Applied Changes

No safe automated changes were applied.

Module: spring-core-2.0:javaagent

Module path: instrumentation/spring/spring-core-2.0/javaagent

Summary

Applied one safe repository-guideline fix in spring-core-2.0 javaagent and committed it.

Applied Changes

Style

File: SimpleAsyncTaskExecutorInstrumentationTest.java:42
Change: Renamed the unused `NoSuchMethodException` catch variable from `e` to `ignored`.
Reason: `knowledge/general-rules.md` catch-variable guidance says intentionally unused catch parameters should use `ignored`.

Module: spring-data-1.8:javaagent

Module path: instrumentation/spring/spring-data/spring-data-1.8/javaagent

Summary

No safe repository-guideline fixes were found under instrumentation/spring/spring-data/spring-data-1.8/javaagent; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: spring-data-3.0:kotlin-testing

Module path: instrumentation/spring/spring-data/spring-data-3.0/kotlin-testing

Summary

No safe repository-guideline fixes were needed for instrumentation/spring/spring-data/spring-data-3.0/kotlin-testing; the scoped files and related metadata.yaml were already consistent with the loaded review rules.

Applied Changes

No safe automated changes were applied.

Module: spring-data-3.0:testing

Module path: instrumentation/spring/spring-data/spring-data-3.0/testing

Summary

Applied one safe repository-guideline fix in spring-data-3.0 testing and committed it.

Applied Changes

Testing

File: ReactiveSpringDataTest.java:38
Change: Moved `@SuppressWarnings("deprecation")` from `testFindAll()` to `ReactiveSpringDataTest` class scope while preserving the explanatory semconv comment.
Reason: `testing-semconv-stability.md` requires class-level deprecation suppression when tests use deprecated semconv constants.

Module: spring-data-common:testing

Module path: instrumentation/spring/spring-data/spring-data-common/testing

Summary

Applied 1 safe repository-guideline fix under instrumentation/spring/spring-data/spring-data-common/testing and committed it as cc373169.

Applied Changes

Style

File: AbstractSpringJpaTest.java:38
Change: Moved repeated `@SuppressWarnings("deprecation")` annotations for `DB_CONNECTION_STRING` from individual methods to class scope while preserving the explanatory TODO comment.
Reason: Repository `@SuppressWarnings` guidance says to place a suppression on the class when two or more members need the same suppression and to preserve accurate explanatory comments.

Module: spring-integration-4.1:javaagent

Module path: instrumentation/spring/spring-integration-4.1/javaagent

Summary

No safe repository-guideline fixes were found in the reviewed spring-integration-4.1 javaagent files.

Applied Changes

No safe automated changes were applied.

Module: spring-integration-4.1:library

Module path: instrumentation/spring/spring-integration-4.1/library

Summary

Applied and committed two safe repository-guideline fixes for spring-integration-4.1 library.

Applied Changes

Build

File: build.gradle.kts:27
Change: Changed broad `withType<Test>().configureEach` test configuration to `test` for the module's single explicit test task.
Reason: `gradle-conventions.md` says single-test-task modules should use `tasks.test`; implicit `latestDepTest` does not justify broad `withType<Test>()` configuration.

Style

File: SpringIntegrationTelemetryBuilder.java:104
Change: Moved private `consumerSpanName` and `producerSpanName` helpers below the public `build()` method that uses them.
Reason: The style guide's method ordering rule places calling methods above the private helper methods they call.

Module: spring-integration-4.1:testing

Module path: instrumentation/spring/spring-integration-4.1/testing

Summary

Applied and committed 2 safe repository-guideline fixes in spring-integration-4.1 testing sources.

Applied Changes

Testing

File: AbstractComplexPropagationTest.java:39
Change: Replaced nullable `@AfterEach` cleanup of `ConfigurableApplicationContext` with `AutoCleanupExtension` and `cleanup.deferCleanup(applicationContext)`.
Reason: `testing-general-patterns.md` recommends `AutoCleanupExtension.deferCleanup(...)` for JUnit resources that stay live for the test and only need cleanup at test end.

File: AbstractSpringIntegrationTracingTest.java:41
Change: Replaced nullable `@AfterEach` cleanup of `ConfigurableApplicationContext` with `AutoCleanupExtension` and `cleanup.deferCleanup(applicationContext)`.
Reason: `testing-general-patterns.md` recommends `AutoCleanupExtension.deferCleanup(...)` for JUnit resources that stay live for the test and only need cleanup at test end.


Download code review diagnostics

otelbot Bot added 8 commits May 2, 2026 05:27
Automated code review of instrumentation/spring/spring-boot-resources/javaagent.
Automated code review of instrumentation/spring/spring-cloud-aws-3.0/javaagent.
Automated code review of instrumentation/spring/spring-cloud-gateway/spring-cloud-gateway-2.2/testing.
Automated code review of instrumentation/spring/spring-core-2.0/javaagent.
Automated code review of instrumentation/spring/spring-data/spring-data-3.0/testing.
Automated code review of instrumentation/spring/spring-data/spring-data-common/testing.
Automated code review of instrumentation/spring/spring-integration-4.1/library.
Automated code review of instrumentation/spring/spring-integration-4.1/testing.
@otelbot otelbot Bot requested a review from a team as a code owner May 2, 2026 06:09
@trask trask enabled auto-merge (squash) May 2, 2026 15:53
@trask trask merged commit 83c1b4f into main May 2, 2026
95 checks passed
@trask trask deleted the otelbot/code-review-sweep-25244636897 branch May 2, 2026 16:20
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