Repository navigation
Improve smoke tests build-cache friendliness - #13294
Conversation
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
a5fd6b3 to
0bf8b97
Compare
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
20c7218 to
351813d
Compare
f7be66e to
1191ec8
Compare
6c7346b to
f582922
Compare
Prevent commit hashes and filesystem traversal order changes to invalidate the agent fingerprint (code and configuration) are unchanged, this forced smoke tests to needlessly rerun. Rely on runtime classpath normalisation for the agent jar input. `dd-java-agent.version` is tracked as needed e.g. CI Visibility code needs it to initialize itself. Sort JMX metric configuration names before writing the packaged list so fresh checkouts produce identical resource bytes. Allow S3 cache entries up to 256 MiB so smoke application builds larger than the plugin's 50 MiB default can be stored.
f582922 to
212ad4b
Compare
Makes `projectJar` API use Gradle runtime-classpath fingerprints, this allows to leverage the existing normalization on version files. Some jars passed to the nested smoke test app, also package the version files, normalization helps ignore that version. Document input annotations, normalisation and cache diagnostics in the Gradle build-cache guide.
Use a compatibility CPU target for the Quarkus and Spring Boot native fixtures so cached executables can run on other CI hosts of the same OS and architecture. Document why the S3 prefix does not isolate CPU features. Link the GraalVM guidance and record stronger targets as candidates requiring guarantees across eligible build and execution hosts. Resolve forwarded API JAR properties on the project inside dependency blocks so both native fixtures consume the supplied project JAR.
212ad4b to
a651611
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
More details
Commit-stamp normalization preserves separate cache invalidation for agent code, tracked resources, base versions, and required version-resource presence. Static review identified no actionable defects.
🤖 Bits Code Review · Commit a651611
Include dd-trace-api.version and trace/dd-trace-core.version in the presence inputs for smoke tests and forwarded project JARs. Missing resources change runtime versions to unknown, so adding or removing these paths must invalidate cached results. Keep commit stamps normalised. Cover presence changes and stamp-only changes for all three tracked version resources in the cache tests.
Explain that normalization ignores generated `.version` file contents while the project's base version remains a cache input.
04f4fe1 to
60cd573
Compare
db73247
into
master
What Does This Do
Allows smoke tests to reuse matching output across commits that change only generated commit metadata. Tests continue to launch the exact packaged agent JAR.
This should be useful in particular when building smoke test fixture apps.
Apart, from other fixes, this is possible by switching the jar declared in input from the
@Inputfile(which is opaque when declared this way) to@Classpath(which benefits from runtime classpath normalization already applied to dd-trace-java projects, see #11677).Motivation
Version files having commit hash, filesystem-dependent JMX configuration ordering and oversized fixture cache entries cause misses when agent code is unchanged. This lets smoke tests benefit from the shared build cache introduced in #12604.
Additional Notes
Some numbers: All arrows compare each PR's selected master baseline -> PR run. Duration values are per-job medians.
Baselines: #12604 master
5a9bf74ccd-> warm PR runa19b40f110; #13294 mastere9c3f25824-> PR runa651611. The #12604 PR values reuse its published smoke measurements.a651611restored all 453 executable test tasks and all five native builds.Data context:
Not enabledmeans Introduce a Gradle S3 build cache #12604's master baseline used the GitLab cache without the S3 build cache. Test-task counts exclude skipped, no-source and up-to-date tasks;FROM-CACHEcan include local restoration.Master merge-base
gantt title Master merge-base - pipeline 151210214 dateFormat YYYY-MM-DD HH:mm:ss axisFormat %H:%M:%S tickInterval 5minute todayMarker off section Parent pipeline Build and test compilation : 2000-01-01 00:00:51, 2000-01-01 00:06:46 Instrumentation tests [48] : 2000-01-01 00:05:43, 2000-01-01 00:58:47 Latest-dependency tests [30] : 2000-01-01 00:05:31, 2000-01-01 00:38:42 Smoke tests AMD64 [108] : 2000-01-01 00:06:50, 2000-01-01 00:28:23 Smoke tests ARM64 [43] : 2000-01-01 00:04:09, 2000-01-01 00:23:25 Other Gradle tests and checks : 2000-01-01 00:00:00, 2000-01-01 00:17:47 Packaging and system-test setup : 2000-01-01 00:03:52, 2000-01-01 00:10:27 Startup benchmarks [2] : 2000-01-01 00:05:03, 2000-01-01 00:19:01 Benchmark reporting and configuration validation : 2000-01-01 00:04:57, 2000-01-01 00:38:02 Test-result aggregation and pipeline finalization : 2000-01-01 00:58:47, 2000-01-01 01:00:32 Other jobs [376] : 2000-01-01 00:00:00, 2000-01-01 00:53:53 section Downstream pipelines System tests : 2000-01-01 00:10:27, 2000-01-01 00:24:06 Test-matrix generation : 2000-01-01 00:10:29, 2000-01-01 00:11:52 SSI system tests : 2000-01-01 00:11:53, 2000-01-01 00:24:06 section Comparison scale 65-minute boundary :milestone, 2000-01-01 01:05:00, 0sNote the pipeline on
masterruns many other jobs than on PRs, e.g. with other JVMs.The Other jobs includes 144 SSI smoke jobs.
a651611: smoke-test cache implementation
gantt title Smoke test cache PR - pipeline 151443023 dateFormat YYYY-MM-DD HH:mm:ss axisFormat %H:%M:%S tickInterval 5minute todayMarker off section Parent pipeline Build and test compilation : 2000-01-01 00:00:00, 2000-01-01 00:04:10 Instrumentation tests [48] : 2000-01-01 00:04:21, 2000-01-01 00:16:06 Latest-dependency tests [30] : 2000-01-01 00:03:15, 2000-01-01 00:12:48 Smoke tests AMD64 [52] : 2000-01-01 00:04:54, 2000-01-01 00:14:57 Other Gradle tests and checks : 2000-01-01 00:00:01, 2000-01-01 00:12:23 Packaging and system-test setup : 2000-01-01 00:03:56, 2000-01-01 00:10:34 Startup benchmarks [2] : 2000-01-01 00:04:50, 2000-01-01 00:18:24 Benchmark reporting and configuration validation : 2000-01-01 00:05:15, 2000-01-01 00:22:29 Test-result aggregation and pipeline finalization : 2000-01-01 00:26:35, 2000-01-01 00:28:22 section Downstream pipelines System tests : 2000-01-01 00:10:34, 2000-01-01 00:26:33 Test-matrix generation : 2000-01-01 00:10:35, 2000-01-01 00:12:19 SSI system tests : 2000-01-01 00:12:19, 2000-01-01 00:26:33 section Comparison scale 65-minute boundary :milestone, 2000-01-01 01:05:00, 0sInput normalisation and intended behaviour
In order to avoid discarding fingerprint when only the commit hash changed, smoke tests rely on normalization. The version is now taken from the project, which uses a stable identifier between released versions, such as
1.69.0-SNAPSHOT.The version file write instead a version appended with
~<SHA>. With the already in-place runtime-classpath normalization,*.versionpaths are excluded from fingerprinting.This should also help Gradle input normalization.
Assuming the other test inputs match:
.classdatacontents.versionresource pathsTracked version resources:
dd-java-agent.version,dd-trace-api.versionandtrace/dd-trace-core.version. Presence changes invalidate cached results; commit-stamp changes remain normalised.The
dd-trace-java.smoke-test-appplugin uses the same mechanism withprojectJarthat forward a jar to the nested build..classdataor other tracked resourceAgent code changes will invalidate smoke tests and native builds.
Native portability and forwarded API selection
x86-64-v3andarmv8.1-aare candidates once all eligible build and execution hosts guarantee those features.project.hasProperty('apiJar')inside dependency blocks. The previous unqualified lookup checked the dependency handler and selected the published fallback despite the forwarded project property.Approaches considered
Normalisation reuses Gradle's existing support and preserves the packaged agent exercised by smoke tests. Base-version and required-resource inputs retain the relevant invalidation rules. A separate smoke-test agent JAR and a packaging/stamping split remain outside this PR. Unused fixture dependencies are handled by #13307.
The build-cache guide covers annotations, normalisation, excluded metadata and cache-debug comparisons.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue