Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: describe default rules/rollouts #253

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@

## 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 @@
matches wins. Once created, rules can be re-ordered to change how they're
evaluated.

### Default Rule

Check warning on line 140 in concepts.mdx

View workflow job for this annotation

GitHub Actions / Vale

[vale] reported by reviewdog 🐶 [Openly.Titles] 'Default Rule' should be in sentence case Raw Output: {"message": "[Openly.Titles] 'Default Rule' should be in sentence case", "location": {"path": "concepts.mdx", "range": {"start": {"line": 140, "column": 5}}}, "severity": "WARNING"}

<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 @@

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

Check warning on line 163 in concepts.mdx

View workflow job for this annotation

GitHub Actions / Vale

[vale] reported by reviewdog 🐶 [Microsoft.Adverbs] Remove 'potentially' if it's not important to the meaning of the statement. Raw Output: {"message": "[Microsoft.Adverbs] Remove 'potentially' if it's not important to the meaning of the statement.", "location": {"path": "concepts.mdx", "range": {"start": {"line": 163, "column": 23}}}, "severity": "WARNING"}

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 @@

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

Check warning on line 176 in concepts.mdx

View workflow job for this annotation

GitHub Actions / Vale

[vale] reported by reviewdog 🐶 [Openly.Titles] 'Default Rollout' should be in sentence case Raw Output: {"message": "[Openly.Titles] 'Default Rollout' should be in sentence case", "location": {"path": "concepts.mdx", "range": {"start": {"line": 176, "column": 5}}}, "severity": "WARNING"}

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
Loading