Skip to content

[BUG] fractional operator: single-entry evaluation not supported by evaluator (minItems mismatch) #1924

@toddbaert

Description

@toddbaert

Parent Issue

Sub-issue of #1904.

Summary

The fractional operator evaluator in core/pkg/evaluator/fractional.go requires at least 2 elements in the array, but single-entry fractional operations should be valid. A single-entry fractional is a bit strange, but useful for testing and building dynamic rules.

The schema in docs/schema/v0/targeting.json was updated (PR #1923) to allow minItems: 1, but the evaluator implementation does not support this; it needs to be updated to handle single-entry fractional arrays.

Tasks

  • Update the fractional evaluator to support single-entry arrays
  • Add gherkin tests in flagd-testbed for single-entry fractional operations

Originally posted by @toddbaert in #1923 (comment)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Pending

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions