Add feature flag reads to the client - #4
Merged
Merged
Conversation
Two flags decide whether the rest of this library behaves the way its documentation says, and reaching them meant fetching /api/v2/features and parsing it by hand. Features returns the set keyed by flag key, FeatureEnabled answers for one. The reason this is worth an API and not a note in the README: opengraph_extension_management governs more than the extensions endpoint. GetShortestPath branches on it at pathfinding.go:156 in v9.5.1, and with the flag off the server answers from the built-in AD and Azure kinds alone, so a path across the edges of an installed schema comes back as 404 path not found. A correct graph and a switched off feature look identical from the outside. An unknown key is an error rather than false, because false is exactly what a disabled flag answers. Nothing is cached, since a flag can be toggled while a collector is running.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two flags decide whether the rest of this library behaves the way its
documentation says, and reaching them meant fetching /api/v2/features and
parsing it by hand. Features returns the set keyed by flag key, FeatureEnabled
answers for one.
The reason this is worth an API and not a note in the README:
opengraph_extension_management governs more than the extensions endpoint.
GetShortestPath branches on it at pathfinding.go:156 in v9.5.1, and with the
flag off the server answers from the built-in AD and Azure kinds alone, so a
path across the edges of an installed schema comes back as 404 path not found.
A correct graph and a switched off feature look identical from the outside.
An unknown key is an error rather than false, because false is exactly what a
disabled flag answers. Nothing is cached, since a flag can be toggled while a
collector is running.