Skip to content

Enterprise · Approvals and safety nets

Safety nets

A freeze window blocks planned change, the kill switch overrides a live flag at once, a scheduled change can be cancelled, and Version History lets you roll back.

Before you start

  • Staging of express-checkout is deployed, and the policy Release approvals exists.
  • The flag holiday-banner exists and is not deployed anywhere. The terminal from Automation and CI still has gate.sh and its three variables: FLUXGATE_URL, FLUXGATE_TOKEN and FLUXGATE_ENVIRONMENT_ID.
  • Start as priya Requester, then use sam Approver and admin System admin as each step says. Select the team Checkout.

Four safety nets

An approval stops a bad change before it ships. These four tools limit the damage when something slips through, or when you need to hold all change for a while.

ToolWhat it doesWho uses it
Freeze windowBlocks stage changes in an environment for a period.An admin or a Team Admin creates it.
Kill switchOverrides a live flag at once.An admin or a Team Admin.
Scheduled changeRuns a disable, enable or archive at a set time. You can cancel it first.Whoever can update the feature.
Version HistoryRestores an earlier state of a flag.Any signed-in user.

Freeze windows

A freeze window blocks changes to the stages of one environment between a start and an end time, for example a holiday trading peak. A request for a stage change in that environment fails while the window is active, with the message Change blocked by active freeze window 'Holiday freeze'. An evaluation is not a change, so your app keeps serving flags as before.

On a stage, the Change Freeze card shows Frozen and names the window. An admin or a Team Admin can override it with a recorded Override Reason. For everyone else, the card says an admin has to override.

The kill switch

Emergency Disable turns a live flag off at once, without a request. It has three properties that matter in an incident:

  • It creates no approval request, so a slow approver cannot delay it.
  • A freeze window does not block it.
  • It needs a Reason of at least five characters, which the flag then shows on its row.

Emergency Enable reverses it. Every kill switch use is recorded as a version.

Scheduled changes

A scheduled change runs one action, Disable feature, enable or archive, at a time you pick. It waits as Pending. A pending change can be cancelled, and then nothing runs. A reason is required.

Version history and rollback

Every update of a flag is a version. These actions create one: an Update Feature save, each emergency disable and enable (tag Kill switch), a stage criteria save and a rollback. Creating a feature or changing a stage does not. Select a version to see its diff against the previous one, with Before and After panes. Rollback restores the selected version, and the rollback becomes a version too.

How the safety nets and approvals interact

ActionNeeds approvalBlocked by a freeze window
Request Deployment or Request RollbackYesYes
Emergency Disable and Emergency EnableNoNo
Execute Rollback on an approved rollback requestAlready approvedYes. The approval does not bypass the freeze.

Make the flag live

To watch a kill switch work, the flag has to be live. holiday-banner has never been deployed, so run the loop from Approvals and policies for its Development stage.

  1. As priya, open holiday-banner at /features/<id>/edit, click the Development stage, type a Reason, open Actions and click Request Deployment.
  2. Log out and sign in as sam. Open /approvals and click Approve on the pending request. The toast "Approval recorded" appears.
  3. Log out and sign in as priya. Click the Development stage, open Actions and click Deploy.
  4. Log out and sign in as admin. The admin account operates the controls on this page.

Run the gate from the previous page. It exits with 0:

Flag on
bash gate.sh; echo $?
Output
banner on
0

Create a freeze window

  1. Click Freeze Windows under Govern to open /settings/freeze-windows.
  2. Under New Window, type Holiday freeze in Name and choose Production in Scope.
  3. Set Starts to a few minutes ago. The field is a date and time input. Click its minutes part and type the number. By default it starts 15 minutes from now, so the window would not be active yet. Keep Ends as it is.
  4. Type Holiday trading peak in Reason and click Create Window. The toast "Freeze window created" appears, and the row shows Active now.
  5. Open holiday-banner at /features/<id>/edit and click the Production stage. The Change Freeze card shows Frozen, the text "Holiday freeze is active for Production" and the field Override Reason.

The window blocks a request for the frozen environment. Here priya asks for a Production deployment of holiday-banner while the window is active. The API answers with a 403 and this body:

Response body
{"error":"forbidden","message":"Change blocked by active freeze window 'Holiday freeze'","code":null,"details":null}

In the UI, the toast reads "Failed to change stage" with the same message under it. A request that is already approved is blocked too: while a window covers its environment, Execute Rollback on an approved rollback fails with that toast. End the window, and the action works.

Use the kill switch

  1. Click Features under Build to open /features.
  2. Point at the red icon button on the holiday-banner row. The tooltip reads Emergency Disable. Click it. The dialog Disable Feature opens.
  3. Type Banner breaks checkout on mobile in Reason. Leave Disable timing on Disable immediately. Click Disable Feature.
  4. The row shows DISABLED and EMERGENCY OVERRIDE with your reason.
  5. Run the CI gate. It exits with 10, which means off.
  6. When the fix is out, click the green icon button on the row (Emergency Enable). Type Fix shipped and banner verified in Reason and click Enable Feature. The badge clears.
  7. Run the CI gate again. It exits with 0.

When your own flag is not deployed, the kill switch has nothing live to override. That is why you made holiday-banner live first.

End the freeze window

  1. Return to /settings/freeze-windows and click Disable on Holiday freeze. The badge reads Inactive.
  2. The window stays in the table. Click Enable to turn it on again, or Delete to remove it.
Freeze Windows page with the New Window form and the Holiday freeze window listed as Inactive with Enable and Delete buttons (opens full size in a new tab)
After Disable, Holiday freeze stays in the table as Inactive. The Scope column shows an id instead of the environment name.

With the window inactive, nothing blocks the stage changes of the next steps.

Schedule a change and cancel it

  1. Click the pencil icon on the holiday-banner row to open /features/<id>/edit. Scroll to Scheduled Changes.
  2. Action shows Disable feature. Set Run At to next week. Click the day part of the date and type the day.
  3. Type Retire the banner after the sale in Reason. Click Schedule Change. If you leave Reason empty, the toast reads "Schedule reason is required".
  4. The toast "Scheduled change created" appears, and the table shows the row with the status Pending.
  5. Click Cancel on the row. The toast "Scheduled change cancelled" appears. The status is Cancelled and the reason reads Cancelled by user.

Version history and rollback

  1. Scroll up. Change Description to Holiday banner, spring copy and click Update Feature. The toast "Feature updated successfully" appears.
  2. Click the History tab. Version History lists the versions, newest first. The newest one is selected. Its diff shows BEFORE - and AFTER Holiday banner, spring copy.
  3. Select the version before it. It is the version tagged Kill switch from the enable, not the one from the disable. The disable version holds the disabled state and would switch the flag off again.
  4. Click Rollback and confirm the browser dialog. The toast "Feature rolled back" appears. A new version with the tag Rollback is on top, and the description is empty again.
  5. Open holiday-banner at /features/<id> and click the Activity tab. It shows the same history for anyone who needs to audit a change.
Version History for holiday-banner listing four versions, including two kill switch versions and a rollback, with the diff of version 4 (opens full size in a new tab)
Version History for holiday-banner: kill switch versions, a rollback, and the diff of the selected version.

Examples

The CI gate during a freeze

This is the gate from Automation and CI while Holiday freeze is active, then after the kill switch, then after the enable. The gate reads Development while the freeze covers Production, so the freeze cannot change the result. The point is that the kill switch works regardless of the freeze.

Freeze active, flag live
bash gate.sh; echo $?
Output
banner on
0
Freeze still active, after Emergency Disable
bash gate.sh; echo $?
Output
banner off
10
Freeze still active, after Emergency Enable
bash gate.sh; echo $?
Output
banner on
0

The versions of holiday-banner

VersionTagCreated by
1Kill switchEmergency Disable
2Kill switchEmergency Enable
3UpdateUpdate Feature, the new description
4RollbackRollback to version 2

The numbers can differ when you edited the flag earlier.

Good to know

  • Freeze Windows under Govern needs an admin or a Team Admin. So do creating, disabling and deleting a window, Emergency Disable, Emergency Enable and Update Feature.
  • Scope lists each environment by name, then the choices All Development, All Staging and All Production. The table prints the first eight characters of the environment id in the Scope column, for example dc44a99a, and shows both dates in your browser locale.
  • The row buttons on the freeze window are Disable or Enable, and Delete. Disable keeps the window.
  • Disable timing also offers Schedule disable, and an optional Expiry restores the flag after that time.
  • The emergency dialog accepts a Reason of 5 to 500 characters.
  • A rollback restores everything stored in the version, including stage statuses. Roll back to a version taken after the Development deployment, so Development stays deployed.
  • The rollback asks the browser to confirm, with a dialog such as "Rollback feature to version 2?". The dialog names no details. Check the version you selected before you click.
  • After you switch users, reload the page if the team selector looks stale.

Troubleshooting

The freeze window shows "Starts in 15 minutes"

The default start is 15 minutes from now, so the window is not active yet. Move Starts a few minutes into the past, or wait.

The emergency dialog says "Approval required"

The banner is a preview that does not apply. The kill switch runs at once and records no request.

Next

Connect Jira so that a ticket status change drives a release in Jira setup.