Implement 'open feature' feature flagging#1371
Merged
Conversation
c5046f1 to
8f5c55d
Compare
steventux
approved these changes
Apr 27, 2026
Contributor
steventux
left a comment
There was a problem hiding this comment.
Looks a lot better than env vars.
Made a small suggestion for readability, not a blocker.
3fc11ee to
ceba293
Compare
ceba293 to
000f3ad
Compare
We're going to use openfeature format feature flags.
* Add application level environment variable to indicate the deployed environment that the running instance is running on. This can be used to predicate the environment banner, flags files etc
* Use InMemoryStore * Read yaml files for each env flags.<DEPLOYED_TO>.yaml
* Replace the existing env var based flag with a shiny new openfeature one This is a basic test implementation that will apply accross all environments currently
* Documentation for the yml openfeature implementation
* Add a COPY line to the docker file to build the flags files into the image. * Set to 444 to write protect the files (flagged by SonarQube)
000f3ad to
8531d32
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
We currently feature flag using environment variables. As we expand our private beta we will need to be able to enable and disable functionality in a more complex way. We will also need to assure enabling features as we build them which will require a degree of accountability for enabling features that is difficult to support with environment variable based flags.
OpenFeature gives us a consistent pluggable interface that allows a simple implementation (this one) to replace the existing level of functionality we have and will allow us to expand the backend flag management to use a custom backend or a service e.g https://www.getunleash.io or other open feature compliant SaaS. (there are discussions afoot to this end in the wider programme.
This PR:
Jira link
Review notes
I haven't replaced everything in this PR. Some of the other 'flags' might be simpler to leave as env vars as they're not really features e.g. BASIC_AUTH
The DEPLOYED_TO variable could be used for other things, replacing the DJANGO_ENV which has been a bit contentious. That hasn't been done here either.
Review checklist
/api/v1/), confirm whether it is a breaking change — if so, a new major version (/api/v2/) is required (see ADR-006)