Skip to content

feat: Add the overrideAffected indicator to EvaluationReason - #362

Draft
kinyoklion wants to merge 1 commit into
rlamb/overrides-dotnet-filedata-reloaderfrom
rlamb/overrides-dotnet-reason-marker
Draft

kinyoklion wants to merge 1 commit into
rlamb/overrides-dotnet-filedata-reloaderfrom
rlamb/overrides-dotnet-reason-marker

Conversation

@kinyoklion

Copy link
Copy Markdown
Member

Summary

Adds the overrideAffected indicator to EvaluationReason, 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 new OverrideAffected property, a WithOverrideAffected(bool) copy method that keeps every other property, and equality and hash code that include the indicator. WithInExperiment and WithBigSegmentsStatus keep the indicator. In JSON the overrideAffected property 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.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant