From 4f32042c1339cbf9ad5cdedcfbb4f791282745f5 Mon Sep 17 00:00:00 2001 From: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Date: Thu, 27 Feb 2025 14:08:32 -0500 Subject: [PATCH 01/24] Update conversation-overview.md fix todo Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> --- .../building-blocks/conversation/conversation-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md b/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md index 3f2f79defa1..f6267322bf1 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md @@ -59,7 +59,7 @@ Want to put the Dapr conversation API to the test? Walk through the following qu | Quickstart/tutorial | Description | | ------------------- | ----------- | -| [Conversation quickstart](todo) | TODO | +| [Conversation quickstart]({{< ref conversation-quickstart.md >}}) | Learn how to interact with Large Language Models (LLMs) using the conversation API. | ### Start using the conversation API directly in your app From b74c247d01eeec64ce887eb6418039fa623208f1 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 28 Feb 2025 16:32:37 -0500 Subject: [PATCH 02/24] update python examples for workflow; update conversation quickstart to python sdk Signed-off-by: Hannah Hunter --- .../workflow/howto-author-workflow.md | 181 ++++++++++-------- .../quickstarts/conversation-quickstart.md | 57 +++--- .../quickstarts/workflow-quickstart.md | 9 - 3 files changed, 121 insertions(+), 126 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-author-workflow.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-author-workflow.md index 3345b97b2a8..ae2285d3720 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-author-workflow.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-author-workflow.md @@ -36,16 +36,31 @@ The Dapr sidecar doesn’t load any workflow definitions. Rather, the sidecar si -Define the workflow activities you'd like your workflow to perform. Activities are a function definition and can take inputs and outputs. The following example creates a counter (activity) called `hello_act` that notifies users of the current counter value. `hello_act` is a function derived from a class called `WorkflowActivityContext`. +Define the workflow activities you'd like your workflow to perform. Activities are a function definition and can take inputs and outputs. The following example creates task chaining activities that receive input ```python -def hello_act(ctx: WorkflowActivityContext, input): - global counter - counter += input - print(f'New counter value is: {counter}!', flush=True) +@wfr.activity(name='step10') +def step1(ctx, activity_input): + print(f'Step 1: Received input: {activity_input}.') + # Do some work + return activity_input + 1 + + +@wfr.activity +def step2(ctx, activity_input): + print(f'Step 2: Received input: {activity_input}.') + # Do some work + return activity_input * 2 + + +@wfr.activity +def step3(ctx, activity_input): + print(f'Step 3: Received input: {activity_input}.') + # Do some work + return activity_input ^ 2 ``` -[See the `hello_act` workflow activity in context.](https://github.com/dapr/python-sdk/blob/master/examples/demo_workflow/app.py#LL40C1-L43C59) +[See the task chaining workflow activity in context.](https://github.com/dapr/python-sdk/blob/main/examples/workflow/task_chaining.py) {{% /codetab %}} @@ -226,16 +241,19 @@ Next, register and call the activites in a workflow. -The `hello_world_wf` function is derived from a class called `DaprWorkflowContext` with input and output parameter types. It also includes a `yield` statement that does the heavy lifting of the workflow and calls the workflow activities. +The `random_workflow` function is a task chaining workflow pattern derived from a class called `DaprWorkflowContext` with input and output parameter types. It also includes a `yield` statement that does the heavy lifting of the workflow and calls the workflow activities. ```python -def hello_world_wf(ctx: DaprWorkflowContext, input): - print(f'{input}') - yield ctx.call_activity(hello_act, input=1) - yield ctx.call_activity(hello_act, input=10) - yield ctx.wait_for_external_event("event1") - yield ctx.call_activity(hello_act, input=100) - yield ctx.call_activity(hello_act, input=1000) +@wfr.workflow(name='random_workflow') +def task_chain_workflow(ctx: wf.DaprWorkflowContext, wf_input: int): + try: + result1 = yield ctx.call_activity(step1, input=wf_input) + result2 = yield ctx.call_activity(step2, input=result1) + result3 = yield ctx.call_activity(step3, input=result2) + except Exception as e: + yield ctx.call_activity(error_handler, input=str(e)) + raise + return [result1, result2, result3] ``` [See the `hello_world_wf` workflow in context.](https://github.com/dapr/python-sdk/blob/master/examples/demo_workflow/app.py#LL32C1-L38C51) @@ -409,82 +427,77 @@ Finally, compose the application using the workflow. - A Python package called `DaprClient` to receive the Python SDK capabilities. - A builder with extensions called: - - `WorkflowRuntime`: Allows you to register workflows and workflow activities - - `DaprWorkflowContext`: Allows you to [create workflows]({{< ref "#write-the-workflow" >}}) + - `WorkflowRuntime`: Allows you to register the workflow runtime. + - `DaprWorkflowContext`: Allows you to [create workflows and workflow activities]({{< ref "#write-the-workflow" >}}) - `WorkflowActivityContext`: Allows you to [create workflow activities]({{< ref "#write-the-workflow-activities" >}}) - API calls. In the example below, these calls start, pause, resume, purge, and terminate the workflow. ```python -from dapr.ext.workflow import WorkflowRuntime, DaprWorkflowContext, WorkflowActivityContext -from dapr.clients import DaprClient - -# ... - -def main(): - with DaprClient() as d: - host = settings.DAPR_RUNTIME_HOST - port = settings.DAPR_GRPC_PORT - workflowRuntime = WorkflowRuntime(host, port) - workflowRuntime = WorkflowRuntime() - workflowRuntime.register_workflow(hello_world_wf) - workflowRuntime.register_activity(hello_act) - workflowRuntime.start() - - # Start workflow - print("==========Start Counter Increase as per Input:==========") - start_resp = d.start_workflow(instance_id=instanceId, workflow_component=workflowComponent, - workflow_name=workflowName, input=inputData, workflow_options=workflowOptions) - print(f"start_resp {start_resp.instance_id}") - - # ... - - # Pause workflow - d.pause_workflow(instance_id=instanceId, workflow_component=workflowComponent) - getResponse = d.get_workflow(instance_id=instanceId, workflow_component=workflowComponent) - print(f"Get response from {workflowName} after pause call: {getResponse.runtime_status}") - - # Resume workflow - d.resume_workflow(instance_id=instanceId, workflow_component=workflowComponent) - getResponse = d.get_workflow(instance_id=instanceId, workflow_component=workflowComponent) - print(f"Get response from {workflowName} after resume call: {getResponse.runtime_status}") - - sleep(1) - # Raise workflow - d.raise_workflow_event(instance_id=instanceId, workflow_component=workflowComponent, - event_name=eventName, event_data=eventData) - - sleep(5) - # Purge workflow - d.purge_workflow(instance_id=instanceId, workflow_component=workflowComponent) - try: - getResponse = d.get_workflow(instance_id=instanceId, workflow_component=workflowComponent) - except DaprInternalError as err: - if nonExistentIDError in err._message: - print("Instance Successfully Purged") - - # Kick off another workflow for termination purposes - start_resp = d.start_workflow(instance_id=instanceId, workflow_component=workflowComponent, - workflow_name=workflowName, input=inputData, workflow_options=workflowOptions) - print(f"start_resp {start_resp.instance_id}") - - # Terminate workflow - d.terminate_workflow(instance_id=instanceId, workflow_component=workflowComponent) - sleep(1) - getResponse = d.get_workflow(instance_id=instanceId, workflow_component=workflowComponent) - print(f"Get response from {workflowName} after terminate call: {getResponse.runtime_status}") - - # Purge workflow - d.purge_workflow(instance_id=instanceId, workflow_component=workflowComponent) - try: - getResponse = d.get_workflow(instance_id=instanceId, workflow_component=workflowComponent) - except DaprInternalError as err: - if nonExistentIDError in err._message: - print("Instance Successfully Purged") - - workflowRuntime.shutdown() +from durabletask import worker, task + +from dapr.ext.workflow.workflow_context import Workflow +from dapr.ext.workflow.dapr_workflow_context import DaprWorkflowContext +from dapr.ext.workflow.workflow_activity_context import Activity, WorkflowActivityContext +from dapr.ext.workflow.util import getAddress + +from dapr.clients import DaprInternalError +from dapr.clients.http.client import DAPR_API_TOKEN_HEADER +from dapr.conf import settings +from dapr.conf.helpers import GrpcEndpoint +from dapr.ext.workflow.logger import LoggerOptions, Logger + +wfr = wf.WorkflowRuntime() + + @wfr.workflow(name='hello_world_wf') + def hello_world_wf(ctx: DaprWorkflowContext, wf_input): + # Workflow definition... + + @wfr.activity(name='hello_act') + def hello_act(ctx: WorkflowActivityContext, wf_input): + # Activity definition... + + # Start workflow + wfr = WorkflowRuntime() + wfr.start() + wf_client = DaprWorkflowClient() + + # ... + + # Pause workflow + wf_client.pause_workflow(instance_id=instance_id) + metadata = wf_client.get_workflow_state(instance_id=instance_id) + # ... check status ... + wf_client.resume_workflow(instance_id=instance_id) + + sleep(1) + + # Raise workflow + wf_client.raise_workflow_event( + instance_id=instance_id, + event_name=event_name, + data=event_data + ) + + # Purge workflow + state = wf_client.wait_for_workflow_completion( + instance_id, + timeout_in_seconds=30 + ) + wf_client.purge_workflow(instance_id=instance_id) + + workflowRuntime.shutdown() if __name__ == '__main__': - main() + wfr.start() + sleep(10) # wait for workflow runtime to start + + wf_client = wf.DaprWorkflowClient() + instance_id = wf_client.schedule_new_workflow(workflow=task_chain_workflow, input=42) + print(f'Workflow started. Instance ID: {instance_id}') + state = wf_client.wait_for_workflow_completion(instance_id) + print(f'Workflow completed! Status: {state.runtime_status}') + + wfr.shutdown() ``` diff --git a/daprdocs/content/en/getting-started/quickstarts/conversation-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/conversation-quickstart.md index 8abed6f58d3..e38701bfadd 100644 --- a/daprdocs/content/en/getting-started/quickstarts/conversation-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/conversation-quickstart.md @@ -10,7 +10,7 @@ description: Get started with the Dapr conversation building block The conversation building block is currently in **alpha**. {{% /alert %}} -Let's take a look at how the [Dapr conversation building block]({{< ref conversation-overview.md >}}) makes interacting with Large Language Models (LLMs) easier. In this quickstart, you use the echo component to communicate with the mock LLM and ask it for a poem about Dapr. +Let's take a look at how the [Dapr conversation building block]({{< ref conversation-overview.md >}}) makes interacting with Large Language Models (LLMs) easier. In this quickstart, you use the echo component to communicate with the mock LLM and ask it to define Dapr. You can try out this conversation quickstart by either: @@ -18,7 +18,7 @@ You can try out this conversation quickstart by either: - [Running the application without the template]({{< ref "#run-the-app-without-the-template" >}}) {{% alert title="Note" color="primary" %}} -Currently, only the HTTP quickstart sample is available in Python and JavaScript. +Currently, you can only use JavaScript for the quickstart sample using HTTP, not the JavaScript SDK. {{% /alert %}} ## Run the app with the template file @@ -50,7 +50,7 @@ git clone https://github.com/dapr/quickstarts.git From the root of the Quickstarts directory, navigate into the conversation directory: ```bash -cd conversation/python/http/conversation +cd conversation/python/sdk/conversation ``` Install the dependencies: @@ -61,7 +61,7 @@ pip3 install -r requirements.txt ### Step 3: Launch the conversation service -Navigate back to the `http` directory and start the conversation service with the following command: +Navigate back to the `sdk` directory and start the conversation service with the following command: ```bash dapr run -f . @@ -117,37 +117,28 @@ In the application code: - The mock LLM echoes "What is dapr?". ```python -import logging -import requests -import os - -logging.basicConfig(level=logging.INFO) - -base_url = os.getenv('BASE_URL', 'http://localhost') + ':' + os.getenv( - 'DAPR_HTTP_PORT', '3500') - -CONVERSATION_COMPONENT_NAME = 'echo' - -input = { - 'name': 'echo', - 'inputs': [{'message':'What is dapr?'}], - 'parameters': {}, - 'metadata': {} +from dapr.clients import DaprClient +from dapr.clients.grpc._request import ConversationInput + +with DaprClient() as d: + inputs = [ + ConversationInput(content="What is dapr?", role='user', scrub_pii=True), + ] + + metadata = { + 'model': 'modelname', + 'key': 'authKey', + 'cacheTTL': '10m', } -# Send input to conversation endpoint -result = requests.post( - url='%s/v1.0-alpha1/conversation/%s/converse' % (base_url, CONVERSATION_COMPONENT_NAME), - json=input -) - -logging.info('Input sent: What is dapr?') + print('Input sent: What is dapr?') -# Parse conversation output -data = result.json() -output = data["outputs"][0]["result"] + response = d.converse_alpha1( + name='echo', inputs=inputs, temperature=0.7, context_id='chat-123', metadata=metadata + ) -logging.info('Output response: ' + output) + for output in response.outputs: + print(f'Output response: {output.result}') ``` {{% /codetab %}} @@ -575,7 +566,7 @@ git clone https://github.com/dapr/quickstarts.git From the root of the Quickstarts directory, navigate into the conversation directory: ```bash -cd conversation/python/http/conversation +cd conversation/python/sdk/conversation ``` Install the dependencies: @@ -586,7 +577,7 @@ pip3 install -r requirements.txt ### Step 3: Launch the conversation service -Navigate back to the `http` directory and start the conversation service with the following command: +Navigate back to the `sdk` directory and start the conversation service with the following command: ```bash dapr run --app-id conversation --resources-path ../../../components -- python3 app.py diff --git a/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md index 5f50c6a9909..02929b31da4 100644 --- a/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md @@ -251,7 +251,6 @@ class WorkflowConsoleApp: if __name__ == '__main__': app = WorkflowConsoleApp() app.main() - ``` #### `order-processor/workflow.py` @@ -276,7 +275,6 @@ wfr = WorkflowRuntime() logging.basicConfig(level=logging.INFO) - @wfr.workflow(name="order_processing_workflow") def order_processing_workflow(ctx: DaprWorkflowContext, order_payload_str: str): """Defines the order processing workflow. @@ -343,7 +341,6 @@ def notify_activity(ctx: WorkflowActivityContext, input: Notification): logger = logging.getLogger('NotifyActivity') logger.info(input.message) - @wfr.activity(name="process_payment_activity") def process_payment_activity(ctx: WorkflowActivityContext, input: PaymentRequest): """Defines Process Payment Activity.This is used by the workflow to process a payment""" @@ -353,7 +350,6 @@ def process_payment_activity(ctx: WorkflowActivityContext, input: PaymentRequest +' USD') logger.info(f'Payment for request ID {input.request_id} processed successfully') - @wfr.activity(name="verify_inventory_activity") def verify_inventory_activity(ctx: WorkflowActivityContext, input: InventoryRequest) -> InventoryResult: @@ -377,8 +373,6 @@ def verify_inventory_activity(ctx: WorkflowActivityContext, return InventoryResult(True, inventory_item) return InventoryResult(False, None) - - @wfr.activity(name="update_inventory_activity") def update_inventory_activity(ctx: WorkflowActivityContext, input: PaymentRequest) -> InventoryResult: @@ -401,8 +395,6 @@ def update_inventory_activity(ctx: WorkflowActivityContext, client.save_state(store_name, input.item_being_purchased, new_val) logger.info(f'There are now {new_quantity} {input.item_being_purchased} left in stock') - - @wfr.activity(name="request_approval_activity") def request_approval_activity(ctx: WorkflowActivityContext, input: OrderPayload): @@ -413,7 +405,6 @@ def request_approval_activity(ctx: WorkflowActivityContext, logger.info('Requesting approval for payment of '+f'{input["total_cost"]}'+' USD for ' +f'{input["quantity"]}' +' ' +f'{input["item_name"]}') - ``` {{% /codetab %}} From 0992cd48c298b2245d7733ddbaa1e8b5652d1fa7 Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Fri, 28 Feb 2025 20:12:58 -0300 Subject: [PATCH 03/24] Updates latest version to 1.15.1 (#4562) Also marks all `v1.12.x` releases to not-supported. We only support N-2 versions, where N is the latest version. Signed-off-by: joshvanl --- daprdocs/content/en/operations/security/mtls.md | 10 +++++----- .../en/operations/support/support-release-policy.md | 13 +++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/daprdocs/content/en/operations/security/mtls.md b/daprdocs/content/en/operations/security/mtls.md index b471783c031..2bd7ec2c386 100644 --- a/daprdocs/content/en/operations/security/mtls.md +++ b/daprdocs/content/en/operations/security/mtls.md @@ -334,12 +334,12 @@ Example: dapr status -k NAME NAMESPACE HEALTHY STATUS REPLICAS VERSION AGE CREATED - dapr-operator dapr-system True Running 1 1.15.0 4m 2025-02-19 17:36.26 - dapr-placement-server dapr-system True Running 1 1.15.0 4m 2025-02-19 17:36.27 + dapr-operator dapr-system True Running 1 1.15.1 4m 2025-02-19 17:36.26 + dapr-placement-server dapr-system True Running 1 1.15.1 4m 2025-02-19 17:36.27 dapr-dashboard dapr-system True Running 1 0.15.0 4m 2025-02-19 17:36.27 - dapr-sentry dapr-system True Running 1 1.15.0 4m 2025-02-19 17:36.26 - dapr-scheduler-server dapr-system True Running 3 1.15.0 4m 2025-02-19 17:36.27 - dapr-sidecar-injector dapr-system True Running 1 1.15.0 4m 2025-02-19 17:36.26 + dapr-sentry dapr-system True Running 1 1.15.1 4m 2025-02-19 17:36.26 + dapr-scheduler-server dapr-system True Running 3 1.15.1 4m 2025-02-19 17:36.27 + dapr-sidecar-injector dapr-system True Running 1 1.15.1 4m 2025-02-19 17:36.26 ⚠ Dapr root certificate of your Kubernetes cluster expires in 2 days. Expiry date: Mon, 04 Apr 2025 15:01:03 UTC. Please see docs.dapr.io for certificate renewal instructions to avoid service interruptions. ``` diff --git a/daprdocs/content/en/operations/support/support-release-policy.md b/daprdocs/content/en/operations/support/support-release-policy.md index cb8705451e5..6a5ff1187a8 100644 --- a/daprdocs/content/en/operations/support/support-release-policy.md +++ b/daprdocs/content/en/operations/support/support-release-policy.md @@ -45,7 +45,8 @@ The table below shows the versions of Dapr releases that have been tested togeth | Release date | Runtime | CLI | SDKs | Dashboard | Status | Release notes | |--------------------|:--------:|:--------|---------|---------|---------|------------| -| February 27th 2025 | 1.15.0
| 1.15.0 | Java 1.14.0
Go 1.12.0
PHP 1.2.0
Python 1.15.0
.NET 1.15.0
JS 3.5.0
Rust 0.16 | 0.15.0 | Supported (current) | [v1.15.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.15.0) | +| February 28th 2025 | 1.15.1
| 1.15.0 | Java 1.14.0
Go 1.12.0
PHP 1.2.0
Python 1.15.0
.NET 1.15.0
JS 3.5.0
Rust 0.16 | 0.15.0 | Supported (current) | [v1.15.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.15.1) | +| February 27th 2025 | 1.15.0
| 1.15.0 | Java 1.14.0
Go 1.12.0
PHP 1.2.0
Python 1.15.0
.NET 1.15.0
JS 3.5.0
Rust 0.16 | 0.15.0 | Supported | [v1.15.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.15.0) | | September 16th 2024 | 1.14.4
| 1.14.1 | Java 1.12.0
Go 1.11.0
PHP 1.2.0
Python 1.14.0
.NET 1.14.0
JS 3.3.1 | 0.15.0 | Supported | [v1.14.4 release notes](https://github.com/dapr/dapr/releases/tag/v1.14.4) | | September 13th 2024 | 1.14.3
| 1.14.1 | Java 1.12.0
Go 1.11.0
PHP 1.2.0
Python 1.14.0
.NET 1.14.0
JS 3.3.1 | 0.15.0 | ⚠️ Recalled | [v1.14.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.14.3) | | September 6th 2024 | 1.14.2
| 1.14.1 | Java 1.12.0
Go 1.11.0
PHP 1.2.0
Python 1.14.0
.NET 1.14.0
JS 3.3.1 | 0.15.0 | Supported | [v1.14.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.14.2) | @@ -56,11 +57,11 @@ The table below shows the versions of Dapr releases that have been tested togeth | April 3rd 2024 | 1.13.2
| 1.13.0 | Java 1.11.0
Go 1.10.0
PHP 1.2.0
Python 1.13.0
.NET 1.13.0
JS 3.3.0 | 0.14.0 | Supported | [v1.13.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.13.2) | | March 26th 2024 | 1.13.1
| 1.13.0 | Java 1.11.0
Go 1.10.0
PHP 1.2.0
Python 1.13.0
.NET 1.13.0
JS 3.3.0 | 0.14.0 | Supported | [v1.13.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.13.1) | | March 6th 2024 | 1.13.0
| 1.13.0 | Java 1.11.0
Go 1.10.0
PHP 1.2.0
Python 1.13.0
.NET 1.13.0
JS 3.3.0 | 0.14.0 | Supported | [v1.13.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.13.0) | -| January 17th 2024 | 1.12.4
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported | [v1.12.4 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.4) | -| January 2nd 2024 | 1.12.3
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported | [v1.12.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.3) | -| November 18th 2023 | 1.12.2
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported | [v1.12.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.2) | -| November 16th 2023 | 1.12.1
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported | [v1.12.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.1) | -| October 11th 2023 | 1.12.0
| 1.12.0 | Java 1.10.0
Go 1.9.0
PHP 1.1.0
Python 1.11.0
.NET 1.12.0
JS 3.1.2 | 0.14.0 | Supported | [v1.12.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.0) | +| January 17th 2024 | 1.12.4
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Unsupported | [v1.12.4 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.4) | +| January 2nd 2024 | 1.12.3
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Unsupported | [v1.12.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.3) | +| November 18th 2023 | 1.12.2
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Unsupported | [v1.12.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.2) | +| November 16th 2023 | 1.12.1
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Unsupported | [v1.12.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.1) | +| October 11th 2023 | 1.12.0
| 1.12.0 | Java 1.10.0
Go 1.9.0
PHP 1.1.0
Python 1.11.0
.NET 1.12.0
JS 3.1.2 | 0.14.0 | Unsupported | [v1.12.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.0) | | November 18th 2023 | 1.11.6
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Unsupported | [v1.11.6 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.6) | | November 3rd 2023 | 1.11.5
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Unsupported | [v1.11.5 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.5) | | October 5th 2023 | 1.11.4
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Unsupported | [v1.11.4 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.4) | From fb53445f389ee2636c6a4cb090e595bbca919da7 Mon Sep 17 00:00:00 2001 From: Marc Duiker Date: Mon, 3 Mar 2025 10:54:52 +0100 Subject: [PATCH 04/24] Revert back to built-in template that includes GA Signed-off-by: Marc Duiker --- daprdocs/layouts/partials/head.html | 45 ----------------------------- 1 file changed, 45 deletions(-) delete mode 100644 daprdocs/layouts/partials/head.html diff --git a/daprdocs/layouts/partials/head.html b/daprdocs/layouts/partials/head.html deleted file mode 100644 index 92fac408193..00000000000 --- a/daprdocs/layouts/partials/head.html +++ /dev/null @@ -1,45 +0,0 @@ - - -{{ hugo.Generator }} -{{ range .AlternativeOutputFormats -}} - -{{ end -}} - -{{ $outputFormat := partial "outputformat.html" . -}} -{{ if and hugo.IsProduction (ne $outputFormat "print") -}} - -{{ else -}} - -{{ end -}} - -{{ partialCached "favicons.html" . }} - - {{- if .IsHome -}} - {{ .Site.Title -}} - {{ else -}} - {{ with .Title }}{{ . }} | {{ end -}} - {{ .Site.Title -}} - {{ end -}} - -{{ $desc := .Page.Description | default (.Page.Content | safeHTML | truncate 150) -}} - -{{ template "_internal/opengraph.html" . -}} -{{ template "_internal/schema.html" . -}} -{{ template "_internal/twitter_cards.html" . -}} -{{ partialCached "head-css.html" . "asdf" -}} - -{{ if .Site.Params.offlineSearch -}} - -{{ end -}} - -{{ if .Site.Params.prism_syntax_highlighting -}} - -{{ end -}} - -{{ partial "hooks/head-end.html" . -}} From 7c40430f037c6ebd67e6186b8bbb17b2954e0b83 Mon Sep 17 00:00:00 2001 From: Jake Engelberg <152900222+jake-engelberg@users.noreply.github.com> Date: Mon, 3 Mar 2025 13:12:09 -0500 Subject: [PATCH 05/24] spelling-fix: kubernetes-persisting-scheduler.md (#4566) instalation -> installation Signed-off-by: Jake Engelberg <152900222+jake-engelberg@users.noreply.github.com> --- .../hosting/kubernetes/kubernetes-persisting-scheduler.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-persisting-scheduler.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-persisting-scheduler.md index 8c877d73c28..552331bd170 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-persisting-scheduler.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-persisting-scheduler.md @@ -41,7 +41,7 @@ This means the actual disk usage of Scheduler will be higher than the current ob ### Setting the Storage Size on Installation If you need to increase an **existing** Scheduler storage size, see the [Increase Scheduler Storage Size](#increase-existing-scheduler-storage-size) section below. -To increase the storage size (in this example- `16Gi`) for a **fresh** Dapr instalation, you can use the following command: +To increase the storage size (in this example- `16Gi`) for a **fresh** Dapr installation, you can use the following command: {{< tabs "Dapr CLI" "Helm" >}} From 19f812c0db1fbd1cfa00528a8654a6b39739400d Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Mon, 3 Mar 2025 15:23:07 -0500 Subject: [PATCH 06/24] remove 3500, only use as an example in API docs Signed-off-by: Hannah Hunter --- daprdocs/content/en/reference/api/jobs_api.md | 6 +++--- daprdocs/content/en/reference/api/workflow_api.md | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/daprdocs/content/en/reference/api/jobs_api.md b/daprdocs/content/en/reference/api/jobs_api.md index bb635e3c759..316974e9471 100644 --- a/daprdocs/content/en/reference/api/jobs_api.md +++ b/daprdocs/content/en/reference/api/jobs_api.md @@ -20,7 +20,7 @@ With the jobs API, you can schedule jobs and tasks in the future. Schedule a job with a name. Jobs are scheduled based on the clock of the server where the Scheduler service is running. The timestamp is not converted to UTC. You can provide the timezone with the timestamp in RFC3339 format to specify which timezone you'd like the job to adhere to. If no timezone is provided, the server's local time is used. ``` -POST http://localhost:3500/v1.0-alpha1/jobs/ +POST http://localhost:/v1.0-alpha1/jobs/ ``` ### URL parameters @@ -100,7 +100,7 @@ $ curl -X POST \ Get a job from its name. ``` -GET http://localhost:3500/v1.0-alpha1/jobs/ +GET http://localhost:/v1.0-alpha1/jobs/ ``` ### URL parameters @@ -138,7 +138,7 @@ $ curl -X GET http://localhost:3500/v1.0-alpha1/jobs/jobforjabba -H "Content-Typ Delete a named job. ``` -DELETE http://localhost:3500/v1.0-alpha1/jobs/ +DELETE http://localhost:/v1.0-alpha1/jobs/ ``` ### URL parameters diff --git a/daprdocs/content/en/reference/api/workflow_api.md b/daprdocs/content/en/reference/api/workflow_api.md index 5a3ff3dd712..3d667d8421d 100644 --- a/daprdocs/content/en/reference/api/workflow_api.md +++ b/daprdocs/content/en/reference/api/workflow_api.md @@ -13,7 +13,7 @@ Dapr provides users with the ability to interact with workflows through its buil Start a workflow instance with the given name and optionally, an instance ID. ``` -POST http://localhost:3500/v1.0/workflows///start[?instanceID=] +POST http://localhost:/v1.0/workflows///start[?instanceID=] ``` Note that workflow instance IDs can only contain alphanumeric characters, underscores, and dashes. @@ -53,7 +53,7 @@ The API call will provide a response similar to this: Terminate a running workflow instance with the given name and instance ID. ``` -POST http://localhost:3500/v1.0/workflows///terminate +POST http://localhost:/v1.0/workflows///terminate ``` {{% alert title="Note" color="primary" %}} @@ -87,7 +87,7 @@ This API does not return any content. For workflow components that support subscribing to external events, such as the Dapr Workflow engine, you can use the following "raise event" API to deliver a named event to a specific workflow instance. ``` -POST http://localhost:3500/v1.0/workflows///raiseEvent/ +POST http://localhost:/v1.0/workflows///raiseEvent/ ``` {{% alert title="Note" color="primary" %}} @@ -120,7 +120,7 @@ None. Pause a running workflow instance. ``` -POST http://localhost:3500/v1.0/workflows///pause +POST http://localhost:/v1.0/workflows///pause ``` ### URL parameters @@ -147,7 +147,7 @@ None. Resume a paused workflow instance. ``` -POST http://localhost:3500/v1.0/workflows///resume +POST http://localhost:/v1.0/workflows///resume ``` ### URL parameters @@ -174,7 +174,7 @@ None. Purge the workflow state from your state store with the workflow's instance ID. ``` -POST http://localhost:3500/v1.0/workflows///purge +POST http://localhost:/v1.0/workflows///purge ``` {{% alert title="Note" color="primary" %}} @@ -205,7 +205,7 @@ None. Get information about a given workflow instance. ``` -GET http://localhost:3500/v1.0/workflows// +GET http://localhost:/v1.0/workflows// ``` ### URL parameters From 178e0c8a7725d25cbad150cd34e03c414258be6c Mon Sep 17 00:00:00 2001 From: Jake Engelberg <152900222+jake-engelberg@users.noreply.github.com> Date: Mon, 3 Mar 2025 17:44:05 -0500 Subject: [PATCH 07/24] Update kubernetes-persisting-scheduler.md (#4568) dapr / PVC uninstall specifics, about how a manual deletion of PVCs is required to define a new volume. Signed-off-by: Jake Engelberg <152900222+jake-engelberg@users.noreply.github.com> --- .../hosting/kubernetes/kubernetes-persisting-scheduler.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-persisting-scheduler.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-persisting-scheduler.md index 552331bd170..d6c187b1975 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-persisting-scheduler.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-persisting-scheduler.md @@ -69,6 +69,14 @@ helm upgrade --install dapr dapr/dapr \ {{% /codetab %}} {{< /tabs >}} +{{% alert title="Note" color="primary" %}} +For storage providers that do NOT support dynamic volume expansion: If Dapr has ever been installed on the cluster before, the Scheduler's Persistent Volume Claims must be manually uninstalled in order for new ones with increased storage size to be created. +```bash +kubectl delete pvc -n dapr-system dapr-scheduler-data-dir-dapr-scheduler-server-0 dapr-scheduler-data-dir-dapr-scheduler-server-1 dapr-scheduler-data-dir-dapr-scheduler-server-2 +``` +Persistent Volume Claims are not deleted automatically with an [uninstall]({{< ref dapr-uninstall.md >}}). This is a deliberate safety measure to prevent accidental data loss. +{{% /alert %}} + #### Increase existing Scheduler Storage Size {{% alert title="Warning" color="warning" %}} From 12b2f173d333930645e3c560e575cd4f2512d934 Mon Sep 17 00:00:00 2001 From: Jonel Dominic Tapang Date: Wed, 5 Mar 2025 05:29:15 +0800 Subject: [PATCH 08/24] Update sidecar.md (#4570) Add missing sample argument for Dapr sidecar app port config sample Signed-off-by: Jonel Dominic Tapang Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> --- daprdocs/content/en/concepts/dapr-services/sidecar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/concepts/dapr-services/sidecar.md b/daprdocs/content/en/concepts/dapr-services/sidecar.md index 1d783b78f14..8e57144a3b9 100644 --- a/daprdocs/content/en/concepts/dapr-services/sidecar.md +++ b/daprdocs/content/en/concepts/dapr-services/sidecar.md @@ -52,7 +52,7 @@ For a detailed list of all available arguments run `daprd --help` or see this [t 1. Specify the port your application is listening to ```bash - daprd --app-id --app-port 5000 + daprd --app-id myapp --app-port 5000 ``` 1. If you are using several custom resources and want to specify the location of the resource definition files, use the `--resources-path` argument: From f4848ae0774d1b94c7370ab1286497d148652d03 Mon Sep 17 00:00:00 2001 From: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Date: Wed, 5 Mar 2025 11:53:07 -0500 Subject: [PATCH 09/24] Update v1.15.1 --> v1.15.2 (#4571) * update patch version to latest Signed-off-by: Hannah Hunter * update shortcode Signed-off-by: Hannah Hunter --------- Signed-off-by: Hannah Hunter --- .../content/en/operations/support/support-release-policy.md | 1 + daprdocs/layouts/shortcodes/dapr-latest-version.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/daprdocs/content/en/operations/support/support-release-policy.md b/daprdocs/content/en/operations/support/support-release-policy.md index 6a5ff1187a8..3047c5bf5fd 100644 --- a/daprdocs/content/en/operations/support/support-release-policy.md +++ b/daprdocs/content/en/operations/support/support-release-policy.md @@ -45,6 +45,7 @@ The table below shows the versions of Dapr releases that have been tested togeth | Release date | Runtime | CLI | SDKs | Dashboard | Status | Release notes | |--------------------|:--------:|:--------|---------|---------|---------|------------| +| March 3rd 2025 | 1.15.2
| 1.15.0 | Java 1.14.0
Go 1.12.0
PHP 1.2.0
Python 1.15.0
.NET 1.15.0
JS 3.5.0
Rust 0.16 | 0.15.0 | Supported (current) | [v1.15.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.15.2) | | February 28th 2025 | 1.15.1
| 1.15.0 | Java 1.14.0
Go 1.12.0
PHP 1.2.0
Python 1.15.0
.NET 1.15.0
JS 3.5.0
Rust 0.16 | 0.15.0 | Supported (current) | [v1.15.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.15.1) | | February 27th 2025 | 1.15.0
| 1.15.0 | Java 1.14.0
Go 1.12.0
PHP 1.2.0
Python 1.15.0
.NET 1.15.0
JS 3.5.0
Rust 0.16 | 0.15.0 | Supported | [v1.15.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.15.0) | | September 16th 2024 | 1.14.4
| 1.14.1 | Java 1.12.0
Go 1.11.0
PHP 1.2.0
Python 1.14.0
.NET 1.14.0
JS 3.3.1 | 0.15.0 | Supported | [v1.14.4 release notes](https://github.com/dapr/dapr/releases/tag/v1.14.4) | diff --git a/daprdocs/layouts/shortcodes/dapr-latest-version.html b/daprdocs/layouts/shortcodes/dapr-latest-version.html index ee56053a0fd..c449b6e5831 100644 --- a/daprdocs/layouts/shortcodes/dapr-latest-version.html +++ b/daprdocs/layouts/shortcodes/dapr-latest-version.html @@ -1 +1 @@ -{{- if .Get "short" }}1.15{{ else if .Get "long" }}1.15.0{{ else if .Get "cli" }}1.15.0{{ else }}1.15.0{{ end -}} +{{- if .Get "short" }}1.15{{ else if .Get "long" }}1.15.2{{ else if .Get "cli" }}1.15.0{{ else }}1.15.0{{ end -}} From 0682cd077cd6a761fe73bacfe85a1b759b499b4e Mon Sep 17 00:00:00 2001 From: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Date: Thu, 6 Mar 2025 17:50:21 -0500 Subject: [PATCH 10/24] update keys to items for consistency (#4565) Signed-off-by: Hannah Hunter --- .../building-blocks/configuration/howto-manage-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md b/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md index 25d4169e20f..4a7e2e2243b 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md +++ b/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md @@ -263,7 +263,7 @@ using System.Threading.Tasks; using Dapr.Client; const string DAPR_CONFIGURATION_STORE = "configstore"; -var CONFIGURATION_KEYS = new List { "orderId1", "orderId2" }; +var CONFIGURATION_ITEMS = new List { "orderId1", "orderId2" }; var client = new DaprClientBuilder().Build(); // Subscribe for configuration changes From 418ef7f30677f1b9f4d3dd56fbc48dace2d926bb Mon Sep 17 00:00:00 2001 From: msfussell Date: Thu, 13 Mar 2025 13:40:55 -0700 Subject: [PATCH 11/24] update the docs Signed-off-by: msfussell --- sdkdocs/python | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdkdocs/python b/sdkdocs/python index fc4980daaa4..e7c85cea29e 160000 --- a/sdkdocs/python +++ b/sdkdocs/python @@ -1 +1 @@ -Subproject commit fc4980daaa4802bfb2590f133c332b934b196205 +Subproject commit e7c85cea29e64581f86a7b127d22e618a972bbdb From fb8764bffc4d6eca325404d089cf43661a50fea2 Mon Sep 17 00:00:00 2001 From: Anton Troshin Date: Thu, 13 Mar 2025 15:49:27 -0500 Subject: [PATCH 12/24] Update multi-app template and arguments annotations for new configuration options (#4573) Signed-off-by: Anton Troshin Co-authored-by: Mark Fussell --- .../multi-app-dapr-run/multi-app-template.md | 17 +++++++++-------- .../reference/arguments-annotations-overview.md | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md index ba7e3d17753..87012d7aac6 100644 --- a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md +++ b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md @@ -254,14 +254,14 @@ The properties for the Multi-App Run template align with the `dapr run` CLI flag | `apiListenAddresses` | N | Dapr API listen addresses | | | `logLevel` | N | The log verbosity. | | | `appMaxConcurrency` | N | The concurrency level of the application; default is unlimited | | -| `placementHostAddress` | N | | | +| `placementHostAddress` | N | Comma separated list of addresses for Dapr placement servers | `127.0.0.1:50057,127.0.0.1:50058` | +| `schedulerHostAddress` | N | Dapr Scheduler Service host address | `localhost:50006` | | `appSSL` | N | Enable https when Dapr invokes the application | | -| `daprHTTPMaxRequestSize` | N | Max size of the request body in MB. | | -| `daprHTTPReadBufferSize` | N | Max size of the HTTP read buffer in KB. This also limits the maximum size of HTTP headers. The default 4 KB | | +| `maxBodySize` | N | Max size of the request body in MB. Set the value using size units (e.g., `16Mi` for 16MB). The default is `4Mi` | | +| `readBufferSize` | N | Max size of the HTTP read buffer in KB. This also limits the maximum size of HTTP headers. Set the value using size units, for example `32Ki` will support headers up to 32KB . Default is `4Ki` for 4KB | | | `enableAppHealthCheck` | N | Enable the app health check on the application | `true`, `false` | | `appHealthCheckPath` | N | Path to the health check file | `/healthz` | -| `appHealthProbeInterval` | N | Interval to probe for the health of the app in seconds - | | +| `appHealthProbeInterval` | N | Interval to probe for the health of the app in seconds | | | `appHealthProbeTimeout` | N | Timeout for app health probes in milliseconds | | | `appHealthThreshold` | N | Number of consecutive failures for the app to be considered unhealthy | | | `enableApiLogging` | N | Enable the logging of all API calls from application to Dapr | | @@ -303,10 +303,11 @@ The properties for the Multi-App Run template align with the `dapr run -k` CLI f | `apiListenAddresses` | N | Dapr API listen addresses | | | `logLevel` | N | The log verbosity. | | | `appMaxConcurrency` | N | The concurrency level of the application; default is unlimited | | -| `placementHostAddress` | N | | | +| `placementHostAddress` | N | Comma separated list of addresses for Dapr placement servers | `127.0.0.1:50057,127.0.0.1:50058` | +| `schedulerHostAddress` | N | Dapr Scheduler Service host address | `127.0.0.1:50006` | | `appSSL` | N | Enable https when Dapr invokes the application | | -| `daprHTTPMaxRequestSize` | N | Max size of the request body in MB. | | -| `daprHTTPReadBufferSize` | N | Max size of the HTTP read buffer in KB. This also limits the maximum size of HTTP headers. The default 4 KB | | +| `maxBodySize` | N | Max size of the request body in MB. Set the value using size units (e.g., `16Mi` for 16MB). The default is `4Mi` | `16Mi` | +| `readBufferSize` | N | Max size of the HTTP read buffer in KB. This also limits the maximum size of HTTP headers. Set the value using size units, for example `32Ki` will support headers up to 32KB . Default is `4Ki` for 4KB | `32Ki` | | `enableAppHealthCheck` | N | Enable the app health check on the application | `true`, `false` | | `appHealthCheckPath` | N | Path to the health check file | `/healthz` | | `appHealthProbeInterval` | N | Interval to probe for the health of the app in seconds | | diff --git a/daprdocs/content/en/reference/arguments-annotations-overview.md b/daprdocs/content/en/reference/arguments-annotations-overview.md index 72d50b01c94..a8976efd500 100644 --- a/daprdocs/content/en/reference/arguments-annotations-overview.md +++ b/daprdocs/content/en/reference/arguments-annotations-overview.md @@ -24,7 +24,7 @@ This table is meant to help users understand the equivalent options for running | `--dapr-http-max-request-size` | `--dapr-http-max-request-size` | | `dapr.io/http-max-request-size` | **Deprecated** in favor of `--max-body-size`. Inreasing the request max body size to handle large file uploads using http and grpc protocols. Default is `4` MB | | `--max-body-size` | not supported | | `dapr.io/max-body-size` | Inreasing the request max body size to handle large file uploads using http and grpc protocols. Set the value using size units (e.g., `16Mi` for 16MB). The default is `4Mi` | | `--dapr-http-read-buffer-size` | `--dapr-http-read-buffer-size` | | `dapr.io/http-read-buffer-size` | **Deprecated** in favor of `--read-buffer-size`. Increasing max size of http header read buffer in KB to to support larger header values, for example `16` to support headers up to 16KB . Default is `16` for 16KB | -| `--read-buffer-size` | not supported | | `dapr.io/read-buffer-size` | Increasing max size of http header read buffer in KB to to support larger header values. Set the value using size units, for example `32Ki` will support headers up to 32KB . Default is `4` for 4KB | +| `--read-buffer-size` | not supported | | `dapr.io/read-buffer-size` | Increasing max size of http header read buffer in KB to to support larger header values. Set the value using size units, for example `32Ki` will support headers up to 32KB . Default is `4Ki` for 4KB | | not supported | `--image` | | `dapr.io/sidecar-image` | Dapr sidecar image. Default is daprio/daprd:latest. The Dapr sidecar uses this image instead of the latest default image. Use this when building your own custom image of Dapr and or [using an alternative stable Dapr image]({{< ref "support-release-policy.md#build-variations" >}}) | | `--internal-grpc-port` | not supported | | `dapr.io/internal-grpc-port` | Sets the internal Dapr gRPC port (default `50002`); all cluster services must use the same port for communication | | `--enable-metrics` | not supported | | configuration spec | Enable [prometheus metric]({{< ref prometheus >}}) (default true) | From 35fcf61b489c06fae4f2bfb5fad75184e4633cc6 Mon Sep 17 00:00:00 2001 From: Emmanuel Auffray Date: Sat, 15 Mar 2025 00:38:08 +1300 Subject: [PATCH 13/24] feat: :sparkles: Add conversation GoogleAI component reference Signed-off-by: Emmanuel Auffray --- .../supported-conversation/googleai.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 daprdocs/content/en/reference/components-reference/supported-conversation/googleai.md diff --git a/daprdocs/content/en/reference/components-reference/supported-conversation/googleai.md b/daprdocs/content/en/reference/components-reference/supported-conversation/googleai.md new file mode 100644 index 00000000000..ad3621637db --- /dev/null +++ b/daprdocs/content/en/reference/components-reference/supported-conversation/googleai.md @@ -0,0 +1,42 @@ +--- +type: docs +title: "GoogleAI" +linkTitle: "GoogleAI" +description: Detailed information on the GoogleAI conversation component +--- + +## Component format + +A Dapr `conversation.yaml` component file has the following structure: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: googleai +spec: + type: conversation.googleai + metadata: + - name: key + value: mykey + - name: model + value: gemini-1.5-flash + - name: cacheTTL + value: 10m +``` + +{{% alert title="Warning" color="warning" %}} +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 %}} + +## Spec metadata fields + +| Field | Required | Details | Example | +|--------------------|:--------:|---------|---------| +| `key` | Y | API key for GoogleAI. | `mykey` | +| `model` | N | The GoogleAI LLM to use. Defaults to `gemini-1.5-flash`. | `gemini-2.0-flash` | +| `cacheTTL` | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | `10m` | + +## Related links + +- [Conversation API overview]({{< ref conversation-overview.md >}}) \ No newline at end of file From 60d5332d1aaa1413296eead40cbb49afdd076624 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Mon, 17 Mar 2025 13:04:21 -0400 Subject: [PATCH 14/24] update author and manage workflow how-tos Signed-off-by: Hannah Hunter --- .../workflow/howto-author-workflow.md | 283 ++++++++++++------ .../workflow/howto-manage-workflow.md | 27 +- 2 files changed, 200 insertions(+), 110 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-author-workflow.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-author-workflow.md index ae2285d3720..009850fae7c 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-author-workflow.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-author-workflow.md @@ -36,31 +36,17 @@ The Dapr sidecar doesn’t load any workflow definitions. Rather, the sidecar si -Define the workflow activities you'd like your workflow to perform. Activities are a function definition and can take inputs and outputs. The following example creates task chaining activities that receive input +Define the workflow activities you'd like your workflow to perform. Activities are a function definition and can take inputs and outputs. The following example creates a counter (activity) called `hello_act` that notifies users of the current counter value. `hello_act` is a function derived from a class called `WorkflowActivityContext`. ```python -@wfr.activity(name='step10') -def step1(ctx, activity_input): - print(f'Step 1: Received input: {activity_input}.') - # Do some work - return activity_input + 1 - - -@wfr.activity -def step2(ctx, activity_input): - print(f'Step 2: Received input: {activity_input}.') - # Do some work - return activity_input * 2 - - -@wfr.activity -def step3(ctx, activity_input): - print(f'Step 3: Received input: {activity_input}.') - # Do some work - return activity_input ^ 2 +@wfr.activity(name='hello_act') +def hello_act(ctx: WorkflowActivityContext, wf_input): + global counter + counter += wf_input + print(f'New counter value is: {counter}!', flush=True) ``` -[See the task chaining workflow activity in context.](https://github.com/dapr/python-sdk/blob/main/examples/workflow/task_chaining.py) +[See the task chaining workflow activity in context.](https://github.com/dapr/python-sdk/blob/main/examples/workflow/simple.py) {{% /codetab %}} @@ -241,22 +227,32 @@ Next, register and call the activites in a workflow. -The `random_workflow` function is a task chaining workflow pattern derived from a class called `DaprWorkflowContext` with input and output parameter types. It also includes a `yield` statement that does the heavy lifting of the workflow and calls the workflow activities. +The `hello_world_wf` function is a function derived from a class called `DaprWorkflowContext` with input and output parameter types. It also includes a `yield` statement that does the heavy lifting of the workflow and calls the workflow activities. ```python -@wfr.workflow(name='random_workflow') -def task_chain_workflow(ctx: wf.DaprWorkflowContext, wf_input: int): - try: - result1 = yield ctx.call_activity(step1, input=wf_input) - result2 = yield ctx.call_activity(step2, input=result1) - result3 = yield ctx.call_activity(step3, input=result2) - except Exception as e: - yield ctx.call_activity(error_handler, input=str(e)) - raise - return [result1, result2, result3] +@wfr.workflow(name='hello_world_wf') +def hello_world_wf(ctx: DaprWorkflowContext, wf_input): + print(f'{wf_input}') + yield ctx.call_activity(hello_act, input=1) + yield ctx.call_activity(hello_act, input=10) + yield ctx.call_activity(hello_retryable_act, retry_policy=retry_policy) + yield ctx.call_child_workflow(child_retryable_wf, retry_policy=retry_policy) + + # Change in event handling: Use when_any to handle both event and timeout + event = ctx.wait_for_external_event(event_name) + timeout = ctx.create_timer(timedelta(seconds=30)) + winner = yield when_any([event, timeout]) + + if winner == timeout: + print('Workflow timed out waiting for event') + return 'Timeout' + + yield ctx.call_activity(hello_act, input=100) + yield ctx.call_activity(hello_act, input=1000) + return 'Completed' ``` -[See the `hello_world_wf` workflow in context.](https://github.com/dapr/python-sdk/blob/master/examples/demo_workflow/app.py#LL32C1-L38C51) +[See the `hello_world_wf` workflow in context.](https://github.com/dapr/python-sdk/blob/main/examples/workflow/simple.py) {{% /codetab %}} @@ -423,84 +419,177 @@ Finally, compose the application using the workflow. -[In the following example](https://github.com/dapr/python-sdk/blob/master/examples/demo_workflow/app.py), for a basic Python hello world application using the Python SDK, your project code would include: +[In the following example](https://github.com/dapr/python-sdk/blob/main/examples/workflow/simple.py), for a basic Python hello world application using the Python SDK, your project code would include: - A Python package called `DaprClient` to receive the Python SDK capabilities. - A builder with extensions called: - `WorkflowRuntime`: Allows you to register the workflow runtime. - - `DaprWorkflowContext`: Allows you to [create workflows and workflow activities]({{< ref "#write-the-workflow" >}}) + - `DaprWorkflowContext`: Allows you to [create workflows]({{< ref "#write-the-workflow" >}}) - `WorkflowActivityContext`: Allows you to [create workflow activities]({{< ref "#write-the-workflow-activities" >}}) -- API calls. In the example below, these calls start, pause, resume, purge, and terminate the workflow. +- API calls. In the example below, these calls start, pause, resume, purge, and completing the workflow. ```python -from durabletask import worker, task - -from dapr.ext.workflow.workflow_context import Workflow -from dapr.ext.workflow.dapr_workflow_context import DaprWorkflowContext -from dapr.ext.workflow.workflow_activity_context import Activity, WorkflowActivityContext -from dapr.ext.workflow.util import getAddress - -from dapr.clients import DaprInternalError -from dapr.clients.http.client import DAPR_API_TOKEN_HEADER -from dapr.conf import settings -from dapr.conf.helpers import GrpcEndpoint -from dapr.ext.workflow.logger import LoggerOptions, Logger - -wfr = wf.WorkflowRuntime() - - @wfr.workflow(name='hello_world_wf') - def hello_world_wf(ctx: DaprWorkflowContext, wf_input): - # Workflow definition... - - @wfr.activity(name='hello_act') - def hello_act(ctx: WorkflowActivityContext, wf_input): - # Activity definition... - - # Start workflow - wfr = WorkflowRuntime() - wfr.start() - wf_client = DaprWorkflowClient() - - # ... - - # Pause workflow - wf_client.pause_workflow(instance_id=instance_id) - metadata = wf_client.get_workflow_state(instance_id=instance_id) - # ... check status ... - wf_client.resume_workflow(instance_id=instance_id) - - sleep(1) - - # Raise workflow - wf_client.raise_workflow_event( - instance_id=instance_id, - event_name=event_name, - data=event_data - ) - - # Purge workflow - state = wf_client.wait_for_workflow_completion( - instance_id, - timeout_in_seconds=30 - ) - wf_client.purge_workflow(instance_id=instance_id) - - workflowRuntime.shutdown() +from datetime import timedelta +from time import sleep +from dapr.ext.workflow import ( + WorkflowRuntime, + DaprWorkflowContext, + WorkflowActivityContext, + RetryPolicy, + DaprWorkflowClient, + when_any, +) +from dapr.conf import Settings +from dapr.clients.exceptions import DaprInternalError + +settings = Settings() + +counter = 0 +retry_count = 0 +child_orchestrator_count = 0 +child_orchestrator_string = '' +child_act_retry_count = 0 +instance_id = 'exampleInstanceID' +child_instance_id = 'childInstanceID' +workflow_name = 'hello_world_wf' +child_workflow_name = 'child_wf' +input_data = 'Hi Counter!' +event_name = 'event1' +event_data = 'eventData' +non_existent_id_error = 'no such instance exists' + +retry_policy = RetryPolicy( + first_retry_interval=timedelta(seconds=1), + max_number_of_attempts=3, + backoff_coefficient=2, + max_retry_interval=timedelta(seconds=10), + retry_timeout=timedelta(seconds=100), +) -if __name__ == '__main__': +wfr = WorkflowRuntime() + + +@wfr.workflow(name='hello_world_wf') +def hello_world_wf(ctx: DaprWorkflowContext, wf_input): + print(f'{wf_input}') + yield ctx.call_activity(hello_act, input=1) + yield ctx.call_activity(hello_act, input=10) + yield ctx.call_activity(hello_retryable_act, retry_policy=retry_policy) + yield ctx.call_child_workflow(child_retryable_wf, retry_policy=retry_policy) + + # Change in event handling: Use when_any to handle both event and timeout + event = ctx.wait_for_external_event(event_name) + timeout = ctx.create_timer(timedelta(seconds=30)) + winner = yield when_any([event, timeout]) + + if winner == timeout: + print('Workflow timed out waiting for event') + return 'Timeout' + + yield ctx.call_activity(hello_act, input=100) + yield ctx.call_activity(hello_act, input=1000) + return 'Completed' + + +@wfr.activity(name='hello_act') +def hello_act(ctx: WorkflowActivityContext, wf_input): + global counter + counter += wf_input + print(f'New counter value is: {counter}!', flush=True) + + +@wfr.activity(name='hello_retryable_act') +def hello_retryable_act(ctx: WorkflowActivityContext): + global retry_count + if (retry_count % 2) == 0: + print(f'Retry count value is: {retry_count}!', flush=True) + retry_count += 1 + raise ValueError('Retryable Error') + print(f'Retry count value is: {retry_count}! This print statement verifies retry', flush=True) + retry_count += 1 + + +@wfr.workflow(name='child_retryable_wf') +def child_retryable_wf(ctx: DaprWorkflowContext): + global child_orchestrator_string, child_orchestrator_count + if not ctx.is_replaying: + child_orchestrator_count += 1 + print(f'Appending {child_orchestrator_count} to child_orchestrator_string!', flush=True) + child_orchestrator_string += str(child_orchestrator_count) + yield ctx.call_activity( + act_for_child_wf, input=child_orchestrator_count, retry_policy=retry_policy + ) + if child_orchestrator_count < 3: + raise ValueError('Retryable Error') + + +@wfr.activity(name='act_for_child_wf') +def act_for_child_wf(ctx: WorkflowActivityContext, inp): + global child_orchestrator_string, child_act_retry_count + inp_char = chr(96 + inp) + print(f'Appending {inp_char} to child_orchestrator_string!', flush=True) + child_orchestrator_string += inp_char + if child_act_retry_count % 2 == 0: + child_act_retry_count += 1 + raise ValueError('Retryable Error') + child_act_retry_count += 1 + + +def main(): wfr.start() - sleep(10) # wait for workflow runtime to start + wf_client = DaprWorkflowClient() + + print('==========Start Counter Increase as per Input:==========') + wf_client.schedule_new_workflow( + workflow=hello_world_wf, input=input_data, instance_id=instance_id + ) + + wf_client.wait_for_workflow_start(instance_id) - wf_client = wf.DaprWorkflowClient() - instance_id = wf_client.schedule_new_workflow(workflow=task_chain_workflow, input=42) - print(f'Workflow started. Instance ID: {instance_id}') - state = wf_client.wait_for_workflow_completion(instance_id) - print(f'Workflow completed! Status: {state.runtime_status}') + # Sleep to let the workflow run initial activities + sleep(12) + + assert counter == 11 + assert retry_count == 2 + assert child_orchestrator_string == '1aa2bb3cc' + + # Pause Test + wf_client.pause_workflow(instance_id=instance_id) + metadata = wf_client.get_workflow_state(instance_id=instance_id) + print(f'Get response from {workflow_name} after pause call: {metadata.runtime_status.name}') + + # Resume Test + wf_client.resume_workflow(instance_id=instance_id) + metadata = wf_client.get_workflow_state(instance_id=instance_id) + print(f'Get response from {workflow_name} after resume call: {metadata.runtime_status.name}') + + sleep(2) # Give the workflow time to reach the event wait state + wf_client.raise_workflow_event(instance_id=instance_id, event_name=event_name, data=event_data) + + print('========= Waiting for Workflow completion', flush=True) + try: + state = wf_client.wait_for_workflow_completion(instance_id, timeout_in_seconds=30) + if state.runtime_status.name == 'COMPLETED': + print('Workflow completed! Result: {}'.format(state.serialized_output.strip('"'))) + else: + print(f'Workflow failed! Status: {state.runtime_status.name}') + except TimeoutError: + print('*** Workflow timed out!') + + wf_client.purge_workflow(instance_id=instance_id) + try: + wf_client.get_workflow_state(instance_id=instance_id) + except DaprInternalError as err: + if non_existent_id_error in err._message: + print('Instance Successfully Purged') wfr.shutdown() -``` +if __name__ == '__main__': + main() +``` + {{% /codetab %}} {{% codetab %}} diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-manage-workflow.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-manage-workflow.md index f03f4a4c471..c9e847ebe15 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-manage-workflow.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/howto-manage-workflow.md @@ -14,13 +14,13 @@ Now that you've [authored the workflow and its activities in your application]({ {{% codetab %}} Manage your workflow within your code. In the workflow example from the [Author a workflow]({{< ref "howto-author-workflow.md#write-the-application" >}}) guide, the workflow is registered in the code using the following APIs: -- **start_workflow**: Start an instance of a workflow -- **get_workflow**: Get information on the status of the workflow +- **schedule_new_workflow**: Start an instance of a workflow +- **get_workflow_state**: Get information on the status of the workflow - **pause_workflow**: Pauses or suspends a workflow instance that can later be resumed - **resume_workflow**: Resumes a paused workflow instance - **raise_workflow_event**: Raise an event on a workflow - **purge_workflow**: Removes all metadata related to a specific workflow instance -- **terminate_workflow**: Terminate or stop a particular instance of a workflow +- **wait_for_workflow_completion**: Complete a particular instance of a workflow ```python from dapr.ext.workflow import WorkflowRuntime, DaprWorkflowContext, WorkflowActivityContext @@ -34,27 +34,28 @@ eventName = "event1" eventData = "eventData" # Start the workflow -start_resp = d.start_workflow(instance_id=instanceId, workflow_component=workflowComponent, - workflow_name=workflowName, input=inputData, workflow_options=workflowOptions) +wf_client.schedule_new_workflow( + workflow=hello_world_wf, input=input_data, instance_id=instance_id + ) # Get info on the workflow -getResponse = d.get_workflow(instance_id=instanceId, workflow_component=workflowComponent) +wf_client.get_workflow_state(instance_id=instance_id) # Pause the workflow -d.pause_workflow(instance_id=instanceId, workflow_component=workflowComponent) +wf_client.pause_workflow(instance_id=instance_id) + metadata = wf_client.get_workflow_state(instance_id=instance_id) # Resume the workflow -d.resume_workflow(instance_id=instanceId, workflow_component=workflowComponent) +wf_client.resume_workflow(instance_id=instance_id) # Raise an event on the workflow. - d.raise_workflow_event(instance_id=instanceId, workflow_component=workflowComponent, - event_name=eventName, event_data=eventData) +wf_client.raise_workflow_event(instance_id=instance_id, event_name=event_name, data=event_data) # Purge the workflow -d.purge_workflow(instance_id=instanceId, workflow_component=workflowComponent) +wf_client.purge_workflow(instance_id=instance_id) -# Terminate the workflow -d.terminate_workflow(instance_id=instanceId, workflow_component=workflowComponent) +# Wait for workflow completion +wf_client.wait_for_workflow_completion(instance_id, timeout_in_seconds=30) ``` {{% /codetab %}} From 6e990e43127adb6cd85fc448d49de5b49d62944f Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Tue, 18 Mar 2025 10:05:23 -0500 Subject: [PATCH 15/24] Added .NET streaming subscription example to pubsub page Signed-off-by: Whit Waldo --- .../pubsub/subscription-methods.md | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md index 5c31057ee32..406368b4142 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md @@ -203,7 +203,55 @@ As messages are sent to the given message handler code, there is no concept of r The example below shows the different ways to stream subscribe to a topic. -{{< tabs Python Go >}} +{{< tabs .NET Python Go >}} + +{{% codetab %}} + +You can use the `SubscribeAsync` method on the `DaprPublishSubscribeClient` to configure the message handler to use to pull messages from the stream. + +```c# +using System.Text; +using Dapr.Messaging.PublishSubscribe; +using Dapr.Messaging.PublishSubscribe.Extensions; + +var builder = WebApplication.CreateBuilder(args); +builder.Services.AddDaprPubSubClient(); +var app = builder.Build(); + +var messagingClient = app.Services.GetRequiredService(); + +//Create a dynamic streaming subscription and subscribe with a timeout of 30 seconds and 10 seconds for message handling +var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); +var subscription = await messagingClient.SubscribeAsync("pubsub", "myTopic", + new DaprSubscriptionOptions(new MessageHandlingPolicy(TimeSpan.FromSeconds(10), TopicResponseAction.Retry)), + HandleMessageAsync, cancellationTokenSource.Token); + +await Task.Delay(TimeSpan.FromMinutes(1)); + +//When you're done with the subscription, simply dispose of it +await subscription.DisposeAsync(); +return; + +//Process each message returned from the subscription +Task HandleMessageAsync(TopicMessage message, CancellationToken cancellationToken = default) +{ + try + { + //Do something with the message + Console.WriteLine(Encoding.UTF8.GetString(message.Data.Span)); + return Task.FromResult(TopicResponseAction.Success); + } + catch + { + return Task.FromResult(TopicResponseAction.Retry); + } +} +``` + +[Learn more about streaming subscriptions using the .NET SDK client.]({{< ref "dotnet-messaging-pubsub-howto.md" >}}) + +{{% /codetab %}} + {{% codetab %}} From 2be7c994e124d0c89adc608486b983cbd769e05a Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Tue, 18 Mar 2025 10:18:52 -0500 Subject: [PATCH 16/24] Added double quotes around .NET in the tabs markup Signed-off-by: Whit Waldo --- .../building-blocks/pubsub/subscription-methods.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md index 406368b4142..b5496419a71 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md @@ -203,7 +203,7 @@ As messages are sent to the given message handler code, there is no concept of r The example below shows the different ways to stream subscribe to a topic. -{{< tabs .NET Python Go >}} +{{< tabs ".NET" Python Go >}} {{% codetab %}} From 8a29b3936ab5d406731d532baec264449115b65e Mon Sep 17 00:00:00 2001 From: James Pegg Date: Mon, 24 Mar 2025 03:52:07 +0000 Subject: [PATCH 17/24] Fixed spelling mistake in secret-scope.md (#4593) "Scop" fixed to "Scope" Signed-off-by: James Pegg --- daprdocs/content/en/operations/configuration/secret-scope.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/operations/configuration/secret-scope.md b/daprdocs/content/en/operations/configuration/secret-scope.md index bd718288d5c..96e7b12e3a1 100644 --- a/daprdocs/content/en/operations/configuration/secret-scope.md +++ b/daprdocs/content/en/operations/configuration/secret-scope.md @@ -7,8 +7,8 @@ description: "Define secret scopes by augmenting the existing configuration reso description: "Define secret scopes by augmenting the existing configuration resource with restrictive permissions." --- -In addition to [scoping which applications can access a given component]({{< ref "component-scopes.md">}}), you can also scop a named secret store component to one or more secrets for an application. By defining `allowedSecrets` and/or `deniedSecrets` lists, you restrict applications to access only specific secrets. -In addition to [scoping which applications can access a given component]({{< ref "component-scopes.md">}}), you can also scop a named secret store component to one or more secrets for an application. By defining `allowedSecrets` and/or `deniedSecrets` lists, you restrict applications to access only specific secrets. +In addition to [scoping which applications can access a given component]({{< ref "component-scopes.md">}}), you can also scope a named secret store component to one or more secrets for an application. By defining `allowedSecrets` and/or `deniedSecrets` lists, you restrict applications to access only specific secrets. +In addition to [scoping which applications can access a given component]({{< ref "component-scopes.md">}}), you can also scope a named secret store component to one or more secrets for an application. By defining `allowedSecrets` and/or `deniedSecrets` lists, you restrict applications to access only specific secrets. For more information about configuring a Configuration resource: - [Configuration overview]({{< ref configuration-overview.md >}}) From aebf393b2a72d396a4a2622d9badacb736eb4b2a Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Tue, 25 Mar 2025 18:28:23 -0400 Subject: [PATCH 18/24] Update self-hosted-with-docker.md - make `scheduler` running (#4599) * Update self-hosted-with-docker.md - make scheduler running Signed-off-by: Mathieu Benoit * Update self-hosted-with-docker.md - --scheduler-host-address Signed-off-by: Mathieu Benoit * Update self-hosted-with-docker.md - Use smaller container images for placement and scheduler Signed-off-by: Mathieu Benoit --------- Signed-off-by: Mathieu Benoit --- .../hosting/self-hosted/self-hosted-with-docker.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-with-docker.md b/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-with-docker.md index 700acc7767e..7aa42196f71 100644 --- a/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-with-docker.md +++ b/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-with-docker.md @@ -123,6 +123,7 @@ services: "--app-id", "nodeapp", "--app-port", "3000", "--placement-host-address", "placement:50006", # Dapr's placement service can be reach via the docker DNS entry + "--scheduler-host-address", "scheduler:50007", # Dapr's scheduler service can be reach via the docker DNS entry "--resources-path", "./components" ] volumes: @@ -134,22 +135,19 @@ services: ... # Deploy other daprized services and components (i.e. Redis) placement: - image: "daprio/dapr" + image: "daprio/placement" command: ["./placement", "--port", "50006"] ports: - "50006:50006" scheduler: - image: "daprio/dapr" - command: ["./scheduler", "--port", "50007"] + image: "daprio/scheduler" + command: ["./scheduler", "--port", "50007", "--etcd-data-dir", "/data"] ports: - "50007:50007" - # WARNING - This is a tmpfs volume, your state will not be persisted across restarts + user: root volumes: - - type: tmpfs - target: /data - tmpfs: - size: "64m" + - "./dapr-etcd-data/:/data" networks: hello-dapr: null From b421483bf41a4edfa0a5660d78ba3172d40366d3 Mon Sep 17 00:00:00 2001 From: Alice Gibbons Date: Thu, 27 Mar 2025 00:58:24 +0000 Subject: [PATCH 19/24] Update actors-quickstart.md (#4601) Update to .NET 8 runtime Signed-off-by: Alice Gibbons --- .../content/en/getting-started/quickstarts/actors-quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/getting-started/quickstarts/actors-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/actors-quickstart.md index fef7c9de93c..47c698be345 100644 --- a/daprdocs/content/en/getting-started/quickstarts/actors-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/actors-quickstart.md @@ -33,7 +33,7 @@ For this example, you will need: - [Docker Desktop](https://www.docker.com/products/docker-desktop) -- [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0), [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0) installed +- [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) installed **NOTE:** .NET 6 is the minimally supported version of .NET for the Dapr .NET SDK packages in this release. Only .NET 8 and .NET 9 will be supported in Dapr v1.16 and later releases. From 196cf3df9d1fbfaf6cba7aa45556ce59d6514e91 Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Wed, 9 Apr 2025 13:31:41 -0500 Subject: [PATCH 20/24] Upped stalebot period from 5 to 30 days (#4610) Signed-off-by: Whit Waldo --- .github/workflows/stale-pr-monitor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-pr-monitor.yml b/.github/workflows/stale-pr-monitor.yml index ee56977ab37..f08ac369f9f 100644 --- a/.github/workflows/stale-pr-monitor.yml +++ b/.github/workflows/stale-pr-monitor.yml @@ -18,4 +18,4 @@ jobs: stale-pr-message: 'Stale PR, paging all reviewers' stale-pr-label: 'stale' exempt-pr-labels: 'question,"help wanted",do-not-merge,waiting-on-code-pr' - days-before-stale: 5 + days-before-stale: 30 From 5435bd43a4d6702a93b2bd4469c66fbd1af0a9bc Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Wed, 9 Apr 2025 16:12:50 -0500 Subject: [PATCH 21/24] Added troubleshooting step to resolve port conflicts during `dapr init` on Windows (#4602) Signed-off-by: Whit Waldo Co-authored-by: Mark Fussell --- .../troubleshooting/common_issues.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/daprdocs/content/en/operations/troubleshooting/common_issues.md b/daprdocs/content/en/operations/troubleshooting/common_issues.md index 40281dd2fee..8d6294f6b4d 100644 --- a/daprdocs/content/en/operations/troubleshooting/common_issues.md +++ b/daprdocs/content/en/operations/troubleshooting/common_issues.md @@ -291,3 +291,21 @@ kubectl config get-users ``` You may learn more about webhooks [here](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/). + +## Ports not available during `dapr init` +You might encounter the following error on Windows after attempting to execute `dapr init`: + +> PS C:\Users\You> dapr init +Making the jump to hyperspace... +Container images will be pulled from Docker Hub +Installing runtime version 1.14.4 +Downloading binaries and setting up components... +docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:52379 -> 0.0.0.0:0: listen tcp4 0.0.0.0:52379: bind: An attempt was made to access a socket in a way forbidden by its access permissions. + +To resolve this error, open a command prompt in an elevated terminal and run: + +```bash +nat stop winnat +dapr init +net start winnat +``` \ No newline at end of file From 4341935c3a1a48bb4ef30e8a6593ea6b3da45e73 Mon Sep 17 00:00:00 2001 From: Fabian Steinbach <63794579+fabistb@users.noreply.github.com> Date: Thu, 10 Apr 2025 16:45:49 +0200 Subject: [PATCH 22/24] change application insights example from insights key to connection string (#4598) Signed-off-by: fabistb Co-authored-by: Whit Waldo Co-authored-by: Mark Fussell --- .../otel-collector/open-telemetry-collector-appinsights.md | 4 ++-- .../open-telemetry-collector-appinsights.yaml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector-appinsights.md b/daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector-appinsights.md index c851ec8a495..fc104263bbd 100644 --- a/daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector-appinsights.md +++ b/daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector-appinsights.md @@ -11,7 +11,7 @@ Dapr integrates with [OpenTelemetry (OTEL) Collector](https://github.com/open-te ## Prerequisites - [Install Dapr on Kubernetes]({{< ref kubernetes >}}) -- [Set up an App Insights resource](https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource) and make note of your App Insights instrumentation key. +- [Set up an App Insights resource](https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource) and make note of your App Insights connection string. ## Set up OTEL Collector to push to your App Insights instance @@ -19,7 +19,7 @@ To push events to your App Insights instance, install the OTEL Collector to your 1. Check out the [`open-telemetry-collector-appinsights.yaml`](/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml) file. -1. Replace the `` placeholder with your App Insights instrumentation key. +1. Replace the `` placeholder with your App Insights connection string. 1. Apply the configuration with: diff --git a/daprdocs/static/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml b/daprdocs/static/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml index 3b26889539d..797b62829d7 100644 --- a/daprdocs/static/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml +++ b/daprdocs/static/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml @@ -20,8 +20,7 @@ data: debug: verbosity: basic azuremonitor: - endpoint: "https://dc.services.visualstudio.com/v2/track" - instrumentation_key: "" + connection_string: "" # maxbatchsize is the maximum number of items that can be # queued before calling to the configured endpoint maxbatchsize: 100 From 58be5f36cea75b02476d6bde9b6caa218d8dbe00 Mon Sep 17 00:00:00 2001 From: Joey Freeland <30938344+jfreeland@users.noreply.github.com> Date: Thu, 10 Apr 2025 13:54:22 -0400 Subject: [PATCH 23/24] docs: bindings.cron every 15m (#4605) Signed-off-by: Joey Freeland <30938344+jfreeland@users.noreply.github.com> Co-authored-by: Mark Fussell Co-authored-by: Cassie Coyle --- .../reference/components-reference/supported-bindings/cron.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md index 6a046f781b0..72daed2dc5e 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md @@ -50,7 +50,7 @@ The Dapr cron binding supports following formats: For example: * `30 * * * * *` - every 30 seconds -* `0 15 * * * *` - every 15 minutes +* `0 */15 * * * *` - every 15 minutes * `0 30 3-6,20-23 * * *` - every hour on the half hour in the range 3-6am, 8-11pm * `CRON_TZ=America/New_York 0 30 04 * * *` - every day at 4:30am New York time From 55a56dd072881047d06a5c00bcea697c8db8324f Mon Sep 17 00:00:00 2001 From: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Date: Thu, 27 Feb 2025 14:08:32 -0500 Subject: [PATCH 24/24] Update conversation-overview.md fix todo Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> --- .../building-blocks/conversation/conversation-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md b/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md index 38cce1067a2..f6267322bf1 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md @@ -59,7 +59,7 @@ Want to put the Dapr conversation API to the test? Walk through the following qu | Quickstart/tutorial | Description | | ------------------- | ----------- | -| [Conversation quickstart]({{< ref conversation-quickstart.md >}}) | Learn how to interact with Large Language Models (LLMs) using the conversation API. | +| [Conversation quickstart]({{< ref conversation-quickstart.md >}}) | Learn how to interact with Large Language Models (LLMs) using the conversation API. | ### Start using the conversation API directly in your app