-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement AWS AppConfig client service for Boolean typed feature flag #2
Merged
Conversation
This file contains 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
lavenderses
commented
May 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This was referenced May 5, 2024
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.
What
Support boolean feature in OpenFeature reuirements with AWS AppConfig
relates #1
How
As described in #1, AWS AppConfig configuration response schema is like following.
If I try to support other feature flag type such as number, string, using Attribute is required.
So, I decied following specification.
Provider spec
If Application Author created feature flag with name
feature-1
in AWS console, he have to add Attribute (this is optional in AWS AppConfig spec, but this provider implementation forces Application Author to configure it) with nameflag_value
as Application Author's desired type.(see about attribute in AWS doc.)
For example, if Application Author wants to use feature flag named
user_id_for_test
as number123
, configuration in AWS console will be following.Any other attribute except for
flag_value
will be ignored in this provider implementation.user_id_for_test
flag_value
123
And, this provider implementation expects above and response will be like....
Provider feature flag evaluation behevior
a. feature flag is enabled in AWS console. (= AWS AppConfig toggle is "On")
b.
flag_value
is exist in attribute.c.
flag_value
type is same as Application Author's expected type.reason = ERROR
anderrorCode = FLAG NOT FOUD
when flag not found in AWS AppConfig.reason = DISABLED
when this feature flag is not enabled in AWS console. (= AWS AppConfig toggle is "Off")reason = ERROR
anderrorCode = PARSE_ERROR
when (1-a) does not satisfiedreason = ERROR
anderrorCode = TYPE_MISMATCH
when (1-b) does not satisfiedThese logic is implemented in
AwsAppConfigParser
andAppConfigValueConverter
.See also OpenFeature specification doc.
https://openfeature.dev/specification/types
Notes
N/A