dapr / components-contrib

Community driven, reusable components for distributed apps
Apache License 2.0
545 stars 475 forks source link

regression: mongodb does not work with workflows anymore, v1.10.5 #2786

Closed mPyKen closed 1 year ago

mPyKen commented 1 year ago

Expected Behavior

workflows to work with mongodb as it did in v1.10.4

Actual Behavior

workflows do not work with mongodb in v1.10.5. Log:

INFO[0009] HTTP API Called                               app_id=wfapp instance=instance method="POST /v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/asdf/start" scope=dapr.runtime.http-info type=log useragent=vscode-restclient ver=1.10.5
DEBU[0009] invoking method 'CreateWorkflowInstance' on workflow actor 'asdf'  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0009] asdf: loading workflow state                  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0009] asdf: creating 'start-d9e4181d' reminder with DueTime = 0s  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0009] starting to read reminders for actor type dapr.internal.wfengine.workflow (migrate=false), with metadata id 00000000-0000-0000-0000-000000000000 and 0 partitions  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0009] read reminders from actors||dapr.internal.wfengine.workflow without partition:   app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0009] finished reading reminders for actor type dapr.internal.wfengine.workflow (migrate=false), with metadata id 00000000-0000-0000-0000-000000000000 and no partitions: total of 0 reminders  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0009] asdf: saving 3 keys to actor state store      app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0009] Executing reminder for actor dapr.internal.wfengine.workflow||asdf||start-d9e4181d  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
INFO[0010] created new workflow instance with ID 'asdf'  app_id=wfapp component="dapr (workflow.dapr/v1)" instance=instance scope=dapr.contrib type=log ver=1.10.5
DEBU[0010] &{asdf}                                       app_id=wfapp instance=instance scope=dapr.runtime.http type=log ver=1.10.5
DEBU[0010] invoking reminder 'start-d9e4181d' on workflow actor 'asdf'  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] orchestration-processor: processing work item: asdf (1 event(s))  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] asdf: received work item with 1 new event(s): [ExecutionStarted]  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] asdf: got orchestration runtime state: name=OrderProcessingWorkflow, status=PENDING, events=0, age=(new)  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
INFO[0010] asdf: starting new 'OrderProcessingWorkflow' instance.  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] asdf: invoking orchestrator                   app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
INFO[0010] gRPC API Called                               app_id=wfapp instance=instance method=/TaskHubSidecarService/CompleteOrchestratorTask scope=dapr.runtime.grpc.api-info type=log useragent="grpc-dotnet/2.50.0 (.NET 7.0.3; CLR 7.0.3; net7.0; windows; x64)" ver=1.10.5
DEBU[0010] asdf: orchestrator returned 1 action(s): [ScheduleTask#0]  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] orchestration-processor: work item processed successfully  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] asdf#0: loading activity state                app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] asdf#0: creating 'run-activity' reminder for immediate execution  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] starting to read reminders for actor type dapr.internal.wfengine.activity (migrate=false), with metadata id 00000000-0000-0000-0000-000000000000 and 0 partitions  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0010] read reminders from actors||dapr.internal.wfengine.activity without partition:   app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0010] finished reading reminders for actor type dapr.internal.wfengine.activity (migrate=false), with metadata id 00000000-0000-0000-0000-000000000000 and no partitions: total of 0 reminders  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0010] asdf: saving 6 keys to actor state store      app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] Executing reminder for actor dapr.internal.wfengine.activity||asdf#0||run-activity  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0010] invoking reminder 'run-activity' on activity actor 'asdf#0'  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
DEBU[0010] activity-processor: processing work item: asdf/ReserveAssetActivity#0  app_id=wfapp instance=instance scope=dapr.runtime.wfengine type=log ver=1.10.5
INFO[0010] Reminder dapr.internal.wfengine.workflow||asdf||start-d9e4181d was canceled by the actor  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0010] Found reminder with key: dapr.internal.wfengine.workflow||asdf||start-d9e4181d. Deleting reminder  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0010] starting to read reminders for actor type dapr.internal.wfengine.workflow (migrate=false), with metadata id 00000000-0000-0000-0000-000000000000 and 0 partitions  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
DEBU[0010] read reminders from actors||dapr.internal.wfengine.workflow without partition: [{"actorid":"asdf","actortype":"dapr.internal.wfengine.workflow","callback":"","data":{"$binary":{"base64":"bnVsbA==","subType":"00"}},"duetime":"0s","expirationtime":{"$date":{"$numberLong":"-62135596800000"}},"name":"start-d9e4181d","period":{},"registeredtime":{"$date":"2023-04-17T10:33:08Z"}}]  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5
ERRO[0010] error deleting reminder: error obtaining reminders for actor type dapr.internal.wfengine.workflow: could not parse actor reminders: parse error: unsupported duration format: {}  app_id=wfapp instance=instance scope=dapr.runtime.actor type=log ver=1.10.5

Steps to Reproduce the Problem

run a workflow locally with mongodb as actor state store

Release Note

RELEASE NOTE:

ItalyPaleAle commented 1 year ago

This seems to be an issue related to serializing reminders, so a combination of runtime + MongoDB component

DeepanshuA commented 1 year ago

Is it due to this: "period":{} in data? parse error: unsupported duration format: {}

ItalyPaleAle commented 1 year ago

I suspect so. Not sure why that is happening. Could be related to BSON serialization of null values?

ItalyPaleAle commented 1 year ago

Should be fixed by dapr/dapr#6277

berndverst commented 1 year ago

Whatever fix is going into 1.10.6 will be added to dapr/dapr master, which will be included in 1.11 also. That should address this issue.

DeepanshuA commented 1 year ago

As it will be shipped to 1.11 as well, adding 1.11 miestone here.