Skip to content

[Feature Flags] Support semantic version operators - #8993

Closed
greghuels wants to merge 2 commits into
DataDog:masterfrom
greghuels:greg.huels/FFL-2919/semver
Closed

[Feature Flags] Support semantic version operators#8993
greghuels wants to merge 2 commits into
DataDog:masterfrom
greghuels:greg.huels/FFL-2919/semver

Conversation

@greghuels

@greghuels greghuels commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

Adds support for the SEMVER_EQ, SEMVER_NEQ, SEMVER_LT, SEMVER_LTE, SEMVER_GT, and SEMVER_GTE Feature Flags condition operators.

Syncs the canonical semver flag configuration and all 13 evaluation cases from DataDog/ffe-system-test-data#20 into the bundled fixture suite.

Reason for change

Feature Flags targeting rules need semantic version comparisons that behave consistently across SDKs. This brings the .NET evaluator in line with the Go implementation and the shared FFE system-test data.

Implementation details

  • Adds a strict semantic version parser and comparer with prerelease precedence and build-metadata total ordering.
  • Treats invalid, missing, or non-string semver operands as non-matches.
  • Routes all six semver operators through the new comparer.
  • Updates the bundled fixture runner to assert canonical evaluation reasons and treat omitted variants as unspecified.

Test coverage

  • Ports all 27 table-driven semver evaluator cases from feat(openfeature): support semantic version conditions dd-trace-go#5128 one-for-one.
  • Covers the Go tests for missing attributes and unsupported operators.
  • Canonical bundled fixtures: 224 passed, including all 13 semver evaluation rows.
  • Complete Feature Flags test namespace: 389 passed.
  • Includes focused parser, ordering, invalid-syntax, and operator-deserialization coverage.
  • Verified net461 and netstandard2.0 production builds.
  • Verified whitespace formatting and git diff --check.

Other details

@greghuels
greghuels requested review from a team as code owners August 4, 2026 20:35
@greghuels
greghuels requested review from btthomas and typotter August 4, 2026 20:35
@greghuels
greghuels marked this pull request as draft August 4, 2026 20:46
@greghuels

Copy link
Copy Markdown
Collaborator Author

Closing this out since there have been some changes in the Go SDK and rewriting this from scratch will be safer and easier

@greghuels greghuels closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants