fix(openfeature): return PARSE_ERROR for invalid regex in flag condition#11071
Conversation
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 petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~f9765026fc, baseline=1.62.0-SNAPSHOT~b0889567dc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.062 s) : 0, 1061974
Total [baseline] (11.18 s) : 0, 11179855
Agent [candidate] (1.059 s) : 0, 1059081
Total [candidate] (11.099 s) : 0, 11099221
section appsec
Agent [baseline] (1.262 s) : 0, 1262486
Total [baseline] (10.988 s) : 0, 10988460
Agent [candidate] (1.261 s) : 0, 1260530
Total [candidate] (11.036 s) : 0, 11035910
section iast
Agent [baseline] (1.236 s) : 0, 1235744
Total [baseline] (11.422 s) : 0, 11422150
Agent [candidate] (1.249 s) : 0, 1248706
Total [candidate] (11.327 s) : 0, 11326903
section profiling
Agent [baseline] (1.184 s) : 0, 1184479
Total [baseline] (10.985 s) : 0, 10984923
Agent [candidate] (1.193 s) : 0, 1193074
Total [candidate] (11.068 s) : 0, 11068054
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~f9765026fc, baseline=1.62.0-SNAPSHOT~b0889567dc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.24 ms) : 0, 1240
crashtracking [candidate] (1.246 ms) : 0, 1246
BytebuddyAgent [baseline] (636.918 ms) : 0, 636918
BytebuddyAgent [candidate] (634.285 ms) : 0, 634285
AgentMeter [baseline] (29.637 ms) : 0, 29637
AgentMeter [candidate] (29.553 ms) : 0, 29553
GlobalTracer [baseline] (249.801 ms) : 0, 249801
GlobalTracer [candidate] (249.96 ms) : 0, 249960
AppSec [baseline] (32.402 ms) : 0, 32402
AppSec [candidate] (32.388 ms) : 0, 32388
Debugger [baseline] (60.057 ms) : 0, 60057
Debugger [candidate] (59.962 ms) : 0, 59962
Remote Config [baseline] (594.202 µs) : 0, 594
Remote Config [candidate] (604.09 µs) : 0, 604
Telemetry [baseline] (8.082 ms) : 0, 8082
Telemetry [candidate] (8.187 ms) : 0, 8187
Flare Poller [baseline] (6.839 ms) : 0, 6839
Flare Poller [candidate] (6.707 ms) : 0, 6707
section appsec
crashtracking [baseline] (1.233 ms) : 0, 1233
crashtracking [candidate] (1.221 ms) : 0, 1221
BytebuddyAgent [baseline] (675.221 ms) : 0, 675221
BytebuddyAgent [candidate] (673.295 ms) : 0, 673295
AgentMeter [baseline] (12.149 ms) : 0, 12149
AgentMeter [candidate] (12.09 ms) : 0, 12090
GlobalTracer [baseline] (249.011 ms) : 0, 249011
GlobalTracer [candidate] (249.351 ms) : 0, 249351
AppSec [baseline] (185.615 ms) : 0, 185615
AppSec [candidate] (188.123 ms) : 0, 188123
Debugger [baseline] (66.754 ms) : 0, 66754
Debugger [candidate] (63.942 ms) : 0, 63942
Remote Config [baseline] (574.314 µs) : 0, 574
Remote Config [candidate] (582.752 µs) : 0, 583
Telemetry [baseline] (7.845 ms) : 0, 7845
Telemetry [candidate] (7.879 ms) : 0, 7879
Flare Poller [baseline] (3.444 ms) : 0, 3444
Flare Poller [candidate] (3.443 ms) : 0, 3443
IAST [baseline] (24.205 ms) : 0, 24205
IAST [candidate] (24.223 ms) : 0, 24223
section iast
crashtracking [baseline] (1.226 ms) : 0, 1226
crashtracking [candidate] (1.248 ms) : 0, 1248
BytebuddyAgent [baseline] (810.516 ms) : 0, 810516
BytebuddyAgent [candidate] (822.235 ms) : 0, 822235
AgentMeter [baseline] (11.452 ms) : 0, 11452
AgentMeter [candidate] (11.625 ms) : 0, 11625
GlobalTracer [baseline] (240.783 ms) : 0, 240783
GlobalTracer [candidate] (241.564 ms) : 0, 241564
AppSec [baseline] (29.6 ms) : 0, 29600
AppSec [candidate] (27.941 ms) : 0, 27941
Debugger [baseline] (64.901 ms) : 0, 64901
Debugger [candidate] (65.836 ms) : 0, 65836
Remote Config [baseline] (534.618 µs) : 0, 535
Remote Config [candidate] (537.567 µs) : 0, 538
Telemetry [baseline] (7.821 ms) : 0, 7821
Telemetry [candidate] (7.816 ms) : 0, 7816
Flare Poller [baseline] (3.445 ms) : 0, 3445
Flare Poller [candidate] (3.423 ms) : 0, 3423
IAST [baseline] (29.323 ms) : 0, 29323
IAST [candidate] (30.149 ms) : 0, 30149
section profiling
crashtracking [baseline] (1.184 ms) : 0, 1184
crashtracking [candidate] (1.209 ms) : 0, 1209
BytebuddyAgent [baseline] (690.103 ms) : 0, 690103
BytebuddyAgent [candidate] (697.234 ms) : 0, 697234
AgentMeter [baseline] (9.193 ms) : 0, 9193
AgentMeter [candidate] (9.276 ms) : 0, 9276
GlobalTracer [baseline] (207.463 ms) : 0, 207463
GlobalTracer [candidate] (208.252 ms) : 0, 208252
AppSec [baseline] (32.898 ms) : 0, 32898
AppSec [candidate] (32.916 ms) : 0, 32916
Debugger [baseline] (66.159 ms) : 0, 66159
Debugger [candidate] (65.54 ms) : 0, 65540
Remote Config [baseline] (575.356 µs) : 0, 575
Remote Config [candidate] (574.717 µs) : 0, 575
Telemetry [baseline] (7.779 ms) : 0, 7779
Telemetry [candidate] (7.823 ms) : 0, 7823
Flare Poller [baseline] (3.543 ms) : 0, 3543
Flare Poller [candidate] (3.532 ms) : 0, 3532
ProfilingAgent [baseline] (94.261 ms) : 0, 94261
ProfilingAgent [candidate] (94.943 ms) : 0, 94943
Profiling [baseline] (94.822 ms) : 0, 94822
Profiling [candidate] (95.511 ms) : 0, 95511
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~f9765026fc, baseline=1.62.0-SNAPSHOT~b0889567dc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1056120
Total [baseline] (8.833 s) : 0, 8832534
Agent [candidate] (1.059 s) : 0, 1059361
Total [candidate] (8.843 s) : 0, 8842523
section iast
Agent [baseline] (1.238 s) : 0, 1238420
Total [baseline] (9.571 s) : 0, 9571301
Agent [candidate] (1.246 s) : 0, 1245809
Total [candidate] (9.587 s) : 0, 9586960
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~f9765026fc, baseline=1.62.0-SNAPSHOT~b0889567dc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.231 ms) : 0, 1231
crashtracking [candidate] (1.245 ms) : 0, 1245
BytebuddyAgent [baseline] (633.457 ms) : 0, 633457
BytebuddyAgent [candidate] (634.979 ms) : 0, 634979
AgentMeter [baseline] (29.625 ms) : 0, 29625
AgentMeter [candidate] (29.616 ms) : 0, 29616
GlobalTracer [baseline] (249.034 ms) : 0, 249034
GlobalTracer [candidate] (249.425 ms) : 0, 249425
AppSec [baseline] (32.454 ms) : 0, 32454
AppSec [candidate] (32.469 ms) : 0, 32469
Debugger [baseline] (59.319 ms) : 0, 59319
Debugger [candidate] (59.14 ms) : 0, 59140
Remote Config [baseline] (603.683 µs) : 0, 604
Remote Config [candidate] (597.678 µs) : 0, 598
Telemetry [baseline] (8.072 ms) : 0, 8072
Telemetry [candidate] (8.06 ms) : 0, 8060
Flare Poller [baseline] (6.009 ms) : 0, 6009
Flare Poller [candidate] (7.522 ms) : 0, 7522
section iast
crashtracking [baseline] (1.244 ms) : 0, 1244
crashtracking [candidate] (1.253 ms) : 0, 1253
BytebuddyAgent [baseline] (814.581 ms) : 0, 814581
BytebuddyAgent [candidate] (819.532 ms) : 0, 819532
AgentMeter [baseline] (11.49 ms) : 0, 11490
AgentMeter [candidate] (11.667 ms) : 0, 11667
GlobalTracer [baseline] (240.069 ms) : 0, 240069
GlobalTracer [candidate] (241.406 ms) : 0, 241406
AppSec [baseline] (28.836 ms) : 0, 28836
AppSec [candidate] (28.728 ms) : 0, 28728
Debugger [baseline] (66.54 ms) : 0, 66540
Debugger [candidate] (63.64 ms) : 0, 63640
Remote Config [baseline] (535.633 µs) : 0, 536
Remote Config [candidate] (541.88 µs) : 0, 542
Telemetry [baseline] (7.808 ms) : 0, 7808
Telemetry [candidate] (7.89 ms) : 0, 7890
Flare Poller [baseline] (3.449 ms) : 0, 3449
Flare Poller [candidate] (3.54 ms) : 0, 3540
IAST [baseline] (27.568 ms) : 0, 27568
IAST [candidate] (30.416 ms) : 0, 30416
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 3 performance regressions! Performance is the same for 15 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~f9765026fc, baseline=1.62.0-SNAPSHOT~b0889567dc
dateFormat X
axisFormat %s
section baseline
no_agent (18.26 ms) : 18074, 18446
. : milestone, 18260,
appsec (19.38 ms) : 19182, 19579
. : milestone, 19380,
code_origins (17.751 ms) : 17576, 17927
. : milestone, 17751,
iast (18.093 ms) : 17913, 18273
. : milestone, 18093,
profiling (18.271 ms) : 18089, 18453
. : milestone, 18271,
tracing (19.072 ms) : 18882, 19263
. : milestone, 19072,
section candidate
no_agent (19.751 ms) : 19546, 19956
. : milestone, 19751,
appsec (19.73 ms) : 19532, 19929
. : milestone, 19730,
code_origins (17.801 ms) : 17625, 17977
. : milestone, 17801,
iast (17.991 ms) : 17811, 18172
. : milestone, 17991,
profiling (18.358 ms) : 18179, 18537
. : milestone, 18358,
tracing (18.114 ms) : 17935, 18292
. : milestone, 18114,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~f9765026fc, baseline=1.62.0-SNAPSHOT~b0889567dc
dateFormat X
axisFormat %s
section baseline
no_agent (1.257 ms) : 1245, 1269
. : milestone, 1257,
iast (3.36 ms) : 3308, 3413
. : milestone, 3360,
iast_FULL (5.789 ms) : 5731, 5847
. : milestone, 5789,
iast_GLOBAL (3.759 ms) : 3696, 3821
. : milestone, 3759,
profiling (2.259 ms) : 2235, 2282
. : milestone, 2259,
tracing (1.892 ms) : 1877, 1908
. : milestone, 1892,
section candidate
no_agent (1.243 ms) : 1231, 1254
. : milestone, 1243,
iast (3.335 ms) : 3293, 3378
. : milestone, 3335,
iast_FULL (6.116 ms) : 6053, 6179
. : milestone, 6116,
iast_GLOBAL (3.716 ms) : 3653, 3780
. : milestone, 3716,
profiling (2.408 ms) : 2385, 2431
. : milestone, 2408,
tracing (1.839 ms) : 1825, 1854
. : milestone, 1839,
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.62.0-SNAPSHOT~f9765026fc, baseline=1.62.0-SNAPSHOT~b0889567dc
dateFormat X
axisFormat %s
section baseline
no_agent (1.497 ms) : 1486, 1509
. : milestone, 1497,
appsec (3.847 ms) : 3619, 4074
. : milestone, 3847,
iast (2.289 ms) : 2219, 2358
. : milestone, 2289,
iast_GLOBAL (2.341 ms) : 2271, 2411
. : milestone, 2341,
profiling (2.534 ms) : 2369, 2699
. : milestone, 2534,
tracing (2.08 ms) : 2027, 2134
. : milestone, 2080,
section candidate
no_agent (1.491 ms) : 1479, 1502
. : milestone, 1491,
appsec (3.853 ms) : 3630, 4076
. : milestone, 3853,
iast (2.294 ms) : 2224, 2365
. : milestone, 2294,
iast_GLOBAL (2.33 ms) : 2260, 2400
. : milestone, 2330,
profiling (2.107 ms) : 2052, 2162
. : milestone, 2107,
tracing (2.094 ms) : 2040, 2147
. : milestone, 2094,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~f9765026fc, baseline=1.62.0-SNAPSHOT~b0889567dc
dateFormat X
axisFormat %s
section baseline
no_agent (14.906 s) : 14906000, 14906000
. : milestone, 14906000,
appsec (14.763 s) : 14763000, 14763000
. : milestone, 14763000,
iast (18.867 s) : 18867000, 18867000
. : milestone, 18867000,
iast_GLOBAL (17.975 s) : 17975000, 17975000
. : milestone, 17975000,
profiling (14.757 s) : 14757000, 14757000
. : milestone, 14757000,
tracing (15.155 s) : 15155000, 15155000
. : milestone, 15155000,
section candidate
no_agent (15.476 s) : 15476000, 15476000
. : milestone, 15476000,
appsec (15.008 s) : 15008000, 15008000
. : milestone, 15008000,
iast (18.182 s) : 18182000, 18182000
. : milestone, 18182000,
iast_GLOBAL (17.952 s) : 17952000, 17952000
. : milestone, 17952000,
profiling (15.363 s) : 15363000, 15363000
. : milestone, 15363000,
tracing (15.061 s) : 15061000, 15061000
. : milestone, 15061000,
|
- Add test case for NOT_MATCHES with invalid regex pattern, which follows the same PatternSyntaxException propagation path as MATCHES - Fix misleading comment on integer-string-variant-flag test case to accurately describe the PARSE_ERROR trigger (unparseable variant value)
e927da9 to
f22e80f
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. |
|
|
||
| // Condition with an intentionally invalid regex pattern (unclosed bracket) | ||
| final List<ConditionConfiguration> conditions = | ||
| singletonList(new ConditionConfiguration(ConditionOperator.MATCHES, "email", "[invalid")); |
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
devflow unqueued this merge request: It did not become mergeable within the expected time |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Propagates
PatternSyntaxExceptionfrommatchesRegex()up to the mainevaluate()method, which now returnsERRORwithErrorCode.PARSE_ERRORwhen a flag condition contains an invalid regex pattern.Previously, invalid regex patterns were silently caught and treated as non-matching conditions, causing the evaluation to fall through to the default allocation with
DEFAULTreason instead of surfacing the configuration error.Motivation
Fixes system test
Test_FFE_Eval_Metric_Parse_Error_Invalid_Regexwhich expectsreason=error, error_code=parse_errorwhen a flag condition has an invalid regex.Additional Notes
PatternSyntaxExceptionextendsIllegalArgumentException. A targeted catch is added before the existingThrowablecatch to ensure it maps toPARSE_ERRORrather thanGENERAL.Contributor Checklist