feature-flags
Installation
SKILL.md
Feature Flags (FlagPole)
New features should be gated behind a feature flag.
-
Register the flag in
src/sentry/features/temporary.py:manager.add("organizations:my-feature", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)Use
api_expose=Trueif the frontend needs to check the flag. UseProjectFeatureand aprojects:prefix for project-scoped flags. -
Python check:
if features.has("organizations:my-feature", organization, actor=user): -
Frontend check (requires
api_expose=True):