Add FeatureEnabled expression for feature dependencies#970
Merged
jnunemaker merged 3 commits intomainfrom Feb 17, 2026
Merged
Conversation
Allow expressions to reference other feature flags' enabled state via Flipper.feature_enabled(:name) and Flipper.feature_disabled(:name). This enables composing feature flags as prerequisites or migration patterns. Includes circular dependency protection via thread-local tracking. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Move begin/ensure to wrap the early return path so the thread-local evaluating set is always cleaned up, even when a circular dependency or self-reference triggers the early return. Added tests to verify. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The KeisukeYamashita/memcached-actions@v1 action was failing in CI. Use a Docker service container instead, consistent with how redis and postgres are already configured. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add FeatureEnabled and FeatureDisabled expression types to enable composing feature flags as prerequisites or migration patterns.
Features:
Flipper.feature_enabled(:name)— Check if another feature is enabledFlipper.feature_disabled(:name)— Check if another feature is disabledAnyandAllexpressionsChanges:
FeatureEnabledexpression class with circular dependency detectionfeature_enabledandfeature_disabledinFlippermoduleactor:for expressions that need it (backward-compatible)Testing:
All 2775 examples pass (includes 10 new tests).