Fix check raw file injection smoke test#10920
Fix check raw file injection smoke test#10920gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomasterfrom
Conversation
Three bugs contributed to flakiness in CI on JDK 8 variants (zulu8, semeru8) and under load: 1. Copy-paste bug in assertRawLogLinesWithInjection: the fallback assertion for 32-bit trace IDs incorrectly referenced logLines[0] (BEFORE FIRST SPAN) instead of logLines[4] (INSIDE THIRD SPAN) and logLines[6] (AFTER FORTH SPAN). This meant the 32-bit trace ID format was never actually validated for those two log lines. 2. BaseApplication.waitForCondition timeout was 10 seconds. On loaded CI machines with JDK 8 JVMs, the RC config change propagation through captureTraceConfig() could take several seconds, approaching the limit and causing "Logs injection config was never updated" failures. Increased to 30 seconds to give adequate headroom. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 63 metrics, 8 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~fdf3a1cf52, baseline=1.61.0-SNAPSHOT~1916c9079d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.063 s) : 0, 1062517
Total [baseline] (8.857 s) : 0, 8857420
Agent [candidate] (1.055 s) : 0, 1055294
Total [candidate] (8.812 s) : 0, 8811947
section iast
Agent [baseline] (1.224 s) : 0, 1224410
Total [baseline] (9.531 s) : 0, 9530545
Agent [candidate] (1.234 s) : 0, 1233678
Total [candidate] (9.575 s) : 0, 9575475
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~fdf3a1cf52, baseline=1.61.0-SNAPSHOT~1916c9079d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.217 ms) : 0, 1217
crashtracking [candidate] (1.189 ms) : 0, 1189
BytebuddyAgent [baseline] (633.629 ms) : 0, 633629
BytebuddyAgent [candidate] (628.657 ms) : 0, 628657
AgentMeter [baseline] (29.597 ms) : 0, 29597
AgentMeter [candidate] (29.35 ms) : 0, 29350
GlobalTracer [baseline] (257.729 ms) : 0, 257729
GlobalTracer [candidate] (256.423 ms) : 0, 256423
AppSec [baseline] (31.905 ms) : 0, 31905
AppSec [candidate] (31.608 ms) : 0, 31608
Debugger [baseline] (59.976 ms) : 0, 59976
Debugger [candidate] (59.411 ms) : 0, 59411
Remote Config [baseline] (594.441 µs) : 0, 594
Remote Config [candidate] (577.926 µs) : 0, 578
Telemetry [baseline] (8.118 ms) : 0, 8118
Telemetry [candidate] (7.963 ms) : 0, 7963
Flare Poller [baseline] (3.58 ms) : 0, 3580
Flare Poller [candidate] (4.228 ms) : 0, 4228
section iast
crashtracking [baseline] (1.187 ms) : 0, 1187
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (794.404 ms) : 0, 794404
BytebuddyAgent [candidate] (802.325 ms) : 0, 802325
AgentMeter [baseline] (11.312 ms) : 0, 11312
AgentMeter [candidate] (11.571 ms) : 0, 11571
GlobalTracer [baseline] (247.076 ms) : 0, 247076
GlobalTracer [candidate] (247.524 ms) : 0, 247524
IAST [baseline] (25.385 ms) : 0, 25385
IAST [candidate] (25.326 ms) : 0, 25326
AppSec [baseline] (26.516 ms) : 0, 26516
AppSec [candidate] (26.465 ms) : 0, 26465
Debugger [baseline] (68.185 ms) : 0, 68185
Debugger [candidate] (68.234 ms) : 0, 68234
Remote Config [baseline] (519.76 µs) : 0, 520
Remote Config [candidate] (524.286 µs) : 0, 524
Telemetry [baseline] (10.171 ms) : 0, 10171
Telemetry [candidate] (10.619 ms) : 0, 10619
Flare Poller [baseline] (3.618 ms) : 0, 3618
Flare Poller [candidate] (3.774 ms) : 0, 3774
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~fdf3a1cf52, baseline=1.61.0-SNAPSHOT~1916c9079d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1055734
Total [baseline] (11.024 s) : 0, 11024172
Agent [candidate] (1.054 s) : 0, 1053590
Total [candidate] (11.059 s) : 0, 11058807
section appsec
Agent [baseline] (1.254 s) : 0, 1254488
Total [baseline] (11.13 s) : 0, 11130072
Agent [candidate] (1.246 s) : 0, 1245510
Total [candidate] (11.15 s) : 0, 11149664
section iast
Agent [baseline] (1.227 s) : 0, 1226584
Total [baseline] (11.273 s) : 0, 11272685
Agent [candidate] (1.232 s) : 0, 1231763
Total [candidate] (11.332 s) : 0, 11332093
section profiling
Agent [baseline] (1.193 s) : 0, 1192966
Total [baseline] (11.007 s) : 0, 11006773
Agent [candidate] (1.188 s) : 0, 1187783
Total [candidate] (10.949 s) : 0, 10949169
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~fdf3a1cf52, baseline=1.61.0-SNAPSHOT~1916c9079d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.194 ms) : 0, 1194
crashtracking [candidate] (1.189 ms) : 0, 1189
BytebuddyAgent [baseline] (628.006 ms) : 0, 628006
BytebuddyAgent [candidate] (627.091 ms) : 0, 627091
AgentMeter [baseline] (29.27 ms) : 0, 29270
AgentMeter [candidate] (29.182 ms) : 0, 29182
GlobalTracer [baseline] (256.442 ms) : 0, 256442
GlobalTracer [candidate] (255.821 ms) : 0, 255821
AppSec [baseline] (31.597 ms) : 0, 31597
AppSec [candidate] (31.505 ms) : 0, 31505
Debugger [baseline] (60.421 ms) : 0, 60421
Debugger [candidate] (60.078 ms) : 0, 60078
Remote Config [baseline] (589.825 µs) : 0, 590
Remote Config [candidate] (587.018 µs) : 0, 587
Telemetry [baseline] (8.0 ms) : 0, 8000
Telemetry [candidate] (8.053 ms) : 0, 8053
Flare Poller [baseline] (4.266 ms) : 0, 4266
Flare Poller [candidate] (4.25 ms) : 0, 4250
section appsec
crashtracking [baseline] (1.195 ms) : 0, 1195
crashtracking [candidate] (1.195 ms) : 0, 1195
BytebuddyAgent [baseline] (663.477 ms) : 0, 663477
BytebuddyAgent [candidate] (657.652 ms) : 0, 657652
AgentMeter [baseline] (12.141 ms) : 0, 12141
AgentMeter [candidate] (12.083 ms) : 0, 12083
GlobalTracer [baseline] (259.137 ms) : 0, 259137
GlobalTracer [candidate] (257.708 ms) : 0, 257708
IAST [baseline] (24.365 ms) : 0, 24365
IAST [candidate] (24.133 ms) : 0, 24133
AppSec [baseline] (178.513 ms) : 0, 178513
AppSec [candidate] (177.581 ms) : 0, 177581
Debugger [baseline] (66.587 ms) : 0, 66587
Debugger [candidate] (66.519 ms) : 0, 66519
Remote Config [baseline] (636.271 µs) : 0, 636
Remote Config [candidate] (631.08 µs) : 0, 631
Telemetry [baseline] (8.434 ms) : 0, 8434
Telemetry [candidate] (8.305 ms) : 0, 8305
Flare Poller [baseline] (3.657 ms) : 0, 3657
Flare Poller [candidate] (3.574 ms) : 0, 3574
section iast
crashtracking [baseline] (1.194 ms) : 0, 1194
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (795.217 ms) : 0, 795217
BytebuddyAgent [candidate] (799.214 ms) : 0, 799214
AgentMeter [baseline] (11.385 ms) : 0, 11385
AgentMeter [candidate] (11.447 ms) : 0, 11447
GlobalTracer [baseline] (247.286 ms) : 0, 247286
GlobalTracer [candidate] (247.736 ms) : 0, 247736
IAST [baseline] (25.304 ms) : 0, 25304
IAST [candidate] (25.474 ms) : 0, 25474
AppSec [baseline] (26.477 ms) : 0, 26477
AppSec [candidate] (26.486 ms) : 0, 26486
Debugger [baseline] (69.99 ms) : 0, 69990
Debugger [candidate] (70.876 ms) : 0, 70876
Remote Config [baseline] (528.388 µs) : 0, 528
Remote Config [candidate] (533.848 µs) : 0, 534
Telemetry [baseline] (9.74 ms) : 0, 9740
Telemetry [candidate] (9.372 ms) : 0, 9372
Flare Poller [baseline] (3.458 ms) : 0, 3458
Flare Poller [candidate] (3.33 ms) : 0, 3330
section profiling
crashtracking [baseline] (1.171 ms) : 0, 1171
crashtracking [candidate] (1.169 ms) : 0, 1169
BytebuddyAgent [baseline] (688.915 ms) : 0, 688915
BytebuddyAgent [candidate] (686.957 ms) : 0, 686957
AgentMeter [baseline] (9.085 ms) : 0, 9085
AgentMeter [candidate] (9.024 ms) : 0, 9024
GlobalTracer [baseline] (216.946 ms) : 0, 216946
GlobalTracer [candidate] (216.132 ms) : 0, 216132
AppSec [baseline] (32.458 ms) : 0, 32458
AppSec [candidate] (32.312 ms) : 0, 32312
Debugger [baseline] (65.035 ms) : 0, 65035
Debugger [candidate] (65.255 ms) : 0, 65255
Remote Config [baseline] (568.089 µs) : 0, 568
Remote Config [candidate] (552.455 µs) : 0, 552
Telemetry [baseline] (7.797 ms) : 0, 7797
Telemetry [candidate] (8.402 ms) : 0, 8402
Flare Poller [baseline] (5.11 ms) : 0, 5110
Flare Poller [candidate] (3.428 ms) : 0, 3428
ProfilingAgent [baseline] (94.49 ms) : 0, 94490
ProfilingAgent [candidate] (93.376 ms) : 0, 93376
Profiling [baseline] (95.058 ms) : 0, 95058
Profiling [candidate] (93.934 ms) : 0, 93934
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 18 metrics, 18 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~fdf3a1cf52, baseline=1.61.0-SNAPSHOT~1916c9079d
dateFormat X
axisFormat %s
section baseline
no_agent (18.199 ms) : 18010, 18387
. : milestone, 18199,
appsec (18.754 ms) : 18563, 18944
. : milestone, 18754,
code_origins (17.716 ms) : 17544, 17889
. : milestone, 17716,
iast (17.637 ms) : 17462, 17813
. : milestone, 17637,
profiling (18.231 ms) : 18052, 18411
. : milestone, 18231,
tracing (17.703 ms) : 17531, 17876
. : milestone, 17703,
section candidate
no_agent (16.954 ms) : 16786, 17122
. : milestone, 16954,
appsec (18.773 ms) : 18583, 18964
. : milestone, 18773,
code_origins (17.848 ms) : 17670, 18025
. : milestone, 17848,
iast (17.815 ms) : 17641, 17990
. : milestone, 17815,
profiling (18.687 ms) : 18498, 18877
. : milestone, 18687,
tracing (17.478 ms) : 17304, 17652
. : milestone, 17478,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~fdf3a1cf52, baseline=1.61.0-SNAPSHOT~1916c9079d
dateFormat X
axisFormat %s
section baseline
no_agent (1.204 ms) : 1192, 1216
. : milestone, 1204,
iast (3.194 ms) : 3153, 3235
. : milestone, 3194,
iast_FULL (5.951 ms) : 5891, 6011
. : milestone, 5951,
iast_GLOBAL (3.634 ms) : 3578, 3690
. : milestone, 3634,
profiling (2.245 ms) : 2224, 2265
. : milestone, 2245,
tracing (1.863 ms) : 1847, 1879
. : milestone, 1863,
section candidate
no_agent (1.195 ms) : 1183, 1206
. : milestone, 1195,
iast (3.107 ms) : 3067, 3146
. : milestone, 3107,
iast_FULL (5.847 ms) : 5789, 5905
. : milestone, 5847,
iast_GLOBAL (3.51 ms) : 3453, 3567
. : milestone, 3510,
profiling (2.132 ms) : 2113, 2152
. : milestone, 2132,
tracing (1.786 ms) : 1771, 1801
. : milestone, 1786,
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~fdf3a1cf52, baseline=1.61.0-SNAPSHOT~1916c9079d
dateFormat X
axisFormat %s
section baseline
no_agent (1.468 ms) : 1456, 1479
. : milestone, 1468,
appsec (2.566 ms) : 2507, 2624
. : milestone, 2566,
iast (2.251 ms) : 2181, 2320
. : milestone, 2251,
iast_GLOBAL (2.295 ms) : 2225, 2365
. : milestone, 2295,
profiling (2.503 ms) : 2339, 2667
. : milestone, 2503,
tracing (2.059 ms) : 2006, 2113
. : milestone, 2059,
section candidate
no_agent (1.47 ms) : 1458, 1482
. : milestone, 1470,
appsec (3.784 ms) : 3560, 4007
. : milestone, 3784,
iast (2.244 ms) : 2175, 2313
. : milestone, 2244,
iast_GLOBAL (2.285 ms) : 2215, 2354
. : milestone, 2285,
profiling (2.082 ms) : 2028, 2137
. : milestone, 2082,
tracing (2.05 ms) : 1996, 2104
. : milestone, 2050,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~fdf3a1cf52, baseline=1.61.0-SNAPSHOT~1916c9079d
dateFormat X
axisFormat %s
section baseline
no_agent (15.256 s) : 15256000, 15256000
. : milestone, 15256000,
appsec (14.452 s) : 14452000, 14452000
. : milestone, 14452000,
iast (18.566 s) : 18566000, 18566000
. : milestone, 18566000,
iast_GLOBAL (17.991 s) : 17991000, 17991000
. : milestone, 17991000,
profiling (15.334 s) : 15334000, 15334000
. : milestone, 15334000,
tracing (14.966 s) : 14966000, 14966000
. : milestone, 14966000,
section candidate
no_agent (15.47 s) : 15470000, 15470000
. : milestone, 15470000,
appsec (14.723 s) : 14723000, 14723000
. : milestone, 14723000,
iast (18.284 s) : 18284000, 18284000
. : milestone, 18284000,
iast_GLOBAL (17.721 s) : 17721000, 17721000
. : milestone, 17721000,
profiling (15.726 s) : 15726000, 15726000
. : milestone, 15726000,
tracing (15.049 s) : 15049000, 15049000
. : milestone, 15049000,
|
PerfectSlayer
left a comment
There was a problem hiding this comment.
💭 thought: According to the kind of changes, this is not flaky tests but buggy tests 🤔
About the timeout, I would be a bit more conservative as 30s seems a lot while 10s should already be enough for CI. WDYT @AlexeyKuznetsov-DD ?
Just reviewed PR, yep logic indeed was broken (looks like a typo or copy-paste error to me). |
dd-smoke-tests/log-injection/src/main/java/datadog/smoketest/loginjection/BaseApplication.java
Outdated
Show resolved
Hide resolved
|
@PerfectSlayer / @AlexeyKuznetsov-DD - appreciate the peek here. I've reverted the timeout change and left the update the the test logic. I'll mark this as |
PerfectSlayer
left a comment
There was a problem hiding this comment.
Looking good to me. I will revert the flake test label as it sounds more like a bug than a flake. I would appreciate a review from your team to check the logic before merging too.
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
@PerfectSlayer I'd prefer not to remove the flake annotation for now in the case that there is a hidden flakiness underneath the consistent test failure. Instead, we can take a look back in a month and remove the flaky label if the test consistently passes in that time. How does that sound to you? |
Are you referring to the |
|
I meant the |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
7c8927f
into
master
What Does This Do
Fixes two bugs in
LogInjectionSmokeTest.check raw file injectionthat caused flaky test failures in CI on JDK 8 variants (zulu8,semeru8) and under load.Motivation
The test has been failing consistently in CI (visible in Datadog Test Visibility since March 13 when
final_statustracking was added). All observed failures are in test classes with Logback or Log4j2 backends. The@Flakyannotation covers IBM8 and OracleJDK8, but the same failures occur on other JDK 8 variants.Bug: Wrong index in
assertRawLogLinesWithInjection(copy-paste error)Lines 234 and 236 used
logLines[0]in the fallback assertion instead oflogLines[4]andlogLines[6]. SincelogLines[0]is "BEFORE FIRST SPAN", the fallback for 32-bit trace IDs was never exercised for INSIDE THIRD SPAN or AFTER FORTH SPAN.Additional Notes
gradle/gradle-daemon-jvm.propertiesrequires JDK 21+ for the Gradle daemon, which always provides the test subprocess JVM viaSystem.getProperty("java.home")@Flakycondition intentionally not extended — fixing root causes rather than skipping on more JVMsContributor Checklist
Fix ...)type: bug,comp: testing,tag: flaky test,tag: no release notesJira ticket: N/A