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 Scheduler crash looping when dagrun creation fails #35135

Merged

Conversation

ephraimbuddy
Copy link
Contributor

@ephraimbuddy ephraimbuddy commented Oct 23, 2023

Scheduler was found crash looping with the error:
airflow.exceptions.AirflowException: Creating DagRun needs either "run_id™ or both "run_type and "execution_date'.
This happened in an old airflow(2.3.4) and I can't reproduce it on the latest but exception from dag.create_dagrun should not crash the scheduler.
Instead, the scheduler should catch the exception and log it.
This PR provides that behaviour

@boring-cyborg boring-cyborg bot added the area:Scheduler Scheduler or dag parsing Issues label Oct 23, 2023
@ephraimbuddy ephraimbuddy force-pushed the fix-scheduler-crash-on-dagrun-creation branch from d253f43 to 42190ac Compare October 23, 2023 16:35
Scheduler was found crash looping with the error:
airflow.exceptions.AirflowException: Creating DagRun needs either "run_id™ or both "run_type and "execution_date'.
This happened in an old airflow(2.3.4) and I can't reproduce it on the latest but exception from dag.create_dagrun should not crash the scheduler.
Instead, the scheduler should catch the exception and log it.
This PR provides that behaviour
@ephraimbuddy ephraimbuddy force-pushed the fix-scheduler-crash-on-dagrun-creation branch from 42190ac to c82043c Compare October 23, 2023 16:38
@eladkal eladkal added this to the Airflow 2.7.3 milestone Oct 23, 2023
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Oct 23, 2023
@ephraimbuddy ephraimbuddy merged commit 98618f0 into apache:main Oct 23, 2023
44 checks passed
@ephraimbuddy ephraimbuddy deleted the fix-scheduler-crash-on-dagrun-creation branch October 23, 2023 18:39
ephraimbuddy added a commit that referenced this pull request Oct 29, 2023
ephraimbuddy added a commit that referenced this pull request Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler Scheduler or dag parsing Issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants