Skip to content

fix: allow single entry in fractional operator#1935

Merged
toddbaert merged 3 commits intoopen-feature:mainfrom
open-feature-forking:fix/fractional-single-entry
Apr 10, 2026
Merged

fix: allow single entry in fractional operator#1935
toddbaert merged 3 commits intoopen-feature:mainfrom
open-feature-forking:fix/fractional-single-entry

Conversation

@leakonvalinka
Copy link
Copy Markdown
Member

This PR

  • allows single entries in the fractional operator

Related Issues

#1924

Notes

Follow-up Tasks

How to test

@leakonvalinka leakonvalinka requested review from a team as code owners April 9, 2026 13:52
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 9, 2026

Deploy Preview for polite-licorice-3db33c canceled.

Name Link
🔨 Latest commit 03fa42f
🔍 Latest deploy log https://app.netlify.com/projects/polite-licorice-3db33c/deploys/69d9356ad551d20008f65baf

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 9, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the fractional evaluation logic to support single-entry configurations, specifically by changing the minimum required length for the valuesArray from 2 to 1 in parseFractionalEvaluationData. It also includes new test cases to validate this behavior for various single-entry scenarios. The only feedback is to refine the error message for an invalid valuesArray to be more precise, suggesting 'fractional evaluation data must contain at least one distribution' instead of 'fractional evaluation data is empty'.

Comment thread core/pkg/evaluator/fractional.go Outdated
leakonvalinka and others added 2 commits April 10, 2026 10:38
Signed-off-by: Lea Konvalinka <lea.konvalinka@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert toddbaert force-pushed the fix/fractional-single-entry branch from b760922 to 944abf3 Compare April 10, 2026 14:38
@sonarqubecloud
Copy link
Copy Markdown

@toddbaert toddbaert merged commit 5fa86c6 into open-feature:main Apr 10, 2026
14 of 17 checks passed
@github-actions github-actions bot mentioned this pull request Apr 10, 2026
toddbaert pushed a commit that referenced this pull request Apr 14, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>flagd: 0.15.3</summary>

##
[0.15.3](flagd/v0.15.2...flagd/v0.15.3)
(2026-04-14)


### 🐛 Bug Fixes

* web and cli docs do not mention s3
([#1941](#1941))
([49ff1cf](49ff1cf))
</details>

<details><summary>core: 0.15.3</summary>

##
[0.15.3](core/v0.15.2...core/v0.15.3)
(2026-04-14)


### 🐛 Bug Fixes

* allow single entry in fractional operator
([#1935](#1935))
([5fa86c6](5fa86c6))
* web and cli docs do not mention s3
([#1941](#1941))
([49ff1cf](49ff1cf))


### ✨ New Features

* metadata support in the kubernetes_sync
([#1905](#1905))
([f8173a4](f8173a4))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants