-
Notifications
You must be signed in to change notification settings - Fork 0
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
1446 dag run failed 979s #1464
1446 dag run failed 979s #1464
Conversation
It's kind of confusing to separate out commits that were previously merged but I managed. I like the idea of making the 30 days a variable. Especially since we are almost at that point from when we first ran the digital bookplate dags. We'd want to retry the failed ones monthly, so 30 days from the original run seems okay. The MARC records that we can add a 979 to may not appear for a whole year so I guess the same one would get rerun every 30 days, the only difference being the execution_date. Does it not work to clear the state (rather than setting it to queued) and just let the scheduler queue them? |
f0a618a
to
a4cb4e1
Compare
The draft PR was not actually ready for a review, |
|
I thought you could use the DagRun.set_state() to None but maybe not? |
This works: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'm not sure about the execution_date for dag runs more than 30 days ago.
Fixes #1446
It is not possible to simply update the state of a dag to "QUEUED" (or anything else) and have it run again (see apache/airflow#35729 (comment)).
This PR makes it so that a new DAG is launched with the previous DAG's conf. Also, the DAG that finds the previously failed DAGS will only look for ones that are 30 days old, so that it will not keep trying to re-rerun the subsequently failed ones. I made that number 30 days because I vaguely remember that was the period we thought we would run this new DAG. If you want, I can make that number into a Variable or change it for this PR.Using the
airflow.models.DagRun
clear_dags
method now.