Skip to content

[FEATURE] Support ability to select on null flagSetId #1708

@toddbaert

Description

@toddbaert

With our recent changes in #1702, we can now use the selector to select flags based on their flagSetId - however, we can't explicitly select on flags WITHOUT a flagSetId. We need to:

  • decide on a way to express this in the selector/header (ie: flagSetId= or flagSetId=null or flagSetId=default) or something like this. If we use null or default here, we must consider these special cases, so I recommend flagSetId= to express selecting the null set.
  • after deciding on the above, actually implement selection on the null flagSetId (as currently implemented, this simply mean querying with the nilFlagSetId constant which is internally assigned to all flags without a flagSetId)
  • optionally, find an alternative way (besides using the nilFlagSetId mentioned above) to index flags without flagSetIds.

I think we discussed the problem when introducing the flag lists. Imagine there are two flags {key: feature, set: A} and {key: feature, set: null}, when an in-process provider constructs the selector, there's no way for it to get a valid flag map with {key: feature, set: null} in the result. It will be a problem for adopting flag sets - basically without the ability to select on the null set, users have to create a "default" set for all existing flags if they need to add a flag with the same key under another set.

Originally posted by @tangenti in #1702 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions