MatrixManAtYrService opened a new issue #20554:
URL: https://github.com/apache/airflow/issues/20554


   ### Apache Airflow version
   
   2.2.3 (latest released)
   
   ### What happened
   
   Here's a dag, I expect it to create 5 dagruns when unpaused, and it does.
   
   ```python3
   from airflow import DAG
   from airflow.operators.python_operator import PythonOperator
   from datetime import datetime, timedelta
   from textwrap import dedent
   from time import sleep
   
   decade = 31556952 * 10
   
   with DAG(
       "count_sla_misses",
       start_date=datetime(1970, 1, 1),
       schedule_interval=timedelta(seconds=decade),
       catchup=True,
       doc_md=dedent(
           """
           # Purpose
   
           Generate an expected SLA misses
   
           ## To Test
   
           1. Unpause the dag
           2. Wait for dagruns to complete
           3. [browse] -> [SLA Misses]
   
           ## Expect
   
           five dagruns, and five SLA misses:
   
           - 1970 - 1980
           - 1980 - 1990
           - 1990 - 2000
           - 2000 - 2010
           - 2010 - 2020
           """
       ),
   ) as miss:
       PythonOperator(
           task_id="miss",
           python_callable=lambda x: sleep(x),
           op_args=[20],
           sla=timedelta(seconds=15),
       )
   ```
   
   ### What you expected to happen
   
   I also expect it to create five SLA misses, but only four show up:
   
   
![slamiss](https://user-images.githubusercontent.com/5834582/147678208-432bf953-1c1f-460f-80f7-023df8a43e03.png)
   
   ### How to reproduce
   
   unpause the dag
   let catchup run it five times
   notice only four misses
   
   
   ### Operating System
   
   docker / debian
   
   ### Versions of Apache Airflow Providers
   
   n/a
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   `astro dev start` with dockerfile:
   
   ```
   FROM quay.io/astronomer/ap-airflow:2.2.3-onbuild
   ```
   
   ### Anything else
   
   If this is somehow desired behavior, I can submit a docs change PR if 
somebody explains to me why it's desired.  But it smells like an actual bug to 
me.
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to