You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/02 02:37:34 UTC
[GitHub] [airflow] aran3 opened a new issue #17977: DagRun marked as success without executing task
aran3 opened a new issue #17977:
URL: https://github.com/apache/airflow/issues/17977
### Apache Airflow version
2.1.3 (latest released)
### Operating System
Red Hat Enterprise Linux Server 7.6 (Maipo)
### Versions of Apache Airflow Providers
apache-airflow-providers-celery==2.0.0
apache-airflow-providers-ftp==2.0.0
apache-airflow-providers-http==2.0.0
apache-airflow-providers-imap==2.0.0
apache-airflow-providers-postgres==2.0.0
apache-airflow-providers-sqlite==2.0.0
### Deployment
Virtualenv installation
### Deployment details
_No response_
### What happened
Running a dag that is manually triggered, and has only 1 step, sometimes the scheduler marks the DAG as success without running the step at all. The step status remains Null in the db and in UI.
### What you expected to happen
Scheduler should never mark Dag complete if it has "Null" state tasks.
Probably this task should be marked as not "Null" before this function even runs, but I'm not sure about it.
### How to reproduce
I don't have a fool-proof way to reproduce - but I was able to reproduce it when I brought down the scheduler for a long time and triggered the dag quickly a few times.
It seems to happen more if dag is triggered multiple times quickly (in the order of seconds).
### Anything else
Happens about 20-50% of the time for this dag as described above.
I reproduced it while running the scheduler with DEBUG, and the only relevant logs are:
```
[2021-09-01 21:58:17,358] {retries.py:78} DEBUG - Running SchedulerJob._create_dagruns_for_dags with retries. Try 1 of 3
[2021-09-01 21:58:17,365] {retries.py:78} DEBUG - Running SchedulerJob._get_next_dagruns_to_examine with retries. Try 1 of 3
[2021-09-01 21:58:17,376] {retries.py:78} DEBUG - Running SchedulerJob._get_next_dagruns_to_examine with retries. Try 1 of 3
[2021-09-01 21:58:17,402] {scheduler_job.py:1138} DEBUG - DAG feeds_dag not changed structure, skipping dagrun.verify_integrity
[2021-09-01 21:58:17,405] {dagrun.py:480} DEBUG - number of tis tasks for <DagRun feeds_dag @ 2021-09-01 20:15:07+00:00: mtf_9001_20210901_120__2021-09-01T20:15:07+00:00, externally triggered: True>: 0 task(s)
[2021-09-01 21:58:17,406] {dagrun.py:434} INFO - Marking run <DagRun feeds_dag @ 2021-09-01 20:15:07+00:00: mtf_9001_20210901_120__2021-09-01T20:15:07+00:00, externally triggered: True> successful
[2021-09-01 21:58:17,406] {dagrun.py:604} WARNING - Failed to record duration of <DagRun feeds_dag @ 2021-09-01 20:15:07+00:00: mtf_9001_20210901_120__2021-09-01T20:15:07+00:00, externally triggered: True>: start_date is not set.
```
Notice **0 task(s)**, which I expect is caused by the task being in Null state in DB and `DagRun.task_instance_scheduling_decisions` not checking for Null-state tasks.
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] enima2684 commented on issue #17977: DagRun marked as success without executing task
Posted by GitBox <gi...@apache.org>.
enima2684 commented on issue #17977:
URL: https://github.com/apache/airflow/issues/17977#issuecomment-915082007
Hi,
I am experiencing the same issue.
I generally launch through the API many dagruns of the same dag (~365 dag runs). After running a few dagruns normally (~200), Airflow scheduler stops scheduling remaining runs and marks them as "succeded" even if no task was run
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] hancyhancy123 commented on issue #17977: DagRun marked as success without executing task
Posted by GitBox <gi...@apache.org>.
hancyhancy123 commented on issue #17977:
URL: https://github.com/apache/airflow/issues/17977#issuecomment-922169864
I am experiencing the same issue too. My task is executed every day. And if it can not run as usual some day, some other things will happen in my project. So I wonder if it can be discovered or inspected by some config, therefore I can trigger it manually and immediately once it happens next time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org