apache / apache/airflow

DAG Import Errors message is dangling in web-interface

Open
#45,227 24 comments 0 reactions 0 assignees View on GitHub
area:core area:MetaDB good first issue kind:bug
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Apache Airflow version

Other Airflow 2 version (please specify below)

### If "Other Airflow 2 version" selected, which one?

2.10.2

### What happened?

dag_report_error

We have this message in the Airflow's web-interface no matter what. This DAG can exist or not - the error still shows.

We have found many different topics across the Internet for various Airflow versions. Some of them from 2018. So users constantly witness these dangling messages, but there are no clarification for this case.

Also we don't have an understanding what is a source for this notification message. It sits in the Airflow DB and webserver is selecting it from there or other core components are generating it for webserver somehow.

### What you think should happen instead?

Even though the error message itself is far from perfect, we expect that if DAG doesn't exist anymore, the error message should disappear.

### How to reproduce

We use gitsync option for storing DAGs:
````yaml
# DAGs Config
dags:
gitSync:
enabled: true
repo: "https://my.repo/path/name.git"
branch: "master"
rev: "HEAD"
subPath: "airflowk8s/dags"
credentialsSecret: my-secret
period: 5s
maxFailures: 10
````
And our DAG is just script.py like that, nothing complicated:
`print("D0ne!")`

So I guess steps should be:
1) Create a broken DAG in remote repository;
2) Get the error message in the Airflow's web-interface;
3) Delete a broken DAG in remote repository;
4) Wait for your gitsync;
5) The error message in the Airflow's web-interface will dangle.

But this bug appears randomly, so we don't know exact reason.

### Operating System

Kubernetes v1.31.0-eks

### 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

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Research direction

Start with the web-interface DAG import error notification and the git-sync deployment described in the issue. Reproduce the sequence with a broken DAG, a synchronization cycle, and deletion, then trace where the notification is sourced and retained. Done means the stale message disappears after the DAG is removed, with coverage for the observed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, python
Domain
backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.