Comments (4)
I like the approach but it requires some tooling to manage the repositories itself and this can go beyond the scope of the project.
Or we should evolve the linter to be able to scan a folder of files.
from go-feature-flag.
@yangzhaox thanks for this idea, actually you can already provide multiple files using multiple retrievers.
You can check the doc about that here https://gofeatureflag.org/docs/configure_flag/store_your_flags#use-multiple-configuration-flag-files
Having a folder is a good idea, but I am struggling to understand how you see this.
I can see how to do that with a file retriever, but do you expect it to work with Github, Gitlab, etc ... retrievers too?
For me, the main challenge here will be how to deal if multiple files defining the same flag name, which one should be the source of truth?
Let's say we have something like that:
flags_dir/
├── flag-team-a.yaml ..................... define flag for team A (contains a flag named `flag-test`)
├── flag-team-c.yaml ..................... define flag for team B (contains a flag named `flag-test`)
├── flag-team-b.yaml ..................... define flag for team C
└── flag-team-d.yaml ..................... define flag for team D (contains a flag named `flag-test`)
Which one should we use and when?
from go-feature-flag.
@thomaspoignant what I envisioned is like this:
flags_dir/
├── team_a_dir/
| ├── CODEROWNERS
| ├── flag-1.yaml
| ├── flag-2.yaml
├── team_b_dir/
├── team_c_dir/
└── team_d_dir/
The folder flags_dir will be part of a git repo where each team should have their own dedicated sub-folder and flag yaml files. Every time a team commits a new flag yaml file, there will be a pipeline running to check / validate these yaml files and make sure they are valid GOFF rules and do not have the same flag defined in multiple teams. Finally this folder and its content will be mounted as volume to the pod/container where GOFF relay proxy is running so our new folder retriever will load all the yaml files underneath. If there is any invalid yaml file, GOFF will skip it and continue to load the rest so that one team's mistake won't affect the flags of other teams. And I don't think we need to support this in other existing retrievers like github, gitlab, s3, etc.
from go-feature-flag.
yes this idea might be a better fit for custom retriever who has multiple teams in a large dev org. And I like the idea of allowing the linter to be able to scan a folder of files.
from go-feature-flag.
Related Issues (20)
- Change the writing file mechanism
- (bug) AwsConfig ignored as of s3Retrieverv2 refactoring HOT 3
- (change) Use slog in the go module
- (feature) <PHP provider> HOT 1
- (feature) Add an option to not retrieve flag values on weekend or dev environment to reduce carbon footprint HOT 9
- 👀 Open pull request on open feature contrib repositories HOT 18
- (bug) OFREP error should contain flag key
- Did 1.26.0 release get re-tagged? HOT 2
- (bug) flaky test - Test_websocket_flag_change HOT 2
- Default value when there is no feature flags in the cache HOT 2
- K8S Relay proxy config templating
- (bug) [relay-proxy] Override configuration via env variables in `retrievers` does not work HOT 5
- (change) Allow templating in relaxyproxy.config helm chart values HOT 1
- (feature) Force call to the retrievers
- (feature) Integration with Datadog RUM
- (bug) targetingKey does not work in the query of targeting rule using OFREP HOT 6
- (doc) Describe evaluation context HOT 2
- (change) Propose updating the base image of relay proxy to Debian 12 (bookworm) HOT 2
- (feature) Github Retriever check rate limiting
- (change) Github retriever add Github response header in the error.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-feature-flag.