Skip to content

Conversation

@nathan-beam
Copy link
Contributor

@nathan-beam nathan-beam commented Mar 3, 2025

This PR

  • Meta Provider will no longer call init if any of the sub-providers do not have an init method

Related Issues

Notes

This was blowing up for us because one of our providers does not have an init method. Since init is common but not required per OpenFeature spec for providers, a simple responds_to? check makes this safe for all providers.

Follow-up Tasks

How to test

Create a MetaProvider using a provider that does not have an init method, such as this one, along with a provider that does have an init function. Call init on the MetaProvider. Assert that init was not called on the provider without an init method, and that it was called on the provider with an init method.

@nathan-beam nathan-beam changed the title Don't init if provider doesn't have an init method fix: don't init if provider doesn't have an init method Mar 3, 2025
@nathan-beam nathan-beam changed the title fix: don't init if provider doesn't have an init method fix: don't init if provider doesn't have an init method Mar 3, 2025
Signed-off-by: Nathan Beam <nbeam@forwardfinancing.com>
@beeme1mr beeme1mr merged commit d2479ed into open-feature:main Mar 3, 2025
12 checks passed
beeme1mr pushed a commit that referenced this pull request Mar 3, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.0.5](openfeature-meta_provider/v0.0.4...openfeature-meta_provider/v0.0.5)
(2025-03-03)


### 🐛 Bug Fixes

* don't init if provider doesn't have an init method
([#49](#49))
([d2479ed](d2479ed))

---
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>
Zaimwa9 pushed a commit to Zaimwa9/ruby-sdk-contrib that referenced this pull request Nov 26, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.0.5](open-feature/ruby-sdk-contrib@openfeature-meta_provider/v0.0.4...openfeature-meta_provider/v0.0.5)
(2025-03-03)

### 🐛 Bug Fixes

* don't init if provider doesn't have an init method
([open-feature#49](open-feature#49))
([d2479ed](open-feature@d2479ed))

---
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>
Signed-off-by: wadii <wadii.zaim@flagsmith.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants