Skip to content

Include Features and Segments in the Evaluation context schema #5808

@khvn26

Description

@khvn26

In order to implement Flagsmith/flagsmith-engine#234, we need to add the following properties to the Evaluation context schema:

  • features: a map of feature keys to feature objects that include a feature name and feature environment default value(s) with its (their) respective weight(s).
  • segments: a map of segment keys to segment objects that include a segment name, a list of segment rules, and a map of the segment's feature overrides.

Additionally, we need to add an EvaluationResult schema that describes the following object:

{
    "context": context, // context used for evaluation
    "flags": [] // a list of evaluated flag values
    "segments": [] // a list of segments that the context matched with
}

In addition to the above, we need to answer the following question: is it valuable to give the newly added 'features' and 'segments' context keys access to the segment rules, i.e. to allow the implementation of the following rules:

  • $.segments.sysadmins.overrides.butter_bar IS NOT "Attention! Server Room Flooding Imminent!"
  • $.features.meta_feature_controlling_certain_segments.enabled IS true

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions