This repository was archived by the owner on Nov 8, 2024. It is now read-only.
feat: [add ability to export configurations] (FF-2472)#57
Merged
leoromanovsky merged 4 commits intomainfrom Jun 21, 2024
Merged
feat: [add ability to export configurations] (FF-2472)#57leoromanovsky merged 4 commits intomainfrom
leoromanovsky merged 4 commits intomainfrom
Conversation
sameerank
approved these changes
Jun 21, 2024
| flag_configurations = client.get_flag_configurations() | ||
|
|
||
| # Convert flag configurations to a JSON string | ||
| flag_config_json = json.dumps(flag_configurations) |
Contributor
There was a problem hiding this comment.
This, flag_configurations being a dict, makes sense to me
| def test_get_configurations(): | ||
| config = {"flag1": mock_flag, "flag2": mock_flag} | ||
| store.set_configurations(config) | ||
| configurations = store.get_configurations() |
giorgiomartini0
approved these changes
Jun 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #issue
Motivation and Context
Support customers being able to bootstrap their client SDKs from server responses. They need to be able to export the configuration to pass onto their clients.
This configuration is of course not obfuscated as it originated from the server - clients will be able to be instantiated in not-obfuscated mode for this use case.
Description
get_flag_configurationsthat returns aDict[str, Flag]- I am choosing this instead of the full UFC configuration since I do not want to export the bandits. Those can be exported and bootstrapped separately if that use-case comes up.How has this been tested?
New unit tests.