-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Copy link
Labels
affected_version:3.0Issues Reported for 3.0Issues Reported for 3.0area:corearea:dynamic-task-mappingAIP-42AIP-42kind:bugThis is a clearly a bugThis is a clearly a bugpriority:highHigh priority bug that should be patched quickly but does not require immediate new releaseHigh priority bug that should be patched quickly but does not require immediate new release
Milestone
Description
Apache Airflow version
3.0.0
If "Other Airflow 2 version" selected, which one?
No response
What happened?
When dynamically creating task groups and creating a task to consume combined results, the input received by the consuming task is None rather than a list of combined results.
What you think should happen instead?
According to the example in docs and behaviour in previous versions of Airflow the result passed to the consuming tasks should be a combined list of results from the task group instances.
How to reproduce
DAG derived from the example in the docs:
from datetime import datetime
from airflow.sdk import DAG, task, task_group
with DAG(
dag_id="dynamic_task_group_dag",
start_date=datetime(2025, 1, 1),
schedule=None,
):
@task_group
def add_one_and_double(value: int):
@task
def add_one(value: int):
return value + 1
@task
def double(value: int):
return value * 2
new_value = add_one(value)
return double(new_value)
@task
def consumer(values: list[int]):
print(f"New values are: {values}")
results = add_one_and_double.expand(value=[1, 2, 3])
consumer(results) # Should receive [4, 6, 8] but gets nullLogs of consumer task showing null was received:
[2025-04-24, 13:14:50] INFO - DAG bundles loaded: dags-folder: source="airflow.dag_processing.bundles.manager.DagBundlesManager"
[2025-04-24, 13:14:50] INFO - Filling up the DagBag from /home/airflow/dags/dynamic_task_group_dag.py: source="airflow.models.dagbag.DagBag"
[2025-04-24, 13:14:50] INFO - Done. Returned value was: None: source="airflow.task.operators.airflow.providers.standard.decorators.python._PythonDecoratedOperator"
[2025-04-24, 13:14:50] INFO - New values are: None: chan="stdout": source="task"
Operating System
Debian GNU/Linux 12
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
affected_version:3.0Issues Reported for 3.0Issues Reported for 3.0area:corearea:dynamic-task-mappingAIP-42AIP-42kind:bugThis is a clearly a bugThis is a clearly a bugpriority:highHigh priority bug that should be patched quickly but does not require immediate new releaseHigh priority bug that should be patched quickly but does not require immediate new release
