-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Closed
Labels
area:corekind:bugThis is a clearly a bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a releaseBug that should be fixed before next release but would not block a release
Milestone
Description
Apache Airflow version
3.0.0
If "Other Airflow 2 version" selected, which one?
No response
What happened?
Setting a variable in Dag is failing due to 'Direct database access via the ORM is not allowed in Airflow 3.0'
What you think should happen instead?
No response
How to reproduce
Have the below dag in dags folder, you will get import error.
from datetime import datetime
from airflow.providers.standard.operators.bash import BashOperator
from airflow.models import Variable
from airflow import DAG
my_var = Variable.set("param_variable", 10)
dag = DAG(
'test_api_dag',
start_date=datetime(2025, 3, 1, 3, 28, 0),
# # schedule=timedelta(days=1),
schedule='@daily',
is_paused_upon_creation=False
)
hello_task = BashOperator(
task_id='test_task',
bash_command='echo "Hello World from Airflow!"',
do_xcom_push = True,
dag=dag,
)
hello_taskOperating System
Linux
Versions of Apache Airflow Providers
No response
Deployment
Other
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
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
area:corekind:bugThis is a clearly a bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a releaseBug that should be fixed before next release but would not block a release