mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-24 20:06:55 +01:00
docs: updates for 7.3 (#10913)
This commit is contained in:
parent
fe2d63ad9b
commit
28fa4240b7
@ -71,7 +71,7 @@ export const CreateStrategy = () => {
|
||||
title='Create strategy type'
|
||||
description="The strategy type and the parameters will be selectable when adding an activation strategy to a toggle in the environments.
|
||||
The parameter defines the type of activation strategy. E.g. you can create a type 'Teams' and add a parameter 'List'. Then it's easy to add team names to the activation strategy"
|
||||
documentationLink='https://docs.getunleash.io/reference/custom-activation-strategies'
|
||||
documentationLink='https://docs.getunleash.io/reference/activation-strategies#custom-strategies'
|
||||
documentationLinkLabel='Custom strategies documentation'
|
||||
formatApiCode={formatApiCode}
|
||||
>
|
||||
|
||||
@ -78,7 +78,7 @@ export const EditStrategy = () => {
|
||||
title='Edit strategy type'
|
||||
description="The strategy type and the parameters will be selectable when adding an activation strategy to a toggle in the environments.
|
||||
The parameter defines the type of activation strategy. E.g. you can create a type 'Teams' and add a parameter 'List'. Then it's easy to add team names to the activation strategy"
|
||||
documentationLink='https://docs.getunleash.io/reference/custom-activation-strategies'
|
||||
documentationLink='https://docs.getunleash.io/reference/activation-strategies#custom-strategies'
|
||||
documentationLinkLabel='Custom strategies documentation'
|
||||
formatApiCode={formatApiCode}
|
||||
>
|
||||
|
||||
@ -479,7 +479,7 @@ export const StrategiesList = () => {
|
||||
<Title
|
||||
title='Advanced and custom strategies'
|
||||
description='Advanced strategies let you target based on specific properties. Custom activation strategies let you define your own activation strategies to use with Unleash.'
|
||||
link='https://docs.getunleash.io/reference/custom-activation-strategies'
|
||||
link='https://docs.getunleash.io/reference/activation-strategies#custom-strategies'
|
||||
/>
|
||||
</PageHeader>
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ export const StrategyParameter = ({
|
||||
Parameters let you provide arguments to your strategy
|
||||
that it can access for evaluation. Read more in the{' '}
|
||||
<Link
|
||||
href='https://docs.getunleash.io/reference/custom-activation-strategies#parameter-types'
|
||||
href='https://docs.getunleash.io/reference/activation-strategies#paremeters'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
|
||||
@ -22,7 +22,7 @@ export const applicationSchema = {
|
||||
},
|
||||
strategies: {
|
||||
description:
|
||||
'Which [strategies](https://docs.getunleash.io/topics/the-anatomy-of-unleash#activation-strategies) the application has loaded. Useful when trying to figure out if your [custom strategy](https://docs.getunleash.io/reference/custom-activation-strategies) has been loaded in the SDK',
|
||||
'Which [strategies](https://docs.getunleash.io/topics/the-anatomy-of-unleash#activation-strategies) the application has loaded. Useful when trying to figure out if your [custom strategy](https://docs.getunleash.io/reference/activation-strategies#custom-strategies) has been loaded in the SDK',
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
|
||||
@ -7,7 +7,7 @@ export const createApplicationSchema = {
|
||||
properties: {
|
||||
strategies: {
|
||||
description:
|
||||
'Which [strategies](https://docs.getunleash.io/topics/the-anatomy-of-unleash#activation-strategies) the application has loaded. Useful when trying to figure out if your [custom strategy](https://docs.getunleash.io/reference/custom-activation-strategies) has been loaded in the SDK',
|
||||
'Which [strategies](https://docs.getunleash.io/topics/the-anatomy-of-unleash#activation-strategies) the application has loaded. Useful when trying to figure out if your [custom strategy](https://docs.getunleash.io/reference/activation-strategies#custom-strategies) has been loaded in the SDK',
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
|
||||
@ -4,7 +4,7 @@ export const createStrategySchema = {
|
||||
$id: '#/components/schemas/createStrategySchema',
|
||||
type: 'object',
|
||||
description:
|
||||
'The data required to create a strategy type. Refer to the docs on [custom strategy types](https://docs.getunleash.io/reference/custom-activation-strategies) for more information.',
|
||||
'The data required to create a strategy type. Refer to the docs on [custom strategy types](https://docs.getunleash.io/reference/activation-strategies#custom-strategies) for more information.',
|
||||
required: ['name', 'parameters'],
|
||||
properties: {
|
||||
name: {
|
||||
@ -51,7 +51,7 @@ export const createStrategySchema = {
|
||||
type: {
|
||||
type: 'string',
|
||||
description:
|
||||
'The [type of the parameter](https://docs.getunleash.io/reference/custom-activation-strategies#parameter-types)',
|
||||
'The [type of the parameter](https://docs.getunleash.io/reference/activation-strategies#parameters)',
|
||||
enum: [
|
||||
'string',
|
||||
'percentage',
|
||||
|
||||
@ -28,7 +28,7 @@ export const updateStrategySchema = {
|
||||
type: {
|
||||
type: 'string',
|
||||
description:
|
||||
'The [type of the parameter](https://docs.getunleash.io/reference/custom-activation-strategies#parameter-types)',
|
||||
'The [type of the parameter](https://docs.getunleash.io/reference/activation-strategies#parameters)',
|
||||
enum: [
|
||||
'string',
|
||||
'percentage',
|
||||
|
||||
@ -135,7 +135,7 @@ const OPENAPI_TAGS = [
|
||||
{
|
||||
name: 'Strategies',
|
||||
description:
|
||||
'Create, update, delete, manage [custom strategies](https://docs.getunleash.io/reference/custom-activation-strategies).',
|
||||
'Create, update, delete, manage [custom strategies](https://docs.getunleash.io/reference/activation-strategies#custom-strategies).',
|
||||
},
|
||||
{
|
||||
name: 'Tags',
|
||||
|
||||
@ -63,7 +63,7 @@ class StrategyController extends Controller {
|
||||
openApiService.validPath({
|
||||
summary: 'Get all strategies',
|
||||
description:
|
||||
'Retrieves all strategy types ([predefined](https://docs.getunleash.io/reference/activation-strategies "predefined strategies") and [custom strategies](https://docs.getunleash.io/reference/custom-activation-strategies)) that are defined on this Unleash instance.',
|
||||
'Retrieves all strategy types ([predefined](https://docs.getunleash.io/reference/activation-strategies "predefined strategies") and [custom strategies](https://docs.getunleash.io/reference/activation-strategies#custom-strategies)) that are defined on this Unleash instance.',
|
||||
tags: ['Strategies'],
|
||||
operationId: 'getAllStrategies',
|
||||
responses: {
|
||||
|
||||
@ -55,15 +55,16 @@ To target users accordingly, let's create an [activation strategy](/reference/ac
|
||||
|
||||

|
||||
|
||||
Different strategies use different parameters. Predefined strategies are bundled with Unleash. The default strategy is a gradual rollout to 100%, which means that the feature is enabled for all users. In this tutorial, we'll adjust the percentage of users who have access to the feature.
|
||||
In this tutorial, we'll use a gradual rollout strategy with the rollout percentage set to 100%, which means that the feature is enabled for all users.
|
||||
|
||||
:::note
|
||||
Activation strategies are defined on the server. For backend SDKs, activation strategy implementation is done on the client side. For frontend SDKs, the feature is calculated on the server side.
|
||||
Activation strategies are defined and configured on the Unleash server. Backend SDKs evaluate feature flags locally using the configuration retrieved from the server. For frontend SDKs, evaluation happens on the server side, and the results are delivered to the client by the Unleash server or Unleash Edge.
|
||||
:::
|
||||
|
||||
Open your feature flag and click **Add strategy**.
|
||||
|
||||

|
||||
Let's set up the strategy! Open your feature flag, and select an environment. Click **Add strategy**, select **Gradual rollout**, and click **Configure**.
|
||||
|
||||

|
||||
|
||||
The gradual rollout strategy form has multiple fields that control the rollout of your feature. You can name the strategy something relevant to the A/B test you’re creating, but this is an optional field.
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ To create a feature flag in the Admin UI, do the following:
|
||||
[Activation strategies](/reference/activation-strategies) determine how and for whom a feature flag is enabled within a specific environment (for example, development, or production). To add an activation strategy to your feature flag in the Admin UI, do the following:
|
||||
|
||||
1. Go to a feature flag, and select the [environment](/reference/environments) where you want to configure the flag.
|
||||
2. Click **Add strategy** for that environment.
|
||||
2. Click **Add strategy**, select **Gradual rollout**, and click **Configure**.
|
||||
3. In the **General** tab, select your rollout percentage. Optionally, you can set the strategy status to **Inactive** if you don't yet want the strategy to be exposed.
|
||||
4. Click **Save strategy**.
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ For additional global configuration, you can import and export:
|
||||
- [Feature flag tag types](/reference/feature-toggles#tags)
|
||||
|
||||
Not included in the export:
|
||||
- [Segments](/reference/segments) and [custom strategies](/reference/custom-activation-strategies): Only references are included in the export. If an import file contains references that don't exist in the target, the import process will stop. You must create the segments or custom strategies manually in the target instance before running the import again.
|
||||
- [Segments](/reference/segments) and [custom strategies](/reference/activation-strategies#custom-strategies): Only references are included in the export. If an import file contains references that don't exist in the target, the import process will stop. You must create the segments or custom strategies manually in the target instance before running the import again.
|
||||
- [Release plans](/reference/release-templates): You must manually recreate any release plans for imported feature flags.
|
||||
|
||||
<VideoContent videoUrls={["https://www.youtube.com/embed/Bs73l2fZxJ4"]}/>
|
||||
@ -136,7 +136,7 @@ Unleash enforces the following validation rules during import:
|
||||
[Parent features](/reference/feature-toggles#feature-flag-dependencies) must already exist in the target instance or be included in the import file.
|
||||
|
||||
- **Custom strategies:**
|
||||
If your import contains [custom strategies](/reference/activation-strategies#custom-activation-strategies), then custom strategies with the same names must already exist in the target Unleash instance. Note that Unleash doesn't verify that the [configuration parameters](/reference/custom-activation-strategies#parameters) of the strategies match.
|
||||
If your import contains [custom strategies](/reference/activation-strategies#custom-strategies), then custom strategies with the same names must already exist in the target Unleash instance. Note that Unleash doesn't verify that the [configuration parameters](/reference/activation-strategies#parameters) of the strategies match.
|
||||
|
||||
- **Existing features in other projects:**
|
||||
If a feature exists in a different project on the target instance, the import is rejected.
|
||||
|
||||
@ -13,7 +13,7 @@ An activation strategy determines who should get a feature. They allow you to en
|
||||
|
||||
An activation strategy is assigned to one [feature flag](/reference/feature-toggles) in one [environment](/reference/environments). A feature flag is enabled in a given context (for example, user or application) if at least one of its activation strategies resolves to true.
|
||||
|
||||
The default activation strategy is a 100% gradual rollout, enabling the flag for all users. You can refine this using [rollout percentage](#rollout-percentage), [targeting](#targeting), and [variants](/reference/strategy-variants).
|
||||
When adding a strategy to a flag, you can choose from several [strategy types](#strategy-types), such as a [gradual rollout](#gradual-rollout). Depending on the strategy type, you can further refine the configuration using [rollout percentage](#rollout-percentage), [targeting](#targeting), and [variants](/reference/strategy-variants).
|
||||
|
||||
Feature flags can have multiple activation strategies. Unleash evaluates each strategy independently, enabling the flag if any resolves to true. This behavior is equivalent to the OR logical operator.
|
||||
|
||||
@ -39,7 +39,7 @@ Segmentation and constraints allow you to define conditions for your activation
|
||||
|
||||
:::
|
||||
|
||||
Constraints are conditional rules that determine whether a strategy applies, based on fields from the [Unleash context](/reference/unleash-context). Constraints can reference both [standard context fields](../reference/unleash-context#overview) and [custom context fields](../reference/unleash-context#custom-context-fields).
|
||||
Constraints are conditional rules that determine whether a strategy applies, based on fields from the [Unleash context](/reference/unleash-context). Constraints can reference both [standard context fields](/reference/unleash-context#overview) and [custom context fields](/reference/unleash-context#custom-context-fields).
|
||||
|
||||
An activation strategy can have as many constraints as needed. When an activation strategy has multiple constraints, then every constraint must be evaluated to true for the strategy to be evaluated. This behavior is equivalent to the AND logical operator.
|
||||
|
||||
@ -137,17 +137,20 @@ Backend SDKs fetch the full feature flag configuration associated with your API
|
||||
However, every value that you add to your feature flag constraints, increases the payload size. We recommend avoiding large constraint value lists. For example, instead of adding many user IDs or emails to the constraint value list, consider what properties those users share. This typically helps define and use a [custom context field](/reference/unleash-context#custom-context-fields) instead.
|
||||
|
||||
|
||||
## Add an activation strategy with a constraint
|
||||
## Add an activation strategy
|
||||
|
||||
To add an activation strategy with a constraint to a feature flag, do the following:
|
||||
|
||||
1. Open the Admin UI and go to the feature flag you'd like to add a strategy to.
|
||||
2. Select the environment you want to configure and click **Add strategy**.
|
||||
3. In the **Targeting** tab, go to the **Constraints** section, and click **Add constraint**.
|
||||
4. Select a context field to constrain on, for example, `email`.
|
||||
5. Set your desired operator, for example, `STR_ENDS_WITH`.
|
||||
6. Enter a value that the operator should evaluate, such as `@user.com`, and click **Add values**. Then click **Done**.
|
||||
7. Click **Save strategy**.
|
||||
3. Select your desired [strategy type](#strategy-types) and click **Apply** or **Configure**.
|
||||
4. In the **Targeting** tab, go to the **Constraints** section, and click **Add constraint**.
|
||||
5. Select a context field to constrain on, for example, `email`.
|
||||
6. Set your desired operator, for example, `STR_ENDS_WITH`.
|
||||
7. Enter a value that the operator should evaluate, such as `@user.com`, and click **Add values**. Then click **Done**.
|
||||
8. Click **Save strategy**.
|
||||
|
||||

|
||||
|
||||
## Client-side implementation
|
||||
|
||||
@ -161,12 +164,104 @@ If the constraint uses a standard Unleash context field, set the context field t
|
||||
|
||||
Unleash SDKs expect all context values to be strings. If you use an operator that acts on non-string values, such as [numeric operators](#numeric-operators) or [date and time operators](#date-and-time-operators), the SDKs attempt to convert the string into the expected type. If the conversion fails, the constraint evaluates to `false`.
|
||||
|
||||
## Custom activation strategies
|
||||
|
||||
[Custom activation strategies](/reference/custom-activation-strategies)
|
||||
## Strategy types
|
||||
|
||||
## Predefined strategy types
|
||||
When you add an activation strategy to a flag, you can choose from several options, depending on how you want to target and roll out your feature.
|
||||
|
||||
### Default strategy
|
||||
|
||||
The default activation strategy is a type of gradual rollout strategy that you can configure per project and environment. It defines your most common configuration and is available as a quick option when adding strategies to flags.
|
||||
|
||||
#### Configure the default strategy
|
||||
|
||||
1. Go to the project where you want to configure the default strategy.
|
||||
2. Open **Settings** and select **Default strategy**.
|
||||
3. Choose the environment you want to edit.
|
||||
4. Click **Edit default strategy for `<environment name>`**.
|
||||
5. Configure your rollout, targeting, and variants, then click **Save strategy**.
|
||||
|
||||
#### Add the default strategy to a flag
|
||||
|
||||
To add your project’s default strategy, click **Add strategy** and select **Project default**.
|
||||
In environments without an active strategy, you’ll also see a suggested option to apply your default strategy directly.
|
||||
|
||||
### Standard strategies
|
||||
|
||||
#### Gradual rollout
|
||||
|
||||
Roll out a feature to a percentage of your users while ensuring each user has a consistent experience. You can combine gradual rollout with [targeting](#targeting) rules to support most rollout scenarios.
|
||||
|
||||
#### Standard on/off
|
||||
|
||||
Turn the feature on or off for your entire user base. For more control, we recommend using a [gradual rollout](#gradual-rollout) strategy set to 100% instead.
|
||||
|
||||
|
||||
### Release templates
|
||||
|
||||
[Release templates](/reference/release-templates) are a collection of activation strategies that let you reuse predefined rollout configurations across multiple flags. They make it easier to standardize rollout processes and reduce manual setup.
|
||||
|
||||
### Advanced strategies
|
||||
|
||||
#### IPs
|
||||
|
||||
The `remoteAddress` strategy activates a feature flag for specific IP addresses.
|
||||
|
||||
Parameters:
|
||||
- `IPs` – List of IPs to enable the feature for.
|
||||
|
||||
#### Hosts
|
||||
|
||||
The `applicationHostname` strategy activates a feature flag for specific hostnames.
|
||||
|
||||
Parameters:
|
||||
- `hostNames` – List of hostnames to enable the feature for.
|
||||
|
||||
### Custom strategies
|
||||
|
||||
:::note
|
||||
|
||||
Whenever possible, we recommend using a standard [gradual rollout](#gradual-rollout) strategy with [strategy constraints](#constraints) instead of defining a custom strategy. They offer similar flexibility without requiring custom code distribution within your SDKs.
|
||||
|
||||
:::caution
|
||||
[Predefined strategy types](/reference/predefined-strategy-types), such as UserIDs, IPs, and Hosts are a legacy implementation. Please use the default strategy with constraints to achieve your desired targeting.
|
||||
:::
|
||||
|
||||
Custom activation strategies let you define your own activation strategies to use with Unleash.
|
||||
|
||||

|
||||
|
||||
When creating a custom strategy, you must set a name, optionally add a description, and define one or more parameters. The parameters are passed as arguments to your activation strategy and are available to your custom implementation in the SDK.
|
||||
|
||||
#### Parameters
|
||||
|
||||

|
||||
|
||||
Parameters define the inputs available to your strategy. Each parameter can be marked as required or optional. This setting helps users understand which fields they must complete, but users can still save the strategy without filling out required parameters.
|
||||
|
||||
Each parameter includes:
|
||||
- A **name**: Must be unique within the strategy.
|
||||
- An optional **description**: Explains the purpose or expected format.
|
||||
- A **type**: Determines the input field shown in the Admin UI and the value type in your code.
|
||||
|
||||
Each parameter type affects both the Admin UI control and the value representation in the JSON payload returned from the Unleash server. Actual data types depend on your SDK’s language.
|
||||
|
||||
By default, all parameter values are empty strings: `""`. If you don’t set a value, the SDK receives an empty string.
|
||||
|
||||
| Type name | Code representation | Example value | UI control |
|
||||
| --- | --- | --- | --- |
|
||||
| string | `string` | `"a string"` | A standard input field |
|
||||
| percentage | `string` representing a number between 0 and 100 (inclusive) | `"99"` | A value slider |
|
||||
| list | `string` (values are comma-separated) | `"one,two"` | A multi-input text field |
|
||||
| number | `string` | `"123"` | A numeric text field |
|
||||
| boolean | `string`: one of `"true"` or `"false"` | `"true"` | An on/off toggle |
|
||||
|
||||
#### Implementation
|
||||
|
||||
:::note
|
||||
|
||||
If the strategy isn’t implemented in your backend SDK, all checks using it return `false` because the SDK doesn’t recognize the strategy.
|
||||
|
||||
:::
|
||||
|
||||
Custom strategies are defined on the Unleash server, but implemented in your [backend SDK](/reference/sdks#backend-sdks). All official Unleash backend SDKs provide a way to implement custom strategies. When implementing your custom strategy, you have access to both the strategy parameters and the [Unleash context](/reference/unleash-context). See your SDK’s documentation for language-specific examples.
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,12 @@ import SearchPriority from '@site/src/components/SearchPriority';
|
||||
|
||||
<SearchPriority level="medium" />
|
||||
|
||||
:::warning
|
||||
|
||||
Custom strategies are deprecated and may be removed in a future major version. We recommend not using custom strategies going forward and instead using the gradual rollout strategy with constraints.
|
||||
If you have a use case you can't solve without using custom strategies, please reach out to us.
|
||||
:::
|
||||
|
||||
**Custom activation strategies** let you define your own activation strategies to use with Unleash. When the [built-in activation strategies](../reference/activation-strategies.md) aren't enough, custom activation strategies are there to provide you with the flexibility you need.
|
||||
|
||||
Custom activation strategies work exactly like the built-in activation strategies when working in the admin UI.
|
||||
|
||||
@ -56,9 +56,10 @@ To enable an environment for a feature flag, you must first add [activation stra
|
||||
To enable a feature flag in a specific environment, do the following:
|
||||
1. In the Admin UI, navigate to the feature flag you'd like to enable in an environment.
|
||||
2. In the list of environments, click **Add strategy** for the environment you want to enable.
|
||||
3. Enter a strategy name and define the rollout percentage. Optionally, you can configure segments, constraints, and variants.
|
||||
4. Click **Save strategy**.
|
||||
5. In the **Enabled in environments** section, toggle the environment you want to enable.
|
||||
3. Select your desired [strategy type](/reference/activation-strategies#strategy-types) and click **Configure**.
|
||||
4. Enter a strategy name and define the rollout percentage. Optionally, you can configure segments, constraints, and variants.
|
||||
5. Click **Save strategy**.
|
||||
6. In the **Enabled in environments** section, toggle the environment you want to enable.
|
||||
|
||||
## Clone an environment
|
||||
|
||||
|
||||
@ -194,17 +194,37 @@ You can review the list and archive flags in bulk with confidence, keeping your
|
||||
|
||||
### View archived flags
|
||||
|
||||
To view archived feature flags in a project, use the **Show only archived** filter in the **Feature flags** list.
|
||||
To view archived feature flags in a project, click **View archived flags**.
|
||||
|
||||
To view archived feature flags inside **Flags overview**, click **Archived flags**.
|
||||
|
||||
### Revive a feature flag
|
||||
|
||||
To revive an archived flag, use [filters](#view-archived-flags) to find the flag and click **Revive feature flag**. Revived flags are in an inactive state by default.
|
||||
Revived flags are in an inactive state by default.
|
||||
|
||||
To revive an archived flag within a project:
|
||||
|
||||
1. Open the project and click **View archived flags**.
|
||||
2. Find the flag you want to revive and click **Revive feature flag**.
|
||||
|
||||
To revive an archived flag from **Flags overview**:
|
||||
|
||||
1. Open **Flags overview** and click **Archived flags**.
|
||||
2. Find the flag you want to revive and click **Revive feature flag**.
|
||||
|
||||

|
||||
|
||||
### Delete a feature flag
|
||||
|
||||
To delete an archived flag, use [filters](#view-archived-flags) to find the flag and click **Delete feature flag**.
|
||||
To delete an archived flag within a project:
|
||||
|
||||
1. Open the project and click **View archived flags**.
|
||||
2. Find the flag you want to delete and click **Delete feature flag**.
|
||||
|
||||
To delete an archived flag from **Flags overview**:
|
||||
|
||||
1. Open **Flags overview** and click **Archived flags**.
|
||||
2. Find the flag you want to delete and click **Delete feature flag**.
|
||||
|
||||
However, we recommend not deleting feature flags unless they are completely removed from your codebase. If you delete a flag and later create a new one with the same name, it might unintentionally reactivate old code that still references the original flag.
|
||||
|
||||
@ -217,7 +237,7 @@ However, we recommend not deleting feature flags unless they are completely remo
|
||||
:::
|
||||
|
||||
|
||||
Tags can be used to group feature flags by any criteria, such as functionality, teams, or products, to make them easier to filter and manage. Tags are organized by type and color which you can define in the Admin UI under **Configure > Tag types**.
|
||||
Tags can be used to group feature flags by any criteria, such as functionality, teams, or products, to make them easier to filter and manage. Tags are organized by type and color, which you can define in the Admin UI under **Configure > Tag types**.
|
||||
|
||||
To assign tags to a feature flag, do the following:
|
||||
1. Open the feature flag and go to the **Tags for this feature flag** section.
|
||||
|
||||
@ -114,14 +114,10 @@ Even if the playground doesn't recognize or otherwise can't evaluate a specific
|
||||
|
||||
### Custom Strategies
|
||||
|
||||
:::caution
|
||||
[Custom activation strategies](/reference/custom-activation-strategies) are deprecated. Please use the [default activation strategy](/reference/activation-strategies) with constraints.
|
||||
:::
|
||||
The playground does not have any implementations for [custom strategies](/reference/activation-strategies#custom-strategies). As a result, custom strategies do not evaluate to `true` regarless of the context.
|
||||
|
||||
The playground does not have any implementations for [custom strategies](../reference/custom-activation-strategies). As a result, custom strategies do not evaluate to `true` regarless of the context.
|
||||
### The Application Hostname strategy
|
||||
|
||||
### The Application Hostname strategy {#application-hostname}
|
||||
|
||||
The [application hostname strategy](../reference/predefined-strategy-types#hosts) is a little different from the other built-in strategies: it depends on external state and _not_ on the Unleash context to evaluate. In short, the strategy checks its application environment to get the hostname, so the Unleash context has no effect on the result of this strategy.
|
||||
The [application hostname strategy](../reference/activation-strategies#hosts) is a little different from the other built-in strategies: it depends on external state and _not_ on the Unleash context to evaluate. In short, the strategy checks its application environment to get the hostname, so the Unleash context has no effect on the result of this strategy.
|
||||
|
||||
Because the application hostname strategy depends on external state, the playground can't guarantee whether the strategy would be true or false in a client. Further, the result in the playground would most likely be different from what you'd see in a client. Because of this, the playground does not evaluate this strategy.
|
||||
|
||||
@ -28,22 +28,6 @@ The `flexibleRollout` stategy has the following parameters:
|
||||
- groupId - Used to ensure that different flags will **hash differently** for the same user. The groupId defaults to _feature flag name_, but the user can override it to _correlate rollout_ of multiple feature flags.
|
||||
- rollout - The percentage (0-100) you want to enable the feature flag for.
|
||||
|
||||
## IPs
|
||||
|
||||
The `remoteAddress` strategy activates a feature flag for remote addresses defined in the IP list.
|
||||
|
||||
**Parameters:**
|
||||
- IPs - List of IPs to enable the feature for.
|
||||
|
||||
|
||||
## Hosts
|
||||
|
||||
The `applicationHostname` strategy activates a feature flag for client instances with a hostName in the `hostNames` list.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- hostNames - List of hostnames to enable the feature flag for.
|
||||
|
||||
|
||||
### Gradual rollout with user ID
|
||||
|
||||
|
||||
@ -76,8 +76,8 @@ The following tables show which features are supported by each backend SDK. Some
|
||||
| --- | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: |
|
||||
| [Gradual rollout](./activation-strategies) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [Gradual rollout with custom stickiness](./stickiness#custom-stickiness) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ |
|
||||
| [UserID](./predefined-strategy-types#userids), [IP](./predefined-strategy-types#ips), [hostname](./predefined-strategy-types#hosts) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [IP](./predefined-strategy-types#ips) with CIDR syntax | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ✅ | ✅ |
|
||||
| [IP](./activation-strategies#ips), [hostname](./activation-strategies#hosts) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [IP](./activation-strategies#ips) with CIDR syntax | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ✅ | ✅ |
|
||||
|
||||
#### Custom strategies
|
||||
All backend SDKs have basic support.
|
||||
|
||||
@ -65,6 +65,7 @@ To reassign users to different variants using an existing stickiness parameter,
|
||||
|
||||
In the Admin UI, go to the feature flag you'd like to define variants for and do the following:
|
||||
1. Select the environment you want to configure and click **Add strategy**.
|
||||
2. Select your desired [strategy type](/reference/activation-strategies#startegy-types) and click **Configure**.
|
||||
2. Go to the **Variants** tab and click **Add variant**.
|
||||
3. Enter the variant name and an optional payload.
|
||||
4. Optionally, click **Add variant** again to add more variants.
|
||||
|
||||
@ -177,11 +177,6 @@ Consider migrating to [Unleash Enterprise](https://www.getunleash.io/pricing) to
|
||||
|
||||
Support for Internet Explorer has been removed, aligning with upstream dependencies (React v18) and Microsoft's end-of-support for the browser.
|
||||
|
||||
### Deprecated custom strategies
|
||||
|
||||
While still functional in v6, custom strategies are deprecated in favor of using standard strategies combined with [strategy constraints](/reference/activation-strategies#constraints).
|
||||
Consider migrating if possible, as constraints offer similar flexibility without requiring custom code distribution with SDKs.
|
||||
|
||||
### High availability upgrade considerations
|
||||
|
||||
If you run multiple Unleash instances in a high-availability setup and are upgrading from a version **below 5.6.11** directly to **version 5.7 or higher**, you might experience temporary UI unavailability during a rolling upgrade while instances with different versions (`<5.7` and `>=5.7`) are running simultaneously.
|
||||
@ -262,6 +257,12 @@ Now they look like this:
|
||||
|
||||
If your integrations rely on the specific structure of these validation error messages, you might need to update your error handling logic.
|
||||
|
||||
:::note
|
||||
In v6, we deprecated custom strategies. However, due to customer feedback, we reverted this change and will continue to support them.
|
||||
|
||||
Whenever possible, we recommend using a standard gradual rollout strategy combined with [strategy constraints](/reference/activation-strategies#constraints), as they offer similar flexibility without requiring custom code distribution with SDKs.
|
||||
:::
|
||||
|
||||
## Upgrading from v3 to v5
|
||||
|
||||
Follow along with our video demonstration on upgrading from v3 to v5 with no downtime in just a few minutes.
|
||||
|
||||
BIN
website/static/img/add-strategy-modal.png
Normal file
BIN
website/static/img/add-strategy-modal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 286 KiB |
BIN
website/static/img/add-strategy.png
Normal file
BIN
website/static/img/add-strategy.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 187 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 620 KiB |
@ -103,12 +103,17 @@
|
||||
},
|
||||
{
|
||||
"source": "/advanced/custom-activation-strategy",
|
||||
"destination": "/reference/custom-activation-strategies",
|
||||
"destination": "/reference/activation-strategies#custom-strategies",
|
||||
"permanent": true
|
||||
},
|
||||
{
|
||||
"source": "/advanced/custom_activation_strategy",
|
||||
"destination": "/reference/custom-activation-strategies",
|
||||
"destination": "/reference/activation-strategies#custom-strategies",
|
||||
"permanent": true
|
||||
},
|
||||
{
|
||||
"source": "/reference/custom-activation-strategies",
|
||||
"destination": "/reference/activation-strategies#custom-strategies",
|
||||
"permanent": true
|
||||
},
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user