Skip to content

Commit

Permalink
chore: describe default rules/rollouts (#253)
Browse files Browse the repository at this point in the history
* chore: describe default rules/rollouts

Signed-off-by: Mark Phelps <[email protected]>

* chore: fmt

Signed-off-by: Mark Phelps <[email protected]>

---------

Signed-off-by: Mark Phelps <[email protected]>
  • Loading branch information
markphelps authored Jul 31, 2024
1 parent 7ae1611 commit a3bdc1d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ Currently 5 constraint types are available:

## Rules

<Info>
Rules are only available for [Variant](#variants) flags. This was the only
flag type available pre-v1.24.0 of Flipt.
</Info>

Rules allow you to tie your flags, variants and segments together by specifying
which segments are targeted by which variants.

Expand All @@ -142,6 +137,14 @@ Rules are evaluated in order per their rank from 1-N. The first rule that
matches wins. Once created, rules can be re-ordered to change how they're
evaluated.

### Default Rule

<Info>Default Rules are available since v1.74.0 of Flipt.</Info>

If no rules match for a given flag, the default rule value is returned. This value is optional and can be set to any variant that exists for the flag.

![Default Rule Example](/images/concepts/default_rule.png)

### Distributions

Distributions allow you to return different variants of your flag to different
Expand All @@ -157,14 +160,9 @@ The ability to manage distributions, as illustrated in the image above, is an ex

## Rollouts

<Info>
Rollouts are only available for [Boolean](#boolean) flags. Rollouts were
introduced in v1.24.0 of Flipt.
</Info>

Boolean flags return `true` or `false` based on the flags `enabled` property. Rollouts allow you to potentially change this value at request time.
Rollouts allow you to potentially change the result of a boolean flag value at request time.

Rollouts are a sequence of conditions which when one is matched for a request context, overrides the flag's `enabled` property.
Rollouts are a sequence of conditions which when one is matched for a request context, overrides the default rollout property.

Current rollout types include:

Expand All @@ -175,6 +173,10 @@ Current rollout types include:

Rollouts work similar to [Rules](#rules) in that they're evaluated in order per their rank from 1-N. The first rollout that matches wins. Once created, rollouts can be re-ordered to change how they're evaluated.

### Default Rollout

If no rollouts match for a given flag, the default rollout value is returned. This value is the same as the 'enabled' value for the flag for backward compatibility reasons.

## Evaluation

Evaluation is the process of sending requests to the Flipt server to process and
Expand Down
Binary file added images/concepts/default_rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/flags_boolean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/rollouts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.1
info:
title: api
version: 1.46.0
version: 1.47.0
paths:
/evaluate/v1/boolean:
post:
Expand Down

0 comments on commit a3bdc1d

Please sign in to comment.