Skip to content

DAG folder not on python path in airflow 3.1 #1985

@johnhoran

Description

@johnhoran

Describe the bug

A common pattern we use is packaging extra python files up with the dags for use in multiple dags within a single project. In airflow 2 this worked, but with the introduction of dag bundles in airflow 3.1 it has become broken. I've been looking a bit at the code and specifically apache/airflow#50385 where the dags folder has been removed from the path and replaced with the bundle root. So in my deployment /tmp/airflow/dag_bundles/astro/main/dags/2025-11-07T15:28:12.8895389Z/ ends up on the path. However in astronomer this bundle root isn't the same as the dags folder, it contains the dags folder /tmp/airflow/dag_bundles/astro/main/dags/2025-11-07T15:28:12.8895389Z/dags. To me this feels like a bug, when astronomer packaged up the dag folder for deployment, it should have done so such the dags end up at the root of the bundle folder, rather than in the dags subdirectory.

For reference I'm running astronomer 3.1-3, using dag only deploys and 1.38.1 of the astro-cli

Please paste terminal or playground output in a code block here

What CLI Version did you experience this bug?
1.38.1

This CLI bug is related to which Astronomer Platform?

  • Astro
  • Software
  • None/Unknown

What Operating System is the above CLI installed on?

🪜 Steps To Reproduce

📸 Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions