Skip to content

Releases: launchdarkly/haskell-server-sdk

4.0.0

21 Feb 22:45
Compare
Choose a tag to compare

[4.0.0] - 2023-02-21

The latest version of this SDK supports LaunchDarkly's new custom contexts feature. Contexts are an evolution of a previously-existing concept, "users." Contexts let you create targeting rules for feature flags based on a variety of different information, including attributes pertaining to users, organizations, devices, and more. You can even combine contexts to create "multi-contexts."

This feature is only available to members of LaunchDarkly's Early Access Program (EAP). If you're in the EAP, you can use contexts by updating your SDK to the latest version and, if applicable, updating your Relay Proxy. Outdated SDK versions do not support contexts, and will cause unpredictable flag evaluation behavior.

If you are not in the EAP, only use single contexts of kind "user", or continue to use the user type if available. If you try to create contexts, the context will be sent to LaunchDarkly, but any data not related to the user object will be ignored.

For detailed information about this version, please refer to the list below. For information on how to upgrade from the previous version, please read the migration guide.

Added:

  • The type Context from the LaunchDarkly.Server.Context module defines the new context model.
  • All SDK methods that took a hash representing the user now accept an LDContext.
  • Added support for Secure Mode.

Changed (breaking changes from 3.x):

  • The secondary attribute which existed in the user hash is no longer a supported feature. If you set an attribute with that name in Context, it will simply be a custom attribute like any other.
  • Analytics event data now uses a new JSON schema due to differences between the context model and the old user model.

Changed (requirements/dependencies/build):

  • The minimum supported Stackage resolver is LTS 16.31.

Changed (behavioral changes):

  • The default polling URL has changed from https://app.launchdarkly.com to https://sdk.launchdarkly.com.
  • Several optimizations within the flag evaluation logic have improved the performance of evaluations. For instance, target lists are now stored internally as sets for faster matching.

Removed:

  • Removed the User type and all associated functions from the LaunchDarkly.Server.User module.
  • Removed support for the secondary meta-attribute in the user hash.
  • The alias method no longer exists because alias events are not needed in the new context model.
  • The configSetInlineUsersInEvents configuration option no longer exists because it is not relevant in the new context model.
  • Removed all types and options that were deprecated as of the most recent 3.x release.
  • The old Redis store integration has been removed from this repository and published to its own separate package. You can learn more by reviewing the Haskell redis docs or reviewing the published package on Hackage.

Deprecated:

The following methods in TestData have been deprecated and replaced with new context-aware options.

  • variationForAllUsers was replaced with variationForAll
  • valueForAllUsers was replaced with valueForAll
  • variationForUser was replaced with variationForKey
  • ifMatch was replaced with ifMatchContext
  • ifNotMatch was replaced with ifNotMatchContext
  • andMatch was replaced with andMatchContext
  • andNotMatch was replaced with andNotMatchContext

The config method configSetUserKeyLRUCapacity has been deprecated and replaced with configSetContextKeyLRUCapacity.

3.1.1

17 Feb 21:13
Compare
Choose a tag to compare

[3.1.1] - 2023-02-17

Fixed:

  • The polling thread will be shutdown if the LaunchDarkly polling API returns an unrecoverable response code.
  • Updated dependency versions in the Redis store package to mirror the SDK requirements.

3.1.0

27 Jan 20:12
Compare
Choose a tag to compare

[3.1.0] - 2023-01-27

Added:

  • New ApplicationInfo type, for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.

3.0.4

09 Jan 20:29
Compare
Choose a tag to compare

[3.0.4] - 2023-01-09

Changed:

  • Expanded upper version to allow aeson-2.1. (Thanks, vrom911)
  • Expanded upper version to allow hashtables-1.3. (Thanks, vrom911)
  • Expanded upper version to allow mtl-2.3. (Thanks, vrom911)
  • Expanded upper version to allow text-2.0. (Thanks, vrom911)
  • Expanded upper version to allow time-1.12. (Thanks, vrom911)

3.0.3

08 Nov 21:07
Compare
Choose a tag to compare

[3.0.3] - 2022-11-08

Added:

3.0.2

20 Sep 20:56
Compare
Choose a tag to compare

[3.0.2] - 2022-09-20

Changed:

  • Expanded upper version to allow lens 5.1. (Thanks, bmillwood!)

3.0.1

01 Jul 20:31
Compare
Choose a tag to compare

[3.0.1] - 2022-07-01

Fixed:

  • Fixed Aeson 2.0 compatibility layer.

3.0.0

27 Jun 19:14
Compare
Choose a tag to compare

[3.0.0] - 2022-06-27

Added:

  • Add flag support for the client side availability property, as well
    as the older the ability to decode from the older clientSide format.
  • The new allFlagsState function should be used instead of allFlags if you are passing flag data to the front end for use with the JavaScript SDK. It preserves some flag metadata that the front end requires in order to send analytics events correctly. Versions 2.5.0 and above of the JavaScript SDK are able to use this metadata, but the output of allFlagsState will still work with older versions.
  • It is now possible to inject feature flags into the client from local JSON files, replacing the normal LaunchDarkly connection. This would typically be for testing purposes. See LaunchDarkly.Server.Integrations.FileData.
  • LaunchDarkly.Server.Integrations.TestData is another new way to inject feature flag data programmatically into the SDK for testing—either with fixed values for each flag, or with targets and/or rules that can return different values for different users. Unlike FileData, this mechanism does not use any external resources, only the data that your test code has provided.

Changed:

  • CI builds now include a cross-platform test suite implemented in https://github.com/launchdarkly/sdk-test-harness. This covers many test cases that are also implemented in unit tests, but may be extended in the future to ensure consistent behavior across SDKs in other areas.
  • The SDK will track the last known server time as specified in the Date header when sending events. This value, along with the current system time, will be used to determine if debug event should still be sent.
  • VariationIndex has been changed from Natural to Integer.

Fixed:

  • When evaluating against a user attribute, if the attribute is null, it should always be treated as a non-match.

2.2.0

17 Jun 23:11
Compare
Choose a tag to compare

[2.2.0] - 2021-06-17

Added:

  • The SDK now supports the ability to control the proportion of traffic allocation to an experiment. This works in conjunction with a new platform feature now available to early access customers.

2.1.1

05 Mar 20:30
Compare
Choose a tag to compare

[2.1.1] - 2021-03-05

Changed:

  • Updated dependency ranges. Thanks @dbaynard !