Apache Airflow / Editorial solution guide
A DAG is missing after a parsing or import failure
Trace DAG discovery, imports and deployment dependencies without changing production scheduling blindly.
Read-only knowledge base · No public comments
Recognize the symptoms
An expected DAG does not appear or stops receiving new scheduled runs after a deployment. An import or parsing error may be reported for its file, while other DAGs continue to appear.
Understand the likely causes
- The deployed file can contain a syntax or import error, use an unavailable dependency, fail during top-level code, or be absent from the DAG processor’s expected location. Version and provider mismatches can produce similar symptoms.
Identify the deployed file and exact error
Record the expected DAG identifier, deployment revision, file path, Airflow and provider versions, and the sanitized import or parsing error. Inspect the DAG processor’s authorized logs and deployment inventory for the same revision. A missing run can also result from schedule or pause state, so distinguish a discovered DAG with no eligible run from a file that failed to load. Do not publish credentials or connection values while collecting evidence.
Reproduce with the same dependency boundary
In an isolated environment matching the deployed core, Python and provider dependencies, load the affected DAG file and inspect its import result. Compare the actual installed package and file paths with the deployment manifest. Top-level code runs during parsing, so an external request or expensive computation there can fail or delay discovery independently of task execution. Preserve the original traceback and avoid assuming that a successful import on a developer laptop represents the deployed environment.
Correct the smallest responsible boundary
Fix the identified syntax, packaging, dependency or file-distribution problem in source and build a reviewed candidate. Move appropriate runtime work into tasks rather than making repeated parsing depend on unnecessary external operations. Do not install an arbitrary package on a live worker as a generic fix: the DAG processor and task workers may have different environments. Test compatibility and deployment of the corrected artifact using the normal release path.
Verify discovery and one intended run
In a disposable deployment, confirm the import error is absent and the expected DAG identifier, schedule and task graph appear. Exercise a bounded synthetic run and inspect the selected data interval and task output without contacting production destinations. After the approved deployment, compare the deployed revision and discovery evidence, then check that the next eligible run is created. A visible DAG alone does not prove tasks have the dependencies or permissions needed to complete.
Verify the fix
Record the corrected file revision, import result, expected task graph and one authorized run outcome. Reconcile any missed intervals with the data owner before initiating a historical run.
Keep it from recurring
- Test DAG imports with the declared deployment dependencies in CI, review top-level work and monitor parse failures. Version core, provider and DAG artifacts together and rehearse deployment rollback.