Migrating from LaunchDarkly v1 to v2
Once your SDKs are updated, email us at email@example.com and an engineer will help you complete the migration.
To take advantage of our new features, you'll need to update all of your LaunchDarkly SDKs to the latest released versions. You must do this across all of your environments. Behind the scenes, all of your current flag settings will be maintained, so you won't see any change in behavior after the update.
- Multivariate Feature Flags
- Custom Rules
- Bulk User Targeting
- Slack/HipChat Integrations
All of our server-side SDKs have received a major version update, but for the most part, the changes are backwards compatible. The most obvious change is that we've renamed the
toggle method to
variation. In the typed languages, you'll see
stringVariation, etc. We've kept the old
toggle method around, but deprecated it to simplify the transition for you.
To help with the update, we've added a
CHANGELOG file to each of our open-source SDKs. Here's the link for each SDK and the minimum version that supports the v2 features:
- Python 2.0.0
- Ruby 2.0.1
- Node.js 3.0.0
- Go gopkg.in/launchdarkly/go-client.v2
- Java 2.0.0
- .NET 2.0.0
- PHP 2.0.0
- Android 1.0.1
- iOS 2.0.0
If you're using Redis caching, or the LD Daemon, change the Redis key prefix in your Redis store configuration when you update your SDK. For example, in Java, the RedisFeatureStoreBuilder allows you to prefix all of your Redis keys with a sentinel string. When you upgrade your SDK, append a string like
v2 to the key prefix so that your Redis store will use a new set of keys after the update.
This step is necessary because the data model for our feature flags has changed, and the previous flags stored in Redis are not compatible with the new model.
We've released a new version of our iOS SDK. You can find the changelog here. 2.0.0 is the minimum version that supports v2 functionality. As with our server-side SDKs, the main change is that we've renamed the
All versions of the Android SDK support v2 functionality.
We've ensured that older SDKs in the field will continue to work once you've been updated, so there's no need to worry about your app breaking in the field when you update.
However, the older SDKs do not support multivariate flags. You'll need to release a new version of your app with our latest SDK to take advantage of multivariate flags.
- Support for local storage caching
- Support for bootstrapping feature flag values from your backend server
- Support for real-time feature flag updates
If you've built a custom integration on top of our REST API, you'll need to update it to call our new v2 REST API. This API uses a new authentication mechanism (we no longer allow you to authenticate with SDK keys). If you have any questions about how to update your custom integration, we'd be happy to help.