Technology1 min read

Catch missing feature flags before they reach production

By · Published by Everything Blog

In short

Uncreated feature flags pose a significant operational risk because applications may automatically revert to default states that accidentally expose unreleased features. To counter this, Vercel introduced the Flag Definitions Present Deployment Check to halt releases as soon as a deployment is ready. The safeguard inspects the Flags SDK discovery endpoint and requires teams to configure the FLAGS_SECRET environment variable. When triggered, the check blocks the release and provides developers with an exact list of missing flags to create before redeploying.

Key points

  • Missing flag definitions can silently revert an application to default values and acciden…: Missing flag definitions can silently revert an application to default values and accidentally activate hidden features.
  • Teams must configure the SDK discovery endpoint and secret key to enforce deployment vali…: Teams must configure the SDK discovery endpoint and secret key to enforce deployment validation.
  • The safeguard is currently available across all Vercel plans via the project Build and De…: The safeguard is currently available across all Vercel plans via the project Build and Deployment settings.

Sources checked by our analysis pipeline: 1

Vercel Flags can now block a deployment from reaching production if you’ve declared a flag in code but haven’t created it in your project. Without that definition, your app can silently fall back to the flag’s default value, even if that turns on a feature you meant to keep off.

The Flag Definitions Present Deployment Check runs when a deployment is ready. If any flags are missing, the check fails and lists them in the results, where you can create each one before redeploying.

The check reads your Flags SDK discovery endpoint and requires FLAGS_SECRET

to be set in your project’s environment.

To turn on blocking, teams on all plans can enable the check in their project’s Build and Deployment settings and mark it as required. See the Deployment Checks documentation for setup details.

Technology