feat: Add the overrideAffected indicator to EvaluationReason - #362
Draft
kinyoklion wants to merge 1 commit into
Draft
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
Adds an OverrideAffected property and a WithOverrideAffected copy method to EvaluationReason, as defined by the OVERRIDE specification. The indicator is true when a flag override affected the evaluation, directly or transitively, and false by default. Equality and hash code include it. The JSON property "overrideAffected" is written only when true and read when present, so the wire format of ordinary reasons is unchanged.
This branch has not been deployed
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.
Summary
Adds the
overrideAffectedindicator toEvaluationReason, as defined by the OVERRIDE specification. The indicator is true when a flag override affected the evaluation, directly or transitively: the evaluated flag, a prerequisite flag at any depth, or a segment read during the evaluation came from the SDK's override store. It is false otherwise, and false by default for every existing reason.The change is additive and follows the precedent of
InExperiment: a newOverrideAffectedproperty, aWithOverrideAffected(bool)copy method that keeps every other property, and equality and hash code that include the indicator.WithInExperimentandWithBigSegmentsStatuskeep the indicator. In JSON theoverrideAffectedproperty is written only when it is true and is read when present, so the wire format of ordinary reasons is unchanged.This is the common-package half of the marker. The server SDK sets the indicator in a later change; nothing in this package sets it. The public members carry the note that flag overrides are currently experimental and subject to change.
This PR is based on the file data reloader branch so that the whole flag overrides series applies as one linear sequence; it uses nothing from that branch.