Skip to content

Triggerer can not access Variables #61676

@fbmatilla

Description

@fbmatilla

Apache Airflow version

3.1.7

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

No response

What happened?

I can not access variables inside the triggerer by using the airflow.sdk.Variable module, an error VARIABLE_NOT_FOUND is raised.

What you think should happen instead?

Worker can access Variable module however Triggerer can not.

How to reproduce

1.- Create a new variable with name retries and a value of 10.
2.- Put the attached files in the right folders:

  • dag_example.py into your dag folder
  • lib_example.py into a folder in yout PYTHONPATH

Run the DAG:

  • The first task access the variable correctly
  • The second task (the one deferred) fails because the triggerer can not access the variable.

You get an error like this:

[2026-02-09T15:22:57.644686Z] ERROR - Trigger ejemplo_deferrable_3_0/manual__2026-02-09T15:21:16.609292+00:00/async_task/-1/2 (ID 17) exited with error VARIABLE_NOT_FOUND: {'message': 'Variable retries not found'}AirflowRuntimeError: VARIABLE_NOT_FOUND: {'message': 'Variable retries not found'}

Attached files:
dag_example.py

lib_example.py

Logs:

logs_ejemplo_deferrable_3_0_manual__2026-02-09T15_21_16.609292+00_00_async_task_-1_2.txt

Operating System

Ubuntu 20.04.6

Versions of Apache Airflow Providers

apache-airflow==3.1.7
apache-airflow-core==3.1.7
apache-airflow-providers-common-compat==1.13.0
apache-airflow-providers-common-io==1.7.0
apache-airflow-providers-common-sql==1.30.2
apache-airflow-providers-google==19.3.0
apache-airflow-providers-microsoft-azure==12.10.3
apache-airflow-providers-microsoft-mssql==4.4.1
apache-airflow-providers-smtp==2.4.1
apache-airflow-providers-snowflake==6.8.1
apache-airflow-providers-standard==1.10.2
apache-airflow-task-sdk==1.1.7

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else?

Always

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions