Fix xcom_pull() ignoring default parameter when map_indexes not set#64614
Draft
nagasrisai wants to merge 5 commits intoapache:mainfrom
Draft
Fix xcom_pull() ignoring default parameter when map_indexes not set#64614nagasrisai wants to merge 5 commits intoapache:mainfrom
nagasrisai wants to merge 5 commits intoapache:mainfrom
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix
xcom_pull()ignoring thedefaultparameter whenmap_indexesis not set.When
map_indexesis not explicitly provided,xcom_pull()iterates over eachtask_idand callsXCom.get_all(). Ifget_all()returnsNone(meaning no XCom exists for that task), the code was unconditionally appendingNoneto the results list instead of the caller-supplieddefaultvalue. The explicitmap_indexespath did not have this bug.One-line fix:
xcoms.append(None)→xcoms.append(default).Closes #64295