Skip to content

[FEATURE] Detect stale flags #400

@Kavindu-Dodan

Description

@Kavindu-Dodan

Requirements

Background

Consider this conversation [1]. Flagd can operate with multiple sync providers. These sync providers push flag configurations which get stored in the internal in-memory store [2].

There could be occasions where individual providers shutdown, and disconnect for various reasons. For example, for an HTTP flag source, the source can undergo maintenance causing downtime. When this happens, flags stored internally could go stale

Proposal

As highlighted by the conversation [1], it could be beneficial to mark stored flag configurations to be stale and set state Reason.STALE for evaluations. This makes sure flag configurations served by flagd are consistent with their sources.

Update
Given that we do not have a stale sate in existing evaluation reasons [3], a good alternative is to utilize CACHED state

[1] - #297 (comment)
[2] - https://github.com/open-feature/flagd/tree/main/pkg/store
[3] - https://docs.openfeature.dev/docs/specification/types#resolution-details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageThis issue needs to be investigated by a maintainerenhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions