Skip to content

support feature flags #65

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

Merged
merged 24 commits into from
Jul 30, 2024
Merged

support feature flags #65

merged 24 commits into from
Jul 30, 2024

Conversation

Eskibear
Copy link
Member

@Eskibear Eskibear commented May 27, 2024

By default feature flags are excluded and cannot be loaded. Only when featureFlagOptions.enabled is true, it loads feature flags as a whole into a preserved key feature_management, according to featureFlagOptions.selectors. The refresh behavior is independently controlled by featureFlagOptions.refresh.

@Eskibear Eskibear marked this pull request as ready for review June 3, 2024 02:30
*
* @remarks
* keyFilter of selector will be prefixed with "appconfig.featureflag/" when request is sent.
* If no selectors are specified then no feature flags will be retrieved.
Copy link
Member

Choose a reason for hiding this comment

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

If no selectors are specified, shouldn't we load all Feature Flags with null label? That's what we do for key-values too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Per discussion, for feature flags we expect customers to explicitly specify selectors.

Copy link
Member

Choose a reason for hiding this comment

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

Should we throw an error if FeatureFlagOptions.enabled is true but selectors are not provided?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, as it makes no sense to enable feature flags but load nothing. Throwing an error is better than silently loading nothing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@Eskibear Eskibear mentioned this pull request Jun 5, 2024
@Eskibear Eskibear changed the base branch from feature-management to feature/feature-management June 11, 2024 08:22
@Eskibear Eskibear changed the base branch from feature/feature-management to main July 3, 2024 07:09
@Eskibear Eskibear merged commit 2ce7ec6 into main Jul 30, 2024
3 checks passed
@Eskibear Eskibear deleted the yanzh/fm branch July 30, 2024 05:58
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.

3 participants