Skip to content

DAGs are missing and deleted in Airflow 2.10.1 #42111

@ldacey

Description

@ldacey

Apache Airflow version

2.10.0

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

2.10.1

What happened?

I updated to Airflow 2.10.1 and the DAGs in my UI started to disappear. I checked the scheduler logs and it showed that the DAGs were not being found and were being deleted. I quickly reverted back to the working 2.10.0 image after that and I don't have the specific logs.

I am syncing the src folder in my repo as the dags_folder which also contains common scripts, hooks, operators, etc. The plugins_folder is backed into the image and only contains things which don't change often, like XCom backend.

Official Helm chart values:

config:
  core:
    dags_folder: /opt/airflow/dags/repo/src
    plugins_folder: /opt/airflow/plugins

dags:
  gitSync:
    enabled: true
    repo: https://gitlab.domain.com/dags.git
    branch: main
    rev: HEAD
    depth: 1
    subPath: src

This is my dags_folder structure:

src/
├── common
│   ├── __init__,py
├── dags
│   ├── __init__.py
│   ├── account_a
│   │   ├── example_a_dag.py
│   │   └── example_b_dag.py
│   └── account_x
├── hooks
│   ├── __init__.py
├── notifiers
│   ├── __init__.py
├── operators
│   ├── __init__.py
├── projects
│   ├── __init__.py
│   ├── account_a
│   │   ├── transform.py
│   │   └── schemas.py
│   └── account_x
└── sensors
    ├── __init__.py

My .airflowignore is in the src folder:

common/
notifiers/
operators/
sensors/
hooks/
projects/

What you think should happen instead?

The DAGs should still be discovered between minor Airflow releases since nothing else changed.

How to reproduce

Hopefully the structure of my setup above suffices.

I am using the Airflow constraints file when installing extras. linux/amd64 is the target platform used and 2.10.1 is the Airflow version I had trouble with.

    - docker build
      --file Dockerfile
      --pull
      --platform "${TARGET_PLATFORM}"
      --cache-from "${RELEASE_IMAGE}"
      --build-arg BUILDKIT_INLINE_CACHE=1
      --build-arg PYTHON_BASE_IMAGE="python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION}"
      --build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}"
      --build-arg AIRFLOW_USE_UV="true"
      --build-arg AIRFLOW_UV_VERSION="${AIRFLOW_UV_VERSION}"
      --build-arg AIRFLOW_EXTRAS="async,docker,cncf.kubernetes,ftp,google,google_auth,http,microsoft.azure,odbc,postgres,sftp,ssh,statsd,openlineage"
      --build-arg AIRFLOW_CONSTRAINTS_REFERENCE="${CONSTRAINTS_VERSION}"
      --build-arg INSTALL_MYSQL_CLIENT="false"
      --build-arg INSTALL_MSSQL_CLIENT="true"
      --build-arg INSTALL_POSTGRES_CLIENT="true"
      --build-arg UPGRADE_TO_NEWER_DEPENDENCIES="true"
      --build-arg ADDITIONAL_RUNTIME_APT_DEPS="git graphviz procps vim odbc-postgresql python3-pybind11 python3-pyodbc libgeos-dev"
      --tag "${RELEASE_IMAGE}"
      "."

Operating System

Debian GNU/Linux 12 (bookworm)

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

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions