|
2 | 2 |
|
3 | 3 | All notable changes to the LaunchDarkly Java SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
|
4 | 4 |
|
| 5 | +## [6.0.0] - 2022-12-07 |
| 6 | +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." |
| 7 | + |
| 8 | +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. |
| 9 | + |
| 10 | +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. |
| 11 | + |
| 12 | +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](https://docs.launchdarkly.com/sdk/server-side/java/migration-5-to-6). |
| 13 | + |
| 14 | +### Added: |
| 15 | +- In `com.launchDarkly.sdk`, the types `LDContext` and `ContextKind` define the new context model. |
| 16 | +- For all SDK methods that took an `LDUser` parameter, there is now an overload that takes an `LDContext`. The SDK still supports `LDUser` for now, but `LDContext` is the preferred model and `LDUser` may be removed in a future version. |
| 17 | +- The `TestData` flag builder methods have been extended to support now context-related options, such as matching a key for a specific context type other than "user". |
| 18 | + |
| 19 | +### Changed _(breaking changes from 6.x)_: |
| 20 | +- It was previously allowable to set a user key to an empty string. In the new context model, the key is not allowed to be empty. Trying to use an empty key will cause evaluations to fail and return the default value. |
| 21 | +- There is no longer such a thing as a `secondary` meta-attribute that affects percentage rollouts. If you set an attribute with that name in an `LDContext`, it will simply be a custom attribute like any other. |
| 22 | +- The `anonymous` attribute in `LDUser` is now a simple boolean, with no distinction between a false state and a null state. |
| 23 | +- Types such as `DataStore`, which define the low-level interfaces of LaunchDarkly SDK components and allow implementation of custom components, have been moved out of the `interfaces` subpackage into a new `subsystems` subpackage. Some types have been removed by using generics: for instance, the interface `DataSourceFactory` has been replaced by `ComponentConfigurer<DataSource>`. Application code normally does not refer to these types except possibly to hold a value for a configuration property such as `LDConfig.Builder.dataStore()`, so this change is likely to only affect configuration-related logic. |
| 24 | + |
| 25 | +### Changed (requirements/dependencies/build): |
| 26 | +- The SDK no longer has a dependency on [SLF4J](https://www.slf4j.org/). It will still use SLF4J as the default logging framework _if_ SLF4J is in the classpath, so it is the application's responsibility to declare its own dependency on SLF4J, as any application that uses SLF4J would normally do. |
| 27 | +- Applications that use the database integrations for Redis, DynamoDB, or Consul must update to the latest major versions of the corresponding packages (`launchdarkly-java-server-sdk-redis-store`, etc.). |
| 28 | + |
| 29 | +### Changed (behavioral changes): |
| 30 | +- If SLF4J is not in the classpath, the SDK now uses `System.err` as its default logging destination. See "requirements/dependencies/build" above. |
| 31 | +- The SDK can now evaluate segments that have rules referencing other segments. |
| 32 | +- Analytics event data now uses a new JSON schema due to differences between the context model and the old user model. |
| 33 | + |
| 34 | +### Removed: |
| 35 | +- Removed all types, fields, and methods that were deprecated as of the most recent 5.x release. |
| 36 | +- Removed the `secondary` meta-attribute in `LDUser` and `LDUser.Builder`. |
| 37 | +- The `alias` method no longer exists because alias events are not needed in the new context model. |
| 38 | +- The `inlineUsersInEvents` option no longer exists because it is not relevant in the new context model. |
| 39 | + |
5 | 40 | ## [5.10.3] - 2022-10-20
|
6 | 41 | ### Fixed:
|
7 | 42 | - The `pom.xml` specified a dependency on `com.launchdarkly:launchdarkly-logging` even though that library is already contained inside the SDK jar, which could cause extra copies of classes to be in the classpath. The dependency has been removed and the classes are still in the jar. ([#282](https://github.com/launchdarkly/java-server-sdk/issues/282))
|
|
0 commit comments