diff --git a/.github/workflows/link_validation.yaml b/.github/workflows/link_validation.yaml index 4b7840e3cb1..350f8407a33 100644 --- a/.github/workflows/link_validation.yaml +++ b/.github/workflows/link_validation.yaml @@ -13,7 +13,7 @@ jobs: validate: runs-on: ubuntu-latest env: - PYTHON_VER: 3.7 + PYTHON_VER: 3.12 steps: - uses: actions/checkout@v2 - name: Check Microsoft URLs do not pin localized versions @@ -27,7 +27,7 @@ jobs: exit 1 fi - name: Set up Python ${{ env.PYTHON_VER }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VER }} - name: Install dependencies diff --git a/.github/workflows/website-root.yml b/.github/workflows/website-root.yml index 6bd00c5e6db..af72363b475 100644 --- a/.github/workflows/website-root.yml +++ b/.github/workflows/website-root.yml @@ -63,7 +63,7 @@ jobs: skip_app_build: true skip_deploy_on_missing_secrets: true - name: Upload Hugo artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: hugo_build path: ./daprdocs/public/ diff --git a/daprdocs/config.toml b/daprdocs/config.toml index dcaf0b6ec97..b0165c98386 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -109,7 +109,7 @@ id = "G-60C6Q1ETC1" lang = "en" [[module.mounts]] source = "../sdkdocs/rust/daprdocs/content/en/rust-sdk-contributing" - target = "content/contributing/sdks-contrib" + target = "content/contributing/sdk-contrib/" lang = "en" [[module.mounts]] diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md index b0392fa7818..2b2fbde3561 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md @@ -199,7 +199,7 @@ string randomString = GetRandomString(); // DON'T DO THIS! Instant currentTime = Instant.now(); UUID newIdentifier = UUID.randomUUID(); -string randomString = GetRandomString(); +String randomString = getRandomString(); ``` {{% /codetab %}} @@ -246,7 +246,7 @@ string randomString = await context.CallActivityAsync("GetRandomString") ```java // Do this!! Instant currentTime = context.getCurrentInstant(); -Guid newIdentifier = context.NewGuid(); +Guid newIdentifier = context.newGuid(); String randomString = context.callActivity(GetRandomString.class.getName(), String.class).await(); ``` @@ -342,7 +342,7 @@ Do this: ```csharp // Do this!! -string configuation = workflowInput.Configuration; // imaginary workflow input argument +string configuration = workflowInput.Configuration; // imaginary workflow input argument string data = await context.CallActivityAsync("MakeHttpCall", "https://example.com/api/data"); ``` @@ -352,7 +352,7 @@ string data = await context.CallActivityAsync("MakeHttpCall", "https://e ```java // Do this!! -String configuation = ctx.getInput(InputType.class).getConfiguration(); // imaginary workflow input argument +String configuration = ctx.getInput(InputType.class).getConfiguration(); // imaginary workflow input argument String data = ctx.callActivity(MakeHttpCall.class, "https://example.com/api/data", String.class).await(); ``` @@ -362,7 +362,7 @@ String data = ctx.callActivity(MakeHttpCall.class, "https://example.com/api/data ```javascript // Do this!! -const configuation = workflowInput.getConfiguration(); // imaginary workflow input argument +const configuration = workflowInput.getConfiguration(); // imaginary workflow input argument const data = yield ctx.callActivity(makeHttpCall, "https://example.com/api/data"); ``` diff --git a/daprdocs/content/en/developing-applications/integrations/AWS/authenticating-aws.md b/daprdocs/content/en/developing-applications/integrations/AWS/authenticating-aws.md index f11565ceb59..3439526f3e3 100644 --- a/daprdocs/content/en/developing-applications/integrations/AWS/authenticating-aws.md +++ b/daprdocs/content/en/developing-applications/integrations/AWS/authenticating-aws.md @@ -34,10 +34,16 @@ In production scenarios, it is recommended to use a solution such as: If running on AWS EKS, you can [link an IAM role to a Kubernetes service account](https://docs.aws.amazon.com/eks/latest/userguide/create-service-account-iam-policy-and-role.html), which your pod can use. -All of these solutions solve the same problem: They allow the Dapr runtime process (or sidecar) to retrive credentials dynamically, so that explicit credentials aren't needed. This provides several benefits, such as automated key rotation, and avoiding having to manage secrets. +All of these solutions solve the same problem: They allow the Dapr runtime process (or sidecar) to retrieve credentials dynamically, so that explicit credentials aren't needed. This provides several benefits, such as automated key rotation, and avoiding having to manage secrets. Both Kiam and Kube2IAM work by intercepting calls to the [instance metadata service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html). +### Setting Up Dapr with AWS EKS Pod Identity + +EKS Pod Identities provide the ability to manage credentials for your applications, similar to the way that Amazon EC2 instance profiles provide credentials to Amazon EC2 instances. Instead of creating and distributing your AWS credentials to the containers or using the Amazon EC2 instance’s role, you associate an IAM role with a Kubernetes service account and configure your Pods to use the service account. + +To see a comprehensive example on how to authorize pod access to AWS Secrets Manager from EKS using AWS EKS Pod Identity, [follow the sample in this repository](https://github.com/dapr/samples/tree/master/dapr-eks-podidentity). + ### Use an instance profile when running in stand-alone mode on AWS EC2 If running Dapr directly on an AWS EC2 instance in stand-alone mode, you can use instance profiles. @@ -84,7 +90,6 @@ On Windows, the environment variable needs to be set before starting the `dapr` {{< /tabs >}} - ### Authenticate to AWS if using AWS SSO based profiles If you authenticate to AWS using [AWS SSO](https://aws.amazon.com/single-sign-on/), some AWS SDKs (including the Go SDK) don't yet support this natively. There are several utilities you can use to "bridge the gap" between AWS SSO-based credentials and "legacy" credentials, such as: @@ -111,7 +116,7 @@ AWS_PROFILE=myprofile awshelper daprd... {{% codetab %}} -On Windows, the environment variable needs to be set before starting the `awshelper` command, doing it inline (like in Linxu/MacOS) is not supported. +On Windows, the environment variable needs to be set before starting the `awshelper` command; doing it inline (like in Linux/MacOS) is not supported. {{% /codetab %}} @@ -123,4 +128,7 @@ On Windows, the environment variable needs to be set before starting the `awshel ## Related links -For more information, see [how the AWS SDK (which Dapr uses) handles credentials](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials). +- For more information, see [how the AWS SDK (which Dapr uses) handles credentials](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials). +- [EKS Pod Identity Documentation](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html) +- [AWS SDK Credentials Configuration](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials) +- [Set up an Elastic Kubernetes Service (EKS) cluster](https://docs.dapr.io/operations/hosting/kubernetes/cluster/setup-eks/) diff --git a/daprdocs/content/en/developing-applications/integrations/Diagrid/test-containers.md b/daprdocs/content/en/developing-applications/integrations/Diagrid/test-containers.md deleted file mode 100644 index 1eabef6bf61..00000000000 --- a/daprdocs/content/en/developing-applications/integrations/Diagrid/test-containers.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -type: docs -title: "How to: Integrate using Testcontainers Dapr Module" -linkTitle: "Dapr Testcontainers" -weight: 3000 -description: "Use the Dapr Testcontainer module from your Java application" ---- - -You can use the Testcontainers Dapr Module provided by Diagrid to set up Dapr locally for your Java applications. Simply add the following dependency to your Maven project: - -```xml - - io.diagrid.dapr - testcontainers-dapr - 0.10.x - -``` - -[If you're using Spring Boot, you can also use the Spring Boot Starter.](https://github.com/diagridio/spring-boot-starter-dapr) - -{{< button text="Use the Testcontainers Dapr Module" link="https://github.com/diagridio/testcontainers-dapr" >}} \ No newline at end of file diff --git a/daprdocs/content/en/operations/hosting/kubernetes/cluster/setup-eks.md b/daprdocs/content/en/operations/hosting/kubernetes/cluster/setup-eks.md index 6a87484cc36..b7e8a0f8153 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/cluster/setup-eks.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/cluster/setup-eks.md @@ -66,7 +66,7 @@ This guide walks you through installing an Elastic Kubernetes Service (EKS) clus 1. Create the cluster by running the following command: ```bash - eksctl create cluster -f cluster.yaml + eksctl create cluster -f cluster-config.yaml ``` 1. Verify the kubectl context: diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md b/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md index 780bfaebefe..76def5a6b42 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md @@ -675,7 +675,12 @@ To perform a `throw-error` operation, invoke the Zeebe command binding with a `P "data": { "jobKey": 2251799813686172, "errorCode": "product-fetch-error", - "errorMessage": "The product could not be fetched" + "errorMessage": "The product could not be fetched", + "variables": { + "productId": "some-product-id", + "productName": "some-product-name", + "productKey": "some-product-key" + } }, "operation": "throw-error" } @@ -686,6 +691,11 @@ The data parameters are: - `jobKey` - the unique job identifier, as obtained when activating the job - `errorCode` - the error code that will be matched with an error catch event - `errorMessage` - (optional) an error message that provides additional context +- `variables` - (optional) JSON document that will instantiate the variables at the local scope of the + job's associated task; it must be a JSON object, as variables will be mapped in a + key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and + "b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a + valid argument, as the root of the JSON document is an array and not an object. ##### Response 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 360bd6ef3e3..86865de5b30 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 @@ -68,7 +68,8 @@ spec: # value: 5 # - name: concurrencyMode # Optional # value: "single" - + # - name: concurrencyLimit # Optional + # value: "0" ``` @@ -98,6 +99,7 @@ The above example uses secrets as plain strings. It is recommended to use [a sec | disableDeleteOnRetryLimit | N | When set to true, after retrying and failing of `messageRetryLimit` times processing a message, reset the message visibility timeout so that other consumers can try processing, instead of deleting the message from SQS (the default behvior). Default: `"false"` | `"true"`, `"false"` | assetsManagementTimeoutSeconds | N | Amount of time in seconds, for an AWS asset management operation, before it times out and cancelled. Asset management operations are any operations performed on STS, SNS and SQS, except message publish and consume operations that implement the default Dapr component retry behavior. The value can be set to any non-negative float/integer. Default: `5` | `0.5`, `10` | concurrencyMode | N | When messages are received in bulk from SQS, call the subscriber sequentially (“single” message at a time), or concurrently (in “parallel”). Default: `"parallel"` | `"single"`, `"parallel"` +| concurrencyLimit | N | Defines the maximum number of concurrent workers handling messages. This value is ignored when concurrencyMode is set to `"single"`. To avoid limiting the number of concurrent workers, set this to `0`. Default: `0` | `100` ### Additional info diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md index 713bdb1cbb7..f778c3824b6 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md @@ -195,6 +195,44 @@ Entity management is only possible when using [Microsoft Entra ID Authentication > Dapr passes the name of the consumer group to the Event Hub, so this is not supplied in the metadata. +## Receiving custom properties + +By default, Dapr does not forward [custom properties](https://learn.microsoft.com/azure/event-hubs/add-custom-data-event). However, by setting the subscription metadata `requireAllProperties` to `"true"`, you can receive custom properties as HTTP headers. + +```yaml +apiVersion: dapr.io/v2alpha1 +kind: Subscription +metadata: + name: order-pub-sub +spec: + topic: orders + routes: + default: /checkout + pubsubname: order-pub-sub + metadata: + requireAllProperties: "true" +``` + +The same can be achieved using the Dapr SDK: + +{{< tabs ".NET" >}} + +{{% codetab %}} + +```csharp +[Topic("order-pub-sub", "orders")] +[TopicMetadata("requireAllProperties", "true")] +[HttpPost("checkout")] +public ActionResult Checkout(Order order, [FromHeader] int priority) +{ + return Ok(); +} +``` + +{{% /codetab %}} + +{{< /tabs >}} + ## Subscribing to Azure IoT Hub Events Azure IoT Hub provides an [endpoint that is compatible with Event Hubs](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-read-builtin#read-from-the-built-in-endpoint), so the Azure Event Hubs pubsub component can also be used to subscribe to Azure IoT Hub events. diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v1.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v1.md index 8cec85ad16a..c818d7d191f 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v1.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v1.md @@ -52,7 +52,7 @@ spec: # Controls the default mode for executing queries. (optional) #- name: queryExecMode # value: "" - # Uncomment this if you wish to use PostgreSQL as a state store for actors (optional) + # Uncomment this if you wish to use PostgreSQL as a state store for actors or workflows (optional) #- name: actorStateStore # value: "true" ``` diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v2.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v2.md index 3223867787f..dc7787d4f22 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v2.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-postgresql-v2.md @@ -52,7 +52,7 @@ spec: # Controls the default mode for executing queries. (optional) #- name: queryExecMode # value: "" - # Uncomment this if you wish to use PostgreSQL as a state store for actors (optional) + # Uncomment this if you wish to use PostgreSQL as a state store for actors or workflows (optional) #- name: actorStateStore # value: "true" ``` diff --git a/daprdocs/package-lock.json b/daprdocs/package-lock.json index 6bcdae97208..e7dec5f674f 100644 --- a/daprdocs/package-lock.json +++ b/daprdocs/package-lock.json @@ -720,9 +720,15 @@ } }, "node_modules/nanoid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.2.tgz", - "integrity": "sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" },