PowerShell-FeatureFlags
PowerShell-FeatureFlags copied to clipboard
Clarify reasoning behind environment variables in README.md
Deterministic, cheap evaluation of all feature flags; ability to use feature flags in batch scripts in a cheap way.
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?
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!
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: @.***>
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.
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!
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: @.***>
Happy to help! And this discussion to me really means that we need to update the docs ASAP. Thanks for your questions!