Commit f982bad
build(samples): Remove outputs.upToDateWhen { false } from systemTest tasks (#5522)
* build(samples): Remove outputs.upToDateWhen { false } from systemTest tasks
The systemTest tasks in the sample modules forced Gradle to always treat
their outputs as out of date, disabling up-to-date checks and build cache
reuse. Removing this lets Gradle rely on its normal input/output tracking
for the Test tasks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* build(samples): Track systemTest app archive via convention plugin
The system tests launch the packaged sample (war/shadowJar/bootJar) from
build/libs as a separate process, so the archive is a real input to the
systemTest task even though it is not on the test classpath. Without it,
removing outputs.upToDateWhen { false } would let Gradle mark systemTest
up-to-date while a separate jar build refreshed the artifact, skipping
verification against the rebuilt sample.
Move that wiring into a single io.sentry.systemtest convention plugin in
build-logic instead of repeating it in every sample build file. The
plugin auto-detects the packaging task (war, else shadowJar, else
bootJar), mirroring the selection in test/system-test-runner.py, and
declares its archive as an input and dependency. Each sample just
applies the plugin.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* build(samples): Track OpenTelemetry agent jar as systemTest input
The agent-based OpenTelemetry samples are launched by the runner with
-javaagent:<sentry-opentelemetry-agent>, started outside the test JVM.
That jar is not on the test classpath nor one of the app archives, so
without tracking it systemTest could stay up-to-date and be skipped
while the runner launches a newer agent.
Add a usesOpenTelemetryAgent opt-in to the io.sentry.systemtest plugin;
the three agent samples enable it and the agent jar is then tracked as a
content input. The runner already builds and launches the agent before
invoking the task, so it is tracked by path without a cross-project task
dependency, which keeps it configuration-on-demand and configuration
cache compatible.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 57d359a commit f982bad
24 files changed
Lines changed: 86 additions & 44 deletions
File tree
- build-logic/src/main/kotlin
- io/sentry/gradle
- sentry-samples
- sentry-samples-console-opentelemetry-noagent
- sentry-samples-console-otlp
- sentry-samples-console
- sentry-samples-jul
- sentry-samples-log4j2
- sentry-samples-logback
- sentry-samples-spring-7
- sentry-samples-spring-boot-4-opentelemetry-noagent
- sentry-samples-spring-boot-4-opentelemetry
- sentry-samples-spring-boot-4-otlp
- sentry-samples-spring-boot-4-webflux
- sentry-samples-spring-boot-4
- sentry-samples-spring-boot-jakarta-opentelemetry-noagent
- sentry-samples-spring-boot-jakarta-opentelemetry
- sentry-samples-spring-boot-jakarta
- sentry-samples-spring-boot-opentelemetry-noagent
- sentry-samples-spring-boot-opentelemetry
- sentry-samples-spring-boot-webflux-jakarta
- sentry-samples-spring-boot-webflux
- sentry-samples-spring-boot
- sentry-samples-spring-jakarta
- sentry-samples-spring
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
75 | | - | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
78 | | - | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
79 | | - | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | | - | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
76 | | - | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | | - | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
0 commit comments