Skip to content

Latest commit

 

History

History
164 lines (139 loc) · 4.85 KB

File metadata and controls

164 lines (139 loc) · 4.85 KB

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

Progressive rollout

A progressive rollout allows you to change the value of your flag over time.

Example

progressive-flag:
  variations:
    variationA: A
    variationB: B
  defaultRule:
# highlight-start
    progressiveRollout:
      initial:
        variation: variationA
        date: 2024-01-01T05:00:00.100Z
      end:
        variation: variationB
        date: 2024-01-05T05:00:00.100Z
# highlight-end
{
  "progressive-flag": {
    "variations": {
      "variationA": "A",
      "variationB": "B"
    },
    "defaultRule": {
# highlight-start
      "progressiveRollout": {
        "initial": {
          "variation": "variationA",
          "date": "2024-01-01T05:00:00.100Z"
        },
        "end": {
          "variation": "variationB",
          "date": "2024-01-05T05:00:00.100Z"
        }
      },
# highlight-end
    }
  }
}
[progressive-flag.variations]
variationA = "A"
variationB = "B"
# highlight-start
[progressive-flag.defaultRule.progressiveRollout.initial]
variation = "variationA"
date = 2024-01-01T05:00:00.100Z

[progressive-flag.defaultRule.progressiveRollout.end]
variation = "variationB"
date = 2024-01-05T05:00:00.100Z
# highlight-end
  • Before the initial date, the flag will return variationA
  • Between the initial and end date, the flag will gradually shift to return variationB instead of variationA.
  • After the end date, the flag will return variationB.

Using the percentage field (advanced)

If you intend to partially rollout or keep both features.

    progressiveRollout:
      initial:
        variation: variationA
        # highlight-start
        percentage: 20   
        # highlight-end
        date: 2024-01-01T05:00:00.100Z
      end:
        variation: variationB
        # highlight-start
        percentage: 80
        # highlight-end
        date: 2024-01-05T05:00:00.100Z
      "progressiveRollout": {
        "initial": {
          "variation": "variationA",
          # highlight-start
          "percentage": 20,
          # highlight-end
          "date": "2024-01-01T05:00:00.100Z"
        },
        "end": {
          "variation": "variationB",
          # highlight-start
          "percentage": 80,
          # highlight-end
          "date": "2024-01-05T05:00:00.100Z"
        }
      }
[progressive-flag.defaultRule.progressiveRollout.initial]
variation = "variationA"
# highlight-start
percentage = 20
# highlight-end
date = 2024-01-01T05:00:00.100Z

[progressive-flag.defaultRule.progressiveRollout.end]
variation = "variationB"
# highlight-start
percentage = 80
# highlight-end
date = 2024-01-05T05:00:00.100Z
  • Before the initial date, the flag will return variationB 20% of the time and variationA 80% of the time.
  • Between the initial and end date, the flag will gradually shift to return variationB more instead of variationA.
  • After the end date, the flag will return variationB 80% of the time and variationA 20% of the time.
  • This may not be intuitive. It starts with variationA as the dominant response and gradually shifts towards variationB.

Configuration fields

:::info The dates are in the format supported natively by your flag file format. :::

Field Description
initial The initial state of this flag.
variation is the variation you intend to switch from.
date is the date to start the rollout.
end The end state of this flag.
variation is the variation you intend to switch to.
date is the date when rollout is completed.
percentage
(optional)
It represents the ramp of progress, at which level the flag starts (initial) and ends (end).
Default: initial = 0 and end = 100.