From 09b790b8df9574ad8309cb99478679bbc0684687 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Tue, 26 Sep 2023 11:17:01 -0400 Subject: [PATCH 01/18] fix navbar for preview branch Signed-off-by: Hannah Hunter --- daprdocs/config.toml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/daprdocs/config.toml b/daprdocs/config.toml index d28410be666..6ddde657798 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -1,5 +1,5 @@ # Site Configuration -baseURL = "https://v1-12.docs.dapr.io" +baseURL = "https://v1-13.docs.dapr.io" title = "Dapr Docs" theme = "docsy" disableFastRender = true @@ -168,20 +168,23 @@ offlineSearch = false github_repo = "https://github.com/dapr/docs" github_project_repo = "https://github.com/dapr/dapr" github_subdir = "daprdocs" -github_branch = "v1.11" +github_branch = "v1.13" # Versioning -version_menu = "v1.11 (latest)" -version = "v1.11" +version_menu = "v1.13 (preview)" +version = "v1.13" archived_version = false url_latest_version = "https://docs.dapr.io" [[params.versions]] - version = "v1.12 (preview)" + version = "v1.13 (preview)" + url = "https://v1-13.docs.dapr.io" +[[params.versions]] + version = "v1.12 (latest)" url = "#" [[params.versions]] - version = "v1.11 (latest)" - url = "https://docs.dapr.io" + version = "v1.11" + url = "https://v1-11.docs.dapr.io" [[params.versions]] version = "v1.10" url = "https://v1-10.docs.dapr.io" From 3055c7c8020537502eb7a8f8e4b61fe617c7edd4 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Thu, 12 Oct 2023 11:27:53 -0400 Subject: [PATCH 02/18] update workflow Signed-off-by: Hannah Hunter --- .../workflows/{website-v1-12.yml => website-v1-13.yml} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{website-v1-12.yml => website-v1-13.yml} (95%) diff --git a/.github/workflows/website-v1-12.yml b/.github/workflows/website-v1-13.yml similarity index 95% rename from .github/workflows/website-v1-12.yml rename to .github/workflows/website-v1-13.yml index a16d54978ef..a4c55111669 100644 --- a/.github/workflows/website-v1-12.yml +++ b/.github/workflows/website-v1-13.yml @@ -1,13 +1,13 @@ -name: Azure Static Web App v1.12 +name: Azure Static Web App v1.13 on: push: branches: - - v1.12 + - v1.13 pull_request: types: [opened, synchronize, reopened, closed] branches: - - v1.12 + - v1.13 jobs: build_and_deploy_job: @@ -28,7 +28,7 @@ jobs: HUGO_ENV: production HUGO_VERSION: "0.100.2" with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_V1_12 }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_V1_13 }} repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) skip_deploy_on_missing_secrets: true action: "upload" @@ -49,6 +49,6 @@ jobs: id: closepullrequest uses: Azure/static-web-apps-deploy@v1 with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_V1_12 }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_V1_13 }} skip_deploy_on_missing_secrets: true action: "close" From af705f1a880ac0442f61a7a9ca651c02cd6c5adb Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Thu, 12 Oct 2023 11:51:56 -0400 Subject: [PATCH 03/18] update website roote Signed-off-by: Hannah Hunter --- .github/workflows/website-root.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/website-root.yml b/.github/workflows/website-root.yml index 1f8e503e4c2..6039e0715ed 100644 --- a/.github/workflows/website-root.yml +++ b/.github/workflows/website-root.yml @@ -4,11 +4,11 @@ on: workflow_dispatch: push: branches: - - v1.11 + - v1.13 pull_request: types: [opened, synchronize, reopened, closed] branches: - - v1.11 + - v1.13 concurrency: # Cancel the previously triggered build for only PR build. From 1e105d0b2f5e9b09c1879b1705addd9c6a8381cb Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Thu, 12 Oct 2023 12:29:02 -0400 Subject: [PATCH 04/18] try and fix navbar Signed-off-by: Hannah Hunter --- daprdocs/config.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/daprdocs/config.toml b/daprdocs/config.toml index 48b1f16e5e0..0e645e9633e 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -181,10 +181,7 @@ url_latest_version = "https://docs.dapr.io" url = "https://v1-13.docs.dapr.io" [[params.versions]] version = "v1.12 (latest)" - url = "#" -[[params.versions]] - version = "v1.11" - url = "https://v1-11.docs.dapr.io" + url = "https://docs.dapr.io" [[params.versions]] version = "v1.11" url = "https://v1-11.docs.dapr.io" From 0dde1beb6c1064836746870aae7c1956b52c66f6 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Thu, 12 Oct 2023 14:49:45 -0400 Subject: [PATCH 05/18] fix navbar Signed-off-by: Hannah Hunter --- daprdocs/config.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daprdocs/config.toml b/daprdocs/config.toml index 0e645e9633e..83fa1daae93 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -168,11 +168,11 @@ offlineSearch = false github_repo = "https://github.com/dapr/docs" github_project_repo = "https://github.com/dapr/dapr" github_subdir = "daprdocs" -github_branch = "v1.13" +github_branch = "v1.12" # Versioning -version_menu = "v1.13 (preview)" -version = "v1.13" +version_menu = "v1.12 (latest)" +version = "v1.12" archived_version = false url_latest_version = "https://docs.dapr.io" From 3a2f85e4ed44a321eeddbc593f102a3dc7426f76 Mon Sep 17 00:00:00 2001 From: greenie-msft <56556602+greenie-msft@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:42:13 -0700 Subject: [PATCH 06/18] Update config.toml (#3827) Signed-off-by: greenie-msft <56556602+greenie-msft@users.noreply.github.com> --- daprdocs/config.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daprdocs/config.toml b/daprdocs/config.toml index 83fa1daae93..959683fbf3b 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -171,14 +171,14 @@ github_subdir = "daprdocs" github_branch = "v1.12" # Versioning -version_menu = "v1.12 (latest)" -version = "v1.12" +version_menu = "v1.13 (preview)" +version = "v1.13" archived_version = false url_latest_version = "https://docs.dapr.io" [[params.versions]] version = "v1.13 (preview)" - url = "https://v1-13.docs.dapr.io" + url = "#" [[params.versions]] version = "v1.12 (latest)" url = "https://docs.dapr.io" From 3cc2f02bee19b010a93cee13a0ded5464fcbc969 Mon Sep 17 00:00:00 2001 From: greenie-msft <56556602+greenie-msft@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:34:41 -0700 Subject: [PATCH 07/18] Remove website root WF (#3829) --- .github/workflows/website-root.yml | 109 ----------------------------- 1 file changed, 109 deletions(-) delete mode 100644 .github/workflows/website-root.yml diff --git a/.github/workflows/website-root.yml b/.github/workflows/website-root.yml deleted file mode 100644 index 6039e0715ed..00000000000 --- a/.github/workflows/website-root.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: Azure Static Web App Root - -on: - workflow_dispatch: - push: - branches: - - v1.13 - pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - v1.13 - -concurrency: - # Cancel the previously triggered build for only PR build. - group: website-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -jobs: - build_and_deploy_job: - name: Build Hugo Website - if: github.event.action != 'closed' - runs-on: ubuntu-latest - env: - SWA_BASE: 'proud-bay-0e9e0e81e' - HUGO_ENV: production - steps: - - name: Checkout docs repo - uses: actions/checkout@v3 - with: - submodules: true - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: '14' - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2.5.0 - with: - hugo-version: 0.102.3 - extended: true - - name: Setup Docsy - run: | - cd daprdocs - git submodule update --init --recursive - sudo npm install -D --save autoprefixer - sudo npm install -D --save postcss-cli - - name: Build Hugo Website - run: | - cd daprdocs - git config --global --add safe.directory /github/workspace - if [ $GITHUB_EVENT_NAME == 'pull_request' ]; then - STAGING_URL="https://${SWA_BASE}-${{github.event.number}}.westus2.azurestaticapps.net/" - fi - hugo ${STAGING_URL+-b "$STAGING_URL"} - - name: Deploy docs site - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: "upload" - app_location: "daprdocs/public/" - api_location: "daprdocs/public/" - output_location: "" - skip_app_build: true - skip_deploy_on_missing_secrets: true - - name: Upload Hugo artifacts - uses: actions/upload-artifact@v3 - with: - name: hugo_build - path: ./daprdocs/public/ - if-no-files-found: error - - close_staging_site: - if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest - name: Close Pull Request Job - steps: - - name: Close Pull Request - id: closepullrequest - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }} - action: "close" - skip_deploy_on_missing_secrets: true - - algolia_index: - name: Index site for Algolia - if: github.event_name == 'push' - needs: ['build_and_deploy_job'] - runs-on: ubuntu-latest - env: - ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} - ALGOLIA_API_WRITE_KEY: ${{ secrets.ALGOLIA_API_WRITE_KEY }} - ALGOLIA_INDEX_NAME: daprdocs - steps: - - name: Checkout docs repo - uses: actions/checkout@v2 - with: - submodules: false - - name: Download Hugo artifacts - uses: actions/download-artifact@v3 - with: - name: hugo_build - path: site/ - - name: Install Python packages - run: | - pip install --upgrade bs4 - pip install --upgrade 'algoliasearch>=2.0,<3.0' - - name: Index site - run: python ./.github/scripts/algolia.py ./site From 661a1ed3d176332cd12d0380aabfe8eb141ee6ba Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Mon, 23 Oct 2023 04:52:01 -0500 Subject: [PATCH 08/18] Added example for retrieving bulk deserialized items matching PR #1173 in dotnet-sdk repo. Signed-off-by: Whit Waldo --- .../state-management/howto-get-save-state.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md index 9d8f08e9300..621e71b7b26 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md +++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md @@ -566,6 +566,33 @@ To launch a Dapr sidecar for the above example application, run a command simila dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 dotnet run ``` +The above example will return a `BulkStateItem` with the serialized format of the value you saved to state. If you would prefer that the value be deserialized by the SDK across each of your bulk response items, you can instead use the following: + +```csharp +//dependencies +using Dapr.Client; +//code +namespace EventService +{ + class Program + { + static async Task Main(string[] args) + { + string DAPR_STORE_NAME = "statestore"; + //Using Dapr SDK to retrieve multiple states + using var client = new DaprClientBuilder().Build(); + IReadOnlyList> mulitpleStateResult = await client.GetBulkStateAsync(DAPR_STORE_NAME, new List { "widget_1", "widget_2" }, parallelism: 1); + } + } + + class Widget + { + string Size { get; set; } + string Color { get; set; } + } +} +``` + {{% /codetab %}} {{% codetab %}} From 5adcac925ab798583235ac003cd7a8c3d5a9b2a3 Mon Sep 17 00:00:00 2001 From: Amit Mor Date: Sun, 12 Nov 2023 21:48:17 +0200 Subject: [PATCH 09/18] SNS/SQS contention Signed-off-by: Amit Mor Signed-off-by: Amit Mor --- .../components-reference/supported-pubsub/setup-aws-snssqs.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md index 61b68290196..0d316d5aed2 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md @@ -133,6 +133,9 @@ When configuring the PubSub component with SQS dead-letter queues, the metadata When running the Dapr sidecar (`daprd`) with your application on EKS (AWS Kubernetes) node/pod already attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec. {{% /alert %}} +#### SNS/SQS Contention with Dapr + +Fundamentally, SNS aggregates messages from multiple publisher topics into a single SQS queue by creating SQS subscriptions to those topics. As a subscriber, the SNS/SQS PubSub component consumes messages from that sole SQS queue. However, like any SQS consumer, the component cannot selectively retrieve only messages published to specific SNS topics it is configured to subscribe to. This can result in the component receiving messages originating from topics without associated handlers. Typically this occurs during component initialization, if infrastructure subscriptions are ready before component subscription handlers, or during shutdown, if component handlers are removed before infrastructure subscriptions. Since this issue affects any SQS consumer of multiple SNS topics, the component cannot prevent consuming messages from topics lacking handlers. When this happens, the component logs an error indicating such messages were erroneously retrieved. ## Create an SNS/SQS instance From 58570f137ce1c5aecfb0e49fd1100cf4cfdfc185 Mon Sep 17 00:00:00 2001 From: Amit Mor Date: Mon, 13 Nov 2023 10:45:28 +0200 Subject: [PATCH 10/18] added recommendation Signed-off-by: Amit Mor Signed-off-by: Amit Mor --- .../supported-pubsub/setup-aws-snssqs.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md index 0d316d5aed2..207b42fdaca 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md @@ -9,15 +9,16 @@ aliases: ## Component format -To set up AWS SNS/SQS pub/sub, create a component of type `pubsub.aws.snssqs`. +To set up AWS SNS/SQS pub/sub, create a component of type `pubsub.aws.snssqs`. By default, the AWS SNS/SQS component: + - Generates the SNS topics - Provisions the SQS queues - Configures a subscription of the queues to the topics {{% alert title="Note" color="primary" %}} -If you only have a publisher and no subscriber, only the SNS topics are created. +If you only have a publisher and no subscriber, only the SNS topics are created. However, if you have a subscriber, SNS, SQS, and the dynamic or static subscription thereof are generated. {{% /alert %}} @@ -136,6 +137,11 @@ When running the Dapr sidecar (`daprd`) with your application on EKS (AWS Kubern #### SNS/SQS Contention with Dapr Fundamentally, SNS aggregates messages from multiple publisher topics into a single SQS queue by creating SQS subscriptions to those topics. As a subscriber, the SNS/SQS PubSub component consumes messages from that sole SQS queue. However, like any SQS consumer, the component cannot selectively retrieve only messages published to specific SNS topics it is configured to subscribe to. This can result in the component receiving messages originating from topics without associated handlers. Typically this occurs during component initialization, if infrastructure subscriptions are ready before component subscription handlers, or during shutdown, if component handlers are removed before infrastructure subscriptions. Since this issue affects any SQS consumer of multiple SNS topics, the component cannot prevent consuming messages from topics lacking handlers. When this happens, the component logs an error indicating such messages were erroneously retrieved. +In these situations, the unhandled messages would reappear in SQS with their [receive count](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html#sqs-receive-count) decremented after each pull. Thus, there is a risk that an unhandled message could exceed its `messageReceiveLimit` and be lost. + +{{% alert title="Important" color="warning" %}} +It is therefore advisable to consider potential contention scenarios when using SNS/SQS with Dapr, and configure `messageReceiveLimit` appropriately. It is also highly recommended to use SQS dead-letter queues by setting `sqsDeadLettersQueueName` to prevent losing messages. +{{% /alert %}} ## Create an SNS/SQS instance From 6a9ccf472911e19fa294772040207eeafee0b471 Mon Sep 17 00:00:00 2001 From: Amit Mor Date: Tue, 14 Nov 2023 23:45:15 +0200 Subject: [PATCH 11/18] suggested edits Signed-off-by: Amit Mor Signed-off-by: Amit Mor --- .../supported-pubsub/setup-aws-snssqs.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md index 207b42fdaca..6ccddb05234 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md @@ -136,11 +136,19 @@ When running the Dapr sidecar (`daprd`) with your application on EKS (AWS Kubern #### SNS/SQS Contention with Dapr -Fundamentally, SNS aggregates messages from multiple publisher topics into a single SQS queue by creating SQS subscriptions to those topics. As a subscriber, the SNS/SQS PubSub component consumes messages from that sole SQS queue. However, like any SQS consumer, the component cannot selectively retrieve only messages published to specific SNS topics it is configured to subscribe to. This can result in the component receiving messages originating from topics without associated handlers. Typically this occurs during component initialization, if infrastructure subscriptions are ready before component subscription handlers, or during shutdown, if component handlers are removed before infrastructure subscriptions. Since this issue affects any SQS consumer of multiple SNS topics, the component cannot prevent consuming messages from topics lacking handlers. When this happens, the component logs an error indicating such messages were erroneously retrieved. +Fundamentally, SNS aggregates messages from multiple publisher topics into a single SQS queue by creating SQS subscriptions to those topics. As a subscriber, the SNS/SQS pub/sub component consumes messages from that sole SQS queue. + +However, like any SQS consumer, the component cannot selectively retrieve the messages published to the SNS topics to which it is specifically subscribed. This can result in the component receiving messages originating from topics without associated handlers. Typically, this occurs during: + +- **Component initialization:** If infrastructure subscriptions are ready before component subscription handlers, or +- **Shutdown:** If component handlers are removed before infrastructure subscriptions. + +Since this issue affects any SQS consumer of multiple SNS topics, the component cannot prevent consuming messages from topics lacking handlers. When this happens, the component logs an error indicating such messages were erroneously retrieved. + In these situations, the unhandled messages would reappear in SQS with their [receive count](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html#sqs-receive-count) decremented after each pull. Thus, there is a risk that an unhandled message could exceed its `messageReceiveLimit` and be lost. {{% alert title="Important" color="warning" %}} -It is therefore advisable to consider potential contention scenarios when using SNS/SQS with Dapr, and configure `messageReceiveLimit` appropriately. It is also highly recommended to use SQS dead-letter queues by setting `sqsDeadLettersQueueName` to prevent losing messages. +Consider potential contention scenarios when using SNS/SQS with Dapr, and configure `messageReceiveLimit` appropriately. It is highly recommended to use SQS dead-letter queues by setting `sqsDeadLettersQueueName` to prevent losing messages. {{% /alert %}} ## Create an SNS/SQS instance From 9be31d97d0f7ed5fec71e78e31a3f00de1fc1df9 Mon Sep 17 00:00:00 2001 From: Yaron Schneider Date: Tue, 21 Nov 2023 23:14:31 -0800 Subject: [PATCH 12/18] Update config.toml (#3882) Signed-off-by: Yaron Schneider --- daprdocs/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/config.toml b/daprdocs/config.toml index c5f2f7bee40..9b7e85bb2fc 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -190,7 +190,7 @@ url_latest_version = "https://docs.dapr.io" [[params.versions]] version = "v1.13 (preview)" - url = "#" + url = "https://v1-13.docs.dapr.io" [[params.versions]] version = "v1.12 (latest)" url = "#" From 02a84b0d6a230bb18395b671ead2c45ca00f57de Mon Sep 17 00:00:00 2001 From: Yaron Schneider Date: Tue, 21 Nov 2023 23:47:16 -0800 Subject: [PATCH 13/18] Update config.toml (#3883) * Update config.toml Signed-off-by: Yaron Schneider * Update config.toml Signed-off-by: Yaron Schneider --------- Signed-off-by: Yaron Schneider --- daprdocs/config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daprdocs/config.toml b/daprdocs/config.toml index 9b7e85bb2fc..415e86f5f19 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -190,10 +190,10 @@ url_latest_version = "https://docs.dapr.io" [[params.versions]] version = "v1.13 (preview)" - url = "https://v1-13.docs.dapr.io" + url = "#" [[params.versions]] version = "v1.12 (latest)" - url = "#" + url = "https://docs.dapr.io" [[params.versions]] version = "v1.11" url = "https://v1-11.docs.dapr.io" From 3114f4d357468752055901dd6d47f12e85f22a64 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Mon, 4 Dec 2023 23:39:25 +0000 Subject: [PATCH 14/18] Adds Daprd `--block-shutdown-seconds` reference Part of https://github.com/dapr/dapr/issues/4313 Signed-off-by: joshvanl --- daprdocs/content/en/reference/arguments-annotations-overview.md | 1 + 1 file changed, 1 insertion(+) diff --git a/daprdocs/content/en/reference/arguments-annotations-overview.md b/daprdocs/content/en/reference/arguments-annotations-overview.md index 68eab9812c3..599ae8eed72 100644 --- a/daprdocs/content/en/reference/arguments-annotations-overview.md +++ b/daprdocs/content/en/reference/arguments-annotations-overview.md @@ -46,6 +46,7 @@ This table is meant to help users understand the equivalent options for running | `--sentry-address` | `--sentry-address` | | not supported | Address for the [Sentry CA service]({{< ref sentry >}}) | | `--version` | `--version` | `-v` | not supported | Prints the runtime version | | `--dapr-graceful-shutdown-seconds` | not supported | | `dapr.io/graceful-shutdown-seconds` | Graceful shutdown duration in seconds for Dapr, the maximum duration before forced shutdown when waiting for all in-progress requests to complete. Defaults to `5`. If you are running in Kubernetes mode, this value should not be larger than the Kubernetes termination grace period, who's default value is `30`.| +| `--dapr-block-shutdown-seconds` | not supported | | `dapr.io/block-shutdown-seconds` | Block shutdowns seconds, if set, will block the graceful shutdown proceedure as described above from starting until the number of seconds has elapsed or the application becomes unhealthy as configured through application health options. This is useful for applications which need to execute Dapr APIs during their own termination procudure. Any new invocations of any Dapr APIs will not be available to the application once the block has expired. | | not supported | not supported | | `dapr.io/enabled` | Setting this paramater to true injects the Dapr sidecar into the pod | | not supported | not supported | | `dapr.io/api-token-secret` | Tells Dapr which Kubernetes secret to use for [token-based API authentication]({{< ref api-token >}}). By default this is not set | | not supported | not supported | | `dapr.io/app-token-secret` | Tells Dapr which Kubernetes secret to use for [token-based application authentication]({{< ref app-api-token >}}). By default, this is not set | From 22b7057aed775fae3346cce77d1aaafbd51070ca Mon Sep 17 00:00:00 2001 From: joshvanl Date: Tue, 5 Dec 2023 14:08:08 +0000 Subject: [PATCH 15/18] Updates block-shutdown-seconds to block-shutdown-duration Signed-off-by: joshvanl --- daprdocs/content/en/reference/arguments-annotations-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/arguments-annotations-overview.md b/daprdocs/content/en/reference/arguments-annotations-overview.md index 599ae8eed72..e2d0e4382ee 100644 --- a/daprdocs/content/en/reference/arguments-annotations-overview.md +++ b/daprdocs/content/en/reference/arguments-annotations-overview.md @@ -46,7 +46,7 @@ This table is meant to help users understand the equivalent options for running | `--sentry-address` | `--sentry-address` | | not supported | Address for the [Sentry CA service]({{< ref sentry >}}) | | `--version` | `--version` | `-v` | not supported | Prints the runtime version | | `--dapr-graceful-shutdown-seconds` | not supported | | `dapr.io/graceful-shutdown-seconds` | Graceful shutdown duration in seconds for Dapr, the maximum duration before forced shutdown when waiting for all in-progress requests to complete. Defaults to `5`. If you are running in Kubernetes mode, this value should not be larger than the Kubernetes termination grace period, who's default value is `30`.| -| `--dapr-block-shutdown-seconds` | not supported | | `dapr.io/block-shutdown-seconds` | Block shutdowns seconds, if set, will block the graceful shutdown proceedure as described above from starting until the number of seconds has elapsed or the application becomes unhealthy as configured through application health options. This is useful for applications which need to execute Dapr APIs during their own termination procudure. Any new invocations of any Dapr APIs will not be available to the application once the block has expired. | +| `--dapr-block-shutdown-duration` | not supported | | `dapr.io/block-shutdown-duration` | Block shutdown duration, if set, will block the graceful shutdown proceedure as described above from starting until the given duration has elapsed or the application becomes unhealthy as configured through application health options. This is useful for applications which need to execute Dapr APIs during their own termination procudure. Any new invocations of any Dapr APIs will not be available to the application once the block has expired. Accepts [Go duration](https://pkg.go.dev/time#ParseDuration) string. | | not supported | not supported | | `dapr.io/enabled` | Setting this paramater to true injects the Dapr sidecar into the pod | | not supported | not supported | | `dapr.io/api-token-secret` | Tells Dapr which Kubernetes secret to use for [token-based API authentication]({{< ref api-token >}}). By default this is not set | | not supported | not supported | | `dapr.io/app-token-secret` | Tells Dapr which Kubernetes secret to use for [token-based application authentication]({{< ref app-api-token >}}). By default, this is not set | From 2db304e62afc71faf58c4332483303ae20ed8242 Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Fri, 8 Dec 2023 17:53:36 +0000 Subject: [PATCH 16/18] Update arguments-annotations-overview.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Josh van Leeuwen --- daprdocs/content/en/reference/arguments-annotations-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/arguments-annotations-overview.md b/daprdocs/content/en/reference/arguments-annotations-overview.md index e2d0e4382ee..f69190fcfd4 100644 --- a/daprdocs/content/en/reference/arguments-annotations-overview.md +++ b/daprdocs/content/en/reference/arguments-annotations-overview.md @@ -46,7 +46,7 @@ This table is meant to help users understand the equivalent options for running | `--sentry-address` | `--sentry-address` | | not supported | Address for the [Sentry CA service]({{< ref sentry >}}) | | `--version` | `--version` | `-v` | not supported | Prints the runtime version | | `--dapr-graceful-shutdown-seconds` | not supported | | `dapr.io/graceful-shutdown-seconds` | Graceful shutdown duration in seconds for Dapr, the maximum duration before forced shutdown when waiting for all in-progress requests to complete. Defaults to `5`. If you are running in Kubernetes mode, this value should not be larger than the Kubernetes termination grace period, who's default value is `30`.| -| `--dapr-block-shutdown-duration` | not supported | | `dapr.io/block-shutdown-duration` | Block shutdown duration, if set, will block the graceful shutdown proceedure as described above from starting until the given duration has elapsed or the application becomes unhealthy as configured through application health options. This is useful for applications which need to execute Dapr APIs during their own termination procudure. Any new invocations of any Dapr APIs will not be available to the application once the block has expired. Accepts [Go duration](https://pkg.go.dev/time#ParseDuration) string. | +| `--dapr-block-shutdown-duration` | not supported | | `dapr.io/block-shutdown-duration` | Block shutdown duration, if set, blocks the graceful shutdown procedure (as described above) from starting until the given duration has elapsed or the application becomes unhealthy as configured through application health options. This is useful for applications that need to execute Dapr APIs during their own termination procedure. Any new invocations of any Dapr APIs are not available to the application once the block has expired. Accepts [Go duration](https://pkg.go.dev/time#ParseDuration) string. | | not supported | not supported | | `dapr.io/enabled` | Setting this paramater to true injects the Dapr sidecar into the pod | | not supported | not supported | | `dapr.io/api-token-secret` | Tells Dapr which Kubernetes secret to use for [token-based API authentication]({{< ref api-token >}}). By default this is not set | | not supported | not supported | | `dapr.io/app-token-secret` | Tells Dapr which Kubernetes secret to use for [token-based application authentication]({{< ref app-api-token >}}). By default, this is not set | From bb11cf583c6e1a9982e2ae5683f48b17f59f4178 Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Fri, 22 Dec 2023 20:01:19 -0600 Subject: [PATCH 17/18] Added .NET examples to cryptography building block Signed-off-by: Whit Waldo --- .../cryptography/howto-cryptography.md | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/cryptography/howto-cryptography.md b/daprdocs/content/en/developing-applications/building-blocks/cryptography/howto-cryptography.md index 92f3a671072..c7a781b072d 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/cryptography/howto-cryptography.md +++ b/daprdocs/content/en/developing-applications/building-blocks/cryptography/howto-cryptography.md @@ -15,7 +15,7 @@ Now that you've read about [Cryptography as a Dapr building block]({{< ref crypt ## Encrypt -{{< tabs "JavaScript" "Go" >}} +{{< tabs "JavaScript" "Go", "C#" >}} {{% codetab %}} @@ -136,6 +136,29 @@ if err != nil { {{% /codetab %}} +{{% codetab %}} + + + +To decrypt a file, use the `DecryptAsync` method and pass it either a byte array or a stream. + +```csharp +const string componentName = "azurekeyvault"; +const string keyName = "myKey"; + +var decryptedBytes = await client.DecryptAsync(componentName, encryptedBytes, keyName, cancellationToken); + +// `DecryptAsync` can also accept a stream like a `FileStream` or `MemoryStream` +await using var memoryStream = new MemoryStream(encryptedBytes); +var decryptedBytesFromStream = await client.DecryptAsync(componentName, memoryStream, keyName, cancellationToken); +``` + +{{% /codetab %}} + {{< /tabs >}} ## Next steps From c19cd9dccf543e2c32cba449ea05afe46bc63d65 Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Fri, 22 Dec 2023 20:25:08 -0600 Subject: [PATCH 18/18] Added .NET examples to cryptography building block --- .../cryptography/howto-cryptography.md | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/cryptography/howto-cryptography.md b/daprdocs/content/en/developing-applications/building-blocks/cryptography/howto-cryptography.md index 92f3a671072..c7a781b072d 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/cryptography/howto-cryptography.md +++ b/daprdocs/content/en/developing-applications/building-blocks/cryptography/howto-cryptography.md @@ -15,7 +15,7 @@ Now that you've read about [Cryptography as a Dapr building block]({{< ref crypt ## Encrypt -{{< tabs "JavaScript" "Go" >}} +{{< tabs "JavaScript" "Go", "C#" >}} {{% codetab %}} @@ -136,6 +136,29 @@ if err != nil { {{% /codetab %}} +{{% codetab %}} + + + +To decrypt a file, use the `DecryptAsync` method and pass it either a byte array or a stream. + +```csharp +const string componentName = "azurekeyvault"; +const string keyName = "myKey"; + +var decryptedBytes = await client.DecryptAsync(componentName, encryptedBytes, keyName, cancellationToken); + +// `DecryptAsync` can also accept a stream like a `FileStream` or `MemoryStream` +await using var memoryStream = new MemoryStream(encryptedBytes); +var decryptedBytesFromStream = await client.DecryptAsync(componentName, memoryStream, keyName, cancellationToken); +``` + +{{% /codetab %}} + {{< /tabs >}} ## Next steps