v5.10.0
·
5 commits
to v5
since this release
[5.10.0] - 2022-07-05
Added:
ldtestdata.FlagBuilder.VariationForAll
andVariationForAllIndex
: new names for the deprecated methods listed below.
Changed:
- It was possible to cause analytics event data to be lost by passing
ldvalue.Raw(nil)
orldvalue.Raw(json.RawMessage(""))
as a default value parameter toJSONVariation
, or as the value of a custom user attribute, because a zero-length byte array is not a valid JSON value and would cause the event output to be malformed. The SDK now guards against this by encoding such a value asnull
in the event data. It is still possible to cause a similar problem by passing a malformed raw value as asldvalue.Raw(json.RawMessage("{{{"))
; it is the caller's responsibility not to do so, as the purpose ofjson.RawMessage
is to avoid unnecessary parsing and implies that the value is known to be syntactically valid.
Fixed:
- If a field in
Config.ApplicationInfo
is set to a string longer than 64 characters, the SDK will now log a warning and discard it, since the LaunchDarkly services cannot process such strings for these fields. - Prevented a potential data race in
LDClient.Initialized()
. (#69)
Deprecated:
ldtestdata.FlagBuilder.VariationForAllUsers
andVariationForAllUsersIndex
. These methods are being renamed because in the future, there will be other possible kinds of evaluation inputs that are not users, and these test methods will apply equally to those.