Map length determined incorrectly when mapping over an output of a multi-output task #51109
Open
1 of 2 tasks
Labels
area:core
area:dynamic-task-mapping
AIP-42
area:TaskGroup
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
Uh oh!
There was an error while loading. Please reload this page.
Apache Airflow version
2.11.0
If "Other Airflow 2 version" selected, which one?
No response
What happened?
The mapping length in
expandinput
is determined incorrectly to be the number of returns from a task, instead of the number of elements in the sequence we map on (which is one of the values returned by the aforementioned task).Note how
all_lengths
is always2
regardless of the contents ofvalue
:Depending on the relative size of the determined and actual map size, the dag either reports the error below, works correctly, or ends up not processing the later elements.
What you think should happen instead?
all_length
should correctly reflect the number of elements we're mapping on.How to reproduce
Workaround
Introduce an intermediate passthrough task:
Operating System
Linux
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else?
When the number of map elements (length of
targets
) is equal to the number of outputs fromdetermine_run_params
, the code works correctly. Perhaps Airflow's tests related to this functionality are hitting this exact sweet spot.Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: