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

Updating Config V2 #355

Merged
merged 8 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions website/docs/advanced/config-v2-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,33 @@ This guide will help you migrate from Config V1 to Config V2.

## What is Config V2?

Config V2 is the next generation of ConfigCat. It comes with a new dashboard, API, SDKs, and features. It's not backward compatible with Config V1. Read more about the new features in the [Config V2 Overview](advanced/config-v2).
Config V2 is the next generation of ConfigCat. It comes with a new dashboard, API, SDKs, and features. The V1 Dashboard, API, and SDKs are not compatible with V2. However the V2 SDKs are backwards compatible with V1.
sigewuzhere marked this conversation as resolved.
Show resolved Hide resolved

Read more about the new features in the [Config V2 Overview](advanced/config-v2).

## A few things to consider before migration

- Config V2 and V1 are completely separate. They don't affect each other in any way. You can use them side by side.
- Every newly created config is a V2 config.
- After Config V2 launches, every newly created config will be a V2 config by default.
- You can migrate your V1 configs to V2. That will mean that a V1 and a V2 version of your config will be available at the same time. The V2 version will have a new SDK key for each environment.
sigewuzhere marked this conversation as resolved.
Show resolved Hide resolved
- There is no automatic sync between the V1 and V2 configs. You have to manually update the V2 config if you make changes to the V1 config and vice versa.
- Once started it's recommended to migrate your V1 configs to V2 as quickly as possible to avoid confusion.
- There is no pressure to migrate. You can stay on V1 for a long time.
- There is no automatic sync between the V1 and V2 configs. If you want to keep them in sync, you have to manually update the V2 config when you make changes to the V1 config and vice versa.
- Considering the above, it's recommended to migrate your V1 configs to V2 as quickly as possible to avoid confusion.
- There is no pressure to migrate. Although we have plans to phase out V1 eventually, you can stay on it for a long time.

## Migrating from Config V1 to Config V2

To migrate from Config V1 to Config V2, you have to copy your V1 config to a new V2 one and update your applications to use the new config. The migration process is the following:
sigewuzhere marked this conversation as resolved.
Show resolved Hide resolved

### Step 1: Create the V2 config

1. Open the ConfigCat Dashboard and click on the `Start migration` button on top of a V1 config.
2. Click `Create V2 config` to create a new config with the same settings as the V1 config.

It's important to note that the V2 config was created with the same settings as the V1 config and the V1 config is still accessible and unchanged.
It's important to note that the V2 config will be created with the same settings as the V1 config and the V1 config will still be accessible and unchanged.

### Step 2: Upgrade the ConfigCat SDK version

In your application, upgrade the ConfigCat SDK to the latest version. Old versions of the SDK will not be able to access the new config. Make sure you upgrade every application that uses the migrated V2 config.
In your application, replace the old ConfigCat SDK Key with the new one (i.e. with the one that belongs to the V2 version of the config) in every environment. The new key can be found on the ConfigCat Dashboard on the V2 config's page top right corner.
sigewuzhere marked this conversation as resolved.
Show resolved Hide resolved

Here is a list of the SDKs that support Config V2: [See the supported SDK versions.](advanced/config-v2-sdk-compatibility.md)

Expand All @@ -40,11 +44,11 @@ In your application, update the ConfigCat SDK Key to the one that belongs to the

### Step 4: Deploy your application

Deploy your application to production and wait until all your users are migrated to the new config. You can check the migration status on the ConfigCat Dashboard on the V2 config's page.
Deploy your application to production and wait until all your users upgrade to the new version. You can check the migration status on the ConfigCat Dashboard on the V2 config's page.

### Step 5: Clean up

Once you are sure that all your users are migrated (no downloads on the V1 configs for a long while) to the new config, you can delete the V1 config. This will prevent confusion and accidental use of the old config.
Once you are sure that all your users are upgraded to the new version of your application (i.e. the migration status page reports that the V1 configs are not downloaded for a long while), you can complete the migration process by deleting the V1 config. This will prevent confusion and accidental use of the old config.

:::caution
Once you delete the V1 config, you won't be able to restore it.
Expand Down
20 changes: 11 additions & 9 deletions website/docs/advanced/config-v2.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: config-v2
title: Config V2 Overview
description: Config V2 is the next generation of ConfigCat. It comes with a new dashboard, API, SDKs, and features.
description: Config V2 is the next generation of ConfigCat. It comes with a new dashboard, API, SDKs and features.
---

Config V2 is a new version of ConfigCat. It comes with a new dashboard, API, SDKs, and features.
Expand All @@ -10,40 +10,42 @@ Config V2 is a new version of ConfigCat. It comes with a new dashboard, API, SDK

- A bunch of new features and improvements listed below.
- New config editor UI on the Dashboard.
- [New config JSON schema.](https://github.com/configcat/config-json)
- [New and improved config JSON schema.](https://github.com/configcat/config-json)
- New API: [See the API Docs.](https://api.configcat.com/docs/)
- New SDKs: [See the supported SDK versions.](advanced/config-v2-sdk-compatibility)

## How to migrate from Config V1 to Config V2?

See the [Config V2 Migration Guide](advanced/config-v2-migration-guide). If you get stuck or have any questions about the migration, [contact us](https://configcat.com/support/).
See the [Config V2 Migration Guide](advanced/config-v2-migration-guide). If you get stuck or have any questions about the migration, feel free to [contact us](https://configcat.com/support/).

## New features

### AND conditions

With AND conditions, you can create more complex targeting rule sets for your feature flags. You can add multiple conditions to a targeting rule and they will be evaluated as a logical AND.
With AND conditions, you can define more complex targeting rules, such as "serve this value for the users who use my Android app AND whose email domain is '@example.com'".

You can add multiple conditions to a targeting rule and they will be evaluated as a logical AND.
sigewuzhere marked this conversation as resolved.
Show resolved Hide resolved

### New comparators

With the new comparators, you can create date based targeting rules and schedule releases, compare arrays etc.
With the new comparators, you can create targeting rules which are based on dates, based on comparing arrays etc.

- New text and sensitive text comparators: EQUALS, NOT EQUALS, STARTS WITH ANY OF, ENDS WITH ANY OF, NOT STARTS WITH ANY OF, NOT ENDS WITH ANY OF.
- New array comparators: ARRAY CONTAINS ANY OF, ARRAY NOT CONTAINS ANY OF.
- New date comparators: BEFORE, AFTER.

### Prerequisite flags

With prerequisite flags, you can create feature flags that depend on other feature flags. Prerequisite feature flags are particularly useful for managing complex feature dependencies and ensuring a smooth user experience during feature rollouts.
With prerequisite flags, you can create feature flags that depend on other feature flags. Prerequisite feature flags (aka. master feature flag, inter-dependent feature flag, global toggle) are particularly useful for managing complex feature dependencies and ensuring a smooth user experience during feature rollouts.

### Comparison value hints

With comparison value hints, you can add hints to your comparison values. This way you can add a description to your comparison value list items that helps you remember what they are for.
With comparison value hints, you can associate arbitrary text with your comparison values. This way you can add a description to your comparison value list items that helps you remember what they are for.

### Percentage options for targeting rules

You can add percentage options to your targeting rules. This is useful if you want to create percentage options based on your user attributes.
You can add percentage options to your targeting rules. This is useful if you want to create more complex targeting rules, such as "turn on the feature for 20% of the users who use my Android app".
sigewuzhere marked this conversation as resolved.
Show resolved Hide resolved

### Custom percentage attributes

With custom percentage attributes, you can create percentage options based on custom attributes. This way you can create percentage options based on any of your user attributes.
With custom percentage attributes, you can create percentage options based on custom attributes. This way you can create percentage options based on any of your user attributes. For example, you can create a percentage option that is based on the user's company or organization. So you can serve a value for 20% of the users from company A and serve another value for 80% of the users from company B.