Skip to content

Fix xcom_pull() ignoring default parameter when map_indexes not set#64614

Draft
nagasrisai wants to merge 5 commits intoapache:mainfrom
nagasrisai:fix/xcom-pull-default-no-map-indexes
Draft

Fix xcom_pull() ignoring default parameter when map_indexes not set#64614
nagasrisai wants to merge 5 commits intoapache:mainfrom
nagasrisai:fix/xcom-pull-default-no-map-indexes

Conversation

@nagasrisai
Copy link
Copy Markdown
Contributor

Fix xcom_pull() ignoring the default parameter when map_indexes is not set.

When map_indexes is not explicitly provided, xcom_pull() iterates over each task_id and calls XCom.get_all(). If get_all() returns None (meaning no XCom exists for that task), the code was unconditionally appending None to the results list instead of the caller-supplied default value. The explicit map_indexes path did not have this bug.

One-line fix: xcoms.append(None)xcoms.append(default).

Closes #64295

When map_indexes is not explicitly provided, xcom_pull() calls
XCom.get_all() for each task_id. If get_all() returns None (no XCom
stored), the code was appending None unconditionally instead of the
caller-supplied default value.

Fixes apache#64295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xcom_pull() ignores default parameter when map_indexes is not set

1 participant