-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Remove scan_stale_dag method in DAG processor manager
#47937
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
Closed
ephraimbuddy
wants to merge
1
commit into
apache:main
from
astronomer:remove-stale-dag-check-processor
Closed
Remove scan_stale_dag method in DAG processor manager
#47937
ephraimbuddy
wants to merge
1
commit into
apache:main
from
astronomer:remove-stale-dag-check-processor
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This method has been replaced by `handle_removed_files` and `deactivate_deleted_dags` method. Its present now causes issues as it deactivates DAGs incorrectly. `handle_removed_files` is a better method more suited to dag bundles as the file's processor is also terminated. Also removed unused config variable in scheduler and config.yml Closes: apache#47294
e502479 to
653d927
Compare
Contributor
Author
|
Marked this as draft as I found that when the dag file exists, but there's no dag anymore, the dag in DB doesn't get deactivated. Working on that |
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 20, 2025
We currently use Psutil's create_time for process start time, which gives a different time than the time we use to check process duration(which comes from time.monotonic). This leads to the processor timing out after a while due to the large (false)difference in time recorded, especially when the laptop is hibernated. Process time should not depend on the system's time clock, and I guess that's what happened here. Closes: apache#47937, Closes: apache#47294
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 20, 2025
We currently use Psutil's create_time for process start time, which gives a different time than the time we use to check process duration(which comes from time.monotonic). This leads to the processor timing out after a while due to the large (false)difference in time recorded, especially when the laptop is hibernated. Process time should not depend on the system's time clock, and I guess that's what happened here. Closes: apache#47937, Closes: apache#47294
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 20, 2025
We currently use Psutil's create_time for process start time, which gives the time the process started using the system clock. We can use time.time to track when the process started processing the files instead. In breeze, once the laptop hibbernates, you would have to restart the dag processor but this fixes it. Since this does not happen in other deployments, we suspect that this issue is peculiar to breeze. Closes: apache#47937, Closes: apache#47294
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 21, 2025
We currently use Psutil's create_time for process start time, which gives the time the process started using the system clock. We can use time.time to track when the process started processing the files instead. In breeze, once the laptop hibbernates, you would have to restart the dag processor but this fixes it. Since this does not happen in other deployments, we suspect that this issue is peculiar to breeze. Closes: apache#47937, Closes: apache#47294
Contributor
Author
|
Closing in favour of #48004 |
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 22, 2025
We currently use Psutil's create_time for process start time, which gives the time the process started using the system clock. We can use time.time to track when the process started processing the files instead. In breeze, once the laptop hibbernates, you would have to restart the dag processor but this fixes it. Since this does not happen in other deployments, we suspect that this issue is peculiar to breeze. Closes: apache#47937, Closes: apache#47294
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This method has been replaced by
handle_removed_filesanddeactivate_deleted_dags. Its present now causes issues as it deactivates DAGs incorrectly.handle_removed_filesis a better method more suited to dag bundles as the file's processor is also terminated.Also removed unused config variable in scheduler and config.yml
Closes: #47294