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: DAGs are not marked as stale if the dags folder change #41433

Merged
merged 23 commits into from
Aug 28, 2024

Conversation

utkarsharma2
Copy link
Contributor

@utkarsharma2 utkarsharma2 commented Aug 13, 2024

Closes: #41432

@boring-cyborg boring-cyborg bot added the area:Scheduler including HA (high availability) scheduler label Aug 13, 2024
@uranusjr
Copy link
Member

Is a test possible?

@utkarsharma2
Copy link
Contributor Author

Is a test possible?

Yes, I'll add them.

@utkarsharma2
Copy link
Contributor Author

Is a test possible?

@uranusjr, @Lee-W I have added a test, PTAL.

tests/dag_processing/test_job_runner.py Outdated Show resolved Hide resolved
tests/dag_processing/test_job_runner.py Outdated Show resolved Hide resolved
tests/dag_processing/test_job_runner.py Outdated Show resolved Hide resolved
airflow/dag_processing/manager.py Outdated Show resolved Hide resolved
airflow/dag_processing/manager.py Outdated Show resolved Hide resolved
@utkarsharma2 utkarsharma2 merged commit 9f30a41 into apache:main Aug 28, 2024
50 checks passed
@utkarsharma2 utkarsharma2 deleted the FixDagParsing branch August 28, 2024 09:07
@ephraimbuddy
Copy link
Contributor

@utkarsharma2 , can you backport this to v2-10-test

@utkarsharma2
Copy link
Contributor Author

Thanks @ephraimbuddy I'll do that.

utkarsharma2 added a commit to astronomer/airflow that referenced this pull request Aug 28, 2024
…1433)

* Fix: DAGs are not marked as stale if the AIRFLOW__CORE__DAGS_FOLDER changes

* Update airflow/dag_processing/manager.py

* Add testcase

* Add code comment

* Update code comment

* Update the logic for checking the current dag_directory

* Update testcases

* Remove unwanted code

* Uncomment code

* Add processor_subdir when creating processor_subdir

* Fix test_retry_still_in_executor test

* Remove config from test

* Update airflow/dag_processing/manager.py

Co-authored-by: Jed Cunningham <[email protected]>

* Update if condition for readability

---------

Co-authored-by: Jed Cunningham <[email protected]>
(cherry picked from commit 9f30a41)
@utkarsharma2
Copy link
Contributor Author

Cherry picked - #41829

utkarsharma2 added a commit that referenced this pull request Aug 28, 2024
…41829)

* Fix: DAGs are not marked as stale if the AIRFLOW__CORE__DAGS_FOLDER changes

* Update airflow/dag_processing/manager.py

* Add testcase

* Add code comment

* Update code comment

* Update the logic for checking the current dag_directory

* Update testcases

* Remove unwanted code

* Uncomment code

* Add processor_subdir when creating processor_subdir

* Fix test_retry_still_in_executor test

* Remove config from test

* Update airflow/dag_processing/manager.py

Co-authored-by: Jed Cunningham <[email protected]>

* Update if condition for readability

---------

Co-authored-by: Jed Cunningham <[email protected]>
(cherry picked from commit 9f30a41)
ephraimbuddy added a commit to astronomer/airflow that referenced this pull request Aug 29, 2024
ephraimbuddy added a commit to astronomer/airflow that referenced this pull request Aug 29, 2024
@utkarsharma2 utkarsharma2 added the type:bug-fix Changelog: Bug Fixes label Aug 30, 2024
@utkarsharma2 utkarsharma2 added this to the Airflow 2.10.1 milestone Aug 30, 2024
utkarsharma2 added a commit that referenced this pull request Sep 2, 2024
…41829)

* Fix: DAGs are not marked as stale if the AIRFLOW__CORE__DAGS_FOLDER changes

* Update airflow/dag_processing/manager.py

* Add testcase

* Add code comment

* Update code comment

* Update the logic for checking the current dag_directory

* Update testcases

* Remove unwanted code

* Uncomment code

* Add processor_subdir when creating processor_subdir

* Fix test_retry_still_in_executor test

* Remove config from test

* Update airflow/dag_processing/manager.py

Co-authored-by: Jed Cunningham <[email protected]>

* Update if condition for readability

---------

Co-authored-by: Jed Cunningham <[email protected]>
(cherry picked from commit 9f30a41)
utkarsharma2 added a commit to astronomer/airflow that referenced this pull request Sep 10, 2024
utkarsharma2 added a commit to astronomer/airflow that referenced this pull request Sep 12, 2024
ephraimbuddy added a commit to astronomer/airflow that referenced this pull request Sep 13, 2024
jedcunningham pushed a commit that referenced this pull request Sep 13, 2024
…(41433) (#41829) (#41893) 41829 (#42220)

* Revert "Skip test_scan_stale_dags_when_dag_folder_change in DB isolation mode (#41893)"

This reverts commit 07af14a.

* Revert "Fix: DAGs are not marked as stale if the dags folder change (#41433) (#41829)"

This reverts commit 996af78.
ephraimbuddy added a commit that referenced this pull request Sep 13, 2024
…(41433) (#41829) (#41893) 41829 (#42220)

* Revert "Skip test_scan_stale_dags_when_dag_folder_change in DB isolation mode (#41893)"

This reverts commit 07af14a.

* Revert "Fix: DAGs are not marked as stale if the dags folder change (#41433) (#41829)"

This reverts commit 996af78.
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 type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DAGs are not marked as stale if the AIRFLOW__CORE__DAGS_FOLDER changes
5 participants