1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Merge branch 'main' into docs/sdk-min-version-for-advanced-operators

This commit is contained in:
Thomas Heartman 2022-03-18 15:01:39 +01:00
commit 0998ca4618
4 changed files with 17 additions and 6 deletions

View File

@ -38,7 +38,7 @@ Unleash Slack addon takes the following parameters.
- **Slack Webhook URL** - This is the only required property. If you are using a Slack Application you must also make sure your application is allowed to post to the channel you want to post to.
- **Username** - Used to override the username used to post the update to a Slack channel.
- **Emoji Icon** - Used to override the emoji icon used to post the update to a Slack channel.
- Default channel - Where to post the message if the feature toggles has not overridden the channel via the slack tags.
- **Default channel** - Where to post the message if the feature toggles has not overridden the channel via the slack tags.
#### Global configuration

View File

@ -6,11 +6,11 @@ title: Strategy Constraints
:::info Availability
Strategy constraints are available to Unleash Pro and Enterprise users.
Unleash 4.9 introduced a more comprehensive set of constraint operators. These require that both Unleash *and* your client SDK of choice support them. See the [SDK compatibility table](../sdks/index.md#server-side-compatibility-table) for more information. Prior to Unleash 4.9, the only available operators were `IN` and `NOT_IN`.
Unleash 4.9 introduced a more comprehensive set of constraint operators. These require that both Unleash *and* your client SDK of choice support them. See the [SDK compatibility table](../sdks/index.md#strategy-constraints) for more information. Prior to Unleash 4.9, the only available operators were `IN` and `NOT_IN`.
:::
:::caution undefined behavior
When using _advanced strategy constraints_ (any operator that isn't `IN` or `NOT_IN`), *make sure your client SDK is up to date* and supports this feature. For older versions of the client SDKs we **cannot guarantee** any specific behavior: the constraints may evaluate to `false`, they may evaluate to `true`, or the client may raise an exception (as in the case of the **Ruby SDK** prior to **version 4.1.0**).
When using _advanced strategy constraints_ (any operator that isn't `IN` or `NOT_IN`), *make sure your client SDK is up to date* and supports this feature. For older versions of the client SDKs we **cannot guarantee** any specific behavior. Please see the [incompatibilities section](#incompatibilities) for more information.
:::
**Strategy constraints** are conditions that must be satisifed for an [activation strategy](../user_guide/activation_strategy) to be evaluated for a feature toggle.
@ -176,7 +176,18 @@ If you set a context field to a value that the SDKs cannot parse correctly for a
In other words: if you have a strategy constraint operator that expects a number, such as `NUM_GT`, but you set the corresponding context field to a string value, then the expression will be false: `"some string"` is **not** greater than `5`.
This value can still be negated as explained in [the section on negating values](#constraint-negation).
## Incompatibilities and undefined behavior {#incompatibilities}
It's important that you use an up-to-date client SDK if you're using the advanced constraint operators introduced in Unleash 4.9. If your client SDK does not support the new operators, we cannot guarantee how it'll react. As a result, you may see different behavior across applications.
If you use the new constraints with old SDKs, here's how it'll affect _some_ of the SDKs (the list is not exhaustive):
- The Node.js and Go client SDKs will ignore the new constraints completely: the constraints will not affect the toggle's status.
- The Python client SDK will evaluate the toggle to false, as it cannot evaluate the constraint successfully.
- The Ruby SDK raises an exception if the operator is not `IN` or `NOT_IN`.
Please inspect the [SDK compatibility table to see which version of your preferred SDK introduced support for this feature](../sdks/index.md#strategy-constraints).
After Unleash 4.9, we updated the [Unleash client specification](https://github.com/Unleash/client-specification). Going forward, any constraint that a client does not recognize, **must be evaluated as `false`**
## [Deprecated]: Constrain on a specific environment {#constrain-on-a-specific-environment}

View File

@ -27,7 +27,7 @@ This guide assumes that you've got the following:
## Schedule feature releases with strategy constraints {#strategy-constraints}
You can use this approach with _any_ strategy you want. The strategies will work just as they normally do, they just won't become active until the specified time. For example: with the standard strategy, the feature would become available to all your users at the specified time; with a gradual rollout, the rollout would start at the specified time.
[Strategy contstraints](../advanced/strategy-constraints.md#date-and-time-operators) are the easiest way to schedule feature releases ([as long as your SDKs are up to date](../advanced/strategy-constraints.md#incompatibilities)). You can use this approach with _any_ strategy you want. The strategies will work just as they normally do, they just won't become active until the specified time. For example: with the standard strategy, the feature would become available to all your users at the specified time; with a gradual rollout, the rollout would start at the specified time.
### Step 1: Add an activation strategy with a date-based constraint

View File

@ -74,9 +74,9 @@ If you see an item marked with a ❌ that you would find useful, feel free to re
| [Hostname](../user_guide/activation_strategy#hostnames) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| **Category: [Custom strategies](../advanced/custom_activation_strategy)** | | | | | | | | | |
| Basic support | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| **Category: [Strategy constraints](../advanced/strategy_constraints)** | | | | | | | | | |
| <span id="strategy-constraints">**Category: [Strategy constraints](../advanced/strategy_constraints)**</span> | | | | | | | | | |
| Basic support (`IN`, `NOT_IN` operators) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| <span id="strategy-constraints-advanced-support">Advanced support (Semver, date, numeric and extended string operators)</span> (introduced in) | ✅ (5.1) | ✅ (3.12) | ✅ (3.3) | ✅ (5.1) | ✅ (4.2) | ⭕ | ✅ (1.3) | ⭕ | ✅ (0.8) |
| <span id="strategy-constraints-advanced-support">Advanced support (Semver, date, numeric and extended string operators)</span> (introduced in) | ✅ (5.1) | ✅ (3.12) | ✅ (3.3) | ✅ (5.1) | ✅ (4.2) | ⭕ | ✅ (1.3) | ⭕ | ✅ (0.8) |
| **Category: [Unleash Context](../user_guide/unleash_context)** | | | | | | | | | |
| Static fields (`environment`, `appName`) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| Defined fields | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |