Skip to content

TriggerDagRunOperator fails to pass data to other dag in Airflow 3.x #57191

@Aymen1617

Description

@Aymen1617

Apache Airflow version

3.1.0

If "Other Airflow 2/3 version" selected, which one?

No response

What happened?

Image it is not passing data from one dag to another why

Image

What you think should happen instead?

No response

How to reproduce

Steps to Reproduce:

Create a DAG dag_a with a PythonOperator returning a dictionary:

def fetch_job():
return {"job_id": 123, "target_id": 987}

Use TriggerDagRunOperator to trigger another DAG (dag_b) with conf from XCom:

TriggerDagRunOperator(
task_id="trigger_dag_b",
trigger_dag_id="dag_b",
conf="{{ ti.xcom_pull(task_ids='fetch_job') }}"
)

Run the DAG.

Observed Behavior:

Airflow raises a Pydantic ValidationError.

The DAG fails to trigger dag_b.

Cause:

Airflow 3.x strictly validates that conf is a dict.

Using {{ ti.xcom_pull(...) }} without fromjson returns a string, not a dictionary.

Operating System

linux

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions