avkirilishin opened a new pull request, #36462: URL: https://github.com/apache/airflow/pull/36462
closes: https://github.com/apache/airflow/issues/34023 Redo of the #34337 Relates to https://github.com/apache/airflow/issues/35541#issuecomment-1826259201 @uranusjr Can you please take a look at the approach? I haven't checked the performance yet, but if the approach is okay, I will check it if needed. Perhaps it can be optimized. And I found that something goes wrong with the example from the `get_relevant_upstream_map_indexes` method. When I checked the dag: ```python import pendulum from airflow import DAG from airflow.decorators import task, task_group with DAG( 'mul-in-tg', schedule='@daily', start_date=pendulum.DateTime(2023, 12, 26), ) as dag: @task def upstream(inp): return inp @task def this_task(v): # This is self.task. return v * 2 @task_group def tg1(inp): val = upstream(inp) # This is the upstream task. this_task(val) # When inp is 1, val here should resolve to 2. return val val = tg1.expand(inp=[1, 2, 3]) # This val is the same object returned by tg1. @task def another_task(inp, val): print("(inp, val)", (inp, val)) @task_group def tg2(inp): another_task(inp, val) # val here should resolve to [2, 4, 6]. tg2.expand(inp=["a", "b"]) ``` I observed: <img width="1017" alt="image" src="https://github.com/apache/airflow/assets/54231417/d642c604-ae4c-4fc4-bd5e-9746a5c357e3"> Is this the expected behavior? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
