1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-28 19:06:12 +01:00
unleash.unleash/website/docs/reference/dependent-features.md
2024-10-03 10:33:22 +02:00

4.4 KiB
Raw Blame History

title
Dependent Features

:::note Availability

Plan: Pro and Enterprise | Version: 5.7+

:::

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

Parent dependency criteria

  • Project Association: Both parent and child flags should belong to the same project.
  • Single Level Dependency: The parent flag cant 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 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.

Variant dependencies

:::note Availability

Plan: Pro and Enterprise | Version: 5.12+

:::

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 and all feature environment variants. 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 and variants comparison sections for more details on the variant evaluation order.

Managing dependencies

Adding

Introduce dependencies either through the UI or API, also applicable when copying a child feature with an existing parent dependency.

A button for adding parent dependency.

Removing

Eliminate them through the UI or API. Dependencies are also removed when archiving a child feature. A parent feature cant be removed if it would leave a child feature orphaned. To remove both, batch archive them. If Unleash confirms no other child features are using the parent, archiving proceeds.

A button for deleting parent dependency.

Permissions

The Update feature dependency project permission, auto-assigned to admin and project members, allows managing dependencies.

Metrics calculation

Metrics are influenced solely by the evaluation of child features.

Client SDK Support

To make use of dependent feature, you need to use a compatible client. Client SDK with variant support:

If you would like to give feedback on this feature, experience issues or have questions, please feel free to open an issue on GitHub.