Closed irwalker closed 1 year ago
Hi @irwalker, thanks for reporting this issue! We started to work on the fix. I'll notify you when it's released.
Hi @irwalker, it turned out that the example test uses the wrong type for the local dictionary override definition. This is the correct one:
flag_overrides = LocalDictionaryFlagOverrides.new(
{ some_feature: "yes" },
OverrideBehaviour::LOCAL_ONLY,
)
So, instead of LocalDictionaryDataSource.new()
, it must be LocalDictionaryFlagOverrides.new()
.
Did you find LocalDictionaryDataSource.new()
in the docs or examples? I'm just asking because I'd also fix it there if that's the case.
Thanks for the quick response on this @z4kn4fein!
Prior to 6.0 we were using ConfigCat::LocalDictionaryFlagOverrides.new
which worked OK - the dev who implemented this in our system looked at the gem source to figure out which class to use.
Using LocalDictionaryFlagOverrides.new
appears to have solved our problem.
Note that if I use LocalDictionaryFlagOverrides.new
in our code prior to the 6.0 update it is not defined.
, [2023-06-21T16:52:36.958455 #42326] ERROR -- : #<NameError: uninitialized constant ConfigCat::LocalDictionaryFlagOverrides
ConfigCat::LocalDictionaryFlagOverrides.new(
Also, I just realised this was documented in the Changelog 🤦
I'm going to mark this as closed since the change was mentioned in the Changelog; I think it would be better if there was a breaking changes section in release docs to make this more obvious in future releases 😄.
Thanks again for the quick response
Yeah, you're right, we'll do it that way next time. Thanks for the feedback!
Describe the bug
Using the
flag_overrides
parameter on v6+ of this gem causes an error:To reproduce
Initialise a config cat client with the
flag_overrides
parameter set.Failing spec: https://github.com/configcat/ruby-sdk/pull/26
Expected behavior
This used to override local feature flags when using offline settings. E.g: