Reputation: 3
I have been trying past 2 days to resolve this. There is a DAG python script which I created and saved it in the dags folder in airflow which is being referred to in the "airflow.cfg" file. The other dags are getting updated except for one dag. I tried to restart scheduler and also tried to reset the airflow db using airflow db reset and then tried airflow db init once again but still the same issue exists.
Upvotes: 0
Views: 985
Reputation: 1046
Some ideas on what you could check:
dag_id
? (I lost a few hours to this once, if two dags have the same name, the scheduler will randomly pick one to display with every dag_dir_list_interval)from airflow.decorators import dag, task
from pendulum import datetime
@dag(
dag_id="unique_name",
start_date=datetime(2022,12,10),
schedule=None,
catchup=False
)
def my_dag():
@task
def say_hi():
return "hi"
say_hi()
# without this line the DAG will not show up in the UI
my_dag()
airflow run dags list
and airflow run dags list-import-errors
?dags
folder created by astro dev init
)Disclaimer: I work at Astronomer, who develops the Astro CLI as an OS project.
Upvotes: 1