-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
airflow3.0:breakingCandidates for Airflow 3.0 that contain breaking changesCandidates for Airflow 3.0 that contain breaking changesairflow3.0:candidatePotential candidates for Airflow 3.0Potential candidates for Airflow 3.0kind:featureFeature RequestsFeature Requests
Milestone
Description
Description
I suggest changing the bare-minimum code required for instantiating a DAG:
# Proposed
from airflow import DAG
from airflow.operators.bash import BashOperator
with DAG(dag_id="no_schedule_dag") as dag:
BashOperator(task_id="foobar", bash_command="echo hello")This is currently not possible because start_date is a required argument:

I regularly see people using externally triggered DAGs and you're currently forced to set a placeholder start_date because Airflow requires it:
# Current situation
import datetime
from airflow import DAG
from airflow.operators.bash import BashOperator
with DAG(dag_id="no_schedule_dag", start_date=datetime.datetime(2022, 1, 1), schedule_interval=None) as dag:
BashOperator(task_id="foobar", bash_command="echo hello")When people want to set a schedule_interval, they intentionally think of it, so defaulting to None feels like a better UX to me.
Use case/motivation
To improve the Airflow user experience, I suggest removing the start_date requirement on DAG:
DAG(dag_id="my_dag")This DAG could be triggered externally.
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
thomasglaser
Metadata
Metadata
Assignees
Labels
airflow3.0:breakingCandidates for Airflow 3.0 that contain breaking changesCandidates for Airflow 3.0 that contain breaking changesairflow3.0:candidatePotential candidates for Airflow 3.0Potential candidates for Airflow 3.0kind:featureFeature RequestsFeature Requests