Repository navigation
Replies: 6 comments 2 replies
|
You should never use dynamic start date |
|
@eladkal do you have a recommendation for my use case? I need auto catch up for past day when airflow is recovered |
Maybe what you are looking for is |
|
@eladkal I do have |
|
Converting to a discussion - dynamic start_date is absolutely not recommended pattern - and it had never been intended to be used in the way you described. I am not sure what you are trying to achieve. Maybe what you are trying to do is to have daily dag and shutdown airflow to save money (but I am only guessing - you have not described your use case @wdewing in detail) - in which case you are probably use wrong tool for what you are trying to do because airflow was not designed to follow similar patterns. Again - i am wildly guessing because I have no way what "recovery for past day" means - I interpret it as "I deliberatly shut down airlfow for a day and now want it to catch up and I am doing it regularly" . That's how I interpret it without having more information But if you have valid case where continuously running airflow causes some problems for your case, and you cannot solve it differently, I suggest you open a new feature request where you describe your request in detail with a proposal how you think it can be solved. For sure setting the dynamic start date - which is highly discouraged - was a very "hacky" way of doing whatever you wanted to do and with versioning introduction it has side-effects, so I suggest trying to look at good solution. But without having your use case clearly described including the fact why current airflow cannot fulfill your use case is a good starting point. |
|
I think I asked you to describe it in new issue.
I completely do not understand what you are talking about. When you shutdown airflow and start it up, momentarily, there shoud be no gaps. I do not understand how you run it - but if you see gaps there is something very wrong in your setup. No time to spend time for free on analysing your setup - but if you create a new issue and explain exactly where the gaps are showing up if you set fixed start date, maybe someone will help. Generally speaking - using dynamic start date for even something similar to what you describe makes no sense whatsoever. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Apache Airflow version
3.0.3
If "Other Airflow 2 version" selected, which one?
No response
What happened?
It seems the DAG version is changed whenever any field is changed. But for our use case we want to have a limited catchup period, so we set
start_date=datetime.now()-timedelta(days=1), which cause the dag version keep changing and dag_version table to grow over time.What you think should happen instead?
I think we should carefully define the dag version. User should also have control of their dag's version.
Also we should only keep dag version to a small number to avoid infinite grow of the table and potential performance issue.
How to reproduce
Set dynamic start_date
Operating System
linux
Versions of Apache Airflow Providers
No response
Deployment
Other 3rd-party Helm chart
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
All reactions