Skip to content

Certain DAG import errors ("role does not exist") don't persist in Airflow #49651

@zachliu

Description

@zachliu

Apache Airflow version

3.0.0

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

No response

What happened?

I've just started noticing this behavior in Airflow 3.0.0:

  • The role does not exist errors no longer persist in the "DAG Import Errors" section of the UI, nor in the database.

For example, I have

dag.access_control = {"non_existing_role": {"can_edit", "can_read"}}

in many DAGs. These role does not exist errors do initially appear in the "DAG Import Errors," but only briefly. After a few minutes, they disappear—you can no longer find them in the UI, the logs, or the database. The dag-processor logs show successful parsing for all DAGs that still contain the non_existing_role.

The only way to surface the same error message again is by running airflow sync-perm --include-dags -v inside the container.

I vaguely recall that these types of errors used to persist in the "DAG Import Errors" section in versions prior to and including 3.0.0rc2.

(Other parsing errors, such as ill-formatted Variables, do not appear to exhibit this issue.)

Here is a screenshot of the error before it disappeared:

Image

What you think should happen instead?

The role does not exist error should persist until the role is created.

How to reproduce

Use access_control with a non-existing role name in any DAG(s):

dag.access_control = {"non_existing_role": {"can_edit", "can_read"}}

Operating System

LM 21.3 with docker python:3.12-slim-bookworm

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

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

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions