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.

Triggering DAG from UI Creates 2 DAG runs if the DAG was paused

See original GitHub issue

Apache Airflow version

2.3.2 (latest released)

What happened

If a DAG with a schedule_interval set to @daily is paused, and the DAG is triggered by clicking the “play” button --> “Trigger DAG”, two DAG runs will simultaneously be triggered: One for the current data interval and one for the manual run.

image

image

What you think should happen instead

Maybe an alert with confirmation should pop up and inform the user that the DAG run will be for the current data interval rather than the current datetime?

How to reproduce

  1. Pause a DAG that hasn’t run in the current data interval.
  2. Trigger the DAG by clicking the “play” button then clicking “Trigger DAG”

Operating System

Debian 11

Versions of Apache Airflow Providers

n/a

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:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bispaulcommented, Sep 13, 2022

Hi @potiuk please assign it to me.

0reactions
RNHTTRcommented, Sep 13, 2022

@rohit-mobstac If DAG is turned on within the DAG’s data interval, it will trigger a DAG run when you unpause the DAG, which I think is to be expected. I think there should be some kind of logic that blocks that scheduled DAG run to run if you’re triggering it from the UI. Or there should at least be the option to block it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Airflow how to stop DAGS from triggering when unpaused
For example, if I have an hourly DAG and I paused it at 2:50pm today and then restarted at 3:44pm, it automatically triggers...
Read more >
FAQ — Airflow Documentation - Apache Airflow
A DagRun represents a specific execution of an entire DAG and has a state (running, success, failed, …). The scheduler creates new DagRun...
Read more >
Cross-DAG dependencies | Astronomer Documentation
You can trigger a downstream DAG with the TriggerDagRunOperator from any point in the upstream DAG. If you set the operator's wait_for_completion parameter...
Read more >
Scheduling & Triggers - Apache Airflow Documentation
Note that if you run a DAG on a schedule_interval of one day, the run stamped 2016-01-01 will be trigger soon after 2016-01-01T23:59...
Read more >
airflow refresh dags - La Calabrisella 2
In the DAGs view you can: Pause/unpause a DAG with the toggle to the left of the DAG name. Next, create a new...
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