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 all 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
30 changes: 20 additions & 10 deletions website/docs/advanced/config-v2-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,37 @@ description: A detailed guide on how to migrate from Config V1 to Config V2.

This guide will help you migrate from Config V1 to Config V2.

:::info
This migration guide is for ConfigCat users who have Config V2 enabled. If you don't have Config V2 enabled, you can [contact us](https://configcat.com/support/) to add you to the Beta program.
:::

## 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, Public Management API and SDKs.

Config V2 supports all the features of V1, so you can continue using those, but it offers interesting new features as well. However, you won't be able to use the new features with the V1 versions of the Dashboard, Public Management API and SDKs.

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

## A few things to consider before migration

- Migration from Config V1 means that a V2 config will be copied from the V1 config. The V1 config will remain unchanged and accessible. The V2 version will have a new SDK key for each environment.
- 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.
- 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.
- 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.
- Every newly created config will be a V2 config by default.
- 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.
- There is no pressure to migrate. Although we have plans to phase out V1 eventually, you can stay on it for a long time.
- Once the migration process is started, it's recommended to migrate your V1 configs to V2 as quickly as possible to avoid confusion.

## Migrating from Config V1 to Config V2

The migration process starts with copying your V1 config to a new V2 one and updating your applications to use the new config. The complete process is the following:

### 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

Expand All @@ -36,15 +46,15 @@ Here is a list of the SDKs that support Config V2: [See the supported SDK versio

### Step 3: Update the ConfigCat SDK Key

In your application, update the ConfigCat SDK Key to the one that belongs to the V2 config in every environment. The new key can be found on the ConfigCat Dashboard on the V2 config's page.
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.

### 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
2 changes: 1 addition & 1 deletion website/docs/advanced/config-v2-sdk-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Config V2 SDK Compatibility
description: This table shows which SDK versions support Config V2.
---

This table shows which SDK versions support Config V2.
This table shows which SDK versions support Config V2. Read more about [Config V2](/advanced/config-v2)

| SDK | Version | Release Notes |
| ------------------------------- | ------- | --------------------------------------------------------------- |
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 with an AND connection between them.

### 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 are on iOS, and off for 80%".

### 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.