Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Configurably allow duplicates in FileDataSourceImpl #298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 12, 2024

  1. Configurably allow duplicates in FileDataSourceImpl

    This PR modifies the `FileDataSourceImpl` to accept an additional value in the
    options hash called `allow_duplicates`. `false` will be used if no value is
    provided which will cause this to operate exactly as it does prior to this
    change.
    
    Configuring `allow_duplicates` to be `true` will not raise an error when flag or
    segment values are loaded from multiple files and a subsequent file contains a
    key found in a previous file.
    
    The purpose of this is to allow a notion of a 'local' override during
    development. A project may have a `/config/feature_flags.yml` and a developer
    adds a flag to it for a feature they are developing. If they want to commit
    code with this feature, but don't want other developers encountering it yet,
    they will have to remember to turn the feature off prior to commiting their
    change.
    
    With this change, a project could have a `/config/feature_flags.yml` which
    contains the flag values other developers should see, and a
    `/config/feature_flags.local.yml` file, ignored by source control and not
    checked in. As a developer is working on the new feature, they can have it
    enabled in the `.local` file so they can see the feature and work with it, but
    disabled in the commited file so it does not impact other developers.
    djmorton42 committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    5ed340c View commit details
    Browse the repository at this point in the history