PowerShell-FeatureFlags icon indicating copy to clipboard operation
PowerShell-FeatureFlags copied to clipboard

Clarify reasoning behind environment variables in README.md

Open lupino3 opened this issue 6 years ago • 7 comments

Deterministic, cheap evaluation of all feature flags; ability to use feature flags in batch scripts in a cheap way.

lupino3 avatar May 29 '19 19:05 lupino3

The "environmentVariables" member in the json file seems to be only partially implemented, though the readme file suggests it is "done" ... will this receive more development?

tomrowton-alk avatar Apr 27 '23 14:04 tomrowton-alk

Hi @tomrowton-alk, the feature is implemented but not very well documented. We do use it in production.

Is there something that you are missing from this feature?

Thanks!

lupino3 avatar Apr 28 '23 12:04 lupino3

What I thought it did was test for a given environment variable to have the given value, but that does not seem to work...

Am I misunderstanding how it is intended to function?

Thank you!

On Fri, Apr 28, 2023 at 7:54 AM Andrea Spadaccini @.***> wrote:

Hi @tomrowton-alk https://github.com/tomrowton-alk, the feature is implemented but not very well documented. We do use it in production.

Is there something that you are missing from this feature?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerShell-FeatureFlags/issues/3#issuecomment-1527520724, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYXVGTUERN2RRSSVQBFC7VTXDO4XLANCNFSM4HQRSVCA . You are receiving this because you were mentioned.Message ID: @.***>

tomrowton-alk avatar Apr 28 '23 14:04 tomrowton-alk

To be clearer, I thought that Test-FeatureFlag would take the environment variable items into account when returning True/False... my testing and rereading the code show that doesn't and can't happen with the current code.

tomrowton-alk avatar Apr 28 '23 15:04 tomrowton-alk

The documentation is definitely unclear on that. The goal of the environment variables support is the opposite: when some feature flags are enabled, you can create an environment configuration file with the Out-FeaturesEnvConfig cmdlet, containing only the environment variable definition matching the enabled feature flags.

The goal of this feature is to add easy feature flag support to batch scripts that cannot easily directly invoke Test-FeatureFlag, but can easily depend on environment variables.

Hope this makes things clearer!

lupino3 avatar Apr 30 '23 09:04 lupino3

Oh, ok, thanks, that does make sense.

I really appreciate your quick and informative replies!

On Sun, Apr 30, 2023 at 4:24 AM Andrea Spadaccini @.***> wrote:

The documentation is definitely unclear on that. The goal of the environment variables support is the opposite: when some feature flags are enabled, you can create an environment configuration file with the Out-FeaturesEnvConfig cmdlet, containing only the environment variable definition matching the enabled feature flags.

The goal of this feature is to add easy feature flag support to batch scripts that cannot easily directly invoke Test-FeatureFlag, but can easily depend on environment variables.

Hope this makes things clearer!

— Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerShell-FeatureFlags/issues/3#issuecomment-1528979581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYXVGTUHPQTDHFSVMX7CBDLXDYVWNANCNFSM4HQRSVCA . You are receiving this because you were mentioned.Message ID: @.***>

tomrowton-alk avatar May 02 '23 13:05 tomrowton-alk

Happy to help! And this discussion to me really means that we need to update the docs ASAP. Thanks for your questions!

lupino3 avatar May 02 '23 13:05 lupino3