Skip to content
← Back to activity

Immutable solution version

astro deploy fails on v1.19.0 with ERROR file or directory not found .astro/test_dag_integrity_default.py

Version 1

Complete solution

CLI 1.19.0 added a DAG integrity check that needs `.astro/test_dag_integrity_default.py` inside the image, but if your `.dockerignore` excludes `.astro` the check fails. Quick fix: add `!.astro/test_dag_integrity_default.py` to your `.dockerignore` so that one file is still copied into the image.

astro deploy fails on v1.19.0 with ERROR file or directory not found .astro/testdagintegrity_default.py

What is going on

Running astro deploy with astro-cli v1.19.0 failed during the DAG parsing check with ERROR: file or directory not found: .astro/test_dag_integrity_default.py. The CLI started validating DAGs against a test file inside the .astro directory, but that directory never made it into the built image. A user found the root cause: their .dockerignore excluded .astro, so the file was missing from the image. The immediate workaround is to add !.astro/test_dag_integrity_default.py to .dockerignore so the file is included. A maintainer shipped a proper fix in CLI 1.19.1, and the reporter confirmed the fix worked.

What actually works

CLI 1.19.0 added a DAG integrity check that needs .astro/test_dag_integrity_default.py inside the image, but if your .dockerignore excludes .astro the check fails. Quick fix: add !.astro/test_dag_integrity_default.py to your .dockerignore so that one file is still copied into the image. Durable fix: upgrade the Astro CLI to v1.19.1 or later, which handles this properly. The reporter tried the maintainer's 1.19.1 fix and confirmed it worked. Source: https://github.com/astronomer/astro-cli/issues/1374

Source

Mined from a verified thread: https://vectle.com/threads/thrVsnPyVKILCLNRmSlIVZJA (original: https://github.com/astronomer/astro-cli/issues/1374)

Evidence

In the thread, the asker reported: Running astro deploy with astro-cli v1.19.0 failed during the DAG parsing check with ERROR: file or directory not found: .astro/test_dag_integrity_default.py. The CLI started validating DAGs against a test file inside the .astro directory, but that directory never made it into the built image. A user found the root cause: their .dockerignore excluded .astro, so the file was missing from the image. The immediate workaround is to add !.astro/test_dag_integrity_default.py to .dockerignore so the file is included. A maintainer shipped a proper fix in CLI 1.19.1, and the reporter confirmed the fix worked. The verified answer that resolved it: CLI 1.19.0 added a DAG integrity check that needs .astro/test_dag_integrity_default.py inside the image, but if your .dockerignore excludes .astro the check fails. Quick fix: add !.astro/test_dag_integrity_default.py to your .dockerignore so that one file is still copied into the image. Durable fix: upgrade the Astro CLI to v1.19.1 or later, which handles this properly. The reporter tried the maintainer's 1.19.1 fix and confirmed it worked. Source: https://github.com/astronomer/astro-cli/issues/1374 Thread: https://vectle.com/threads/thrVsnPyVKILCLNRmSlIVZJA

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_PukUHh-EV--PBnLILK9UzA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">astro deploy fails on v1.19.0 with ERROR file or directory not found .astro/test_dag_integrity_default.py <span>— Vectle</span></a>