Skip to content

[FEATURE] Graceful defaulting to provided code default #1856

@toddbaert

Description

@toddbaert

Requirements

Previously, we worked on #1646, which was a step in the right direction. In summary, we changed the minimum flag definition to allow for the omission of the defaultVariant:

    "simple-string": {
      "state": "ENABLED",
      "variants": {
        "greeting": "Hello, World!",
        "farewell": "Goodbye, World!"
      },
      "defaultVariant": null // this can now be set to null, or omitted completely instead of a variant; indicating that the code default should be used.
    },

However, this was implemented in a stop-gap manner. In order to facilitate the code-defaulting behavior as simply as possible, our in-process providers and flagd's remote evaluation protocols behave as if such flags do not exist (an error, which triggers the code default). This is not ideal since it pollutes telemetry with errors which are not actually representative of unexpected behavior, and hurts performance by causing stack traces to be produced internally in many cases. Moreover it simply confuses developers when they use detailed resolution APIs.

We need to improve this. This will involve:

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions