Rocket Learners

Help

Feature flags

A feature flag is a switch for a feature that is still being built or tried out. For each environment, such as Local or Production, you choose whether the flag is on and who it is on for.

To open the list of flags, select Platform on the platform console, then select Feature Flags.

Each deployment keeps its own flags. A change you make saves only in the deployment you’re on.

Add a flag

  1. Under Add a flag, enter a name in Name.
  2. Enter a short note in Description.
  3. Select Add Flag.

You see “Flag added. Switch it on in an environment to start.”

A name uses lower-case letters, numbers, dots and dashes. It’s what the code asks for, so it can’t be changed later.

Switch a flag on

  1. Select a flag’s name in the list.
  2. Find the environment’s section.
  3. Select its OFF button.

You see “Switched on, for everyone. Edit the strategy to narrow it.” The flag is now on for everyone in that environment.

In a production environment, you’re asked to confirm first. Select Switch On.

To switch it off, select ON. You see “Switched off.”

Choose who a flag is on for

A strategy says who the flag is on for. A flag can have several strategies in one environment. Anyone that any one strategy allows gets the flag.

  1. Open the flag and find the environment’s section.
  2. Select Add Strategy.
  3. Under Who it is on for, choose Everyone or A percentage.
  4. For a percentage, enter a number from 0 to 100 in Percentage.
  5. Choose what it counts in Of: people, organisations, or requests at random.
  6. Select Save.

Someone who is signed out, or isn’t in an organisation, doesn’t get a flag set for people or organisations.

Add a condition

A condition narrows a strategy. When a strategy has several, every one must hold.

  1. In the strategy’s window, select Add Condition.
  2. Choose Organisation, Country, Person or Date and time from Field.
  3. Choose a rule from Rule.
  4. Enter what to match in Values, separated by commas. For Country, use two-letter codes such as NZ, AU.
  5. Select Save.

Change, pause or delete a strategy

On the strategy’s row:

  • Select Edit to change it.
  • Select Pause to stop it without losing it. The row shows Paused. Select Resume to bring it back.
  • Select Delete, then Delete again, to remove it.

A flag that is on but has no live strategy is on for nobody: “Nobody gets this flag here until a strategy is added or resumed.”

Archive a flag

  1. Open the flag.
  2. Select Archive Flag.
  3. Select Archive to confirm.

The flag is off in every environment, and its settings are kept. To see archived flags, select Show archived flags on the list. Select Restore Flag on a flag to bring it back.

Add or edit an environment

Select Environments on the list of flags. Each environment has a Display name, an Order and a Production checkbox. Select Save to keep a change.

To add one, fill in Name, Display name and Production under Add an environment, then select Add Environment. The name must match the deployment’s own, and can’t be changed later.

Select Delete to remove an environment no flag uses. You can’t delete a production environment or the one you’re on.

Who can do this

Only Global Admins can use these pages.

If something goes wrong

“A flag with that name already exists. Archived flags count too.” Choose another name.

“Check the strategy: the percentage is 0 to 100, every condition needs a value, and dates need a date and time.” Fix the strategy, then select Save.

“That environment already has 20 strategies, the most allowed.” Delete or edit one you don’t need.

“A flag is still switched or has a strategy in this environment. Remove those first.” The environment is in use. Switch the flag off and delete its strategies first.

Confirm Action

Are you sure you want to proceed?