Skip to content

defaultFlags versus overrideFlags #2022

@donp-usbank

Description

@donp-usbank

Is your feature request related to a problem? Please describe.
As a developer develping a feature behind a flag, during the development (pre-release) phase I'd like an easy way to toggle the state of a flag for testing, without the requirement to change the state of the flag in the Feature Flag service (which may affect other developers or may require a workflow).

Describe the solution you'd like
We'd like a way to provide an object with flag states that will override any cached/retrieved flags. This is very similar to how defaultFlags works, but these "override` flags should take precedence.

Describe alternatives you've considered
I read through the documentation about defaultFlags, which I initially might solve this issue. But it looks like the intention with this is to provide a set of flags to be used only when there are no retreived/cached flag values. For the use case I described, we'd want to explicitly override the retreived/cached flags even when they're present, in order to force a flag to a specific state for testing. I can see in the code here that when the cached flags are present they would overwrite any defaultFlags:

...defaultFlags,

Additional context
Add any other context or screenshots about the feature request here.

Is there any way to achieve this in the current implementation of FlopFlip?
Or would something like this require us to create a custom adapterArg and then use this in our execute function to manually override the cached flags?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions