Skip to content

Conversation

@uranusjr
Copy link
Member

Since the latest XCom migration has not been publicly released, this
modifies that migration in place so we don't need to recreate the XCom
primary key again.

While I added the map_index argument to the functions, I'm honestly not
sure how it can be used for most of the interfaces. Those can hopefully
be added incrementally later.

Since the latest XCom migration has not been publicly released, this
modifies that migration in place so we don't need to recreate the XCom
primary key *again*.

While I added the map_index argument to the functions, I'm honestly not
sure how it can be used for most of the interfaces. Those can hopefully
be added incrementally later.
@uranusjr
Copy link
Member Author

Ah, adding map_index requires us to change the XCom interface (because the push/pull/clear interface now needs to accept map_index as an argument). This will need the patch-outdated treatment introduced to serialize in #19505.

@uranusjr uranusjr marked this pull request as draft February 22, 2022 05:38
Comment on lines 111 to 114
dag_id: str,
task_id: str,
run_id: str,
map_index: int = -1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if instead of all these columns we should take a Union[TaskInstance, TaskInstanceKey]?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering about just TaskInstanceKey; it’s quite trivial to build a key from a ti anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ti.key infact :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I've started making this change and I'm not too sure about it. Will continue for now.

@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Feb 22, 2022
It's getting to the point where set/clear etc are taking entirely too
many parameters and it's getting unwieldy, and we've already got a class
that encapsulates this info.
@ashb
Copy link
Member

ashb commented Feb 28, 2022

Decided to fix up the Operator links first, so this depends on #21798

@uranusjr
Copy link
Member Author

uranusjr commented Mar 7, 2022

Easier to redo this one top of main instead of rebasing.

@uranusjr uranusjr closed this Mar 7, 2022
@uranusjr uranusjr deleted the xcom-map-index branch April 15, 2022 06:26
@jedcunningham jedcunningham added this to the Airflow 2.3.0 milestone Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dynamic-task-mapping AIP-42 full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants