Skip to content
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 3.3.0 release #198

Merged
merged 322 commits into from
Dec 2, 2022
Merged

prepare 3.3.0 release #198

merged 322 commits into from
Dec 2, 2022

Conversation

LaunchDarklyReleaseBot
Copy link
Contributor

[3.3.0] - 2022-12-02

The primary purpose of this release is to introduce newer APIs for SDK configuration, corresponding to how configuration will work in the upcoming 4.0 release. The corresponding older APIs are now deprecated; switching from them to the newer ones now will facilitate migrating to 4.0 in the future. This also brings the Android SDK's API closer in line with other current LaunchDarkly SDKs, such as the Java SDK and the .NET SDKs.

Previously, most configuration options were set by setter methods in LDConfig.Builder. These are being superseded by builders that are specific to one area of functionality: for instance, Components.streamingDataSource() and Components.pollingDataSource() provide builders/factories that have options specific to streaming or polling, and the SDK's many options related to analytics events are now in a builder returned by Components.sendEvents(). Using this newer API makes it clearer which options are for what, and makes it impossible to write contradictory configurations like .stream(true).pollingIntervalMillis(30000).

The new configuration builders also include some options for SDK behavior that could not previously be configured; see "Added".

Added:

  • Components, containing factory methods for the various configuration builders.
  • Configuration builder classes in com.launchdarkly.sdk.android.integrations: StreamingDataSourceBuilder, PollingDataSourceBuilder, EventProcessorBuilder, HttpConfigurationBuilder, ServiceEndpointsBuilder.
  • It is now possible to entirely disable analytics events, by setting LDConfig.Builder.events() to Components.noEvents().
  • It is now possible to substitute a test fixture for the analytics events subsystem, by creating a custom implementation of com.launchdarkly.sdk.android.subsystems.EventProcessor.
  • It is now possible to change the initial delay for reconnecting after a stream connection failure, with StreamingDataSourceBuilder.initialReconnectDelayMillis().

Deprecated:

(all in LDConfig.Builder)

  • pollingIntervalMillis, stream: see PollingDataSourceBuilder.
  • backgroundPollingIntervalMillis: see PollingDataSourceBuilder and StreamingDataSourceBuilder.
  • allAttributesPrivate, diagnosticRecordingIntervalMillis, eventsCapacity, eventsFlushIntervalMillis, inlineUsersInEvents, privateAttributes: see EventProcessorBuilder.
  • connectionTimeoutMillis, headerTransform, useReport, wrapperName, wrapperVersion: see HttpConfigurationBuilder.
  • streamUri, pollUri, eventsUri: See ServiceEndpointsBuilder.

gwhelanLD and others added 30 commits February 15, 2019 20:03
# Conflicts:
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/LDClient.java
…rializer/deserializers to classes in gson package and create one for PUT responses. Removed BaseUserSharedPreferences.
…s to synchronize to prevent data race on sending, updating, and clearing event store. Move SummaryEventSharedPreferences and UserSummaryEventSharedPreferences out of response package.
# Conflicts:
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/LDClient.java
* Changed shared preferences store system to user a single FlagStore
system that holds all the information on a flag to prevent issues
arising from unsynchronized separate stores for flag meta-data and
values.

* Abstract FlagStoreManager from FlagStore, new FlagStoreFactory class so manager can construct FlagStores of unknown type. Reformatted interfaces. Removed unused imports.

* Handle null case in allFlags, actually commit changes to UserManager.

* Hopefully fix edge cases in summary event reporting to pass testing.

* Hopefully fix edge cases in summary event reporting to pass testing.

* Simplify getFeaturesJsonObject as no longer using -1 as placeholder for null for variations.

* Make Flag non-mutable. Move GsonCache to gson package, move custom serializer/deserializers to classes in gson package and create one for PUT responses. Removed BaseUserSharedPreferences.

* Send summary event even if stored flag doesn't exist.

* Move sendSummaryEvent update code to UserSummaryEventSharedPreferences to synchronize to prevent data race on sending, updating, and clearing event store. Move SummaryEventSharedPreferences and UserSummaryEventSharedPreferences out of response package.

* Update SharedPrefsFlagStore to hold StoreUpdatedListener in weak reference. Fix various warnings.

* Migration code for upcoming flagstore.

* Remove couple of debug messages.

* Handle todos.

* Revert to old String behavior for allFlags, initialize WeakReference in SharedPrefsFlagStore.

* Better implementation of EvaluationReason serialization type adapter.

* Remove isUnknown argument from SummaryEventSharedPreferences methods. Use Runnable instead of Callable in UserManager to avoid useless return nulls. Rename FlagStoreFactoryInterface to FlagStoreFactory.

* Statically initialize Gson instance in GsonCache.

* Make Gson instance in GsonCache final on principle.
# Conflicts:
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/LDClient.java
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/SummaryEventSharedPreferences.java
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/UserManager.java
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/UserSummaryEventSharedPreferences.java
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/flagstore/sharedprefs/SharedPrefsFlagStoreFactory.java
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/flagstore/sharedprefs/SharedPrefsFlagStoreManager.java
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/gson/EvaluationReasonSerialization.java
#	launchdarkly-android-client/src/main/java/com/launchdarkly/android/gson/GsonCache.java
add methods to get value with explanation; refactor existing variation methods
fix/expand doc comments for public methods
)

Add `unsafeReset()` method to close and clear instances for re-initializing client between tests. Update LDClientTest to call `unsafeReset()` before tests.
eli-darkly and others added 26 commits November 10, 2022 12:11
…ata-source-config

# Conflicts:
#	launchdarkly-android-client-sdk/src/androidTest/java/com/launchdarkly/sdk/android/DiagnosticEventTest.java
…-config

# Conflicts:
#	launchdarkly-android-client-sdk/src/androidTest/java/com/launchdarkly/sdk/android/DiagnosticEventTest.java
…-config

# Conflicts:
#	launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/sdk/android/LDClient.java
…erformance issue) (#279)

* don't keep summary event counters in SharedPreferences

* don't create a summary event if there's no data
…builder

(non-U2C, for 3.x) add sub-configuration builder for events
…nfig

(non-U2C, for 3.x) add configuration builders for polling/streaming
(non-U2C, for 3.x) add configuration builder for HTTP
(non-U2C, for 3.x) add configuration builder for service endpoints
@LaunchDarklyReleaseBot LaunchDarklyReleaseBot merged commit 367551a into main Dec 2, 2022
@LaunchDarklyReleaseBot LaunchDarklyReleaseBot deleted the release-3.3.0 branch December 2, 2022 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants