Closed mikita-charnukhin closed 6 days ago
Yeah, upvoting this 👍🏻
Seems like a basic enough feature to have for schedules
Also facing this, even the most basic example seems to completely ignore the retryOptions set on a workflow when it is part of a schedule
I tried reproducing this with a schedule client in the Go SDK and retries worked correctly. There might be an issue with Java SDK.
Hi @dnr Yes, as I mentioned in the issue description above the retries issue exists in Java SDK. If you go to ScheduleClientImpl.createSchedule(...) -> ScheduleClientCallsInterceptor.createSchedule(...) -> RootScheduleClientInvoker.createSchedule(...) -> ScheduleProtoUtil.scheduleToProto(...) -> ScheduleProtoUtil.actionToProto(...) then you’ll see that RetryOptions object is ignored when doing mapping of ScheduleAction object from the “temporal-sdk-java” module to the ScheduleAction object from the “temporal-serviceclient” module. During that mapping ScheduleAction.action.retryPolicy stays null (action_ is of type NewWorkflowExecutionInfo). RetryOptions object which we pass to the Temporal client is being ignored.
Resolved with https://github.com/temporalio/sdk-java/pull/2082 which is included in Java SDK v1.24.0
Issue description
I am trying to configure a retry policy for a scheduled workflow. By scheduled workflow I mean this feature: Features - Java SDK feature guide | Temporal Documentation 1 . Unfortunately it seems not working for me. I am expecting that when I add a
RetryOptions
object to theSchedule
→ScheduleActionStartWorkflow
→WorkflowOptions
then retries will be working according to the provided configuration. I haven’t seen any notes about additional actions which might be required to enable retries for scheduled workflow executions. But maybe I am missing something..Notes
RuntimeException
then after activity retries exhausted the scheduled workflow execution fails without expected retries (following any configured retry policy).RetryOptions
works as expected if I use them to trigger a single workflow execution (without a schedule). Example of a single workflow execution which I meant:workflowClient.newWorkflowStub(SomeWorkflow.class, workflowOptions).runSomeWorkflow(someInput);
Code example
Is there any issue with scheduled workflows which breaks the retry mechanism? Or maybe you can see an obvious mistake in my configuration..
Thank you in advance!