Skip to content

Fix zip DAG import errors being cleared during bundle refresh#63617

Open
gopidesupavan wants to merge 5 commits intoapache:mainfrom
gopidesupavan:fix-cleanup-import-errors
Open

Fix zip DAG import errors being cleared during bundle refresh#63617
gopidesupavan wants to merge 5 commits intoapache:mainfrom
gopidesupavan:fix-cleanup-import-errors

Conversation

@gopidesupavan
Copy link
Member

Bundle refresh cleanup was treating ZIP archives as if only the outer archive path existed. Import errors for DAGs inside a ZIP are stored with inner paths such as test_zip.zip/broken_dag.py, but the observed file set only contained test_zip.zip. As a result, clear_orphaned_import_errors() could incorrectly delete still-valid import errors for broken DAGs inside ZIP archives.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    Yes used for tests using copilot

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@gopidesupavan gopidesupavan force-pushed the fix-cleanup-import-errors branch 2 times, most recently from 7d97abc to 2e5c599 Compare March 15, 2026 09:56
@gopidesupavan gopidesupavan added this to the Airflow 3.1.9 milestone Mar 16, 2026
@gopidesupavan gopidesupavan added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Mar 16, 2026
@gopidesupavan gopidesupavan force-pushed the fix-cleanup-import-errors branch from 2e5c599 to da3c8e7 Compare March 16, 2026 13:29
@gopidesupavan gopidesupavan requested a review from kaxil March 16, 2026 20:04
@gopidesupavan gopidesupavan force-pushed the fix-cleanup-import-errors branch from 0391f4a to 18650fd Compare March 16, 2026 21:49
@gopidesupavan gopidesupavan force-pushed the fix-cleanup-import-errors branch 4 times, most recently from 0d6f22d to e977337 Compare March 18, 2026 16:23
Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

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

Minor note (not in diff): test_deactivate_deleted_dags_return_value still passes list literals (["test_dag1.py"]) to DagModel.deactivate_deleted_dags(rel_filelocs=...), but the type hint was changed to set[str]. Works at runtime, but a type checker would flag it.

@gopidesupavan gopidesupavan force-pushed the fix-cleanup-import-errors branch from e977337 to 1d9c664 Compare March 19, 2026 07:19
@gopidesupavan
Copy link
Member Author

Minor note (not in diff): test_deactivate_deleted_dags_return_value still passes list literals (["test_dag1.py"]) to DagModel.deactivate_deleted_dags(rel_filelocs=...), but the type hint was changed to set[str]. Works at runtime, but a type checker would flag it.

yeah make sense my bad updated it now :)

@gopidesupavan gopidesupavan force-pushed the fix-cleanup-import-errors branch from 1d9c664 to a694c0d Compare March 20, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:DAG-processing backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants