Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DagFileProcessor interfering with dags outside its processor_subdir #33357

Conversation

pierrejeambrun
Copy link
Member

@pierrejeambrun pierrejeambrun commented Aug 12, 2023

closes: #33310

DagFileProcessorManager._refresh_dag_dir should not interfer with SerializedDagModel, DagModel or DagCode outside of its dag_directory.

Cf original issue but this mostly cause other dags to get wrongly deactivated by other standalone DagProcessor. I assume this can also cause some scheduling delay if the deactivation of the dag happens at the wrong timing.

@boring-cyborg boring-cyborg bot added area:Scheduler including HA (high availability) scheduler area:serialization labels Aug 12, 2023
@pierrejeambrun pierrejeambrun changed the title Fix/33310 dag file processor deleted dags with subdir Fix DagFileProcessor interfering with dags outside its processor_subdir Aug 12, 2023
@pierrejeambrun pierrejeambrun force-pushed the fix/33310-dag-file-processor-deleted-dags-with-subdir branch from 20f7763 to 6f56a96 Compare August 12, 2023 21:28
@pierrejeambrun pierrejeambrun added this to the Airflow 2.7.1 milestone Aug 12, 2023
@pierrejeambrun pierrejeambrun added the type:bug-fix Changelog: Bug Fixes label Aug 12, 2023
@potiuk
Copy link
Member

potiuk commented Aug 13, 2023

Nice catch!

airflow/models/dag.py Outdated Show resolved Hide resolved
Copy link
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

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

Agree with @uranusjr comment but otherwise, LGTM

@pierrejeambrun
Copy link
Member Author

pierrejeambrun commented Aug 14, 2023

Comment was addressed, merging

@pierrejeambrun pierrejeambrun merged commit 35b1830 into apache:main Aug 14, 2023
@pierrejeambrun pierrejeambrun deleted the fix/33310-dag-file-processor-deleted-dags-with-subdir branch August 14, 2023 20:45
ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 17, 2023
…bdir`` (apache#33357)

* Fix standalone DagProcessor interfering with DAG outsite of its subdir

* Add tests

* Update code review
ephraimbuddy pushed a commit that referenced this pull request Aug 28, 2023
…bdir`` (#33357)

* Fix standalone DagProcessor interfering with DAG outsite of its subdir

* Add tests

* Update code review

(cherry picked from commit 35b1830)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler including HA (high availability) scheduler area:serialization type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple DAG processors with separate DAG directories keep deactivating each other's DAGs
4 participants