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.

Enable ignore_first_depends_on_past for scheduled run and applies on new tasks

See original GitHub issue

Description In airflow backfill, -I is available so that the task instance of the first DAG run will ignore depends_on_past setting. It is a bit confusing from its name that it is a concept only for backfill jobs. For scheduled jobs, this behavior is on by default. However, one case we’ve been seeing a lot is that when a new task with depends_on_past=True was added, it will not be scheduled until its previous TI is marked as success. This is because when we are checking the taks deps, we consider a task instance the first task instance only when it’s from the first DAG run of the DAG(roughly), code.

Use case / motivation So that after adding new task, people don’t need to remember manually marking the previous TI as success before getting the new task running.

Proposed behavior Add a new property ignore_first_depends_on_past in BaseOperator and control its value through a config entry. If it is true, then first task instance of a task will not respect depends_on_past setting. A task instance will be considered as the first task instance of a task when there is not task instance in the DB with an execution_date earlier than it.

Or, making it the default behavior.

Related Issues No

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
KevinYang21commented, May 24, 2020

Plan to work on this myself, maybe later next week

0reactions
pingzhcommented, Mar 23, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable-ScheduledTask - Microsoft Learn
This command uses the Get-ScheduledTask cmdlet to get all scheduled tasks in the *\UpdateTasks* folder. It pipes this information to the Enable-ScheduledTasks ......
Read more >
Create a Scheduled Task - VMware Docs
In the vSphere Client, navigate to the object for which you want to schedule a task. · Select Configure > Scheduled Tasks >...
Read more >
Scheduled tasks - Amazon ECS - AWS Documentation
Amazon ECS supports creating scheduled tasks. Scheduled tasks use Amazon EventBridge rules to run tasks either on a schedule or in a response...
Read more >
Introduction to Tasks - Snowflake Documentation
A task can execute any one of the following types of SQL code: Single SQL statement. Call to a stored procedure. Procedural logic...
Read more >
Scheduling tasks - IBM
You can configure scheduled tasks to run at a specified time. ... Specify the schedules that you want to apply to the task...
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