-
Notifications
You must be signed in to change notification settings - Fork 1
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
Config v6 #23
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
adams85
force-pushed
the
config-v6
branch
2 times, most recently
from
February 26, 2024 16:41
663ffdc
to
b581b1e
Compare
…c + add missing getValueDetails overload w/o defaultValue + eliminate getValue code redundancy
…tr<> param passing
…SDK bringing down the consumer's app) + add the captured exception to EvaluationDetails + add the exception message to the log + change the return type of getKeyAndValue to std::optional for consistency
adams85
force-pushed
the
config-v6
branch
19 times, most recently
from
March 2, 2024 09:36
f239575
to
571ee1c
Compare
…Client> to prevent use after free issues
adams85
commented
Apr 2, 2024
kp-cat
force-pushed
the
config-v6
branch
3 times, most recently
from
April 2, 2024 21:50
44b58e2
to
803acd5
Compare
z4kn4fein
previously approved these changes
Apr 3, 2024
z4kn4fein
approved these changes
Apr 3, 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.
Implements config v6 support.
Features/improvements:
config_v6.json
) and update config modelEvaluationDetails.matchedTargetingRule
/matchedPercentageOption
properties (rename + set combinations correctly)ConfigCatClient.getKeyAndValue
Tests:
EvaluationDetails.matchedTargetingRule
/matchedPercentageOption
properties (rename + set combinations correctly)Related improvements/fixes:
Dynamically typed languages should log a warning when default value doesn't match the setting type (see https://trello.com/c/Le6vimGu)Additional improvements:
getValueDetails
API (see breaking changes). Also, add thegetValueDetails
counterpart of thegetValue
overload that doesn't require a default value.forceRefresh
and the evaluation methods (getValue
, etc.) to stop potential unhandled exceptions thrown by the evaluation logic from bringing down the consumer's application.RefreshResult
) from theforceRefresh
method.EvaluationDetails
via the newerrorException
field. Also, expose the exception to theonError
hook callbacks.forceRefresh
fails and there is a related exception, also expose it inRefreshResult
via the newerrorException
field.Additional bugfixes:
Breaking changes:
shared_ptr
to prevent use after free issues.user
parameter of evaluation methods (getValue
& co.) from C pointer toshared_ptr
. Also, change the type of theEvaluationDetails.user
field toshared_ptr
to prevent use after free issues.ConfigCatUser.user
field fromstd::unordered_map<std::string, std::string>
tostd::unordered_map<std::string, ConfigCatUser::AttributeValue>
to allow other values thanstd::string
.EvaluationDetails
generic and change the return type ofgetValueDetails
overloads to return specializedEvaluationDetails
objects that contain a value of the same type as the default value.getValue(const std::string&, const ConfigCatUser*)
andgetKeyAndValue
fromstd::shared_ptr
tostd::optional
(for consistency and to remove unnecessary heap allocation).std::exception_ptr
to theonError
hook callback.Settings
const in the parameter of theonConfigChanged
hook callback as it is not supposed to be modified by consumers.error
field toerrorMessage
inEvaluationDetails
(and also make it optional).matchedEvaluationRule
field tomatchedTargetingRule
and thematchedEvaluationPercentageRule
field tomatchedPercentageOption
inEvaluationDetails
.EvaluationDetails.variationId
field optional.Config
and related structs/enums).ILogger.log
method.ConfigCatLogger
,ConfigEntry
andSettingResult
types from the public API.getBehavior
method to theOverrideDataSource
class.int32_t
instead ofint
for integer setting values for better portability (on most platformsint32_t
is just an alias ofint
).Requirement checklist (only if applicable)