Skip to content

Fix Astro local bind mounts for src and dbt - #31

Merged
lassebenni merged 1 commit into
mainfrom
fix/astro-local-src-mount
Aug 27, 2026
Merged

lassebenni merged 1 commit into
mainfrom
fix/astro-local-src-mount

Conversation

@lassebenni

Copy link
Copy Markdown
Collaborator

Summary

  • Mount ../src and ../dbt beside Astro's existing dags/ and include/ mounts (/usr/local/airflow/src and /usr/local/airflow/dbt) instead of nested under them.
  • Set DBT_PROJECT_DIR to /usr/local/airflow/dbt.

On some Docker Desktop setups (notably when the repo lives under ~/Desktop), nested overlay mounts can show correct binds in docker inspect while the path is empty inside the scheduler at task runtime — causing ModuleNotFoundError: No module named 'src.ingestion'.

/usr/local/airflow is on sys.path, so import src resolves without nesting under dags/.

Related team PRs

Test plan

  • astro dev kill && astro dev start from data/airflow
  • Inside scheduler: ls /usr/local/airflow/src/ingestion shows pipeline modules
  • Trigger a task that imports src.ingestion — no ModuleNotFoundError
  • dbt debug / parse from Airflow task with DBT_PROJECT_DIR=/usr/local/airflow/dbt

Made with Cursor

Nested mounts under dags/ and include/ can appear empty inside containers on some Docker Desktop setups while inspect still shows correct binds. Mount beside those paths and set DBT_PROJECT_DIR to /usr/local/airflow/dbt.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings August 26, 2026 18:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@lassebenni
lassebenni merged commit 36dd060 into main Aug 27, 2026
5 of 7 checks passed
@lassebenni
lassebenni deleted the fix/astro-local-src-mount branch August 27, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants