CI/CD & DevOps Practices Practice Question 3: Release Toggle Decouple
CI/CD & DevOps Practices · Test 1 · question 3 of 10
A team practices trunk-based development and deploys main to production several times a day. A new checkout flow was finished two weeks early, but marketing wants customers to see it only when a campaign launches next Tuesday at 09:00. If the new flow misbehaves after launch, operations must be able to hide it within seconds, without redeploying and without undoing any other change that has shipped in the meantime.
What should the team do?
Show answer and explanation
Answer:
A release toggle lets unfinished or unreleased code paths ship to production as latent code, which separates *deploying* the code from *releasing* the feature. The code keeps flowing through the normal pipeline with everything else. Turning the feature on at 09:00 is a runtime switch, and turning it off again is just as fast. Neither needs a deployment, and neither affects any other change (A).
Option B couples the release to a deployment and brings back a long-lived branch, with a risky big merge on launch morning. Hiding the feature afterwards would need a revert and a redeploy, which the stem rules out.
Option C stops the continuous flow of every other change for a week to protect one feature. It still makes the release a deployment, so the feature cannot be hidden without another one.
Option D makes the 09:00 switch fast, but a blue/green switch moves all traffic to a different build. Switching back to hide the checkout flow would also revert every other change deployed since, which breaks the requirement to leave other changes in place.
Reference: Feature Toggles (aka Feature Flags) (martinfowler.com)