Skip to content

Reduce servlet smoke test matrix from 166 to 52 cases#16810

Closed
zeitlinger wants to merge 7 commits into
open-telemetry:mainfrom
zeitlinger:reduce-smoke-test-matrix
Closed

Reduce servlet smoke test matrix from 166 to 52 cases#16810
zeitlinger wants to merge 7 commits into
open-telemetry:mainfrom
zeitlinger:reduce-smoke-test-matrix

Conversation

@zeitlinger

@zeitlinger zeitlinger commented Mar 20, 2026

Copy link
Copy Markdown
Member

Blocked by #17721

Summary

Reduces the servlet smoke test matrix by 69% (166 → 52 test cases) by eliminating redundant server × JDK × VM combinations while preserving all coverage guarantees:

  • Every server version still tested with its minimum supported JDK on hotspot (instrumentation correctness)
  • Every JDK (8, 11, 17, 21, 25) tested via Tomcat on hotspot (JDK compatibility)
  • Every JDK + openj9 tested via TomEE (VM compatibility)
  • JPMS still tested via JettyJpms (unchanged)
Server Before After Strategy
Jetty 32 4 1 hotspot × min JDK per version
Tomcat 30 15 All JDKs × hotspot only
TomEE 22 11 All JDKs × openj9 only
WildFly 36 6 1 hotspot × min JDK per version
Liberty 24 4 1 hotspot × JDK 8 per version
Payara 13 3 1 hotspot × min JDK per version
WebSphere 2 2 unchanged
JettyJpms 4 4 unchanged
LibertyServletOnly 3 3 unchanged

Context: SIG meeting feedback on #16436 — the full targeted-CI approach was too complex, but smaller improvements like reducing smoke tests are welcome.

Test plan

  • ./gradlew :smoke-tests:test -PsmokeTestSuite=none compiles successfully
  • ./gradlew spotlessApply passes
  • CI smoke test suites pass
  • Compare wall time of smoke test CI jobs before/after

@trask

trask commented Mar 20, 2026

Copy link
Copy Markdown
Member

this will make our list of supported application servers less impressive 😄 https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md#application-servers

wdyt of only reducing the number that we run on PRs? (as opposed to on merge to main)

@zeitlinger
zeitlinger force-pushed the reduce-smoke-test-matrix branch from 3ce0e3e to a967421 Compare March 20, 2026 19:21
@zeitlinger

Copy link
Copy Markdown
Member Author

this will make our list of supported application servers less impressive 😄 https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md#application-servers

wdyt of only reducing the number that we run on PRs? (as opposed to on merge to main)

good idea - done

@zeitlinger
zeitlinger marked this pull request as draft March 21, 2026 07:52
@zeitlinger
zeitlinger marked this pull request as ready for review March 21, 2026 08:50
Comment thread smoke-tests/images/servlet/build.gradle.kts Outdated
Comment thread smoke-tests/images/servlet/build.gradle.kts Outdated
Comment thread smoke-tests/src/test/java/io/opentelemetry/smoketest/appserver/AppServerTest.java Outdated
Comment thread smoke-tests/build.gradle.kts Outdated
Comment thread smoke-tests/images/servlet/build.gradle.kts Outdated
@trask

trask commented Mar 25, 2026

Copy link
Copy Markdown
Member

I pushed a couple of changes, and CI is failing now but I think unrelated

failed to GET https://download.jboss.org/wildfly/17.0.1.Final/wildfly-17.0.1.Final.zip with status 503 Service Unavailable

EDIT: just made the connection to #16814

@trask
trask force-pushed the reduce-smoke-test-matrix branch from 634e945 to 990d59f Compare April 6, 2026 23:59
zeitlinger and others added 6 commits April 8, 2026 16:48
Instead of permanently removing test cases, run a reduced subset (49 of
166) on pull requests and the full matrix on merge to main. This keeps
the supported libraries list accurate while speeding up PR builds.

The reduced set covers every server version, all JDK versions (via
Tomcat/hotspot and TomEE/openj9), and both VMs. Adding a "test full
smoke" label to a PR runs the complete matrix.
Replace the hardcoded REDUCED_TESTS set with rule-based logic that
derives the reduced subset from @appserver annotations at runtime,
matching the reduceTargets() rules in the Gradle build.

Also fix duplicate Gradle task name for Payara 6.x by deduplicating
after reduction.
…otReduced

- Remove reduceTargets() and reducedSmokeTests from servlet image build
  (images are always built in full; reduction only applies at test time)
- Remove -PreducedSmokeTests=true from pr-smoke-test-servlet-images.yml
- Pass reducedSmokeTests boolean into skipIfNotReduced() from caller
- Use findProperty() == "true" in smoke-tests/build.gradle.kts
@zeitlinger
zeitlinger force-pushed the reduce-smoke-test-matrix branch from ae9f99f to c6be8d3 Compare April 8, 2026 16:48
@zeitlinger
zeitlinger marked this pull request as draft April 9, 2026 07:13
@zeitlinger

Copy link
Copy Markdown
Member Author

closed in favor of #18953

@zeitlinger zeitlinger closed this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants