seanmuth opened a new issue, #73686:
URL: https://github.com/apache/airflow/issues/73686

   Today, when a Dag is at `max_active_runs`, there is very little signal 
anywhere that explains it, across three different surfaces:
   
   - **Logs**: the only existing log message covering this lives in the 
scheduler's periodic bookkeeping (`_set_exceeds_max_active_runs`), and as of 
#72403 it includes the blocking run/task IDs — but only at the moment a Dag 
*newly* becomes blocked. A Dag Run created *after* the Dag is already at 
capacity (e.g. a second manual trigger while the first run is still active) 
produces no log output anywhere explaining why it never starts.
   - **API**: `DagModel.exceeds_max_non_backfill` (added in 3.2.0 by migration 
`0099_3_2_0_add_exceeds_max_runs_flag_to_dag_model`) is persisted to the `dag` 
table but is never exposed on `DAGResponse` (`GET /dags/{dag_id}`) or anywhere 
else in the public API. There is no way for a client to ask "is this Dag 
currently blocked on max_active_runs" without independently computing 
active-run counts.
   - **UI**: the Dag header's "Active Runs" stat 
(`airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx`) shows `X of Y` (e.g. 
"2 of 1") once a Dag is at or over its limit, but nothing explains what that 
means or what happens to the extra run. An info/warning icon with a tooltip 
explaining that a newly-created run will not start until an existing active run 
completes would make this self-explanatory without needing to dig through 
scheduler logs at all.
   
   Related: #72387 / #72403 — that work enhances the "Dag newly became blocked" 
log message with blocking run/task IDs. It is complementary to, not overlapping 
with, the gaps above (different trigger point, different code path).
   
   ### Proposed follow-up work
   
   One PR per item, so each can be reviewed independently:
   
   1. Log when a newly-created Dag Run will not be scheduled yet because the 
Dag is already at `max_active_runs` (covers the manual-trigger-while-blocked 
case that #72403 does not).
   2. Expose `exceeds_max_non_backfill` (or an equivalently named field) on 
`DAGResponse`.
   3. Add an info/warning tooltip next to the "Active Runs" stat in the Dag 
header UI explaining the blocking behavior.
   
   ---
   Drafted-by: Claude Sonnet 5 (no human review before posting)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to