From c462418dbcc68a5b665a3d603fefe5788b7e247f Mon Sep 17 00:00:00 2001 From: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:06:47 -0800 Subject: [PATCH 1/3] [1.13] Azure Blob Storage v2 docs Fixes #3203 Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --- .../setup-azure-blobstorage.md | 37 +++++++++++++------ .../data/components/state_stores/azure.yaml | 4 +- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md index 61846c3beff..c8ba985b225 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md @@ -18,7 +18,9 @@ metadata: name: spec: type: state.azure.blobstorage - version: v1 + # Supports v1 and v2. Users should always use v2 by default. There is no + # migration path from v1 to v2, see `versioning` below. + version: v2 metadata: - name: accountName value: "[your_account_name]" @@ -32,21 +34,32 @@ spec: The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}). {{% /alert %}} +## Versioning + +Dapr has 2 versions of the Azure Blob Storage state store component: `v1` and `v2`. It is recommended to use `v2`, as `v1` is deprecated. + +In `v1`, we identified a longstanding implementation issue where the [key prefix]({{< ref howto-share-state.md >}}) was incorrectly stripped by the component, essentially behaving as if `keyPrefix` was always set to `none`. +The updated `v2` of the component fixes the incorrect behavior and makes the state store correctly respect the `keyPrefix` property. + +While `v1` and `v2` have the same metadata fields, they are otherwise incompatible, with no automatic data migration path for `v1` to `v2`. + +If you are using `v1` of this component, you should continue to use `v1` until you create a new state store. + ## Spec metadata fields -| Field | Required | Details | Example | +| Field | Required | Details | Example | |--------------------|:--------:|---------|---------| -| `accountName` | Y | The storage account name | `"mystorageaccount"`. -| `accountKey` | Y (unless using Microsoft Entra ID) | Primary or secondary storage key | `"key"` -| `containerName` | Y | The name of the container to be used for Dapr state. The container will be created for you if it doesn't exist | `"container"` -| `azureEnvironment` | N | Optional name for the Azure environment if using a different Azure cloud | `"AZUREPUBLICCLOUD"` (default value), `"AZURECHINACLOUD"`, `"AZUREUSGOVERNMENTCLOUD"`, `"AZUREGERMANCLOUD"` +| `accountName` | Y | The storage account name | `"mystorageaccount"`. | +| `accountKey` | Y (unless using Microsoft Entra ID) | Primary or secondary storage key | `"key"` | +| `containerName` | Y | The name of the container to be used for Dapr state. The container will be created for you if it doesn't exist | `"container"` | +| `azureEnvironment` | N | Optional name for the Azure environment if using a different Azure cloud | `"AZUREPUBLICCLOUD"` (default value), `"AZURECHINACLOUD"`, `"AZUREUSGOVERNMENTCLOUD"` | | `endpoint` | N | Optional custom endpoint URL. This is useful when using the [Azurite emulator](https://github.com/Azure/azurite) or when using custom domains for Azure Storage (although this is not officially supported). The endpoint must be the full base URL, including the protocol (`http://` or `https://`), the IP or FQDN, and optional port. | `"http://127.0.0.1:10000"` -| `ContentType` | N | The blob's content type | `"text/plain"` -| `ContentMD5` | N | The blob's MD5 hash | `"vZGKbMRDAnMs4BIwlXaRvQ=="` -| `ContentEncoding` | N | The blob's content encoding | `"UTF-8"` -| `ContentLanguage` | N | The blob's content language | `"en-us"` -| `ContentDisposition` | N | The blob's content disposition. Conveys additional information about how to process the response payload | `"attachment"` -| `CacheControl` | N | The blob's cache control | `"no-cache"` +| `ContentType` | N | The blob's content type | `"text/plain"` | +| `ContentMD5` | N | The blob's MD5 hash | `"vZGKbMRDAnMs4BIwlXaRvQ=="` | +| `ContentEncoding` | N | The blob's content encoding | `"UTF-8"` | +| `ContentLanguage` | N | The blob's content language | `"en-us"` | +| `ContentDisposition` | N | The blob's content disposition. Conveys additional information about how to process the response payload | `"attachment"` | +| `CacheControl`| N | The blob's cache control | `"no-cache"` | ## Setup Azure Blob Storage diff --git a/daprdocs/data/components/state_stores/azure.yaml b/daprdocs/data/components/state_stores/azure.yaml index 6f37e4493e5..6f490f84228 100644 --- a/daprdocs/data/components/state_stores/azure.yaml +++ b/daprdocs/data/components/state_stores/azure.yaml @@ -1,8 +1,8 @@ - component: Azure Blob Storage link: setup-azure-blobstorage state: Stable - version: v1 - since: "1.0" + version: v2 + since: "1.13" features: crud: true transactions: false From 525baca80a3ac1d5313d4e0fa88620b2a1c37d6c Mon Sep 17 00:00:00 2001 From: "Alessandro (Ale) Segala" <43508+ItalyPaleAle@users.noreply.github.com> Date: Mon, 5 Feb 2024 08:56:35 -0800 Subject: [PATCH 2/3] Update daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> --- .../supported-state-stores/setup-azure-blobstorage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md index c8ba985b225..0681daf1b57 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md @@ -38,7 +38,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr Dapr has 2 versions of the Azure Blob Storage state store component: `v1` and `v2`. It is recommended to use `v2`, as `v1` is deprecated. -In `v1`, we identified a longstanding implementation issue where the [key prefix]({{< ref howto-share-state.md >}}) was incorrectly stripped by the component, essentially behaving as if `keyPrefix` was always set to `none`. +In `v1`, a longstanding implementation issue was identified, where the [key prefix]({{< ref howto-share-state.md >}}) was incorrectly stripped by the component, essentially behaving as if `keyPrefix` was always set to `none`. The updated `v2` of the component fixes the incorrect behavior and makes the state store correctly respect the `keyPrefix` property. While `v1` and `v2` have the same metadata fields, they are otherwise incompatible, with no automatic data migration path for `v1` to `v2`. From 90d7be84addc6796a4749fbe8fdb04ff2ce25a2e Mon Sep 17 00:00:00 2001 From: "Alessandro (Ale) Segala" <43508+ItalyPaleAle@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:40:59 -0800 Subject: [PATCH 3/3] Update daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> --- .../supported-state-stores/setup-azure-blobstorage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md index 0681daf1b57..6f99ba27f26 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-blobstorage.md @@ -36,7 +36,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr ## Versioning -Dapr has 2 versions of the Azure Blob Storage state store component: `v1` and `v2`. It is recommended to use `v2`, as `v1` is deprecated. +Dapr has 2 versions of the Azure Blob Storage state store component: `v1` and `v2`. It is recommended to use `v2` for all new applications. `v1` is considered legacy and is preserved for compatibility with existing applications only. In `v1`, a longstanding implementation issue was identified, where the [key prefix]({{< ref howto-share-state.md >}}) was incorrectly stripped by the component, essentially behaving as if `keyPrefix` was always set to `none`. The updated `v2` of the component fixes the incorrect behavior and makes the state store correctly respect the `keyPrefix` property.