Skip to content

feat: allowing null/missing defaultValue - #1659

Merged
toddbaert merged 4 commits into
open-feature:mainfrom
Rahul-Baradol:optional-default-value
Jul 9, 2025
Merged

toddbaert merged 4 commits into
open-feature:mainfrom
Rahul-Baradol:optional-default-value

Conversation

@Rahul-Baradol

Copy link
Copy Markdown
Member

This PR

  • adds support for null/missing default values

Related Issues

Fixes #1647

Notes

Points to be noted...

  • If there is no defaultValue and no targetting rules, then FlagNotFound is returned
  • If targetting doesn't resolve a variant, and there is no defaultValue, then FlagNotFound is returned

Signed-off-by: Rahul Baradol <rahul.baradol.14@gmail.com>
@Rahul-Baradol
Rahul-Baradol requested a review from a team June 29, 2025 08:38
@Rahul-Baradol
Rahul-Baradol requested a review from a team as a code owner June 29, 2025 08:38
@netlify

netlify Bot commented Jun 29, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for polite-licorice-3db33c canceled.

Name Link
🔨 Latest commit e274865
🔍 Latest deploy log https://app.netlify.com/projects/polite-licorice-3db33c/deploys/686ec0a0d6429b00085d080e

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 29, 2025
@toddbaert

toddbaert commented Jul 1, 2025 •

Copy link
Copy Markdown
Member

Hey @Rahul-Baradol, thanks a lot!

This looks like it's on the right track. I think before we can merge it though, we need to update the schema as mentioned in this issue, so configurations like this are seen as valid (that will be a different PR though).

Apart from that, could you add a test or two to assert that FLAG_NOT_FOUND is returned in both of the cases you mention in your description:

Points to be noted...

  • If there is no defaultValue and no targetting rules, then FlagNotFound is returned
  • If targetting doesn't resolve a variant, and there is no defaultValue, then FlagNotFound is returned

EDIT: Oh, I see you also did open-feature/flagd-schemas#186, great! I will review that as well.

@Rahul-Baradol

Copy link
Copy Markdown
Member Author

Sure will add tests!

@toddbaert

Copy link
Copy Markdown
Member

@Rahul-Baradol I will update this PR with the new schema once it's released, you won't have to do that, the submodule stuff can get a bit messy.

Just work on adding the test for now. It's no rush though, we might have to delay merging this one until we have some other related work done as well.

@Rahul-Baradol

Copy link
Copy Markdown
Member Author

Got it!

@toddbaert
toddbaert requested a review from chrfwow July 3, 2025 12:46
Signed-off-by: Rahul Baradol <rahul.baradol.14@gmail.com>
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jul 3, 2025

@beeme1mr beeme1mr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks,

@toddbaert toddbaert changed the title feat!: allowing null/missing defaultValue feat: allowing null/missing defaultValue Jul 9, 2025
toddbaert added 2 commits July 9, 2025 15:13
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert

toddbaert commented Jul 9, 2025 •

Copy link
Copy Markdown
Member

@Rahul-Baradol I've updated the schema submodule to https://github.com/open-feature/flagd-schemas/releases/tag/json%2Fjson-schema-v0.2.12, and I'm merging this. This means you will be able to use this feature locally in flagd. HOWEVER, because we have not yet published the new schema at the canonical location here, editors/validators will still see missing defaultValue's as invalid. This is good for now, since this feature is not yet implemented in most in-process providers.

I've also removed the ! from the title, since this is non-breaking.

Thanks a lot for your help!

@toddbaert
toddbaert merged commit 3f6b78c into open-feature:main Jul 9, 2025
@github-actions github-actions Bot mentioned this pull request Jul 9, 2025
beeme1mr pushed a commit that referenced this pull request Jul 14, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>flagd: 0.12.6</summary>

##
[0.12.6](flagd/v0.12.5...flagd/v0.12.6)
(2025-07-10)


### 🐛 Bug Fixes

* **security:** update module github.com/go-viper/mapstructure/v2 to
v2.3.0 [security]
([#1667](#1667))
([caa0ed0](caa0ed0))


### ✨ New Features

* add sync_context to SyncFlags
([#1642](#1642))
([07a45d9](07a45d9))
</details>

<details><summary>flagd-proxy: 0.7.5</summary>

##
[0.7.5](flagd-proxy/v0.7.4...flagd-proxy/v0.7.5)
(2025-07-10)


### 🐛 Bug Fixes

* **security:** update module github.com/go-viper/mapstructure/v2 to
v2.3.0 [security]
([#1667](#1667))
([caa0ed0](caa0ed0))


### ✨ New Features

* add sync_context to SyncFlags
([#1642](#1642))
([07a45d9](07a45d9))
</details>

<details><summary>core: 0.11.6</summary>

##
[0.11.6](core/v0.11.5...core/v0.11.6)
(2025-07-10)


### ✨ New Features

* add sync_context to SyncFlags
([#1642](#1642))
([07a45d9](07a45d9))
* allowing null/missing defaultValue
([#1659](#1659))
([3f6b78c](3f6b78c))
</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:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Update flagd-core, RPC and OFREP Evaluations to Support null or Undefined defaultValue

5 participants