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/07/20 01:20:22 UTC

[GitHub] [airflow] spire-mike opened a new issue #17097: LatestOnlyOperator example from v1.10.15 documentation not working as expected

spire-mike opened a new issue #17097:
URL: https://github.com/apache/airflow/issues/17097


   I am experimenting with the `LatestOnlyOperator` in Airflow 1.10.15. The [documentation shows](https://airflow.apache.org/docs/apache-airflow/1.10.15/concepts.html#latest-run-only) an example dag with the following code:
   
   ```
   import datetime as dt
   
   from airflow.models import DAG
   from airflow.operators.dummy_operator import DummyOperator
   from airflow.operators.latest_only_operator import LatestOnlyOperator
   from airflow.utils.dates import days_ago
   from airflow.utils.trigger_rule import TriggerRule
   
   dag = DAG(
       dag_id='latest_only_with_trigger',
       schedule_interval=dt.timedelta(hours=4),
       start_date=days_ago(2),
       tags=['example']
   )
   
   latest_only = LatestOnlyOperator(task_id='latest_only', dag=dag)
   task1 = DummyOperator(task_id='task1', dag=dag)
   task2 = DummyOperator(task_id='task2', dag=dag)
   task3 = DummyOperator(task_id='task3', dag=dag)
   task4 = DummyOperator(task_id='task4', dag=dag, trigger_rule=TriggerRule.ALL_DONE)
   
   latest_only >> task1 >> [task3, task4]
   task2 >> [task3, task4]
   ```
   
   And the following image which is meant to show which tasks get skipped and which ones run:
   
   [![enter image description here][1]][1]
   
   When I copy the code from the documentation exactly as it's shown, and load the DAG into my airflow setup, I get the following results:
   
   [![enter image description here][2]][2]
   
   As you can see, this is different than the results the documentation indicate I should expect. In my runs, `task4` is skipped every time, except the latest, but I would expect it to run due to the 'all_done' trigger rule as the documentation suggests. According to the documentation, a skip should not cascade to an 'all_done' trigger rule.
   
   Does anyone have any idea why this is happening? I am copying and pasting from the documentation exactly as they shown:
   
   https://airflow.apache.org/docs/apache-airflow/1.10.15/concepts.html#latest-run-only
   
   
   
   
     [1]: https://i.stack.imgur.com/SGxHZ.png
     [2]: https://i.stack.imgur.com/Jfdbs.png


-- 
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] potiuk commented on issue #17097: LatestOnlyOperator example from v1.10.15 documentation not working as expected

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #17097:
URL: https://github.com/apache/airflow/issues/17097#issuecomment-886251364


   1.10 has reached end-of-life on 17th of June. No more fixes to 1.10 will be provided. If that is an issue for Airflow 2 as well - please create a new issue.


-- 
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] boring-cyborg[bot] commented on issue #17097: LatestOnlyOperator example from v1.10.15 documentation not working as expected

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #17097:
URL: https://github.com/apache/airflow/issues/17097#issuecomment-882971927


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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] potiuk closed issue #17097: LatestOnlyOperator example from v1.10.15 documentation not working as expected

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #17097:
URL: https://github.com/apache/airflow/issues/17097


   


-- 
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] boring-cyborg[bot] commented on issue #17097: LatestOnlyOperator example from v1.10.15 documentation not working as expected

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #17097:
URL: https://github.com/apache/airflow/issues/17097#issuecomment-882971927


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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] boring-cyborg[bot] commented on issue #17097: LatestOnlyOperator example from v1.10.15 documentation not working as expected

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #17097:
URL: https://github.com/apache/airflow/issues/17097#issuecomment-882971927


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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