From 27a74ecf0d2e061f04eb1356e4b3bc673ab32816 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 11 Mar 2022 13:58:41 +0100 Subject: [PATCH] docs: create initial outline for how to schedule feature releases --- .../how-to-schedule-feature-releases.mdx | 67 +++++++++++++++++++ website/sidebars.js | 3 +- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 website/docs/how-to/how-to-schedule-feature-releases.mdx diff --git a/website/docs/how-to/how-to-schedule-feature-releases.mdx b/website/docs/how-to/how-to-schedule-feature-releases.mdx new file mode 100644 index 00000000000..b597fe63e06 --- /dev/null +++ b/website/docs/how-to/how-to-schedule-feature-releases.mdx @@ -0,0 +1,67 @@ +--- +title: How to schedule feature releases +--- +import ApiRequest from '@site/src/components/ApiRequest' + +:::info Placeholders +Placeholders in the code samples below are delimited by angle brackets (i.e. ``). You will need to replace them with the values that are correct in _your_ situation for the code samples to run properly. +::: + +Scheduling feature releases is good. You may want to: +- release a feature at a specific date and time (product launch) +- only have a feature available up until a specific moment (such as a contest cutoff etc) +- make a feature available during a specific period (24 flash sale, Black Friday, etc) + +Obviously Unleash can help you with this. + +There's two distinct ways to do this with Unleash: +- [Using strategy constraints](#strategy-constraints) +- [Using custom activation strategies](#custom-activation-strategies) + +This guide will show you how to schedule a release in the future, but the exact same logic applies if you want to make a feature available until some point in the future. Finally, if you want to only make a feature available during a limited time period, combine the two options. + +## Prerequisites + +This guide assumes that you've got some experience with Unleash, that you've got an instance up and running, and that you've got a feature toggle with a strategy that you want to schedule the release for. Additionally, each of the two ways of doing this have slightly different prerequisites themselves. + +## Schedule feature releases with strategy constraints {#strategy-constraints} + + +### Prerequirements +- Unleash Enterprise 4.9 or later +- SDKs that support advanced strategy constraints + +### Step 1: Add a date-based strategy constraint + +#### Via the UI + +On the strategy that you want to schedule, use the "new constraint" button to add a new constraint. + +Select the `currentTime` context field from the dropdown and choose the one of the date-based operators. + +Finally, select when the feature should be released. + +#### Via the API + + + + +## Schedule feature releases with custom activation strategies {#custom-activation-strategies} + +### Requirements +- Unleash v3.3 or later + +### Step 1: Define a custom activation strategy +See the how-to guide for more granular instructions, but you'd define a custom strategy with an `enableAfter` parameter in the form of a time format you can parse. + +### Step 2: Implement the custom activation strategy in your clients +Again, following the steps in the guide, you'd implement this strategy in each of your clients. + +### See the how-to guide for custom activation strategies diff --git a/website/sidebars.js b/website/sidebars.js index de1844eacb6..a5c0f86f938 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -54,10 +54,11 @@ module.exports = { label: 'Feature toggles, strategies, context', items: [ 'how-to/how-to-add-strategy-constraints', + 'how-to/how-to-capture-impression-data', 'user_guide/create_feature_toggle', 'how-to/how-to-define-custom-context-fields', 'how-to/how-to-use-custom-strategies', - 'how-to/how-to-capture-impression-data' + 'how-to/how-to-schedule-feature-releases', ], type: 'category', link: {