Add PROVIDER_FATAL state propagation for non-retryable RC errors#11195
Draft
Add PROVIDER_FATAL state propagation for non-retryable RC errors#11195
Conversation
When the RC endpoint returns a non-retryable 4xx (401, 403), the OpenFeature provider now transitions to PROVIDER_FATAL instead of blocking indefinitely or timing out with PROVIDER_NOT_READY. Code path: - DefaultConfigurationPoller.sendRequest() detects 401/403 and notifies registered NonRetryableErrorListeners - RemoteConfigServiceImpl registers such a listener and forwards to FeatureFlaggingGateway.dispatchFatalError() - DDEvaluator implements FeatureFlaggingGateway.FatalErrorListener; on receipt it stores the error message and releases the initialization latch - DDEvaluator.initialize() throws FatalError after the latch is released with a fatal error present - Provider.initialize() re-throws FatalError (it extends OpenFeatureError) causing the OpenFeature SDK to set state to PROVIDER_FATAL
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 5 performance regressions! Performance is the same for 56 metrics, 10 unstable metrics.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~e485c134df, baseline=1.62.0-SNAPSHOT~9aedff24d2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1057983
Total [baseline] (8.879 s) : 0, 8878638
Agent [candidate] (1.063 s) : 0, 1062843
Total [candidate] (8.863 s) : 0, 8862663
section iast
Agent [baseline] (1.23 s) : 0, 1230407
Total [baseline] (9.539 s) : 0, 9538995
Agent [candidate] (1.25 s) : 0, 1250108
Total [candidate] (9.592 s) : 0, 9592207
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~e485c134df, baseline=1.62.0-SNAPSHOT~9aedff24d2
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.244 ms) : 0, 1244
crashtracking [candidate] (1.239 ms) : 0, 1239
BytebuddyAgent [baseline] (637.04 ms) : 0, 637040
BytebuddyAgent [candidate] (639.346 ms) : 0, 639346
AgentMeter [baseline] (29.585 ms) : 0, 29585
AgentMeter [candidate] (29.703 ms) : 0, 29703
GlobalTracer [baseline] (249.447 ms) : 0, 249447
GlobalTracer [candidate] (250.4 ms) : 0, 250400
AppSec [baseline] (32.316 ms) : 0, 32316
AppSec [candidate] (32.268 ms) : 0, 32268
Debugger [baseline] (59.729 ms) : 0, 59729
Debugger [candidate] (59.789 ms) : 0, 59789
Remote Config [baseline] (599.915 µs) : 0, 600
Remote Config [candidate] (747.486 µs) : 0, 747
Telemetry [baseline] (8.035 ms) : 0, 8035
Telemetry [candidate] (8.068 ms) : 0, 8068
Flare Poller [baseline] (3.593 ms) : 0, 3593
Flare Poller [candidate] (5.004 ms) : 0, 5004
section iast
crashtracking [baseline] (1.234 ms) : 0, 1234
crashtracking [candidate] (1.248 ms) : 0, 1248
BytebuddyAgent [baseline] (808.353 ms) : 0, 808353
BytebuddyAgent [candidate] (825.666 ms) : 0, 825666
AgentMeter [baseline] (11.337 ms) : 0, 11337
AgentMeter [candidate] (11.56 ms) : 0, 11560
GlobalTracer [baseline] (238.811 ms) : 0, 238811
GlobalTracer [candidate] (240.954 ms) : 0, 240954
IAST [baseline] (27.536 ms) : 0, 27536
IAST [candidate] (31.807 ms) : 0, 31807
AppSec [baseline] (29.657 ms) : 0, 29657
AppSec [candidate] (27.462 ms) : 0, 27462
Debugger [baseline] (65.571 ms) : 0, 65571
Debugger [candidate] (63.187 ms) : 0, 63187
Remote Config [baseline] (541.032 µs) : 0, 541
Remote Config [candidate] (656.826 µs) : 0, 657
Telemetry [baseline] (7.768 ms) : 0, 7768
Telemetry [candidate] (7.75 ms) : 0, 7750
Flare Poller [baseline] (3.437 ms) : 0, 3437
Flare Poller [candidate] (3.477 ms) : 0, 3477
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~e485c134df, baseline=1.62.0-SNAPSHOT~9aedff24d2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.065 s) : 0, 1065035
Total [baseline] (11.158 s) : 0, 11157534
Agent [candidate] (1.059 s) : 0, 1059113
Total [candidate] (11.265 s) : 0, 11264633
section appsec
Agent [baseline] (1.269 s) : 0, 1269338
Total [baseline] (11.063 s) : 0, 11063015
Agent [candidate] (1.264 s) : 0, 1263893
Total [candidate] (11.045 s) : 0, 11045101
section iast
Agent [baseline] (1.252 s) : 0, 1252218
Total [baseline] (11.328 s) : 0, 11328406
Agent [candidate] (1.237 s) : 0, 1237338
Total [candidate] (11.321 s) : 0, 11320558
section profiling
Agent [baseline] (1.189 s) : 0, 1189129
Total [baseline] (11.124 s) : 0, 11124469
Agent [candidate] (1.186 s) : 0, 1186294
Total [candidate] (11.061 s) : 0, 11061436
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~e485c134df, baseline=1.62.0-SNAPSHOT~9aedff24d2
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.239 ms) : 0, 1239
crashtracking [candidate] (1.225 ms) : 0, 1225
BytebuddyAgent [baseline] (639.863 ms) : 0, 639863
BytebuddyAgent [candidate] (636.268 ms) : 0, 636268
AgentMeter [baseline] (29.637 ms) : 0, 29637
AgentMeter [candidate] (29.35 ms) : 0, 29350
GlobalTracer [baseline] (250.948 ms) : 0, 250948
GlobalTracer [candidate] (249.574 ms) : 0, 249574
AppSec [baseline] (32.782 ms) : 0, 32782
AppSec [candidate] (32.258 ms) : 0, 32258
Debugger [baseline] (61.151 ms) : 0, 61151
Debugger [candidate] (60.473 ms) : 0, 60473
Remote Config [baseline] (607.522 µs) : 0, 608
Remote Config [candidate] (733.035 µs) : 0, 733
Telemetry [baseline] (8.122 ms) : 0, 8122
Telemetry [candidate] (8.807 ms) : 0, 8807
Flare Poller [baseline] (4.327 ms) : 0, 4327
Flare Poller [candidate] (4.242 ms) : 0, 4242
section appsec
crashtracking [baseline] (1.249 ms) : 0, 1249
crashtracking [candidate] (1.224 ms) : 0, 1224
BytebuddyAgent [baseline] (680.492 ms) : 0, 680492
BytebuddyAgent [candidate] (675.988 ms) : 0, 675988
AgentMeter [baseline] (12.252 ms) : 0, 12252
AgentMeter [candidate] (12.182 ms) : 0, 12182
GlobalTracer [baseline] (249.692 ms) : 0, 249692
GlobalTracer [candidate] (249.4 ms) : 0, 249400
AppSec [baseline] (186.587 ms) : 0, 186587
AppSec [candidate] (187.599 ms) : 0, 187599
Debugger [baseline] (66.246 ms) : 0, 66246
Debugger [candidate] (64.978 ms) : 0, 64978
Remote Config [baseline] (575.109 µs) : 0, 575
Remote Config [candidate] (721.167 µs) : 0, 721
Telemetry [baseline] (7.884 ms) : 0, 7884
Telemetry [candidate] (7.741 ms) : 0, 7741
Flare Poller [baseline] (3.518 ms) : 0, 3518
Flare Poller [candidate] (3.386 ms) : 0, 3386
IAST [baseline] (24.372 ms) : 0, 24372
IAST [candidate] (24.301 ms) : 0, 24301
section iast
crashtracking [baseline] (1.241 ms) : 0, 1241
crashtracking [candidate] (1.236 ms) : 0, 1236
BytebuddyAgent [baseline] (824.297 ms) : 0, 824297
BytebuddyAgent [candidate] (812.435 ms) : 0, 812435
AgentMeter [baseline] (11.645 ms) : 0, 11645
AgentMeter [candidate] (11.453 ms) : 0, 11453
GlobalTracer [baseline] (242.169 ms) : 0, 242169
GlobalTracer [candidate] (240.66 ms) : 0, 240660
AppSec [baseline] (28.947 ms) : 0, 28947
AppSec [candidate] (27.744 ms) : 0, 27744
Debugger [baseline] (66.155 ms) : 0, 66155
Debugger [candidate] (65.691 ms) : 0, 65691
Remote Config [baseline] (531.612 µs) : 0, 532
Remote Config [candidate] (670.753 µs) : 0, 671
Telemetry [baseline] (7.84 ms) : 0, 7840
Telemetry [candidate] (7.813 ms) : 0, 7813
Flare Poller [baseline] (3.485 ms) : 0, 3485
Flare Poller [candidate] (3.463 ms) : 0, 3463
IAST [baseline] (29.428 ms) : 0, 29428
IAST [candidate] (30.065 ms) : 0, 30065
section profiling
ProfilingAgent [baseline] (94.642 ms) : 0, 94642
ProfilingAgent [candidate] (93.34 ms) : 0, 93340
crashtracking [baseline] (1.192 ms) : 0, 1192
crashtracking [candidate] (1.204 ms) : 0, 1204
BytebuddyAgent [baseline] (694.02 ms) : 0, 694020
BytebuddyAgent [candidate] (693.716 ms) : 0, 693716
AgentMeter [baseline] (8.901 ms) : 0, 8901
AgentMeter [candidate] (8.976 ms) : 0, 8976
GlobalTracer [baseline] (207.905 ms) : 0, 207905
GlobalTracer [candidate] (207.269 ms) : 0, 207269
AppSec [baseline] (32.558 ms) : 0, 32558
AppSec [candidate] (32.59 ms) : 0, 32590
Debugger [baseline] (65.913 ms) : 0, 65913
Debugger [candidate] (65.587 ms) : 0, 65587
Remote Config [baseline] (577.663 µs) : 0, 578
Remote Config [candidate] (697.992 µs) : 0, 698
Telemetry [baseline] (7.89 ms) : 0, 7890
Telemetry [candidate] (7.717 ms) : 0, 7717
Flare Poller [baseline] (3.514 ms) : 0, 3514
Flare Poller [candidate] (3.443 ms) : 0, 3443
Profiling [baseline] (95.205 ms) : 0, 95205
Profiling [candidate] (93.896 ms) : 0, 93896
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 1 performance regressions! Performance is the same for 17 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~e485c134df, baseline=1.62.0-SNAPSHOT~9aedff24d2
dateFormat X
axisFormat %s
section baseline
no_agent (1.242 ms) : 1229, 1254
. : milestone, 1242,
iast (3.383 ms) : 3332, 3433
. : milestone, 3383,
iast_FULL (6.191 ms) : 6127, 6256
. : milestone, 6191,
iast_GLOBAL (3.631 ms) : 3580, 3683
. : milestone, 3631,
profiling (2.2 ms) : 2180, 2220
. : milestone, 2200,
tracing (1.896 ms) : 1879, 1912
. : milestone, 1896,
section candidate
no_agent (1.237 ms) : 1226, 1249
. : milestone, 1237,
iast (3.417 ms) : 3364, 3469
. : milestone, 3417,
iast_FULL (6.154 ms) : 6091, 6218
. : milestone, 6154,
iast_GLOBAL (3.722 ms) : 3667, 3778
. : milestone, 3722,
profiling (2.01 ms) : 1992, 2028
. : milestone, 2010,
tracing (1.882 ms) : 1866, 1898
. : milestone, 1882,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~e485c134df, baseline=1.62.0-SNAPSHOT~9aedff24d2
dateFormat X
axisFormat %s
section baseline
no_agent (18.093 ms) : 17912, 18275
. : milestone, 18093,
appsec (18.912 ms) : 18722, 19103
. : milestone, 18912,
code_origins (17.817 ms) : 17637, 17996
. : milestone, 17817,
iast (17.686 ms) : 17511, 17860
. : milestone, 17686,
profiling (19.667 ms) : 19469, 19865
. : milestone, 19667,
tracing (17.783 ms) : 17610, 17956
. : milestone, 17783,
section candidate
no_agent (17.973 ms) : 17792, 18155
. : milestone, 17973,
appsec (18.46 ms) : 18273, 18646
. : milestone, 18460,
code_origins (17.7 ms) : 17528, 17873
. : milestone, 17700,
iast (17.789 ms) : 17613, 17965
. : milestone, 17789,
profiling (18.572 ms) : 18383, 18761
. : milestone, 18572,
tracing (17.709 ms) : 17535, 17883
. : milestone, 17709,
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~e485c134df, baseline=1.62.0-SNAPSHOT~9aedff24d2
dateFormat X
axisFormat %s
section baseline
no_agent (1.488 ms) : 1477, 1500
. : milestone, 1488,
appsec (3.796 ms) : 3572, 4019
. : milestone, 3796,
iast (2.266 ms) : 2197, 2336
. : milestone, 2266,
iast_GLOBAL (2.312 ms) : 2242, 2382
. : milestone, 2312,
profiling (2.521 ms) : 2355, 2687
. : milestone, 2521,
tracing (2.088 ms) : 2035, 2142
. : milestone, 2088,
section candidate
no_agent (1.491 ms) : 1479, 1503
. : milestone, 1491,
appsec (3.828 ms) : 3607, 4049
. : milestone, 3828,
iast (2.27 ms) : 2201, 2340
. : milestone, 2270,
iast_GLOBAL (2.314 ms) : 2245, 2384
. : milestone, 2314,
profiling (2.091 ms) : 2037, 2146
. : milestone, 2091,
tracing (2.074 ms) : 2021, 2128
. : milestone, 2074,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~e485c134df, baseline=1.62.0-SNAPSHOT~9aedff24d2
dateFormat X
axisFormat %s
section baseline
no_agent (15.303 s) : 15303000, 15303000
. : milestone, 15303000,
appsec (15.013 s) : 15013000, 15013000
. : milestone, 15013000,
iast (18.292 s) : 18292000, 18292000
. : milestone, 18292000,
iast_GLOBAL (18.077 s) : 18077000, 18077000
. : milestone, 18077000,
profiling (14.915 s) : 14915000, 14915000
. : milestone, 14915000,
tracing (14.831 s) : 14831000, 14831000
. : milestone, 14831000,
section candidate
no_agent (15.079 s) : 15079000, 15079000
. : milestone, 15079000,
appsec (14.988 s) : 14988000, 14988000
. : milestone, 14988000,
iast (18.259 s) : 18259000, 18259000
. : milestone, 18259000,
iast_GLOBAL (18.116 s) : 18116000, 18116000
. : milestone, 18116000,
profiling (14.947 s) : 14947000, 14947000
. : milestone, 14947000,
tracing (15.029 s) : 15029000, 15029000
. : milestone, 15029000,
|
- DDEvaluator.evaluate() now returns PROVIDER_FATAL when fatalErrorMessage is set, taking precedence over PROVIDER_NOT_READY and normal evaluation - Two-arg DDEvaluator constructor (configCallback, fatalCallback) made public - Provider.buildEvaluator() wires onProviderFatal() as fatalCallback via the two-arg constructor; onProviderFatal() emits PROVIDER_ERROR event - DefaultConfigurationPoller.sendRequest() removes special 404 early return; 400 and 404 added to isNonRetryableError() so they trigger fatal listener - Added unit tests for fatal path: onFatalError behavior, evaluate after fatal, fatal takes precedence over existing config, callback invocation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Investigation findings
When the RC
/v0.7/configendpoint returns HTTP 401, the call path terminates silently:DefaultConfigurationPoller.sendRequest()receives the 401response.isSuccessful()is false → the response body is logged via a rate-limited warning and the method returnshandleAgentResponse()is never calledRemoteConfigServiceImpl.accept()is never calledFeatureFlaggingGateway.dispatch(ServerConfiguration)is never calledDDEvaluator.accept()is never calledinitializationLatchnever counts downDDEvaluator.initialize()times out and returnsfalseProvider.initialize()throwsProviderNotReadyError— wrong state: should bePROVIDER_FATALFix
Added a
NonRetryableErrorListenerchain from the RC transport layer up to the OpenFeature provider:ConfigurationPoller(interface): addedaddNonRetryableErrorListener/removeNonRetryableErrorListenerdefault methods and theNonRetryableErrorListenerfunctional interfaceDefaultConfigurationPoller: implements the listener list;sendRequest()callsnotifyNonRetryableErrorListeners()whenresponse.code()is 401 or 403RemoteConfigServiceImpl: registers aNonRetryableErrorListenerthat forwards toFeatureFlaggingGateway.dispatchFatalError()FeatureFlaggingGateway: addedFatalErrorListenerinterface plusaddFatalErrorListener/removeFatalErrorListener/dispatchFatalError()— no OpenFeature SDK dependency (uses plainintfor status code)DDEvaluator: implementsFatalErrorListener; on receipt stores the error message and releasesinitializationLatch;initialize()checks for the fatal message after the latch releases and throwsFatalError, causing the OpenFeature SDK to setPROVIDER_FATALTest plan
feature-flagging-apiandremote-config-corestill pass/v0.7/configin the system test causes the provider to enterPROVIDER_FATALPROVIDER_READYPROVIDER_NOT_READY(latch not released,configuration.get()is null)Labels
tag: ai generatedtag: no release note