open-feature / spec

OpenFeature specification
https://openfeature.dev
Apache License 2.0
612 stars 35 forks source link

Define Version Mismatch Behavior #76

Closed beeme1mr closed 1 year ago

beeme1mr commented 2 years ago

Problem

The global singleton used in OpenFeature provides a number of benefits. However, it may introduce some challenges in the future. For example, if a library is using an older version of OpenFeature it may not be compatible with the provider interface.

Objective

Define the expected behavior in the spec when this situation occurs.

thomaspoignant commented 1 year ago

In go-feature-flag I offer the possibility in the SDK to use a singleton or multiple instances https://docs.gofeatureflag.org/v0.27.1/configuration/#multiple-configuration-flag-files.

Offering both ways could help to use multiple versions at the same time.

beeme1mr commented 1 year ago

This is a theoretical issue at this point which is why it hasn't been a priority. However, in the future, library authors may want to include OpenFeature support in their libraries. If this happens, we run the risk of an old version of OpenFeature running that may not be compliant with the registered provider.

OpenTelemetry had a similar problem and they solved it by automatically disabling incompatible versions. You can see how they did it in node here.