Open giuliohome opened 1 week ago
Maybe more interesting the log from the workflows-sample
container
2024-11-23T11:46:59.288Z info: WorkflowSample.Controllers.StockController[0]
2024-11-23T11:46:59.288Z Inventory Restocked!
2024-11-23T11:48:15.691Z info: WorkflowSample.Activities.NotifyActivity[0]
2024-11-23T11:48:15.691Z Received order 1234 for 1 at $0
2024-11-23T11:48:15.987Z info: WorkflowSample.Activities.ReserveInventoryActivity[0]
2024-11-23T11:48:15.987Z Reserving inventory for order '1234' of 1 (null)
Notice the null
... (and at $0
! while it should be 99.5 I assume)
Same issue when running it locally (I've done a test without AKS but running on docker containers)
giulio@myhome:~/csharp/dapr-workflows-aks-sample$ dapr run --app-id dapr-aks-sample --dapr-http-port 3500 -- dotnet run
...
...
INFO[0009] Placement tables updated, version: 1 app_id=dapr-aks-sample instance=myhome scope=dapr.runtime.actors.placement type=log ver=1.14.4
== APP == warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
== APP == Failed to determine the https port for redirect.
== APP == info: WorkflowSample.Controllers.StockController[0]
== APP == Inventory Restocked!
WARN[0125] Redis does not support transaction rollbacks and should not be used in production as an actor state store. app_id=dapr-aks-sample component="statestore (state.redis/v1)" instance=myhome scope=dapr.contrib type=log ver=1.14.4
INFO[0125] 1234: starting new 'OrderProcessingWorkflow' instance with ID = '1234'. app_id=dapr-aks-sample instance=myhome scope=wfengine.durabletask.backend type=log ver=1.14.4
== APP == info: WorkflowSample.Activities.NotifyActivity[0]
== APP == Received order 1234 for 1 at $0
== APP == info: WorkflowSample.Activities.ReserveInventoryActivity[0]
== APP == Reserving inventory for order '1234' of 1 (null)
INFO[0126] 1234: 'OrderProcessingWorkflow' completed with a FAILED status. app_id=dapr-aks-sample instance=myhome scope=wfengine.durabletask.backend type=log ver=1.14.4
INFO[0126] Workflow Actor '1234': workflow completed with status 'ORCHESTRATION_STATUS_FAILED' workflowName 'OrderProcessingWorkflow' app_id=dapr-aks-sample instance=myhome scope=dapr.wfengine.backend.actors type=log ver=1.14.4
Here is the solution in the line below:
curl -i -X POST $DAPR_URL/v1.0-beta1/workflows/dapr/OrderProcessingWorkflow/start?instanceID=1234 -H "Content-Type: application/json" -d '{"Name": "Paperclips", "Cost": 99.95, "Quantity": 1}'
Will open a PR to fix the readme!
Tested also by installing the application in a different namespace of the AKS cluster. I found that it is important to change the redis namespace besides adding the namespace metadata in the Deploy yaml
helm install redis bitnami/redis --namespace myapp
Installed on my Azure Kubernetes Cluster, following the instructions.
Getting
After port-forwarding the dashboard service, the log from there also tracks
ORCHESTRATION_STATUS_FAILED