seanghaeli opened a new pull request, #76260:
URL: https://github.com/apache/airflow/pull/76260

   There's no way to see what runs on the triggerers: Airflow 3 dropped Browse 
> Triggers, and `GET /assets` shows only a watcher's name and trigger id, so a 
watcher failing for days looks healthy. #76101 records each trigger's failures 
and owner on its row; this reads them.
   
   - `GET /api/v2/triggers` and `GET /api/v2/triggers/{trigger_id}` list every 
trigger the caller can see, with its `kind`, `status`, triggerer, failures, 
last error, last event and owner. Kwargs, which can hold credentials, are never 
loaded or returned.
   - `status` is worked out when read: `pending` if no triggerer has it, 
`orphaned` if its triggerer stopped heartbeating, `failing` while it has 
failures since it last recovered, otherwise `running`.
   - Filters: `kind`, `status`, `triggerer_hostname`, `dag_id`, `asset_id` and 
`teams`.
   - No new permission: you see a trigger if you can see its owner, meaning 
read access to its Dag, or to one of its watchers' assets. A shared trigger 
only lists the watchers on assets you can read.
   - Watchers in `GET /assets` gain `status`.
   
   How to review: the access rule is `PermittedTriggerFilter` in 
`core_api/security.py`, and status is `Trigger.status` / `status_expression` in 
`models/trigger.py`. The rest is generated code, docs and tests.
   
   Breeze on Postgres, every kind of trigger running with one watcher 
crash-looping, then FAB users with one role each:
   
   ```text
   --- GET /api/v2/triggers -> HTTP 200
     total_entries=5
     id=1   kind=asset_watcher status=running  host=trig-a dag_id=None fails=0 
last_event=None | watchers to_healthy_asset/healthy_watcher
     id=2   kind=asset_watcher status=running  host=trig-a dag_id=None fails=0 
last_event=None | watchers 
to_twin_a_asset/twin_b_watcher,to_twin_b_asset/twin_b_watcher
     id=3   kind=asset_watcher status=failing  host=trig-a dag_id=None fails=38 
last_event=None | watchers to_creds_asset/creds_watcher
            last_error='ConnectionError: TO creds: the security token included 
in the request is expired'
     id=5   kind=callback      status=running  host=trig-a 
dag_id=to_kinds_deadline fails=0 last_event=2026-10-29T12:11:17.236983Z | 
callback 01a18792 dag=to_kinds_deadline 
run=manual__2026-10-29T12:11:03.871280+00:00 cb_state=running
     id=4   kind=task          status=running  host=trig-a 
dag_id=to_kinds_tasks fails=0 last_event=None | task to_kinds_tasks.wait_long 
try=1 ti_state=deferred
     ?kind=asset_watcher -> HTTP 200 ids=[1 2 3]
     ?status=failing -> HTTP 200 ids=[3]
     ?dag_id=to_kinds_deadline -> HTTP 200 ids=[5]
     ?asset_id=3 -> HTTP 200 ids=[2]
     ?kind=sensor -> HTTP 422 ids=[]
   
   # FAB auth manager, one role per user: Dag to_kinds_tasks only, Dag 
to_kinds_deadline only, assets only, nothing
   --- u_task: list HTTP 200
       total_entries=1 visible=4:task(wait_long)
   --- u_deadline: list HTTP 200
       total_entries=1 visible=5:callback
   --- u_asset_nologs: list HTTP 200
       total_entries=3 visible=1:asset_watcher(creds_watcher), 
2:asset_watcher(healthy_watcher), 3:asset_watcher(secret_watcher)
   --- u_nothing: list HTTP 200
       total_entries=0 visible=
     no token: list HTTP 401 detail HTTP 401
   ```
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change below checkbox to `[X]` followed by the name of the tool, uncomment 
the "Generated-by".
   -->
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code (Opus 5.5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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