Skip to content

DAG import errors from python modules are not cleared #57621

@ktaborski

Description

@ktaborski

Apache Airflow version

3.1.1

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

No response

What happened?

I have airflow deployed in k8s using official helm chart.
This is example directory structure:

dag.py
module/utils.py

Scenario is:
there is parsing error coming from python module (from ex. utils.py), which is imported/used in DAG code (dag.py).
Then import error from module is fixed, but errors are still visible in UI. Restarting dagProcessor helps.

I did short debugging and most likely issue is related to:

It only updates, when import error filename is same as dag.fileloc, which is not true, when import error comes from module.

I think, that same problem was reported here:
#39762 (comment)

What you think should happen instead?

DAG import errors from modules should be cleared.

How to reproduce

Steps provided in description

Operating System

EKS bottlerocket image

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions