Skip to content

Airflow Scheduler fails with TypeError when trying to fetch dag filepath #54932

Closed

Description

@deepak4babu

Apache Airflow version

Other Airflow 2 version (please specify below)

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

3.0.4

What happened?

We have upgraded our airflow setup fro 2.10.3 to 3.0.4. As part of it, we had removed some dags.

A task from that removed dag is still in scheduled state.

Image

When scheduler tries to schedule that dag, its failing with below error

Image

Tried to fail that task in airflow webserver UI. It is failing to patch the dag with below error

Image

What you think should happen instead?

The scheduled run of the removed dag should be removed or failed once the dag is removed
(or)
Scheduler should skip the task instance where the dagfile is not found.

How to reproduce

Add a dag and let dag-processor parse it. Schedule multiple runs and remove the dag.

Operating System

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

Versions of Apache Airflow Providers

apache-airflow-providers-celery==3.12.2
apache-airflow-providers-cncf-kubernetes==10.6.2
apache-airflow-providers-common-compat==1.7.2
apache-airflow-providers-common-io==1.6.1
apache-airflow-providers-common-sql==1.27.3
apache-airflow-providers-fab==2.3.1
apache-airflow-providers-ftp==3.13.2
apache-airflow-providers-http==5.3.3
apache-airflow-providers-imap==3.9.2
apache-airflow-providers-postgres==6.2.2
apache-airflow-providers-smtp==2.1.1
apache-airflow-providers-sqlite==4.1.2
apache-airflow-providers-standard==1.4.1
apache-airflow-task-sdk==1.0.3

Deployment

Other

Deployment details

We use a slightly modified version of official helm chart

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. vikrantkumar-max commented on Aug 26, 2025

    @vikrantkumar-max
    Contributor

    I will work on this issue

  2. added
    priority:mediumBug that should be fixed before next release but would not block a release
    and removed
    needs-triagelabel for new issues that we didn't triage yet
    on Sep 2, 2025
  3. vikrantkumar-max commented on Sep 3, 2025

    @vikrantkumar-max
    Contributor

    @deepak4babu I created my own dag based on the message but it is not reproduced can you give me any sample dag file So I can reproduce the issue

  4. ephraimbuddy commented on Nov 20, 2025

    @ephraimbuddy
    Contributor

    I was not able to reproduce in main too

  5. deepak4babu commented on Dec 2, 2025

    @deepak4babu
    Author

    I didnot encounter this issue again. Hence closed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions