Skip to content

Commit

Permalink
docs: variant dependencies (#6758)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Apr 3, 2024
1 parent 2cbb45d commit fe6aaf7
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion website/docs/reference/dependent-features.md
Expand Up @@ -5,17 +5,34 @@ title: Dependent Features
:::info Availability

**Dependent features** were first introduced in Unleash 5.7 for Pro and Enterprise users.

**Variant dependencies** were first introduced in Unleash 5.12 for Pro and Enterprise users.
:::

## Overview

Dependent features allow to define a child feature flag that depends on a parent feature flag.
A feature flag can have only one parent dependency but multiple child flags can share the same parent. For a child flag to be activated, its parent dependency must be enabled.
A feature flag can have only one parent dependency but multiple child flags can share the same parent. For a child flag to be activated, its parent dependency must be satisfied.

## Parent dependency criteria

* **Project Association**: Both parent and child flags should belong to the same project.
* **Single Level Dependency**: The parent flag can’t have its own parent, ensuring a straightforward, single-level dependency.
* **Parent Value**: Parent value should match predefined feature status and variant criteria.

### Parent value criteria

In order for the child feature to be evaluated, the corresponding parent value criteria must be satisfied.

Parent value criteria can be set to one of the 3 options:
* parent feature must be **enabled**.
* parent feature must be **disabled**. This is useful when your parent is a [kill-switch](./feature-toggle-types.md#feature-toggle-types) with the inverted enabled/disabled logic.
* parent feature must be **enabled with variants**. This is useful when your parent is part of A/B testing, and you need **variant dependencies**.

For the **variant dependencies**, if the parent feature variant is evaluated to the expected value, the dependency is satisfied.
You can specify variant values from all [strategy variants](./strategy-variants.md) and all [feature environment variants](./feature-toggle-variants.md). The parent dependency variant
is compared to the actual value that the parent dependency is evaluated to in a given environment.
Consult [strategy variants order](./strategy-variants.md#strategy-variants-and-strategies-order) and [variants comparison](./strategy-variants#strategy-variants-vs-feature-toggle-variants) sections for more details on the variant evaluation order.

## Managing dependencies

Expand Down

0 comments on commit fe6aaf7

Please sign in to comment.