Repository navigation
feat(core)!: null resolve variants and free-form reasons - #2140
Conversation
✅ Deploy Preview for polite-licorice-3db33c canceled.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
BREAKING CHANGE: model.FallbackReason is removed; a result with no value now has an empty variant and reason DEFAULT. Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
460daab to
113f95d
Compare
Signed-off-by: Todd Baert <[email protected]>
|
suthar26
left a comment
There was a problem hiding this comment.
this makes the code a lot easier to read imo, and keeps the mental model simpler



Implements the
resolvechanges from #2139: anullvariant falls back like a plainnull, and reasons are free-form.nullvariant:{"resolve": [null, ...]}shares the plain-nullpath (defaultVariant, or no value), plus the rule's reason and metadataFALLBACK, removed:T, which can't be nil, so "no value" and "the value isfalse" look the same. The v2 and OFREP layers needed one extra bit to tell them apart.DEFAULTon the way out.Breaking for
flagd/coreconsumers:model.FallbackReasonis gone; check for an empty variant instead. The Go provider needs that change when it bumps core. Wire output is unchanged (basically this is an "internal only" break in flagd-core) - we don't really need to do it here, but I think it's worth it.📓 The break (!) here only impacts the internal flagd-core library.