-
Notifications
You must be signed in to change notification settings - Fork 300
Stable Config parsing: Treat empty environment variable or process argument values as empty string #8759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…values in template variable
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 12 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~fbf809aa04, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.024 s) : 0, 1023614
Total [baseline] (10.446 s) : 0, 10446194
Agent [candidate] (1.027 s) : 0, 1026968
Total [candidate] (10.473 s) : 0, 10472725
section appsec
Agent [baseline] (1.161 s) : 0, 1161478
Total [baseline] (10.694 s) : 0, 10694372
Agent [candidate] (1.161 s) : 0, 1161086
Total [candidate] (10.666 s) : 0, 10665749
section iast
Agent [baseline] (1.146 s) : 0, 1146170
Total [baseline] (10.835 s) : 0, 10834593
Agent [candidate] (1.156 s) : 0, 1155800
Total [candidate] (10.872 s) : 0, 10871716
section profiling
Agent [baseline] (1.278 s) : 0, 1278491
Total [baseline] (10.92 s) : 0, 10919873
Agent [candidate] (1.29 s) : 0, 1290402
Total [candidate] (10.882 s) : 0, 10882032
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~fbf809aa04, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (686.133 ms) : 0, 686133
BytebuddyAgent [candidate] (688.606 ms) : 0, 688606
GlobalTracer [baseline] (240.454 ms) : 0, 240454
GlobalTracer [candidate] (241.823 ms) : 0, 241823
AppSec [baseline] (54.533 ms) : 0, 54533
AppSec [candidate] (55.078 ms) : 0, 55078
Debugger [baseline] (9.867 ms) : 0, 9867
Debugger [candidate] (7.778 ms) : 0, 7778
Remote Config [baseline] (681.19 µs) : 0, 681
Remote Config [candidate] (706.329 µs) : 0, 706
Telemetry [baseline] (8.289 ms) : 0, 8289
Telemetry [candidate] (9.216 ms) : 0, 9216
section appsec
BytebuddyAgent [baseline] (700.737 ms) : 0, 700737
BytebuddyAgent [candidate] (700.244 ms) : 0, 700244
GlobalTracer [baseline] (236.773 ms) : 0, 236773
GlobalTracer [candidate] (236.705 ms) : 0, 236705
IAST [baseline] (21.827 ms) : 0, 21827
IAST [candidate] (21.657 ms) : 0, 21657
AppSec [baseline] (175.698 ms) : 0, 175698
AppSec [candidate] (175.928 ms) : 0, 175928
Debugger [baseline] (5.961 ms) : 0, 5961
Debugger [candidate] (5.928 ms) : 0, 5928
Remote Config [baseline] (610.666 µs) : 0, 611
Remote Config [candidate] (614.299 µs) : 0, 614
Telemetry [baseline] (7.364 ms) : 0, 7364
Telemetry [candidate] (7.369 ms) : 0, 7369
section iast
BytebuddyAgent [baseline] (800.282 ms) : 0, 800282
BytebuddyAgent [candidate] (806.612 ms) : 0, 806612
GlobalTracer [baseline] (229.832 ms) : 0, 229832
GlobalTracer [candidate] (232.043 ms) : 0, 232043
IAST [baseline] (27.47 ms) : 0, 27470
IAST [candidate] (26.096 ms) : 0, 26096
AppSec [baseline] (50.854 ms) : 0, 50854
AppSec [candidate] (52.301 ms) : 0, 52301
Debugger [baseline] (5.872 ms) : 0, 5872
Debugger [candidate] (5.987 ms) : 0, 5987
Remote Config [baseline] (585.114 µs) : 0, 585
Remote Config [candidate] (600.871 µs) : 0, 601
Telemetry [baseline] (7.845 ms) : 0, 7845
Telemetry [candidate] (7.849 ms) : 0, 7849
section profiling
BytebuddyAgent [baseline] (672.75 ms) : 0, 672750
BytebuddyAgent [candidate] (678.188 ms) : 0, 678188
GlobalTracer [baseline] (377.122 ms) : 0, 377122
GlobalTracer [candidate] (381.326 ms) : 0, 381326
AppSec [baseline] (54.735 ms) : 0, 54735
AppSec [candidate] (54.343 ms) : 0, 54343
Debugger [baseline] (6.158 ms) : 0, 6158
Debugger [candidate] (6.167 ms) : 0, 6167
Remote Config [baseline] (637.963 µs) : 0, 638
Remote Config [candidate] (663.61 µs) : 0, 664
Telemetry [baseline] (8.065 ms) : 0, 8065
Telemetry [candidate] (8.118 ms) : 0, 8118
ProfilingAgent [baseline] (108.551 ms) : 0, 108551
ProfilingAgent [candidate] (110.796 ms) : 0, 110796
Profiling [baseline] (108.577 ms) : 0, 108577
Profiling [candidate] (110.822 ms) : 0, 110822
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~fbf809aa04, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.021 s) : 0, 1020564
Total [baseline] (8.625 s) : 0, 8624921
Agent [candidate] (1.016 s) : 0, 1015513
Total [candidate] (8.607 s) : 0, 8607265
section iast
Agent [baseline] (1.147 s) : 0, 1147319
Total [baseline] (9.262 s) : 0, 9262320
Agent [candidate] (1.15 s) : 0, 1149920
Total [candidate] (9.239 s) : 0, 9239422
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.15 s) : 0, 1149761
Total [baseline] (9.203 s) : 0, 9203195
Agent [candidate] (1.156 s) : 0, 1155903
Total [candidate] (9.22 s) : 0, 9219790
section iast_TELEMETRY_OFF
Agent [baseline] (1.155 s) : 0, 1154523
Total [baseline] (9.203 s) : 0, 9202536
Agent [candidate] (1.145 s) : 0, 1144544
Total [candidate] (9.244 s) : 0, 9244482
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~fbf809aa04, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (681.764 ms) : 0, 681764
BytebuddyAgent [candidate] (680.255 ms) : 0, 680255
GlobalTracer [baseline] (239.909 ms) : 0, 239909
GlobalTracer [candidate] (239.487 ms) : 0, 239487
AppSec [baseline] (55.098 ms) : 0, 55098
AppSec [candidate] (54.908 ms) : 0, 54908
Debugger [baseline] (10.626 ms) : 0, 10626
Debugger [candidate] (7.633 ms) : 0, 7633
Remote Config [baseline] (669.618 µs) : 0, 670
Remote Config [candidate] (681.161 µs) : 0, 681
Telemetry [baseline] (8.928 ms) : 0, 8928
Telemetry [candidate] (8.963 ms) : 0, 8963
section iast
BytebuddyAgent [baseline] (799.563 ms) : 0, 799563
BytebuddyAgent [candidate] (802.906 ms) : 0, 802906
GlobalTracer [baseline] (231.196 ms) : 0, 231196
GlobalTracer [candidate] (230.252 ms) : 0, 230252
IAST [baseline] (29.256 ms) : 0, 29256
IAST [candidate] (28.265 ms) : 0, 28265
AppSec [baseline] (49.597 ms) : 0, 49597
AppSec [candidate] (50.441 ms) : 0, 50441
Debugger [baseline] (5.892 ms) : 0, 5892
Debugger [candidate] (5.985 ms) : 0, 5985
Remote Config [baseline] (586.797 µs) : 0, 587
Remote Config [candidate] (618.791 µs) : 0, 619
Telemetry [baseline] (7.881 ms) : 0, 7881
Telemetry [candidate] (7.923 ms) : 0, 7923
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (802.23 ms) : 0, 802230
BytebuddyAgent [candidate] (807.206 ms) : 0, 807206
GlobalTracer [baseline] (230.522 ms) : 0, 230522
GlobalTracer [candidate] (231.456 ms) : 0, 231456
IAST [baseline] (29.323 ms) : 0, 29323
IAST [candidate] (29.347 ms) : 0, 29347
AppSec [baseline] (49.692 ms) : 0, 49692
AppSec [candidate] (49.826 ms) : 0, 49826
Debugger [baseline] (5.925 ms) : 0, 5925
Debugger [candidate] (5.945 ms) : 0, 5945
Remote Config [baseline] (587.803 µs) : 0, 588
Remote Config [candidate] (593.695 µs) : 0, 594
Telemetry [baseline] (7.935 ms) : 0, 7935
Telemetry [candidate] (7.946 ms) : 0, 7946
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (807.515 ms) : 0, 807515
BytebuddyAgent [candidate] (798.478 ms) : 0, 798478
GlobalTracer [baseline] (231.213 ms) : 0, 231213
GlobalTracer [candidate] (230.06 ms) : 0, 230060
IAST [baseline] (24.647 ms) : 0, 24647
IAST [candidate] (22.407 ms) : 0, 22407
AppSec [baseline] (53.279 ms) : 0, 53279
AppSec [candidate] (55.778 ms) : 0, 55778
Debugger [baseline] (5.851 ms) : 0, 5851
Debugger [candidate] (5.98 ms) : 0, 5980
Remote Config [baseline] (595.232 µs) : 0, 595
Remote Config [candidate] (589.936 µs) : 0, 590
Telemetry [baseline] (7.76 ms) : 0, 7760
Telemetry [candidate] (7.798 ms) : 0, 7798
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 18 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~fbf809aa04, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section baseline
no_agent (1.361 ms) : 1341, 1382
. : milestone, 1361,
appsec (1.75 ms) : 1727, 1774
. : milestone, 1750,
appsec_no_iast (1.755 ms) : 1732, 1778
. : milestone, 1755,
code_origins (1.652 ms) : 1625, 1680
. : milestone, 1652,
iast (1.514 ms) : 1490, 1539
. : milestone, 1514,
profiling (1.523 ms) : 1500, 1546
. : milestone, 1523,
tracing (1.49 ms) : 1465, 1515
. : milestone, 1490,
section candidate
no_agent (1.353 ms) : 1333, 1374
. : milestone, 1353,
appsec (1.728 ms) : 1705, 1750
. : milestone, 1728,
appsec_no_iast (1.729 ms) : 1706, 1752
. : milestone, 1729,
code_origins (1.675 ms) : 1649, 1701
. : milestone, 1675,
iast (1.523 ms) : 1499, 1546
. : milestone, 1523,
profiling (1.554 ms) : 1528, 1579
. : milestone, 1554,
tracing (1.499 ms) : 1475, 1524
. : milestone, 1499,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~fbf809aa04, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section baseline
no_agent (387.743 µs) : 367, 408
. : milestone, 388,
iast (519.175 µs) : 496, 543
. : milestone, 519,
iast_FULL (735.384 µs) : 713, 757
. : milestone, 735,
iast_GLOBAL (564.973 µs) : 543, 587
. : milestone, 565,
iast_HARDCODED_SECRET_DISABLED (524.936 µs) : 502, 548
. : milestone, 525,
iast_INACTIVE (477.533 µs) : 454, 501
. : milestone, 478,
iast_TELEMETRY_OFF (507.168 µs) : 484, 531
. : milestone, 507,
tracing (466.691 µs) : 444, 489
. : milestone, 467,
section candidate
no_agent (380.001 µs) : 360, 400
. : milestone, 380,
iast (515.992 µs) : 494, 538
. : milestone, 516,
iast_FULL (739.438 µs) : 718, 761
. : milestone, 739,
iast_GLOBAL (559.007 µs) : 537, 581
. : milestone, 559,
iast_HARDCODED_SECRET_DISABLED (530.884 µs) : 508, 554
. : milestone, 531,
iast_INACTIVE (464.872 µs) : 443, 486
. : milestone, 465,
iast_TELEMETRY_OFF (511.703 µs) : 489, 535
. : milestone, 512,
tracing (466.519 µs) : 444, 489
. : milestone, 467,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~fbf809aa04, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section baseline
no_agent (1.481 ms) : 1469, 1492
. : milestone, 1481,
appsec (2.42 ms) : 2370, 2469
. : milestone, 2420,
iast (2.209 ms) : 2147, 2272
. : milestone, 2209,
iast_GLOBAL (2.244 ms) : 2182, 2307
. : milestone, 2244,
profiling (2.053 ms) : 2002, 2105
. : milestone, 2053,
tracing (2.027 ms) : 1978, 2076
. : milestone, 2027,
section candidate
no_agent (1.478 ms) : 1467, 1490
. : milestone, 1478,
appsec (2.411 ms) : 2361, 2461
. : milestone, 2411,
iast (2.196 ms) : 2134, 2259
. : milestone, 2196,
iast_GLOBAL (2.236 ms) : 2173, 2298
. : milestone, 2236,
profiling (2.044 ms) : 1994, 2094
. : milestone, 2044,
tracing (2.023 ms) : 1974, 2072
. : milestone, 2023,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~fbf809aa04, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section baseline
no_agent (15.318 s) : 15318000, 15318000
. : milestone, 15318000,
appsec (14.874 s) : 14874000, 14874000
. : milestone, 14874000,
iast (18.855 s) : 18855000, 18855000
. : milestone, 18855000,
iast_GLOBAL (18.021 s) : 18021000, 18021000
. : milestone, 18021000,
profiling (14.952 s) : 14952000, 14952000
. : milestone, 14952000,
tracing (15.158 s) : 15158000, 15158000
. : milestone, 15158000,
section candidate
no_agent (15.36 s) : 15360000, 15360000
. : milestone, 15360000,
appsec (15.215 s) : 15215000, 15215000
. : milestone, 15215000,
iast (18.645 s) : 18645000, 18645000
. : milestone, 18645000,
iast_GLOBAL (18.333 s) : 18333000, 18333000
. : milestone, 18333000,
profiling (15.71 s) : 15710000, 15710000
. : milestone, 15710000,
tracing (15.142 s) : 15142000, 15142000
. : milestone, 15142000,
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
@@ -244,6 +244,8 @@ private static String processTemplateVar(String templateVar) throws IOException | |||
} | |||
String value = System.getenv(envVar.toUpperCase()); | |||
if (value == null || value.isEmpty()) { | |||
log.debug( | |||
"Environment variable specified in template {} has no value", envVar.toUpperCase()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how much value this debug message provides - I would just leave it out for now
@@ -261,6 +263,7 @@ private static String processTemplateVar(String templateVar) throws IOException | |||
} | |||
String value = System.getProperty(processArg.substring(2)); | |||
if (value == null || value.isEmpty()) { | |||
log.debug("Process argument specified in template {} has no value", processArg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 but I'd recommend leaving out the debug messages for now
What Does This Do
Modifies stable config file parsing logic to return
""
instead of"UNDEFINED"
.Motivation
While
"UNDEFINED"
may have been meaningful or helpful for string-based configuration values, it doesn't make sense for non-string configurations. Non-string values can't transform"UNDEFINED"
, so they fall back to their defaults anyway. This change simplifies the behavior by returning an empty string (""
) and logging a debug message to indicate what's happening.In an environment where
DD_ENV
is not set....DD_SERVICE: {{environment_variables: ['DD_ENV']}}
resolves toDD_SERVICE: ""
. As a result, the default service name is usedDD_SERVICE: prefix-{{environment_variables: ['DD_ENV']}}-suffix
resolves toDD_SERVICE: "prefix--suffix"
. As a result,"prefix--suffix"
is the service nameDD_PROFILING_ENABLED: {{environment_variables: ['DD_ENV']}}
resolves toDD_PROFILING_ENABLED: ""
. As a result, the default setting (false
) is usedAdditional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]