Coder Social home page Coder Social logo

Comments (4)

thomaspoignant avatar thomaspoignant commented on June 2, 2024 1

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.

thomaspoignant avatar thomaspoignant commented on June 2, 2024

@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.

yangzhaox avatar yangzhaox commented on June 2, 2024

@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.

yangzhaox avatar yangzhaox commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.