Synchronizing Multiple Feature Launches
As you get used to developing with feature flags, you will start to include them from the beginning of your feature development, changing the audience of your features as you go. As this takes hold across your team/organization/company, you will want to be able to tie features together and launch them simultaneously, as part of a broader release.
Fortunately, the ability to tie gates together is built in to Feature Gates, and does not require you to change your code or even your development workflows. Let’s see how.
Launching Features 1 and 2 as part of Release A
Say you are working on Features 1 and 2. As an engineer works on these features, they created Feature Gates for each one, so we have Feature 1, and Feature 2. Each of these features are rolled out only to internal stakeholders as the implementation is ongoing.
Later, you decide that you want these two features to launch at the same time as part of Release A.
First, create your release gate - Release A. Since we aren’t launching yet, lets leave it as returning false for everyone.
Next, lets make Feature 1 and Feature 2 gates depend on this with a “Passes Target Gate” condition at the top. “Passes target gate” means if the listed gate passes, also pass for this gate. Anyone that passes the release gate should pass each of these feature gates, so be sure to set the pass percentage to 100. Don’t worry - the release gate still fails, so your features will not be available to anyone outside of your existing gating conditions.
Now that you have done that for both gates, you can continue developing until you are ready to launch.
When you are ready to launch, each of your features now depends on the “Release A” gate. All you need to do is change that gate to pass for the percentage rollout you want.
For example, if you want to roll this out to 10% of your user base and check on the pulse metrics associated with it, you can just create an “Everyone, 10%” rollout. Notice that the release gate warns you at the top that it is being used in Feature 1 and Feature 2.
Now, checks in code for Feature Gate A and Feature Gate B will pass 10% of the time, and you can measure the combined impact of these changes together in the pulse view for the Release A gate.
Advanced Rollout with Pulse
If you want to measure the impact of these features independently, you can even add a partial rollout on Feature Gate A, Feature Gate B, and the release gate! In this way, you can compare Feature 1 vs Control, Feature 2 vs control, and Feature 1 & 2 vs control. You cannot, however, compare Feature 1 vs Feature 2, nor can you enforce mutual exclusion between Features 1 and 2 - for these types of comparisons, or for mutual exclusivity, check out Experiments.