Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

prepare 5.0.0-rc1 release #191

Merged
merged 659 commits into from
Apr 30, 2020
Merged

prepare 5.0.0-rc1 release #191

merged 659 commits into from
Apr 30, 2020

Conversation

eli-darkly
Copy link
Contributor

[5.0.0-rc1] - 2020-04-29

This beta release is being made available for testing and user feedback, due to the large number of changes from Java SDK 4.x. Features are still subject to change in the final 5.0.0 release. Until the final release, the beta source code will be on the 5.x branch. Javadocs can be found on javadoc.io.

This is a major rewrite that introduces a cleaner API design, adds new features, and makes the SDK code easier to maintain and extend. See the Java 4.x to 5.0 migration guide for an in-depth look at the changes in this version; the following is a summary.

Added:

  • You can tell the SDK to notify you whenever a feature flag's configuration has changed in any way, using FlagChangeListener and LDClient.registerFlagChangeListener().
  • Or, you can tell the SDK to notify you only if the value of a flag for some particular LDUser has changed, using FlagValueChangeListener and Components.flagValueMonitoringListener().
  • You can monitor the status of a persistent data store (for instance, to get caching statistics, or to be notified if the store's availability changes due to a database outage) with LDClient.getDataStoreStatusProvider().
  • The UserAttribute class provides a less error-prone way to refer to user attribute names in configuration, and can also be used to get an arbitrary attribute from a user.
  • The LDGson and LDJackson classes allow SDK classes like LDUser to be easily converted to or from JSON using the popular Gson and Jackson frameworks.

Changed:

  • The minimum supported Java version is now 8.
  • Package names have changed: the main SDK classes are now in com.launchdarkly.sdk and com.launchdarkly.sdk.server.
  • Many rarely-used classes and interfaces have been moved out of the main SDK package into com.launchdarkly.sdk.server.integrations and com.launchdarkly.sdk.server.interfaces.
  • The type java.time.Duration is now used for configuration properties that represent an amount of time, instead of using a number of milliseconds or seconds.
  • When using a persistent data store such as Redis, if there is a database outage, the SDK will wait until the end of the outage and then restart the stream connection to ensure that it has the latest data. Previously, it would try to restart the connection immediately and continue restarting if the database was still not available, causing unnecessary overhead.
  • EvaluationDetail.getVariationIndex() now returns int instead of Integer.
  • EvaluationReason is now a single concrete class rather than an abstract base class.
  • The SDK no longer exposes a Gson dependency or any Gson types.
  • Third-party libraries like Gson, Guava, and OkHttp that are used internally by the SDK have been updated to newer versions since Java 7 compatibility is no longer required.
  • The component interfaces FeatureStore and UpdateProcessor have been renamed to DataStore and DataSource. The factory interfaces for these components now receive SDK configuration options in a different way that does not expose other components' configurations to each other.
  • The PersistentDataStore interface for creating your own database integrations has been simplified by moving all of the serialization and caching logic into the main SDK code.

Removed:

  • All types and methods that were deprecated as of Java SDK 4.13.0 have been removed. This includes many LDConfig.Builder() methods, which have been replaced by the modular configuration syntax that was already added in the 4.12.0 and 4.13.0 releases. See the migration guide for details on how to update your configuration code if you were using the older syntax.
  • The Redis integration is no longer built into the main SDK library (see below).
  • The deprecated New Relic integration has been removed.

If you want to test this release and you are using Consul, DynamoDB, or Redis as a persistent data store, you will also need to update to version 2.0.0-rc1 of the Consul integration, 3.0.0-rc1 of the DynamoDB integration, or 1.0.0-rc1 of the Redis integration (previously the Redis integration was built in; now it is a separate module).

eli-darkly and others added 30 commits January 15, 2020 10:43
avoid exception with semver operators and non-strings
don't include exception in error reason JSON rep
…-ttl"

This reverts commit a3a7b7a, reversing
changes made to 9cd5228.
…ions-package"

This reverts commit 9cd5228, reversing
changes made to c273a05.
# Conflicts:
#	src/main/java/com/launchdarkly/client/EvaluationReason.java
…tf-4.x

# Conflicts:
#	src/main/java/com/launchdarkly/client/Components.java
#	src/main/java/com/launchdarkly/client/LDConfig.java
#	src/main/java/com/launchdarkly/client/RedisFeatureStore.java
#	src/main/java/com/launchdarkly/client/RedisFeatureStoreBuilder.java
#	src/main/java/com/launchdarkly/client/integrations/Redis.java
#	src/main/java/com/launchdarkly/client/integrations/RedisDataStoreBuilder.java
#	src/test/java/com/launchdarkly/client/LDClientEvaluationTest.java
#	src/test/java/com/launchdarkly/client/LDClientEventTest.java
#	src/test/java/com/launchdarkly/client/LDClientTest.java
#	src/test/java/com/launchdarkly/client/RedisFeatureStoreTest.java
#	src/test/java/com/launchdarkly/client/integrations/RedisFeatureStoreBuilderTest.java
#	src/test/java/com/launchdarkly/client/integrations/RedisFeatureStoreTest.java
(5.0 - #1) increase the minimum Java version all the way to 8!
(5.0) remove joda-time, use Java 8 Date API
(5.0) use lambdas instead of anonymous classes for simple interfaces
# Conflicts:
#	src/main/java/com/launchdarkly/client/DefaultEventProcessor.java
#	src/test/java/com/launchdarkly/client/DefaultEventProcessorTest.java
(4.x) add getters for all properties on EvaluationReason; deprecate subclasses
# Conflicts:
#	src/main/java/com/launchdarkly/client/EvaluationReason.java
#	src/test/java/com/launchdarkly/client/EvaluationReasonTest.java
(4.x) add scoped configuration for HTTP options
Java SDK should only log exception stacktraces at debug level
# Conflicts:
#	src/main/java/com/launchdarkly/client/EvaluationReason.java
#	src/main/java/com/launchdarkly/client/LDConfig.java
#	src/test/java/com/launchdarkly/client/EvaluationReasonTest.java
5.0 (#1): remove deprecated HTTP config properties
…eleted-flag

5.0: fix NPE from allFlagsState when there's a deleted flag
…ntext

5.0 (#2): don't keep the entire LDConfig instance around after creating LDClient
(5.0 - #1) use non-nullable integers in EvaluationDetail and events
…default

(5.0) don't serialize -1 variation index in FeatureFlagsState
(5.0) remove a few more unnecessary Guava usages
@eli-darkly eli-darkly merged commit 9812c3a into 5.x Apr 30, 2020
@eli-darkly eli-darkly deleted the 5.0.0-rc1-release branch April 30, 2020 01:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants