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 2022/12/05 23:25:11 UTC

[GitHub] [airflow] MatrixManAtYrService opened a new issue, #28106: IndexError in `airflow dags test` re: scheduling delay stats

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

   ### Apache Airflow version
   
   2.5.0
   
   ### What happened
   
   Very simple dag:
   
   ```python3
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from datetime import datetime, timedelta
   
   with DAG(dag_id="hello_world", schedule=timedelta(days=30 * 365), start_date=datetime(1970, 1, 1)) as dag:
       (
           BashOperator(task_id="hello", bash_command="echo hello")
           >> BashOperator(task_id="world", bash_command="echo world")
       )
   ```
   
   Run it like `airflow dags test hello_world $(date +%Y-%m-%d)`
   
   End of output:
   ```
   [2022-12-04 21:24:02,993] {dagrun.py:606} INFO - Marking run <DagRun hello_world @ 2022-12-04T00:00:00+00:00: manual__2022-12-04T00:00:00+00:00, state:running, queued_at: None. externally triggered: False> successful
   [2022-12-04 21:24:03,003] {dagrun.py:657} INFO - DagRun Finished: dag_id=hello_world, execution_date=2022-12-04T00:00:00+00:00, run_id=manual__2022-12-04T00:00:00+00:00, run_start_date=2022-12-04T00:00:00+00:00, run_end_date=2022-12-05 04:24:02.995279+00:00, run_duration=102242.995279, state=success, external_trigger=False, run_type=manual, data_interval_start=2022-12-04T00:00:00+00:00, data_interval_end=2052-11-26T00:00:00+00:00, dag_hash=None
   [2022-12-04 21:24:03,004] {dagrun.py:878} WARNING - Failed to record first_task_scheduling_delay metric:
   Traceback (most recent call last):
     File "/home/matt/2022/12/04/venv/lib/python3.9/site-packages/airflow/models/dagrun.py", line 866, in _emit_true_scheduling_delay_stats_for_finished_state
       first_start_date = ordered_tis_by_start_date[0].start_date
   IndexError: list index out of range
   ```
   
   ### What you think should happen instead
   
   No warning (or, an explanation of what I can do address whatever it's warning about).
   
   ### How to reproduce
   
   _No response_
   
   ### Operating System
   
   NixOS 22.11 (gnu/linux)
   
   ### Versions of Apache Airflow Providers
   
   n/a
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### 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.apache.org

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


[GitHub] [airflow] MatrixManAtYrService closed issue #28106: IndexError in `airflow dags test` re: scheduling delay stats

Posted by GitBox <gi...@apache.org>.
MatrixManAtYrService closed issue #28106: IndexError in `airflow dags test` re: scheduling delay stats
URL: https://github.com/apache/airflow/issues/28106


-- 
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 #28106: IndexError in `airflow dags test` re: scheduling delay stats

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

   Thanks @MatrixManAtYrService . Fix in #https://github.com/apache/airflow/pull/28138 - would be great if you apply it locally and test if it removes the warning.


-- 
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 #28106: IndexError in `airflow dags test` re: scheduling delay stats

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

   Thanks. Let me reopen - it will be closed automatically when we merge :)


-- 
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] MatrixManAtYrService commented on issue #28106: IndexError in `airflow dags test` re: scheduling delay stats

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

   @potiuk I cloned your branch and re-ran.  No more warning, last line of output is this one (as expected).
   
   ```
   [2022-12-05 16:21:46,276] {dagrun.py:658} INFO - DagRun Finished: dag_id=hello_world, execution_date=2022-12-05T00:00:00+00:00, run_id=manual__2022-12-05T00:00:00+00:00, run_start_date=2022-12-05T00:00:00+00:00, run_end_date=2022-12-05 23:21:46.263335+00:00, run_duration=84106.263335, state=success, external_trigger=False, run_type=manual, data_interval_start=2022-12-05T00:00:00+00:00, data_interval_end=2052-11-27T00:00:00+00:00, dag_hash=None
   ```


-- 
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 #28106: IndexError in `airflow dags test` re: scheduling delay stats

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #28106: IndexError in `airflow dags test` re: scheduling delay stats
URL: https://github.com/apache/airflow/issues/28106


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