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/06/28 14:30:23 UTC

[GitHub] [airflow] IanDoarn opened a new issue #16694: Scheduled DagRuns skip next scheduled run if start_date = days_ago(1) and previous day is not a scheduled run

IanDoarn opened a new issue #16694:
URL: https://github.com/apache/airflow/issues/16694


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 2.0.1
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   ```
   Client Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2018-10-10T16:38:01Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
   Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.16", GitCommit:"7a98bb2b7c9112935387825f2fce1b7d40b76236", GitTreeState:"clean", BuildDate:"2021-02-17T11:52:32Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
   ```
   
   **Environment**: Kubernetes
   
   
       Cloud provider or hardware configuration: Cloud
       OS (e.g. from /etc/os-release): Docker debian
       Kernel (e.g. uname -a):
       Install tools:
       Others: Docker python:3.8-buster, deployed to internal k8s clusters
   
   **What happened**:
   DagRuns skip next scheduled run if start_date = days_ago(1)
   
   related issue https://github.com/apache/airflow/issues/16667
   **What you expected to happen**:
   
   If a dag has a cron schedule for a specific day, lets say Monday 9am CST, the dag should trigger a run
   
   <!-- What do you think went wrong? -->
   
   if start_date = days_ago(1) and the previous day was not a scheduled run, the scheduled run is either skipped OR marked as complete and all tasks are blank.
   
   **How to reproduce it**:
   
   Create  simple dag like the below. Make sure it is enabled and the cron is set so the previous day is not a scheduled run.
   
   When the dag is scheduled it is skipped.
   
   ```python
   default_args = {
       'owner': 'iandoarn',
       'email': ['foobar@baz.com'],
       'start_date': days_ago(1),
       'retries': 0
   }
   
   with DAG(
       dag_id=f"DUMMY_DAG",
       default_args=default_args,
       catchup=False,
       max_active_runs=1,
       schedule_interval='30 1 * * 2-6',
       tags=[CONFIG['client_name'].lower()],
   ) as dag:
       dag.doc_md = __doc__
   
       start_task = BashOperator(
           task_id="start_task",
           bash_command="echo start",
       )
   
       end_task = BashOperator(
           task_id="end_task",
           bash_command="echo end",
       )
   
       start_task >> end_task
   ```
   
   **Anything else we need to know**:
   For my use case, this happens every time on mondays CST for these cron schedules (our airflow instance is in UTC time)
   
   0 14 * * 1-4
   30 1 * * 2-6
   
   


-- 
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] eladkal commented on issue #16694: Scheduled DagRuns skip next scheduled run if start_date = days_ago(1) and previous day is not a scheduled run

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


   >What happened:
   DagRuns skip next scheduled run if start_date = days_ago(1)
   
   Do not use [dynamic value for start_date](https://airflow.apache.org/docs/apache-airflow/stable/faq.html#what-s-the-deal-with-start-date). If the issue is present when using static `start_date` please comment and explain what is the bug.


-- 
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] eladkal closed issue #16694: Scheduled DagRuns skip next scheduled run if start_date = days_ago(1) and previous day is not a scheduled run

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


   


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