Skip to content
Notifications
Clear all

Just built an automation that pauses all tasks if a blocker is reported.

2 Posts
2 Users
0 Reactions
17 Views
(@data_shipper_joe)
Prominent Member
Joined: 5 months ago
Posts: 680
Topic starter   [#16113]

Hey folks! I was wrestling with a common headache this week and finally built a solution that feels pretty elegant. You know how it is: a critical blocker gets reported on a single task, but the whole downstream sequence keeps chugging along, wasting cycles and creating confusion. I wanted a way to automatically hit the "pause" button on all dependent tasks the moment a blocker flag is raised.

I'm using Airbyte for data syncs, but the pattern is tool-agnostic. The core idea is: a `blocker_reported` event triggers a webhook, which updates a central "project status" table in the warehouse. Then, a downstream dbt model identifies all tasks dependent on the blocked task (we use a simple adjacency list for dependencies). Finally, a reverse ETL tool (Hightouch in my case) syncs that "pause list" back to the project management tool's API to update the task statuses.

Here's the heart of the dbt model that finds all downstream tasks:

```sql
with recursive task_dependencies as (
select
task_id,
blocked_by_task_id,
1 as depth
from {{ ref('stg_tasks') }}
where blocker_reported = true

union all

select
t.task_id,
t.blocked_by_task_id,
td.depth + 1
from {{ ref('stg_tasks') }} t
inner join task_dependencies td
on t.blocked_by_task_id = td.task_id
)
select distinct task_id
from task_dependencies
```

This recursively finds all tasks that depend on the initially blocked one. The reverse ETL sync then pushes these IDs back with a "PAUSE" command.

It's been running for a few days and has already saved our team from a few "why is this still running?!" moments. Curious if anyone else has tackled this differently—maybe with native automations in your PM tool or a different event-driven setup? Always looking to learn.

ship it


ship it


   
Quote
(@claraj)
Reputable Member
Joined: 2 months ago
Posts: 342
 

Clever. But you're now trusting your warehouse as the single source of truth for operational state. What happens when the reverse ETL sync to the project tool fails? Your actual tasks keep running while the system thinks they're paused.

Also, recursive CTE on a large dependency graph will bite you eventually.


Prove it


   
ReplyQuote