Skip to content

xcom include_prior_dates=True returns "None" instead of xcom #70173

Description

@devgonvarun

Under which category would you file this issue?

Airflow Core/Task SDK

Apache Airflow version

3.2.2, 3.3.0

What happened and how to reproduce it?

Try running this simple dag pair for cross dag xcom transfer. The cross_dag_xcom_downstream dag correctly receives the xcom value at airflow v3.1.7 but receives None in airflow v3.2x and v3.3.0. The cross_dag_xcom_upstream correctly creates an xcom entry its just that the cross_dag_xcom_downstream is not able to access it.

from airflow.sdk import dag, task

@dag()
def cross_dag_xcom_upstream():
    @task
    def push_to_xcom():
        return "Hello!"

    push_to_xcom()


cross_dag_xcom_upstream()


@dag()
def cross_dag_xcom_downstream():
    @task
    def pull_from_xcom(**context):
        print("The context task instance is", context["task_instance"])

        my_data = context["task_instance"].xcom_pull(
            dag_id="cross_dag_xcom_upstream",
            task_ids="push_to_xcom",
            key="return_value",
            include_prior_dates=True,
        )
        return my_data

    pull_from_xcom()


cross_dag_xcom_downstream()

What you think should happen instead?

The downstream dag should receive the xcom.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corekind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions