Using flag dependencies

2 minute read

Flag dependencies allow a Flag value to be dependent on another Flag value.


Feature B can only work with a new backend API version (feature A). Define feature B deployment with a dependency. Feature B is TRUE only if feature A is TRUE.

Setting up a flag dependency

  • Setting up a flag dependency is done on the Audience tab in a Feature Flag.

  • Add a new rule (or change an existing one).

  • All release rules will allow you to chose another flag as release criteria (in addition to Application Version, Property and Target Group).

  • At each rule, the second dropbox menu will allow you to either choose a Property, Target Group or Flags.

  • After selecting Flags a new dropbox will appear with all feature flags and can be used as a dependent flag.

  • Select the feature flag which the current flag is dependent on, and select its value.

Deleting feature flags that have dependencies

  • Feature flags cannot be deleted if another feature flag is depending on it. If you try to delete a feature flag which has dependencies, the system will display a message with the feature flags that are using the dependent flag.

Runtime workflow

Scenario - Flag B is dependent on Flag A

  • When Flag B is evaluated, Flag A is also evaluated.

  • Server SDK: the same context that the developer sent to Flag B will also be passed to Flag A.

  • Client SDK: both flags will be frozen after Flag B evaluation.

  • Impression handler is called for both Flags A and B.

Circular flag dependencies

CloudBees Feature Management will block automatically a configuration that would lead to a circular dependency, so you don’t have to worry about this