Skip to content

Releases: configcat/elixir-sdk

v4.0.2

08 Aug 08:57
01a6f4d
Compare
Choose a tag to compare

Support Httpoision 2

v4.0.1

04 Apr 16:07
bf9abae
Compare
Choose a tag to compare

ConfigFetcher accepts ETag in a case-insensitive manner to handle http/2 lowercase header keys.

v4.0.0

14 Feb 12:51
ae088d4
Compare
Choose a tag to compare

New features and improvements:

  • Add support for the new Config JSON v6 format: update the config model and implement new features in setting evaluation logic.
  • Overhaul setting evaluation-related logging and make it consistent across SDKs.
  • The User's custom dictionary also allows attribute values other than String values.
  • Upgrade to Elixir 1.16

Breaking changes:

  • The config JSON v5 format is no longer accepted by flag overrides. If you use this feature, you will need to convert your override JSON file(s) to the v6 format. You can do this using the config-json convert v5-to-v6 command of the ConfigCat CLI tool.
  • Rename the matched_evaluation_percentage_rule property to matched_targeting_rule and the matched_evaluation_rule property to matched_percentage_option in EvaluationDetails.
  • Raise ArgumentError "SDK Key is invalid." when the SDK key passed to ConfigCat.Client is in an invalid format (unless the client is set up to use local-only flag override behaviour).

v3.0.0

25 Sep 12:13
588a1d7
Compare
Choose a tag to compare

Breaking Changes

  • Timeouts: connect_timeout and read_timeout options renamed to connect_timeout_milliseconds and read_timeout_milliseconds to indicate the unit of measure (#80)
  • Cache: The ConfigCache behaviour has been changed to store and retrieve String.t() cache entries (was previously a map()). This matches the new generalized cache implementation that is consistent for all ConfigCat SDKs. In addition, the format of the cache keys has been changed to be consistent with the other platforms. With these changes, you can now implement your own ConfigCache implementation in persistent storage (e.g. Redis) and share the cache amongst multiple language implementations. (#89)
  • Removed get_variation_id/get_all_variation_ids: These functions have been removed in favour of the new get_value_details/get_all_value_details functions (see below). (#97)
  • Remove on_changed callback: Auto mode's on_changed callback has been removed. Use the new Hooks feature instead (see below). (#99)
  • One instance per SDK key: When using multiple ConfigCat instances, each instance must be configured with a different SDK key. You must access all of your flags and settings through a single ConfigCat instance. (#108)
  • Lazy cache policy: cache_expiry_seconds option has been renamed to cache_refresh_interval_seconds. (#110)

Added

  • Default User: You can now possible to specify a default user to use when no user is passed to the various get_* functions. You can pass the default_user option when starting ConfigCat, or you can use ConfigCat.set_default_user/1 and ConfigCat.clear_default_user/0 to change the default user at any time. By default, there is no default user. (#80)
  • Online/Offline mode: You can now take ConfigCat offline to keep it from making HTTP calls to the ConfigCat server. When offline, ConfigCat will operate using its most recent cached config. You can pass the offline option when starting ConfigCat or you can use ConfigCat.set_offline/0 and ConfigCat.set_online/0 to toggle between online and offline mode. You can query the current state with ConfigCat.offline?/0. By default, ConfigCat is online. (#81)
  • get_value_details/get_all_value_details: Adds new get_value_details and get_all_value_details functions that return EvaluationDetails structs containing information about flag evaluations, including the key and value, whether or not the default value was returned, the user, the variation, and any matched rules. See the documentation for more details. (#96, #97)
  • Hooks: The new Hooks feature allows you to supply callback functions that are called by ConfigCat when significant events occur. See the documentation for more information. (#99)
  • Logger metadata: All log messages include two additional pieces of information (when available) both in the log messages and as Logger metadata. The instance_id property matches the name property you specify when configuring multiple ConfigCat instances (defaults to Elixir.ConfigCat). The event_id property is a numeric error code that is common to all of the ConfigCat language SDKs. If you want to use the metadata properties, you'll need to configure your Logger backend to include them. (#100)
  • max_init_wait_time_seconds option: Auto mode now has a max_init_wait_time_seconds option. When ConfigCat first starts up, any calls to the get_* functions will wait for this many seconds for the initial config fetch to occur. If the fetch does not complete in time, the existing cached config (if any) will be used. Otherwise, the call will return the default value. Default: 5 seconds. (#102)
  • Module-based multiple instances: If you need to run multiple instances of ConfigCat, you can now use new module-based approach. See the documentation for more information. (#104)

Changed

  • Use latest fetch time and ETag: The new generalized cache format (see above) now includes the time at which the config was last fetched as well as the cache-control ETag. ConfigCat now uses that fetch time when determining whether or not to fetch in Lazy mode and when to start polling in Auto mode and uses the last-received ETag when fetching. When using the default ConfigCache implementation, this behaviour is the same as it always was. But if you're using a persistent ConfigCache implementation, this means that ConfigCat can avoid re-fetching a new config when it starts up if the existing cached config is new enough and on the first fetch, the server can send back a 304 response if appropriate. (#90, #94)
  • force_refresh return value: ConfigCat.force_refresh/0 now returns {:error, String.t()} when it fails rather than leaking errors from HTTPoison. The typespec for that function has been tightened up accordingly. (#101)
  • Reduced server round-trips: When multiple processes attempt to fetch the config while a fetch is already in progress, all of the requests will be satisfied by the result of the in-progress fetch. Previously, each request would be serialized and result in a new request to the server. (#103)
  • Consistent log messages: Log messages are now consistent with the other SDKs, including the new event_id codes described above. (#105)
  • Consolidated evaluation log: When evaluating a flag, a number of debug-level messages are logged. These messages are now collected together into a single log entry. (#107)

Fixed

  • Last fetch time: When the server returns a 304 error, the last fetch time is now updated so that the next fetch request is delayed until the appropriate time. (#101)
  • Errors in local_only mode: When using the :local_only flag overrides setting, some of the ConfigCat calls would fail with confusing error message. These calls are now handled cleanly, returning an appropriate result. (#105)

v2.0.1

27 Jul 20:54
d7f0d54
Compare
Choose a tag to compare

Fix:

  • The evaluation logs were moved back from info level to debug level.

v2.0.0

15 Jul 10:41
bf3aefc
Compare
Choose a tag to compare
  • connect_timeout and read_timeout options were added to be able to configure HTTP timeout parameters.
  • A get_all_values() function was added that evaluates all flags & settings in a map.
  • New flag_overrides parameter to support the reading of flags & settings from a file or a map.
  • The evaluation logs were moved from debug level to info level.

v1.0.2

11 May 04:15
Compare
Choose a tag to compare

Changes

  • Updated dependencies for Elixir 1.11 compatibility. (#65)

v1.0.1

25 Jan 23:38
0d78515
Compare
Choose a tag to compare

Fixed

v1.0.0

03 Nov 15:14
Compare
Choose a tag to compare

Introducing a fully-fledged ConfigCat SDK for Elixir. <3

Special Thanks

Drover 🚗

For allowing me to work on this project and contribute directly to the community/Elixir's ecosystem.

Randy Coulman 🎖️

@randycoulman thanks a lot for joining me on this initiative. I've added you separately here because I know you've worked completely outside of your working hours on this project with me and making a fully-fledged Elixir SDK came 100% from your personal efforts.

InfluxData

Thanks again to @randycoulman and his team at InfluxData which gave us an initial version of this SDK so we didn't need to start entirely from scratch. Friends from InfluxData ❤️ :

ConfigCat Team

@laliconfigcat and his team for embracing the challenge with us, providing all the technical guidance required to make it happen.