Tag intermediate initializationError retries with test.final_status=skip in JUnit XML#11010
Tag intermediate initializationError retries with test.final_status=skip in JUnit XML#11010cbeauchesne wants to merge 10 commits intomasterfrom
initializationError retries with test.final_status=skip in JUnit XML#11010Conversation
buildSrc/src/main/kotlin/dd-trace-java.configure-tests.gradle.kts
Outdated
Show resolved
Hide resolved
buildSrc/src/main/kotlin/dd-trace-java.configure-tests.gradle.kts
Outdated
Show resolved
Hide resolved
buildSrc/src/main/kotlin/dd-trace-java.configure-tests.gradle.kts
Outdated
Show resolved
Hide resolved
eb73143 to
fc75f5f
Compare
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
initializationError retries with test.final_status=skip in JUnit XML
| System.err.println("File not found: " + xmlFile); | ||
| System.exit(1); | ||
| } | ||
| var doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(xmlFile); |
There was a problem hiding this comment.
❔ question: Should we add some flags about entity resolution (for example) here to prevent security issue?
There was a problem hiding this comment.
Which security issue do you have in mind ? The entire workflow and data are derivated from the public content of this repo, and the script itself can be modified during a PR.
| * | ||
| * <p>Gradle generates synthetic "initializationError" testcases in JUnit reports for setup methods. | ||
| * When a setup is retried and eventually succeeds, multiple testcases are created, with only the | ||
| * last one passing. All intermediate attempts are marked skip so Test Optimization is not misled. |
There was a problem hiding this comment.
🎯 suggestion: It would help if you describe the expected changes here. You can re-use stuff from the PR description 😉
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 13 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~899ee14234, baseline=1.61.0-SNAPSHOT~2365c1251f
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056699
Total [baseline] (8.826 s) : 0, 8825670
Agent [candidate] (1.057 s) : 0, 1056559
Total [candidate] (8.811 s) : 0, 8810735
section iast
Agent [baseline] (1.222 s) : 0, 1221951
Total [baseline] (9.543 s) : 0, 9543260
Agent [candidate] (1.223 s) : 0, 1223041
Total [candidate] (9.52 s) : 0, 9519978
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~899ee14234, baseline=1.61.0-SNAPSHOT~2365c1251f
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.194 ms) : 0, 1194
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (634.665 ms) : 0, 634665
BytebuddyAgent [candidate] (634.87 ms) : 0, 634870
AgentMeter [baseline] (29.487 ms) : 0, 29487
AgentMeter [candidate] (29.478 ms) : 0, 29478
GlobalTracer [baseline] (249.368 ms) : 0, 249368
GlobalTracer [candidate] (249.573 ms) : 0, 249573
AppSec [baseline] (32.055 ms) : 0, 32055
AppSec [candidate] (32.101 ms) : 0, 32101
Debugger [baseline] (59.195 ms) : 0, 59195
Debugger [candidate] (59.563 ms) : 0, 59563
Remote Config [baseline] (612.203 µs) : 0, 612
Remote Config [candidate] (606.357 µs) : 0, 606
Telemetry [baseline] (8.055 ms) : 0, 8055
Telemetry [candidate] (8.104 ms) : 0, 8104
Flare Poller [baseline] (5.819 ms) : 0, 5819
Flare Poller [candidate] (5.059 ms) : 0, 5059
section iast
crashtracking [baseline] (1.185 ms) : 0, 1185
crashtracking [candidate] (1.176 ms) : 0, 1176
BytebuddyAgent [baseline] (800.132 ms) : 0, 800132
BytebuddyAgent [candidate] (801.788 ms) : 0, 801788
AgentMeter [baseline] (11.389 ms) : 0, 11389
AgentMeter [candidate] (11.376 ms) : 0, 11376
GlobalTracer [baseline] (238.351 ms) : 0, 238351
GlobalTracer [candidate] (238.657 ms) : 0, 238657
AppSec [baseline] (31.154 ms) : 0, 31154
AppSec [candidate] (29.245 ms) : 0, 29245
Debugger [baseline] (58.136 ms) : 0, 58136
Debugger [candidate] (58.869 ms) : 0, 58869
Remote Config [baseline] (520.216 µs) : 0, 520
Remote Config [candidate] (513.854 µs) : 0, 514
Telemetry [baseline] (14.365 ms) : 0, 14365
Telemetry [candidate] (14.643 ms) : 0, 14643
Flare Poller [baseline] (3.958 ms) : 0, 3958
Flare Poller [candidate] (3.954 ms) : 0, 3954
IAST [baseline] (25.821 ms) : 0, 25821
IAST [candidate] (26.631 ms) : 0, 26631
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~899ee14234, baseline=1.61.0-SNAPSHOT~2365c1251f
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1063562
Total [baseline] (11.007 s) : 0, 11007488
Agent [candidate] (1.058 s) : 0, 1057583
Total [candidate] (11.071 s) : 0, 11071113
section appsec
Agent [baseline] (1.247 s) : 0, 1246636
Total [baseline] (11.177 s) : 0, 11176907
Agent [candidate] (1.247 s) : 0, 1246676
Total [candidate] (11.152 s) : 0, 11152113
section iast
Agent [baseline] (1.226 s) : 0, 1225826
Total [baseline] (11.41 s) : 0, 11409607
Agent [candidate] (1.223 s) : 0, 1222540
Total [candidate] (11.267 s) : 0, 11267047
section profiling
Agent [baseline] (1.184 s) : 0, 1183523
Total [baseline] (11.111 s) : 0, 11110897
Agent [candidate] (1.182 s) : 0, 1182026
Total [candidate] (11.125 s) : 0, 11124834
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~899ee14234, baseline=1.61.0-SNAPSHOT~2365c1251f
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.205 ms) : 0, 1205
BytebuddyAgent [baseline] (637.48 ms) : 0, 637480
BytebuddyAgent [candidate] (634.263 ms) : 0, 634263
AgentMeter [baseline] (29.793 ms) : 0, 29793
AgentMeter [candidate] (29.579 ms) : 0, 29579
GlobalTracer [baseline] (250.798 ms) : 0, 250798
GlobalTracer [candidate] (249.282 ms) : 0, 249282
AppSec [baseline] (32.337 ms) : 0, 32337
AppSec [candidate] (32.111 ms) : 0, 32111
Debugger [baseline] (60.44 ms) : 0, 60440
Debugger [candidate] (59.921 ms) : 0, 59921
Remote Config [baseline] (596.649 µs) : 0, 597
Remote Config [candidate] (588.245 µs) : 0, 588
Telemetry [baseline] (8.06 ms) : 0, 8060
Telemetry [candidate] (7.962 ms) : 0, 7962
Flare Poller [baseline] (6.628 ms) : 0, 6628
Flare Poller [candidate] (6.625 ms) : 0, 6625
section appsec
crashtracking [baseline] (1.201 ms) : 0, 1201
crashtracking [candidate] (1.204 ms) : 0, 1204
BytebuddyAgent [baseline] (660.804 ms) : 0, 660804
BytebuddyAgent [candidate] (660.653 ms) : 0, 660653
AgentMeter [baseline] (12.043 ms) : 0, 12043
AgentMeter [candidate] (12.082 ms) : 0, 12082
GlobalTracer [baseline] (248.708 ms) : 0, 248708
GlobalTracer [candidate] (248.801 ms) : 0, 248801
AppSec [baseline] (184.084 ms) : 0, 184084
AppSec [candidate] (184.108 ms) : 0, 184108
Debugger [baseline] (66.26 ms) : 0, 66260
Debugger [candidate] (66.117 ms) : 0, 66117
Remote Config [baseline] (599.609 µs) : 0, 600
Remote Config [candidate] (590.508 µs) : 0, 591
Telemetry [baseline] (8.634 ms) : 0, 8634
Telemetry [candidate] (8.593 ms) : 0, 8593
Flare Poller [baseline] (3.581 ms) : 0, 3581
Flare Poller [candidate] (3.534 ms) : 0, 3534
IAST [baseline] (24.447 ms) : 0, 24447
IAST [candidate] (24.649 ms) : 0, 24649
section iast
crashtracking [baseline] (1.198 ms) : 0, 1198
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (801.199 ms) : 0, 801199
BytebuddyAgent [candidate] (800.016 ms) : 0, 800016
AgentMeter [baseline] (11.369 ms) : 0, 11369
AgentMeter [candidate] (11.375 ms) : 0, 11375
GlobalTracer [baseline] (239.733 ms) : 0, 239733
GlobalTracer [candidate] (238.343 ms) : 0, 238343
AppSec [baseline] (30.448 ms) : 0, 30448
AppSec [candidate] (28.625 ms) : 0, 28625
Debugger [baseline] (60.42 ms) : 0, 60420
Debugger [candidate] (60.882 ms) : 0, 60882
Remote Config [baseline] (527.644 µs) : 0, 528
Remote Config [candidate] (521.75 µs) : 0, 522
Telemetry [baseline] (14.441 ms) : 0, 14441
Telemetry [candidate] (14.869 ms) : 0, 14869
Flare Poller [baseline] (3.939 ms) : 0, 3939
Flare Poller [candidate] (3.64 ms) : 0, 3640
IAST [baseline] (25.977 ms) : 0, 25977
IAST [candidate] (26.599 ms) : 0, 26599
section profiling
crashtracking [baseline] (1.167 ms) : 0, 1167
crashtracking [candidate] (1.176 ms) : 0, 1176
BytebuddyAgent [baseline] (690.263 ms) : 0, 690263
BytebuddyAgent [candidate] (690.076 ms) : 0, 690076
AgentMeter [baseline] (9.086 ms) : 0, 9086
AgentMeter [candidate] (9.067 ms) : 0, 9067
GlobalTracer [baseline] (206.849 ms) : 0, 206849
GlobalTracer [candidate] (206.345 ms) : 0, 206345
AppSec [baseline] (32.599 ms) : 0, 32599
AppSec [candidate] (32.496 ms) : 0, 32496
Debugger [baseline] (65.775 ms) : 0, 65775
Debugger [candidate] (65.543 ms) : 0, 65543
Remote Config [baseline] (579.834 µs) : 0, 580
Remote Config [candidate] (569.828 µs) : 0, 570
Telemetry [baseline] (7.926 ms) : 0, 7926
Telemetry [candidate] (7.87 ms) : 0, 7870
Flare Poller [baseline] (3.607 ms) : 0, 3607
Flare Poller [candidate] (3.611 ms) : 0, 3611
ProfilingAgent [baseline] (94.318 ms) : 0, 94318
ProfilingAgent [candidate] (94.171 ms) : 0, 94171
Profiling [baseline] (94.885 ms) : 0, 94885
Profiling [candidate] (94.744 ms) : 0, 94744
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 0 performance regressions! Performance is the same for 19 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~899ee14234, baseline=1.61.0-SNAPSHOT~2365c1251f
dateFormat X
axisFormat %s
section baseline
no_agent (18.873 ms) : 18678, 19069
. : milestone, 18873,
appsec (18.915 ms) : 18724, 19106
. : milestone, 18915,
code_origins (18.2 ms) : 18017, 18383
. : milestone, 18200,
iast (17.974 ms) : 17795, 18154
. : milestone, 17974,
profiling (19.972 ms) : 19768, 20175
. : milestone, 19972,
tracing (17.946 ms) : 17771, 18121
. : milestone, 17946,
section candidate
no_agent (19.161 ms) : 18970, 19351
. : milestone, 19161,
appsec (18.77 ms) : 18579, 18962
. : milestone, 18770,
code_origins (17.948 ms) : 17774, 18122
. : milestone, 17948,
iast (18.165 ms) : 17985, 18345
. : milestone, 18165,
profiling (18.639 ms) : 18455, 18823
. : milestone, 18639,
tracing (17.977 ms) : 17800, 18154
. : milestone, 17977,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~899ee14234, baseline=1.61.0-SNAPSHOT~2365c1251f
dateFormat X
axisFormat %s
section baseline
no_agent (1.233 ms) : 1221, 1244
. : milestone, 1233,
iast (3.357 ms) : 3311, 3403
. : milestone, 3357,
iast_FULL (5.99 ms) : 5930, 6051
. : milestone, 5990,
iast_GLOBAL (3.61 ms) : 3551, 3669
. : milestone, 3610,
profiling (2.112 ms) : 2092, 2132
. : milestone, 2112,
tracing (1.92 ms) : 1903, 1936
. : milestone, 1920,
section candidate
no_agent (1.258 ms) : 1246, 1270
. : milestone, 1258,
iast (3.401 ms) : 3349, 3454
. : milestone, 3401,
iast_FULL (5.98 ms) : 5920, 6041
. : milestone, 5980,
iast_GLOBAL (3.738 ms) : 3675, 3801
. : milestone, 3738,
profiling (2.269 ms) : 2248, 2291
. : milestone, 2269,
tracing (1.945 ms) : 1929, 1961
. : milestone, 1945,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~899ee14234, baseline=1.61.0-SNAPSHOT~2365c1251f
dateFormat X
axisFormat %s
section baseline
no_agent (1.494 ms) : 1482, 1506
. : milestone, 1494,
appsec (2.555 ms) : 2500, 2610
. : milestone, 2555,
iast (2.272 ms) : 2203, 2340
. : milestone, 2272,
iast_GLOBAL (2.329 ms) : 2260, 2399
. : milestone, 2329,
profiling (2.548 ms) : 2332, 2764
. : milestone, 2548,
tracing (2.1 ms) : 2047, 2154
. : milestone, 2100,
section candidate
no_agent (1.496 ms) : 1484, 1508
. : milestone, 1496,
appsec (3.815 ms) : 3592, 4038
. : milestone, 3815,
iast (2.277 ms) : 2208, 2346
. : milestone, 2277,
iast_GLOBAL (2.326 ms) : 2257, 2395
. : milestone, 2326,
profiling (2.139 ms) : 2082, 2196
. : milestone, 2139,
tracing (2.081 ms) : 2028, 2134
. : milestone, 2081,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~899ee14234, baseline=1.61.0-SNAPSHOT~2365c1251f
dateFormat X
axisFormat %s
section baseline
no_agent (14.979 s) : 14979000, 14979000
. : milestone, 14979000,
appsec (14.705 s) : 14705000, 14705000
. : milestone, 14705000,
iast (17.932 s) : 17932000, 17932000
. : milestone, 17932000,
iast_GLOBAL (18.125 s) : 18125000, 18125000
. : milestone, 18125000,
profiling (14.905 s) : 14905000, 14905000
. : milestone, 14905000,
tracing (14.974 s) : 14974000, 14974000
. : milestone, 14974000,
section candidate
no_agent (15.474 s) : 15474000, 15474000
. : milestone, 15474000,
appsec (14.783 s) : 14783000, 14783000
. : milestone, 14783000,
iast (18.503 s) : 18503000, 18503000
. : milestone, 18503000,
iast_GLOBAL (17.937 s) : 17937000, 17937000
. : milestone, 17937000,
profiling (15.091 s) : 15091000, 15091000
. : milestone, 15091000,
tracing (15.136 s) : 15136000, 15136000
. : milestone, 15136000,
|
Motivation
When a JUnit setup method (e.g. @BeforeAll) fails and is retried via Gradle's retry plugin, Gradle generates a synthetic
<testcase name="initializationError">for each attempt. If the final retry succeeds, the build passes, but Test Optimization receives all intermediate failure entries with no indication that they were retried, making them appear as genuine failures in the dashboard.What Does This Do
Add a doLast post-processor to every Test task that rewrites the JUnit XML reports after execution. For any suite with multiple
initializationErrortestcases (i.e. retries occurred), all entries except the last one are tagged with:The last entry is left unmodified, allowing Test Optimization to apply its default status inference based on the actual outcome. Files with only one (or zero) initializationError testcases are not modified.
The post-processor runs as a doLast action directly on the test task, keeping it within the task's up-to-date and caching scope so it doesn't interfere with downstream consumers of the JUnit reports.
Additional Notes
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 issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.