question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CLI command "airflow dags next-execution" give unexpected results with paused DAG and catchup=False

See original GitHub issue

Apache Airflow version

2.2.2

What happened

Current time 16:54 UTC Execution Schedule: * * * * * Last Run: 16:19 UTC DAG Paused Catchup=False

airflow dags next-execution sample_dag returns

[INFO] Please be reminded this DAG is PAUSED now.
2022-03-22T16:20:00+00:00

What you think should happen instead

I would expect

[INFO] Please be reminded this DAG is PAUSED now.
2022-03-22T16:53:00+00:00

To be returned since when you unpause the DAG that is the next executed DAG

How to reproduce

Create a simple sample dag with a schedule of * * * * * and pause with catchup=False and wait a few minutes, then run airflow dags next-execution sample_dag

Operating System

Debian

Versions of Apache Airflow Providers

Airflow 2.2.2

Deployment

Astronomer

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

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
uranusjrcommented, Apr 6, 2022

I’d not add a short option for now. Short options are overrated and don’t need to exist anyway.

2reactions
uranusjrcommented, Mar 23, 2022

I guess the viable solution would be to add a flag to optionally respect catchup (and perhaps emit a warning when the command is run without the option but with catchup=False, to tell the user to explicitly specify the behaviour).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line Interface and Environment Variables Reference
Get the next execution datetimes of a DAG. It returns one execution unless the num-executions option is given. airflow dags next-execution [-h] [-n ......
Read more >
Rerun Airflow DAGs | Astronomer Documentation
In this guide, you'll learn how to rerun tasks or DAGs and trigger historical DAG runs, and review the Airflow concepts of catchup...
Read more >
Airflow Documentation - Read the Docs
Use airflow to author workflows as directed acyclic graphs (DAGs) of tasks. The airflow scheduler executes your tasks.
Read more >
Release Notes - Apache Airflow documentation - Amazon AWS
This allows DAG runs to be automatically created as a result of a task “producing” a dataset. ... Add subdir parameter to dags...
Read more >
Airflow CLI to pause, resume and stop an executing DAG
Miscellaneous commands airflow cheat-sheet | Display cheat sheet ... List DAG runs given a DAG id airflow dags next-execution | Get the next...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found