airflow: DAGs are missing and deleted in Airflow 2.10.1
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
- I agree to follow this project’s Code of Conduct
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 28 (17 by maintainers)
I’ve rolled the 2.10.2rc1 Docker image out to our internal environment and I’m no longer seeing this issue. All DAGs are loading as expected as per previous releases.
The symlink is the most likely cause I think we will take it from there (thanks @MCubek @jcrobak @ldacey ) - I think it will mean quick 2.10.2 - so we will appreciate -once we fix it, if you test release candidates we will produce.
I upgraded to 2.10.1, the DAGs suddenly disappear from UIand sometime shows the missingdagbag error and if I refresh couple of times the DAGs are appearing again
Hi @ephraimbuddy, for us the problem seems fixed as well (using official helm chart + git sync). Could you clarify why this issue is still open and linked to the 2.10.3 milestone? Is another fix needed for similar problem in a different setup, or are you just awaiting several confirmations before closing this issue? Just to make up our minds on whether to roll out 2.10.2 or still wait a bit… Thanks!
It is working for us now. Using official helm chart with gitsync and version 2.10.2.
The second issue should be dealt with in a separate ticket, though I think it’s an expected behaviour change, however I have hit recursive redirect issue when editing the url to remove the running param.
I think there are actually two issues here with the same “disappearing dags” symptom
RunningandFailedbuttons are now persisted between UI re-loads. In other words, they act like a checkbox now. i need to “uncheck” it to see all DAGs, which is not the case in2.9.3Since i don’t use symlink on the dags folder, i belong to the second category 😅
Yeah. Looking into this
cc: @utkarsharma2 @ephraimbuddy -> I think we need a quick 2.10.2