From ad7b2d4c43dcefc2d9e0fcb8090d6cc65660a0d0 Mon Sep 17 00:00:00 2001 From: Shubham Sharma Date: Fri, 16 Jun 2023 05:37:36 +0530 Subject: [PATCH 1/5] Fix HTTP examples in Workflow Console App (#1107) * Update demo.http; Signed-off-by: Shubham Sharma * Fix input Signed-off-by: Shubham Sharma --------- Signed-off-by: Shubham Sharma Co-authored-by: halspang <70976921+halspang@users.noreply.github.com> Signed-off-by: Bradley Cotier --- examples/Workflow/WorkflowConsoleApp/demo.http | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/Workflow/WorkflowConsoleApp/demo.http b/examples/Workflow/WorkflowConsoleApp/demo.http index bb91e5045..48b849a88 100644 --- a/examples/Workflow/WorkflowConsoleApp/demo.http +++ b/examples/Workflow/WorkflowConsoleApp/demo.http @@ -1,17 +1,17 @@ ### Start order processing workflow - replace xxx with any id you like -POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/xxx/start +POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=xxx Content-Type: application/json -{ "input" : {"Name": "Paperclips", "TotalCost": 99.95, "Quantity": 1}} +{"Name": "Paperclips", "TotalCost": 99.95, "Quantity": 1} ### Start order processing workflow - replace xxx with any id you like -POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/xxx/start +POST http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=xxx Content-Type: application/json -{ "input" : {"Name": "Cars", "TotalCost": 10000, "Quantity": 30}} +{"Name": "Cars", "TotalCost": 10000, "Quantity": 30} ### Query dapr sidecar - replace xxx with id from the workflow you've created above -GET http://localhost:3500/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/xxx +GET http://localhost:3500/v1.0-alpha1/workflows/dapr/xxx ### Terminate the workflow - replace xxx with id from the workflow you've created above POST http://localhost:3500/v1.0-alpha1/workflows/dapr/xxx/terminate \ No newline at end of file From 62268d29bbd2ebea41f2675fdd9284627b2d69cb Mon Sep 17 00:00:00 2001 From: Chris Gillum Date: Fri, 7 Jul 2023 08:44:40 +0900 Subject: [PATCH 2/5] [Workflow] Fix issue with ignored external event payload (#1119) * [Workflow] Fix issue with ignored external event payload Signed-off-by: Chris Gillum * Pushing missing commits Signed-off-by: Chris Gillum * Remove unnecessary steps from itests.yml Signed-off-by: Chris Gillum --------- Signed-off-by: Chris Gillum Signed-off-by: Bradley Cotier --- .github/workflows/itests.yml | 10 ---------- src/Dapr.Workflow/Dapr.Workflow.csproj | 6 +++--- src/Dapr.Workflow/DaprWorkflowClient.cs | 12 ++++++------ 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/itests.yml b/.github/workflows/itests.yml index 0044fec93..3f42b6bd2 100644 --- a/.github/workflows/itests.yml +++ b/.github/workflows/itests.yml @@ -105,16 +105,6 @@ jobs: - uses: actions/checkout@v1 - name: Parse release version run: python ./.github/scripts/get_release_version.py - - name: Install Local kafka using docker-compose - run: | - docker-compose -f test/Dapr.E2E.Test/deploy/local-test-kafka.yml up -d - docker ps - - name: Install Local Hashicorp Vault using docker-compose - run: | - docker-compose -f test/Dapr.E2E.Test/deploy/local-test-vault.yml up -d - docker ps - - name: Setup Vault's test token - run: echo myroot > /tmp/.hashicorp_vault_token - name: Setup ${{ matrix.display-name }} uses: actions/setup-dotnet@v1 with: diff --git a/src/Dapr.Workflow/Dapr.Workflow.csproj b/src/Dapr.Workflow/Dapr.Workflow.csproj index a951350e8..f6c28b02f 100644 --- a/src/Dapr.Workflow/Dapr.Workflow.csproj +++ b/src/Dapr.Workflow/Dapr.Workflow.csproj @@ -7,14 +7,14 @@ Dapr.Workflow Dapr Workflow Authoring SDK Dapr Workflow SDK for building workflows as code with Dapr - 0.2.0 + 0.3.0 alpha 10.0 - - + + diff --git a/src/Dapr.Workflow/DaprWorkflowClient.cs b/src/Dapr.Workflow/DaprWorkflowClient.cs index 249de09b7..4c4902dbb 100644 --- a/src/Dapr.Workflow/DaprWorkflowClient.cs +++ b/src/Dapr.Workflow/DaprWorkflowClient.cs @@ -70,9 +70,9 @@ public Task ScheduleNewWorkflowAsync( /// The unique ID of the workflow instance to fetch. /// /// Specify true to fetch the workflow instance's inputs, outputs, and custom status, or false to - /// omit them. Defaults to false. + /// omit them. Defaults to true. /// - public async Task GetWorkflowStateAsync(string instanceId, bool getInputsAndOutputs = false) + public async Task GetWorkflowStateAsync(string instanceId, bool getInputsAndOutputs = true) { OrchestrationMetadata? metadata = await this.innerClient.GetInstancesAsync( instanceId, @@ -94,7 +94,7 @@ public async Task GetWorkflowStateAsync(string instanceId, bool g /// The unique ID of the workflow instance to wait for. /// /// Specify true to fetch the workflow instance's inputs, outputs, and custom status, or false to - /// omit them. The default value is false to minimize the network bandwidth, serialization, and memory costs + /// omit them. Setting this value to false can help minimize the network bandwidth, serialization, and memory costs /// associated with fetching the instance metadata. /// /// A that can be used to cancel the wait operation. @@ -104,7 +104,7 @@ public async Task GetWorkflowStateAsync(string instanceId, bool g /// public async Task WaitForWorkflowStartAsync( string instanceId, - bool getInputsAndOutputs = false, + bool getInputsAndOutputs = true, CancellationToken cancellation = default) { OrchestrationMetadata metadata = await this.innerClient.WaitForInstanceStartAsync( @@ -135,7 +135,7 @@ public async Task WaitForWorkflowStartAsync( /// public async Task WaitForWorkflowCompletionAsync( string instanceId, - bool getInputsAndOutputs = false, + bool getInputsAndOutputs = true, CancellationToken cancellation = default) { OrchestrationMetadata metadata = await this.innerClient.WaitForInstanceCompletionAsync( @@ -218,7 +218,7 @@ public Task RaiseEventAsync( object? eventPayload = null, CancellationToken cancellation = default) { - return this.innerClient.RaiseEventAsync(instanceId, eventName, cancellation); + return this.innerClient.RaiseEventAsync(instanceId, eventName, eventPayload, cancellation); } /// From 5771dda84e02cfa9b7733c7591e41db52e9396f2 Mon Sep 17 00:00:00 2001 From: Bradley Cotier Date: Thu, 13 Jul 2023 16:37:42 +0100 Subject: [PATCH 3/5] Rev'ed Grpc.Net.Client PackageReference version for Dapr dotnet-sdk Signed-off-by: Bradley Cotier --- examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj | 2 +- src/Dapr.Client/Dapr.Client.csproj | 2 +- test/Dapr.Client.Test/Dapr.Client.Test.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj b/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj index 23ead7d4d..5ce78bc57 100644 --- a/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj +++ b/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Dapr.Client/Dapr.Client.csproj b/src/Dapr.Client/Dapr.Client.csproj index 7c9ff8160..59a38a3e4 100644 --- a/src/Dapr.Client/Dapr.Client.csproj +++ b/src/Dapr.Client/Dapr.Client.csproj @@ -21,7 +21,7 @@ - + diff --git a/test/Dapr.Client.Test/Dapr.Client.Test.csproj b/test/Dapr.Client.Test/Dapr.Client.Test.csproj index c94f031e9..36f9e725b 100644 --- a/test/Dapr.Client.Test/Dapr.Client.Test.csproj +++ b/test/Dapr.Client.Test/Dapr.Client.Test.csproj @@ -11,7 +11,7 @@ - + From 5556aad9e631e0d33995947b2e0a8041a0d64cf1 Mon Sep 17 00:00:00 2001 From: Bradley Cotier Date: Fri, 14 Jul 2023 08:21:04 +0100 Subject: [PATCH 4/5] -s Signed-off-by: Bradley Cotier --- examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj b/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj index 5ce78bc57..23ead7d4d 100644 --- a/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj +++ b/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj @@ -12,7 +12,7 @@ - + From 1a0ffa9d6105f1899deb745722c0934237897bc8 Mon Sep 17 00:00:00 2001 From: Bradley Cotier Date: Fri, 14 Jul 2023 08:21:34 +0100 Subject: [PATCH 5/5] -s Signed-off-by: Bradley Cotier --- examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj b/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj index 23ead7d4d..5ce78bc57 100644 --- a/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj +++ b/examples/AspNetCore/GrpcServiceSample/GrpcServiceSample.csproj @@ -12,7 +12,7 @@ - +