fix: skip scheduling for stale DAGs to prevent scheduler failures whe…#55126
Closed
vikrantkumar-max wants to merge 1 commit intoapache:mainfrom
Closed
fix: skip scheduling for stale DAGs to prevent scheduler failures whe…#55126vikrantkumar-max wants to merge 1 commit intoapache:mainfrom
vikrantkumar-max wants to merge 1 commit intoapache:mainfrom
Conversation
…n DAG files are removed
ephraimbuddy
reviewed
Sep 1, 2025
| if dag_model.is_stale and not dag: | ||
| self.log.error("DAG %s is stale (removed from filesystem), skipping scheduling for DAG run %s", | ||
| dag_run.dag_id, dag_run.run_id) | ||
| return callback |
Contributor
There was a problem hiding this comment.
Can you share the error you got that resulted in this fix?
2 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes: #54932
Root Cause
DagModel.is_stale=Truebut doesn't handle existing task instances_schedule_dag_run()method callsget_dag_for_run()which returnsNonefor removed DAGsSolution
Added stale DAG detection in
_schedule_dag_run()method inscheduler_job_runner.py:if dag_model.is_stale and not dag