yuqian90 commented on issue #10686:
URL: https://github.com/apache/airflow/issues/10686#issuecomment-714033588


   Hi @KulykDmytro, the original issue reported in #10686 and #10725 has been 
fixed in #10751 and will be released in the release of airflow.
   
   I assume `latest_only` is a `LatestOnlyOperator`? The issue you are 
reporting here is unlikely caused by [Clearing tasks skipped by SkipMixin will 
skip 
them](https://github.com/apache/airflow/blob/master/UPDATING.md#clearing-tasks-skipped-by-skipmixin-will-skip-them).
 It looks more like a flaw in `LatestOnlyOperator` itself. And it must have 
been happening in versions prior to 1.10.12 already. If you look at 
`LatestOnlyOperator` implementation, it always skips all its downstream tasks 
(including indirect downstream tasks). This is probably not what you are 
expecting. It's more reasonable to make `LatestOnlyOperator` to skip only the 
**direct** downstream tasks. if you create a new issue to address this problem 
in `LatestOnlyOperator`, someone will probably help you fix.
   
   ```
           if not left_window < now <= right_window:
               self.log.info('Not latest execution, skipping downstream.')
   
               downstream_tasks = 
context['task'].get_flat_relatives(upstream=False)
               self.log.debug("Downstream task_ids %s", downstream_tasks)
   
               if downstream_tasks:
                   self.skip(context['dag_run'],
                             context['ti'].execution_date,
                             downstream_tasks)
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to