apache / apache/airflow

Import error of new dags cannot be shown on web UI for common users

Open
#29,897 23 comments 0 reactions 0 assignees View on GitHub
_eol_affected_version:2.6 area:core 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

2.5.1

### What happened

When we put a new dag in airflow and the dag contains some error which cannot be parsed by the airflow scheduler,
* The common role user is assigned CommRole which has the permission of **read Import Error**
![image](https://user-images.githubusercontent.com/114475618/222700670-6c8fbdce-f044-4223-9d65-25754b6806c9.png)

* Expectation: we expect Import Error should be seen in ui by the common user assigned CommRole (controlled by access_control)
* Result : We cannot see the **import error** by common Role user(only admin can see it )
- admin see this:
![image](https://user-images.githubusercontent.com/114475618/222700227-30b2abd9-dded-4e2a-aadc-c8ddad0bb099.png)
- common user see no dag or **import error**

### What you think should happen instead

_No response_

### How to reproduce

Just use a error new dag which grants the permission to common user not a admin

### Operating System

Centos7

### Versions of Apache Airflow Providers

2.5.0

### Deployment

Docker-Compose

### Deployment details

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [X] 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

Reproduce the issue in Airflow 2.5.1 with a new DAG containing an import error and a common user granted read Import Error through access_control. Trace how the web UI handles DAG visibility and import-error permissions, then verify that the common user can see the relevant import error while admin behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authorization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.