feat(flags): evaluate dynamic offline rules (FFL-2837 PR2) - #1347
feat(flags): evaluate dynamic offline rules (FFL-2837 PR2)#1347btthomas wants to merge 13 commits into
Conversation
bb7ad12 to
d8dd76f
Compare
cb5597d to
932c87b
Compare
df96e05 to
a50f71d
Compare
932c87b to
a725eb5
Compare
a50f71d to
31cc62b
Compare
a725eb5 to
45a8242
Compare
31cc62b to
f614832
Compare
45a8242 to
0cc9e56
Compare
f614832 to
78d60c2
Compare
0cc9e56 to
31018a5
Compare
78d60c2 to
4902bc1
Compare
31018a5 to
c804067
Compare
| if (!flag) { | ||
| return { | ||
| key, | ||
| value: defaultValue, | ||
| reason: 'ERROR', | ||
| errorCode: 'FLAG_NOT_FOUND' | ||
| }; | ||
| return this.errorDetails(key, defaultValue, 'FLAG_NOT_FOUND'); |
There was a problem hiding this comment.
According to the PR description
A flag that the upstream parser removes returns FLAG_NOT_FOUND
Once we consume the parser from DataDog/openfeature-js-client#344, malformed known flags should be preserved in precomputed.flagErrors and resolve to the coded default with PARSE_ERROR, matching core/browser. I see this PR already handles flagErrors before this fallback. Can you update the description and add an integration test using the upstream parser output?
| export type ConfigurationErrorCode = | ||
| | 'INVALID_CONTEXT' | ||
| | 'PROVIDER_NOT_READY' | ||
| | 'GENERAL'; |
There was a problem hiding this comment.
I think this should include PARSE_ERROR and should map to OpenFeature’s ParseError. Reserve GENERAL for failures that are more unexpected and harder to classify
c804067 to
0014b99
Compare
59cbac3 to
8dc8c27
Compare
0014b99 to
8a11853
Compare
|
8dc8c27 to
dcd5e65
Compare
8a11853 to
d4d92d0
Compare
Pull request stack
This description uses Simplified Technical English. Technical names and API names do not change.
Summary
This PR adds dynamic and mixed offline evaluation to
FlagsClient.FlagDetails.TrackableAssignment.Result behavior
PARSE_ERRORbefore rules fallback.PARSE_ERROR.FLAG_NOT_FOUND.number.PARSE_ERRORinstead of an imprecise number.Tracking
A successful rules assignment uses the existing native assignment bridge.
doLogvalue does not stop the bridge call.doLogto the exposure event.extraLoggingobject because the current Android bridge requires it.Temporary upstream code
This PR adds one
TODO(FFL-2837)marker. The stacked PR2 branch contains 16 markers.The new marker keeps the temporary
rulesBasedcompatibility shape until a published flagging-core release contains openfeature-js-client#344 through939da97and the required SHA digest validation follow-up.openfeature-js-client#336 is currently at
6d3d6a4. Its latest change only restacks it on PR #344. Its valid-sibling and error precedence remain the parity reference.User impact
The existing offline client can evaluate rules after a context change. It does not fetch data. Matching precomputed data still has priority.
PR3 connects the provider resolution context to this path and adds customer documentation.
Checks