Skip to content

Pin latest deps for all gradle configurations#18298

Merged
trask merged 8 commits into
open-telemetry:mainfrom
trask:more-pinning
May 7, 2026
Merged

Pin latest deps for all gradle configurations#18298
trask merged 8 commits into
open-telemetry:mainfrom
trask:more-pinning

Conversation

@trask
Copy link
Copy Markdown
Member

@trask trask commented Apr 25, 2026

Currently built on top of #18391

@trask trask force-pushed the more-pinning branch 4 times, most recently from 294b01d to 9b1d5ef Compare April 28, 2026 19:07
@trask trask changed the title Pin latest deps in custom JvmTestSuite configurations Pin latest deps for all gradle configurations Apr 29, 2026
@trask trask force-pushed the more-pinning branch 3 times, most recently from 19c9538 to ebb2746 Compare April 29, 2026 16:10
trask added 4 commits April 30, 2026 10:38
Broaden the testLatestDeps resolutionStrategy filter so that custom JvmTestSuite source sets (e.g. version5TestRuntimeClasspath in hibernate-4.0) and the main compileClasspath are also pinned via .github/config/latest-dep-versions.json. Latest-dep tests for those classpaths are now reproducible against the snapshot file rather than live Maven Central.

Restrict latestDepTestLibrary overrides to the main test/latestDepTest configurations so that explicit older versions declared in custom JvmTestSuite source sets (e.g. play-mvc-2.4 play24Test, kubernetes-client-7.0 version20Test) are not overridden.

Fail fast when a pinned version is missing for a latest.release or +-range lookup. Previously latest.release silently returned null and fell back to live Maven Central resolution; now it throws like the +-range case, with instructions to run resolveLatestDepVersions.

Document the fail-fast behavior in docs/contributing/writing-instrumentation.md.

GWT moved from com.google.gwt to org.gwtproject in 2.10.0. Use dependencySubstitution to rewrite the compileOnly gwt-user/gwt-dev coordinates in latest-deps mode, keep gwt-user and gwt-dev off the test classpath, and declare gwt-servlet directly with its post-2.10 coordinates so its JSON pin is reachable.
client-java-api 22.0.0 (and the latest.release used in latest-deps mode) requires Java 11+ (class file version 55), so the version22Test test task fails on the JDK 8 CI matrix with UnsupportedClassVersionError. Disable the task when testJavaVersion is Java 8.
@trask trask marked this pull request as ready for review May 1, 2026 13:43
@trask trask requested a review from a team as a code owner May 1, 2026 13:43
trask added 3 commits May 3, 2026 08:11
# Conflicts:
#	.github/config/latest-dep-versions.json
# Conflicts:
#	instrumentation/kubernetes-client-7.0/javaagent/build.gradle.kts
#	instrumentation/pekko/pekko-http-1.0/javaagent/build.gradle.kts
The Play 2.4 custom test suite resolves Play Java, Java WS, and test
artifacts with the 2.4.+ selector when testLatestDeps is enabled, but the
latest-dependency pin file only contained pins for the 2.5.+ selectors. This
caused CI dependency resolution to fail before running checkstyle.

Add the missing 2.4.+ pins for the three Play 2.4 artifacts, using 2.4.11 as
the latest Play 2.4 release.

Validation: .\gradlew.bat :instrumentation:play:play-mvc:play-mvc-2.4:javaagent:checkstylePlay24Test -PtestLatestDeps=true
@github-actions github-actions Bot mentioned this pull request May 5, 2026
@trask trask merged commit f9dd67c into open-telemetry:main May 7, 2026
176 of 178 checks passed
@trask trask deleted the more-pinning branch May 7, 2026 14:20
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