Skip to main content
Practitioner ⭐️
August 2, 2024

Dynamic Tasks processing in sequence

  • August 2, 2024
  • 39 replies
  • 645 views

 

I have created 1 workflow , in which I am creating dynamic tasks depending on input, it creates batch of ids and create tasks out of it. Below is workflow definition

WorkflowVersionUpsert(

   workflow_external_id="test_dynamic-0729",

   version="1",

   workflow_definition=WorkflowDefinitionUpsert(

       description="This workflow has two steps",

       tasks=[

           WorkflowTask(

                external_id="test_sub_tasks",

                parameters=FunctionTaskParameters(

                    external_id="test_sub_tasks",

                    data="${workflow.input}"

                ),

                retries=1,

                timeout=3600,

                depends_on=[],

                on_failure = "abortWorkflow",

            ),

           WorkflowTask(

                external_id="test_create_sub",

                parameters=DynamicTaskParameters(

                    tasks="${test_sub_tasks.output.response.tasks}"

                ),

                name="Dynamic Task",

                description="Executes a list of workflow tasks for subscription creation",

                retries=0,

                timeout=3600,

                depends_on=["test_sub_tasks"],

                on_failure = "abortWorkflow",

           )

       ]

   )

 As part of this workflow, I have some task that are needed to be executed in parallel and are expected to finish in around similar time if running parallel. However, dynamic tasks are not getting executed in parallel, I have 6 dynamic tasks, but they are finishing up sequentially. Sharing snapshot. If we can see time difference between first and last task is ~6m. Not able to take advantage of parallel execution with dynamic tasks.

Impact : Dynamic Execution taking sequential time to process tasks, further delaying completion of workflow

39 replies

Dag Brattli
Practitioner ⭐️⭐️⭐️
Practitioner ⭐️⭐️⭐️
February 4, 2025

Hi ​@Niranjan Madhukar Karvekar, we are really sorry about this issue. My current testing shows that the pre-warming of functions do not really work as expected. We got an update from Microsoft that the deployment of a fix would hit the services sometime between february and march. I will keep you informed once I know more details about this issue.

Aditya Kotiyal
MVP ⭐️⭐️⭐️⭐️⭐️
MVP ⭐️⭐️⭐️⭐️⭐️
March 10, 2025

hi ​@Dag Brattli ,

Any update from MSFT on this? 

Aditya Kotiyal
Dag Brattli
Practitioner ⭐️⭐️⭐️
Practitioner ⭐️⭐️⭐️
March 11, 2025

@Aditya Kotiyal We have weekly meetings with Microsoft to discuss this issue, but unfortunately, they do not have an ETA on a fix yet. Rolling out a new scale controller takes some time. I know they are taking this issue very seriously, and I will get back to you when we have more information.

Dag Brattli

Aditya Kotiyal
MVP ⭐️⭐️⭐️⭐️⭐️
MVP ⭐️⭐️⭐️⭐️⭐️
March 11, 2025

Thanks ​@Dag Brattli .

Understood that it takes time, but it has been impacting our go to market with the offering we are using workflows for and also adoption of workflows across our products. Our team has been waiting for this for almost 8 months now.

Will wait for the updates.

Aditya Kotiyal
Dag Brattli
Practitioner ⭐️⭐️⭐️
Practitioner ⭐️⭐️⭐️
March 11, 2025

@Aditya Kotiyal We have been told by Azure that there was made an update today. We are verifying our functions, and currently seing positive results. It would be great if you could also test your functions from your side to check if you can see some different behaviour? 

Dag Brattli
Practitioner ⭐️⭐️⭐️
Practitioner ⭐️⭐️⭐️
March 19, 2025

Our testing shows that this issue is now resolved, and the ticket we have with Microsoft is now closed. Please reach out to us again if you still experience any problems.

Thanks 

Dag Brattli

Aditya Kotiyal
MVP ⭐️⭐️⭐️⭐️⭐️
MVP ⭐️⭐️⭐️⭐️⭐️
March 19, 2025

Thanks ​@Dag Brattli . Team is also planning to test it as the priorities for them has changed since last time because the issue took a lot of time to be solved. I will keep you and team posted.

Aditya Kotiyal
Seasoned ⭐️⭐️⭐️
April 17, 2025

@Dag Brattli Thanks for the update. Do we still need to prewarm the functions to test this? or Do we expect the good performance without that as well?

Seasoned ⭐️⭐️⭐️
April 17, 2025

@Dag Brattli I checked the performance with same example that I posted in this ticket but I still don’t see the executions are finished in nearly same time. Is it possible for you to check that example at your side if anything is missing. 

 

Here is snapshot of function executions to show the duration. This function is running in parallel through dynamic task. The CDF project name : slb-uds-qa

 

 

Aditya Kotiyal
MVP ⭐️⭐️⭐️⭐️⭐️
MVP ⭐️⭐️⭐️⭐️⭐️
April 24, 2025

@Dag Brattli  Niranjan tested it but the same issue persists.

Aditya Kotiyal