Skip to main content

Feature flags

Feature flags are a software development and delivery technique that allows software teams to enable and disable parts of a codebase at the flip of a switch. Feature flags enable a team to deliver new features to use rapidly but safely. Feature flags also allow you to decouple code deployments from feature releases. You can make code changes in production while hiding those changes from users.

Trunk Based Development

Trunk Based Development is a branching model in which developers create short-lived feature branches and merge back into the “trunk” branch, often called as the master/main branch. It reduces the complexity of merging events and keeps code current by having fewer development lines and by doing small and frequent merges. Trunk based Development and Feature Flags together can be used for continuous delivery, delivering the features faster to market. Trunk Based Development uses Feature Flags as a mechanism to manage new feature releases. Feature flags allow developers to deploy incomplete features to production without releasing them to end-users.

Trunk based development with feature flags

End to end Process:

  1. Developer creates and commits short lived feature branch with Feature flag off.
  2. Implements feature through iterations of small feature lifecycle.
  3. Code is continuously released.
  4. Retire feature toggle.

Accessing LaunchDarkly

Developers automatically get access by being part of ‘DTS CFT Developers’ or ‘DTS SDS Developers’, non-developers can get access with the ‘DTS LaunchDarkly’ group. see onboarding process to request access. You will need to login from myapps.microsoft.com.

After you’ve logged in once you will be able to login from app.launchdarkly.com.

Documentation

Documentation can be accessed directly from the LaunchDarkly website. Their blog contains good information.

Creating a new project

See hmcts/launchdarkly-terraform for instructions on how to setup your new project.

Environments

We currently provide ‘Test’ and ‘Production’ environments by default within Launch Darkly. Flags are generally set to the same value in both ‘Production’ and the ‘Test’ environment, flag targeting is used to control rollout of flags to users across environments.

If your team does require additional environments, you can do this by updating your teams terraform.tfvars. It is not recommended to do this as targeting rules should be simpler to manage and ensure consistency across environments.

This page was last reviewed on 15 August 2024. It needs to be reviewed again on 15 February 2025 by the page owner platops-build-notices .
This page was set to be reviewed before 15 February 2025 by the page owner platops-build-notices. This might mean the content is out of date.