-
Notifications
You must be signed in to change notification settings - Fork 68
feat: implement multiprovider #669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement multiprovider #669
Conversation
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
…ders Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
…ize of the providers Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
…r struct made Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
…where it should be when strategies pushed Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
…e used to define custom strategies Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
…rategies similar to TS and passing that type into the provider Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Helper methods added Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
- Rename UniqueNameProvider -> NamedProvider: More accurate description of type as it's not enforced - Updated signature of NewMultiProvider function: Using a map enforces unique names, use options pattern & config object for future extension - Relocated NamedProvider to strategies as it's not needed externally - Update shape of MultiProvider: Added logging, made all fields private, used map internally - Moved aggregate-errors into errors package - Added alias for ProviderMap shape & added helper functions - Use pointers since we're passing stuff around and want to avoid unnecessary clones of objects & extra garbage collection - Updated other various signatures throughout as needed - Update tests & remove tests that no longer apply Signed-off-by: Jordan Blacker <jblacker@justworks.com>
|
It looks like the test failures are all coming from different providers. What's the process for handling this situation? |
I'm going to rerun the test to see if it's flaky. |
|
I'm looking into the e2e failures, they might be unrelated to your change. |
|
Hey @jblacker, I wasn't able to merge this today due to the failing tests. My theory is that your pr bumps the OpenFeature sdk to the version that added state management. I think some of the provider tests do not handle this properly. Unfortunately, I didn't have a chance to test this theory today. |
|
Oh interesting. I would not have expected that different modules with their own
This is the third line called after |
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
- Replace openfeature's test provider from v1.14 with the `InMemoryProvider` - Comment out ProviderFatalCode from `strategies.cleanErrorMessage` Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
c412ed2 to
71a9f29
Compare
|
It looks like that helped but now there's an issue with the multi-provider e2e testing. I'm surprised that this change affects other packages. We'll need to invest time into improving our tooling. |
Signed-off-by: Jordan Blacker <jblacker@justworks.com>
…sdk-contrib into 599/implement-multiprovider
|
Forgot to sign off and had to clean it up. And fixed that last broken test. We should be good to go now. I ended up downgrading the SDK to the highest version another module was using, which was v1.13.1 |
|
Thanks @jblacker! Would you be interested in joining the org? There's no obligation but it's the first step in the contributor ladder and it makes it easier to collaborate on GitHub. |
|
Yeah, definitely! Let me know what I need to do to get started |
This PR
Adds an implementation of multi-provider for combining multiple providers into a single provider.
Related Issues
Implements #599
Notes
I implemented this based on the JavaScript version of the OpenFeature SDK. More strategies can be added at any time. Additionally, I branched off of @bbland1 so some of their commits are also part of this branch.
This PR supersedes #668
Follow-up Tasks
How to test
Create multiple
FeatureProvidersand pass them to theNewMultiProvidermethod along with a strategy and any options.Verify the results are as expected based on the strategy selected.