-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Airflow 2.0.0 manual run causes scheduled run to skip #13434
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
Possibly related to #13407 |
I don't know if my problem is related to this issue, but I want to underline a change of behavior in airflow 2.0.0 in how the I have the following DAG definition:
Before Airflow 2.0.0 only one DAG was allowed to run. With Airflow 2.0.0 (probably due to the scheduler's rewriting with the fantastic speed added in switching between tasks) at the end of one task in a DAGrun instance instead of scheduling the following one it is scheduled a task from another DAGrun Instance, as you can se from the attached screenshot. I can mitigate the problem in Airflow 2.0.0 with the added It works in my use case in other circumstances it could be impracticable. Please tell me if it is better to open a new main issue. |
I don't think this is really a bug but a change of behavior, IMO this should be reversed or at least allow to change it through config. The problem is in the method bulk_write_to_db in the class DAG https://github.com/apache/airflow/blob/master/airflow/models/dag.py
When is getting from db 'most_recent_dag_runs' it includes DagRun.external_trigger.is_(True). |
I agree, and to be consistent with the older versions the default behavior should be the old one IMHO (personally, I think it should be reversed). |
@salimeryigit Agreed either. It's too much of an implication that a manual trigger may skip the next scheduled run. I'm also surprised at the first time I met this issue as this basic schedule function should be able to be trusted and normally run as expected. In our scenario, we may trigger the DAG times in a day and also scheduled DAG to run daily as well. It's broken after V2 upgrade. Can we elevate this issue explicitly so that users on V2 can notice this behavior change? |
It's a quite big change of behavior, please fix or let it be configurable at least. |
This also happens in Postgres with psycopg2 2.8.6. |
Same DB configuration here, Postgres with psycopg2 2.8.6. |
Don't you think this is an unacceptable change? At least in its current form, we risk the next automated run will be skipped entirely if we want to manually trigger a dag run. This will certainly cause trouble. The manual run should not interfere with the scheduled runs IMHO. |
This is already causing problems and confusion. Users are surprised by this change. |
Will be fixed by #13963 and released in 2.0.1 (around 2nd week of Feb) |
…13963) closes apache#13434 (cherry picked from commit de277c6) (cherry picked from commit 958e258)
closes apache/airflow#13434 (cherry picked from commit de277c69e7909cf0d563bbd542166397523ebbe0) GitOrigin-RevId: 958e25836ffa78273aa195865bc456dceee06351
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 (cherry picked from commit de277c69e7909cf0d563bbd542166397523ebbe0) GitOrigin-RevId: 958e25836ffa78273aa195865bc456dceee06351
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
closes apache/airflow#13434 GitOrigin-RevId: de277c69e7909cf0d563bbd542166397523ebbe0
Apache Airflow version: 2.0.0
Kubernetes version (if you are using kubernetes) (use
kubectl version
): N/AEnvironment:
uname -a
): 5.4.0-1032-awsWhat happened:
I did a fresh Airflow 2.0.0 install. With this version, when I manually trigger a DAG, Airflow skips the next scheduled run.
What you expected to happen:
Manual runs do not interfere with the scheduled runs prior to Airflow 2.
How to reproduce it:
Create a simple hourly DAG. After enabling it and the initial run, run it manually. It shall skip the next hour. Below is an example, where the manual run with execution time of 08:17 causes the scheduled run with execution time of 08:00 to skip.
The text was updated successfully, but these errors were encountered: