-
Notifications
You must be signed in to change notification settings - Fork 9
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
prepare 4.0.0 release #53
Merged
Merged
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
* adding .gitignore * re-ordering items * fix typos
[ch58083] add close [ch58076] make connection timeout configuration [ch58072] add offline mode [ch58435] make event sending configurable
Linting and some refactoring of streaming code.
The retry logic, as originally written, was not taking into account several situations, as evidenced by the large number of suppression entries we had for the SDK test harness. This commit re-writes the retry logic to bring the behavior more inline with other SDKs and eliminate those suppress lines. In order to fully support the retry logic, this commit also introduces support for the initialRetryDelay configuration option, which allows customers to specify the base value used when determining how long to wait before retrying.
While there isn't a formatter rule to enforce a specific structure on the comments, I did want to try and get them at least consistent to some degree. This commit updates the comments in two ways: 1. Wrap the comments at 79 characters 2. If a haddock doc requires more than one line, start the `-- |` marker on its own line.
This commit introduces multiple changes: - It removes the wrapper types we historically had around Config and Client. AFAICT, these are redundant and pointless. - It moves from context functions into an internal module. This allows me to remove 5 functions from the main Context module export since we don't actually want this to be a part of the public API. - Updates the main Server module to take advantage of full module re-exports since that is all we are doing. This prevents us from having to update export lists in two places. - Removes the now defunct user module.
When checking if a value is contained within the target values, it is faster to consult a hashset than a simple list. Since this is an operation that could occur quite frequently over a potentially long list, this minor change may have much larger affects on performance overall.
When we bumped the version numbers for the v3 release, we didn't bump the corresponding versions in the redis store. We didn't catch this because we don't try to build the redis package in CI, and we certainly don't try to build it against every supported Stackage resolver. For now, I've taken the simplest solution to get some tests confirming the behavior. Once I merge this forward in the v4 branch, I will look at simplifying a lot of the redundancy that exists in our unit tests.
Persistent store implementations are supposed to be external to the SDK. Our persistent store spec provides a mechanism for handling this via ItemDescriptors and SerializedItemDescriptors. Where possible, I have attempted to mimic this setup. Once this has been merged in, I will be removing the entire redis implementation into a separate package, removing all of the code from this SDK.
This merge pulls in the changes to stop the polling thread on an unrecoverable error. It also uses that functionality to remove some redundancy in the other networking modules.
The Haskell SDK has been calling the namespace for flags "flags", which makes sense. However, the other SDKs are looking for a namespace of "features", so we need to be consistent.
We are no longer going to support the stack-lts-14 and stack-lts-15 resolvers. The new minimum is LTS-16.33, which targets the GHC v8.8.4. Most packages only see a patch update, a few have some feature updates. generic-lens is the biggest change, jumping a full major version. However, this will allow us to drop support for lens in a future commit, as requested [in a previous pr][1]. [1]: #34
Publication of our SDK to Hackage has been a manual process for quite some time. This commit introduces support for HUP, a tool that will upload the final package and documentation directly to Hackage as part of our release process.
While working on this, I also noticed I failed to align the contract test dependencies with the main SDKs. That has been fixed. I also renamed the STACKOPS parameter to STACKOPTS, which I feel makes more sense.
kinyoklion
approved these changes
Feb 21, 2023
philderbeast
added a commit
to space-vacuum/launchdarkly-haskell-server-sdk
that referenced
this pull request
Mar 28, 2023
* initial implementation * [ch57654] add circleci config (launchdarkly#3) * [ch57656] cleanup dependencies (launchdarkly#2) * [ch57662] Add repo templates (launchdarkly#5) * [ch57657] Add setters for User and Config (launchdarkly#4) * [ch57663] Only expose public modules in package * [ch57666] Add Haddock (launchdarkly#7) * log on authentication failure (launchdarkly#8) * [ch57685] cleanup package (launchdarkly#9) * [ch57695] metric event logic (launchdarkly#10) * [ch58006] Hide typeclass instances with newtype public API (launchdarkly#11) * fix contributor guide wrong link (launchdarkly#12) * fix minor title-casing inconsistencies (launchdarkly#13) * git ignore + re-ordering lists (launchdarkly#14) * adding .gitignore * re-ordering items * fix typos * [ch58315] Add OSX CI (launchdarkly#15) * updated build instructions (launchdarkly#16) * [tickets listed in body] Add misc configuration and close. (launchdarkly#17) [ch58083] add close [ch58076] make connection timeout configuration [ch58072] add offline mode [ch58435] make event sending configurable * set version string to 0.1.0 (launchdarkly#18) * add beta warning * [ch58816] Fix user agent format, prepare release * [ch59631] add haskell sdk to releaser (launchdarkly#20) * [ch63561] Store V2 Interface (launchdarkly#21) * [ch63772] Mock store interface tests (launchdarkly#22) * [ch58074] Redis store implementation (launchdarkly#23) * Linting and some refactoring of streaming code. * [ch64438] dont send empty event payloads * [ch43307] use last bucket as fallback * Increased test coverage (launchdarkly#28) * Custom serialization instances when using custom deserialization (launchdarkly#29) * [ch64640] Add support for Ldd (launchdarkly#30) * [ch65827] payload uuid and event send retry (launchdarkly#32) * [ch66643] strict fields * [ch67127] minimal version constraints (launchdarkly#34) * [ch67145] update master export list * [ch67148] Some doc typos (launchdarkly#36) * [ch67154] Remove beta warning * [ch67570] actually use store initialization status (launchdarkly#38) * [ch69091] Add SSE timeout, fix streaming CPU burn (launchdarkly#39) * [ch70425] standardize streaming behavior (launchdarkly#41) * [ch73995] remove null user key support (launchdarkly#42) * [ch76243] update sdk range for redis * [ch92127] remove sel field from flag model * Removed the guides link * [ch99749] add alias and update event logic (launchdarkly#45) * merge traffic allocation changes * Updates docs URLs (launchdarkly#47) * Use non-deprecated CircleCI Xcode image. (launchdarkly#48) * Path is optional; should default to / (launchdarkly#53) * Create index event when calling track (launchdarkly#51) * Conditionally index users when processing eval events (launchdarkly#56) * Trim trailing slashes from URIs (launchdarkly#52) * Add event summary regardless of capacity (launchdarkly#55) * Do not emit identify event if key is empty; notice user otherwise (launchdarkly#50) If the provided user key is empty, we do not want to emit an identify event. We will log a warning message to the customer instead. If a valid user has been provided though, not only should we emit the event, but also we should add that user to the LRU cache so that we don't unnecessarily generate future index events. * Support for both aeson < 2 and aeson > 2 * Unknown flags should return provided default value (launchdarkly#57) * Exclude various fields from JSON payload if not required (launchdarkly#54) * Adds links to Relay Proxy docs * Add support for client side availability (launchdarkly#61) * Add new all flags state method (launchdarkly#62) * Add initial structure for SDK test harness (launchdarkly#63) * Fix test if user attribute is null (launchdarkly#65) * Fix negative index evaluation (launchdarkly#66) * Track last known server time (launchdarkly#67) * Introduce File and Test Data Sources (launchdarkly#68) * Fix aeson 2.0 compatibility (launchdarkly#69) A user submitted contribution was merged to support Aeson 2.0. While all of our tests were passing, this was because we lacked a test environment that actually used 2.0 This commit addresses the remaining compatibility changes and introduces a later test environment to ensure we are actually building with Aeson 2.0 support. * Bump resource class for linux builds (launchdarkly#70) * Add cabal file and ignore dist-newstyle. (launchdarkly#44) * Add CI support for cabal and hlint (launchdarkly#71) A customer recently provided two pull requests -- one to add the generated cabal file to our repository and the second to update our hlint configuration file. While great, these change aren't sufficient because - We have no way to enforce the generated cabal file is up to date - We aren't running hlint during the CI process This commit introduces CI behaviors to resolve both of these issues. * Update releaser config to use docker instead of circleci (launchdarkly#72) * Update releaser configuration (launchdarkly#73) In a previous commit I updated the releaser config. However, I failed to adjust two additional bits of configuration. - The repository now includes a cabal file which contains version information. We will now update that. - docs need to be copied into the appropriate releaser directory for the GH pages branch to be updated correctly. * Speed up Haskell builds for OSX (launchdarkly#74) The OSX builds have been taking a very long time, despite doing less work than the Linux equivalents. A little digging has uncovered incorrect CI caching for the OSX builds. This small change has taken the build from approximately 45m to 9m per OSX run. * Expand upper versions on select packages (launchdarkly#77) A customer contributed this fix. I made some minor tweaks, but testing seems to indicate everything works as expected. Co-authored-by: Veronika Romashkina <vrom911@gmail.com> * Fix releaser build Co-authored-by: hroederld <hroeder@launchdarkly.com> Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com> Co-authored-by: Gavin Whelan <gwhelan@launchdarkly.com> Co-authored-by: LaunchDarklyCI <dev@launchdarkly.com> Co-authored-by: ember-stevens <79482775+ember-stevens@users.noreply.github.com> Co-authored-by: Matthew M. Keeler <keelerm84@gmail.com> Co-authored-by: Alex Biehl <alex@scarf.sh> Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com> Co-authored-by: Ember Stevens <ember.stevens@launchdarkly.com> Co-authored-by: Louis Chan <lchan@launchdarkly.com> Co-authored-by: LaunchDarklyReleaseBot <launchdarklyreleasebot@launchdarkly.com> Co-authored-by: Phil de Joux <philderbeast@gmail.com> Co-authored-by: Veronika Romashkina <vrom911@gmail.com>
philderbeast
added a commit
to space-vacuum/launchdarkly-haskell-server-sdk
that referenced
this pull request
Mar 28, 2023
* initial implementation * [ch57654] add circleci config (launchdarkly#3) * [ch57656] cleanup dependencies (launchdarkly#2) * [ch57662] Add repo templates (launchdarkly#5) * [ch57657] Add setters for User and Config (launchdarkly#4) * [ch57663] Only expose public modules in package * [ch57666] Add Haddock (launchdarkly#7) * log on authentication failure (launchdarkly#8) * [ch57685] cleanup package (launchdarkly#9) * [ch57695] metric event logic (launchdarkly#10) * [ch58006] Hide typeclass instances with newtype public API (launchdarkly#11) * fix contributor guide wrong link (launchdarkly#12) * fix minor title-casing inconsistencies (launchdarkly#13) * git ignore + re-ordering lists (launchdarkly#14) * adding .gitignore * re-ordering items * fix typos * [ch58315] Add OSX CI (launchdarkly#15) * updated build instructions (launchdarkly#16) * [tickets listed in body] Add misc configuration and close. (launchdarkly#17) [ch58083] add close [ch58076] make connection timeout configuration [ch58072] add offline mode [ch58435] make event sending configurable * set version string to 0.1.0 (launchdarkly#18) * add beta warning * [ch58816] Fix user agent format, prepare release * [ch59631] add haskell sdk to releaser (launchdarkly#20) * [ch63561] Store V2 Interface (launchdarkly#21) * [ch63772] Mock store interface tests (launchdarkly#22) * [ch58074] Redis store implementation (launchdarkly#23) * Linting and some refactoring of streaming code. * [ch64438] dont send empty event payloads * [ch43307] use last bucket as fallback * Increased test coverage (launchdarkly#28) * Custom serialization instances when using custom deserialization (launchdarkly#29) * [ch64640] Add support for Ldd (launchdarkly#30) * [ch65827] payload uuid and event send retry (launchdarkly#32) * [ch66643] strict fields * [ch67127] minimal version constraints (launchdarkly#34) * [ch67145] update master export list * [ch67148] Some doc typos (launchdarkly#36) * [ch67154] Remove beta warning * [ch67570] actually use store initialization status (launchdarkly#38) * [ch69091] Add SSE timeout, fix streaming CPU burn (launchdarkly#39) * [ch70425] standardize streaming behavior (launchdarkly#41) * [ch73995] remove null user key support (launchdarkly#42) * [ch76243] update sdk range for redis * [ch92127] remove sel field from flag model * Removed the guides link * [ch99749] add alias and update event logic (launchdarkly#45) * merge traffic allocation changes * Updates docs URLs (launchdarkly#47) * Use non-deprecated CircleCI Xcode image. (launchdarkly#48) * Path is optional; should default to / (launchdarkly#53) * Create index event when calling track (launchdarkly#51) * Conditionally index users when processing eval events (launchdarkly#56) * Trim trailing slashes from URIs (launchdarkly#52) * Add event summary regardless of capacity (launchdarkly#55) * Do not emit identify event if key is empty; notice user otherwise (launchdarkly#50) If the provided user key is empty, we do not want to emit an identify event. We will log a warning message to the customer instead. If a valid user has been provided though, not only should we emit the event, but also we should add that user to the LRU cache so that we don't unnecessarily generate future index events. * Support for both aeson < 2 and aeson > 2 * Unknown flags should return provided default value (launchdarkly#57) * Exclude various fields from JSON payload if not required (launchdarkly#54) * Adds links to Relay Proxy docs * Add support for client side availability (launchdarkly#61) * Add new all flags state method (launchdarkly#62) * Add initial structure for SDK test harness (launchdarkly#63) * Fix test if user attribute is null (launchdarkly#65) * Fix negative index evaluation (launchdarkly#66) * Track last known server time (launchdarkly#67) * Introduce File and Test Data Sources (launchdarkly#68) * Fix aeson 2.0 compatibility (launchdarkly#69) A user submitted contribution was merged to support Aeson 2.0. While all of our tests were passing, this was because we lacked a test environment that actually used 2.0 This commit addresses the remaining compatibility changes and introduces a later test environment to ensure we are actually building with Aeson 2.0 support. * Bump resource class for linux builds (launchdarkly#70) * Add cabal file and ignore dist-newstyle. (launchdarkly#44) * Add CI support for cabal and hlint (launchdarkly#71) A customer recently provided two pull requests -- one to add the generated cabal file to our repository and the second to update our hlint configuration file. While great, these change aren't sufficient because - We have no way to enforce the generated cabal file is up to date - We aren't running hlint during the CI process This commit introduces CI behaviors to resolve both of these issues. * Update releaser config to use docker instead of circleci (launchdarkly#72) * Update releaser configuration (launchdarkly#73) In a previous commit I updated the releaser config. However, I failed to adjust two additional bits of configuration. - The repository now includes a cabal file which contains version information. We will now update that. - docs need to be copied into the appropriate releaser directory for the GH pages branch to be updated correctly. * Speed up Haskell builds for OSX (launchdarkly#74) The OSX builds have been taking a very long time, despite doing less work than the Linux equivalents. A little digging has uncovered incorrect CI caching for the OSX builds. This small change has taken the build from approximately 45m to 9m per OSX run. * Expand upper versions on select packages (launchdarkly#77) A customer contributed this fix. I made some minor tweaks, but testing seems to indicate everything works as expected. Co-authored-by: Veronika Romashkina <vrom911@gmail.com> * Add application info support (#89) --------- Co-authored-by: hroederld <hroeder@launchdarkly.com> Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com> Co-authored-by: Gavin Whelan <gwhelan@launchdarkly.com> Co-authored-by: LaunchDarklyCI <dev@launchdarkly.com> Co-authored-by: ember-stevens <79482775+ember-stevens@users.noreply.github.com> Co-authored-by: Matthew M. Keeler <keelerm84@gmail.com> Co-authored-by: Alex Biehl <alex@scarf.sh> Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com> Co-authored-by: Ember Stevens <ember.stevens@launchdarkly.com> Co-authored-by: Louis Chan <lchan@launchdarkly.com> Co-authored-by: LaunchDarklyReleaseBot <launchdarklyreleasebot@launchdarkly.com> Co-authored-by: Phil de Joux <philderbeast@gmail.com> Co-authored-by: Veronika Romashkina <vrom911@gmail.com>
philderbeast
added a commit
to space-vacuum/launchdarkly-haskell-server-sdk
that referenced
this pull request
Mar 28, 2023
* initial implementation * [ch57654] add circleci config (launchdarkly#3) * [ch57656] cleanup dependencies (launchdarkly#2) * [ch57662] Add repo templates (launchdarkly#5) * [ch57657] Add setters for User and Config (launchdarkly#4) * [ch57663] Only expose public modules in package * [ch57666] Add Haddock (launchdarkly#7) * log on authentication failure (launchdarkly#8) * [ch57685] cleanup package (launchdarkly#9) * [ch57695] metric event logic (launchdarkly#10) * [ch58006] Hide typeclass instances with newtype public API (launchdarkly#11) * fix contributor guide wrong link (launchdarkly#12) * fix minor title-casing inconsistencies (launchdarkly#13) * git ignore + re-ordering lists (launchdarkly#14) * adding .gitignore * re-ordering items * fix typos * [ch58315] Add OSX CI (launchdarkly#15) * updated build instructions (launchdarkly#16) * [tickets listed in body] Add misc configuration and close. (launchdarkly#17) [ch58083] add close [ch58076] make connection timeout configuration [ch58072] add offline mode [ch58435] make event sending configurable * set version string to 0.1.0 (launchdarkly#18) * add beta warning * [ch58816] Fix user agent format, prepare release * [ch59631] add haskell sdk to releaser (launchdarkly#20) * [ch63561] Store V2 Interface (launchdarkly#21) * [ch63772] Mock store interface tests (launchdarkly#22) * [ch58074] Redis store implementation (launchdarkly#23) * Linting and some refactoring of streaming code. * [ch64438] dont send empty event payloads * [ch43307] use last bucket as fallback * Increased test coverage (launchdarkly#28) * Custom serialization instances when using custom deserialization (launchdarkly#29) * [ch64640] Add support for Ldd (launchdarkly#30) * [ch65827] payload uuid and event send retry (launchdarkly#32) * [ch66643] strict fields * [ch67127] minimal version constraints (launchdarkly#34) * [ch67145] update master export list * [ch67148] Some doc typos (launchdarkly#36) * [ch67154] Remove beta warning * [ch67570] actually use store initialization status (launchdarkly#38) * [ch69091] Add SSE timeout, fix streaming CPU burn (launchdarkly#39) * [ch70425] standardize streaming behavior (launchdarkly#41) * [ch73995] remove null user key support (launchdarkly#42) * [ch76243] update sdk range for redis * [ch92127] remove sel field from flag model * Removed the guides link * [ch99749] add alias and update event logic (launchdarkly#45) * merge traffic allocation changes * Updates docs URLs (launchdarkly#47) * Use non-deprecated CircleCI Xcode image. (launchdarkly#48) * Path is optional; should default to / (launchdarkly#53) * Create index event when calling track (launchdarkly#51) * Conditionally index users when processing eval events (launchdarkly#56) * Trim trailing slashes from URIs (launchdarkly#52) * Add event summary regardless of capacity (launchdarkly#55) * Do not emit identify event if key is empty; notice user otherwise (launchdarkly#50) If the provided user key is empty, we do not want to emit an identify event. We will log a warning message to the customer instead. If a valid user has been provided though, not only should we emit the event, but also we should add that user to the LRU cache so that we don't unnecessarily generate future index events. * Support for both aeson < 2 and aeson > 2 * Unknown flags should return provided default value (launchdarkly#57) * Exclude various fields from JSON payload if not required (launchdarkly#54) * Adds links to Relay Proxy docs * Add support for client side availability (launchdarkly#61) * Add new all flags state method (launchdarkly#62) * Add initial structure for SDK test harness (launchdarkly#63) * Fix test if user attribute is null (launchdarkly#65) * Fix negative index evaluation (launchdarkly#66) * Track last known server time (launchdarkly#67) * Introduce File and Test Data Sources (launchdarkly#68) * Fix aeson 2.0 compatibility (launchdarkly#69) A user submitted contribution was merged to support Aeson 2.0. While all of our tests were passing, this was because we lacked a test environment that actually used 2.0 This commit addresses the remaining compatibility changes and introduces a later test environment to ensure we are actually building with Aeson 2.0 support. * Bump resource class for linux builds (launchdarkly#70) * Add cabal file and ignore dist-newstyle. (launchdarkly#44) * Add CI support for cabal and hlint (launchdarkly#71) A customer recently provided two pull requests -- one to add the generated cabal file to our repository and the second to update our hlint configuration file. While great, these change aren't sufficient because - We have no way to enforce the generated cabal file is up to date - We aren't running hlint during the CI process This commit introduces CI behaviors to resolve both of these issues. * Update releaser config to use docker instead of circleci (launchdarkly#72) * Update releaser configuration (launchdarkly#73) In a previous commit I updated the releaser config. However, I failed to adjust two additional bits of configuration. - The repository now includes a cabal file which contains version information. We will now update that. - docs need to be copied into the appropriate releaser directory for the GH pages branch to be updated correctly. * Speed up Haskell builds for OSX (launchdarkly#74) The OSX builds have been taking a very long time, despite doing less work than the Linux equivalents. A little digging has uncovered incorrect CI caching for the OSX builds. This small change has taken the build from approximately 45m to 9m per OSX run. * Expand upper versions on select packages (launchdarkly#77) A customer contributed this fix. I made some minor tweaks, but testing seems to indicate everything works as expected. Co-authored-by: Veronika Romashkina <vrom911@gmail.com> * Add application info support (#89) * Match package requirements to SDK (#105) When we bumped the version numbers for the v3 release, we didn't bump the corresponding versions in the redis store. We didn't catch this because we don't try to build the redis package in CI, and we certainly don't try to build it against every supported Stackage resolver. For now, I've taken the simplest solution to get some tests confirming the behavior. Once I merge this forward in the v4 branch, I will look at simplifying a lot of the redundancy that exists in our unit tests. * Stop polling when unrecoverable (#107) * Add branch configuration in preparation of v4 release (#113) --------- Co-authored-by: hroederld <hroeder@launchdarkly.com> Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com> Co-authored-by: Gavin Whelan <gwhelan@launchdarkly.com> Co-authored-by: LaunchDarklyCI <dev@launchdarkly.com> Co-authored-by: ember-stevens <79482775+ember-stevens@users.noreply.github.com> Co-authored-by: Matthew M. Keeler <keelerm84@gmail.com> Co-authored-by: Alex Biehl <alex@scarf.sh> Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com> Co-authored-by: Ember Stevens <ember.stevens@launchdarkly.com> Co-authored-by: Louis Chan <lchan@launchdarkly.com> Co-authored-by: LaunchDarklyReleaseBot <launchdarklyreleasebot@launchdarkly.com> Co-authored-by: Phil de Joux <philderbeast@gmail.com> Co-authored-by: Veronika Romashkina <vrom911@gmail.com>
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.
[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:
Context
from theLaunchDarkly.Server.Context
module defines the new context model.LDContext
.Changed (breaking changes from 3.x):
secondary
attribute which existed in the user hash is no longer a supported feature. If you set an attribute with that name inContext
, it will simply be a custom attribute like any other.Changed (requirements/dependencies/build):
Changed (behavioral changes):
https://app.launchdarkly.com
tohttps://sdk.launchdarkly.com
.Removed:
User
type and all associated functions from theLaunchDarkly.Server.User
module.secondary
meta-attribute in the user hash.alias
method no longer exists because alias events are not needed in the new context model.configSetInlineUsersInEvents
configuration option no longer exists because it is not relevant in the new context model.Deprecated:
The following methods in
TestData
have been deprecated and replaced with new context-aware options.variationForAllUsers
was replaced withvariationForAll
valueForAllUsers
was replaced withvalueForAll
variationForUser
was replaced withvariationForKey
ifMatch
was replaced withifMatchContext
ifNotMatch
was replaced withifNotMatchContext
andMatch
was replaced withandMatchContext
andNotMatch
was replaced withandNotMatchContext
The config method
configSetUserKeyLRUCapacity
has been deprecated and replaced withconfigSetContextKeyLRUCapacity
.