Skip to content

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
Member

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
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.

4 participants