import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
A progressive rollout allows you to change the value of your flag over time.
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
andend
date, the flag will gradually shift to return variationB instead of variationA. - After the
end
date, the flag will return variationB.
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
andend
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.
:::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 . |