subhash-0000 opened a new pull request, #59507:
URL: https://github.com/apache/airflow/pull/59507

   Fixes #58928 
   
   The "Triggered DAG" button from `TriggerDagRunOperator` now appears in 
real-time without requiring a manual page refresh.
   
   ### Problem
   Previously, extra links (including the "Triggered DAG" button) only appeared 
after:
   1. The parent task completed
   2. User manually refreshed the browser page
   
   This reduced the utility of extra links, especially for monitoring triggered 
child DAGs in real-time.
   
   ### Solution
   - Add smart polling to `ExtraLinks` component using the existing 
`useAutoRefresh` hook
   - Poll automatically when DAG is active and links are not yet available
   - Stop polling once extra links appear to reduce server load
   - Respects global `auto_refresh_interval` config and DAG paused state
   
   ### Changes Made
   - Modified 
`airflow-core/src/airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx`
   - Added `refetchInterval` logic with conditional polling
   - Follows the same pattern used in `Details.tsx` for polling task instances
   - No breaking changes, no new dependencies
   
   ### Testing
   
   #### Code Quality:
   - [x] TypeScript types are correct
   - [x] Build succeeds without errors (`vite build` passes)
   - [x] Follows existing patterns (`useAutoRefresh` hook)
   - [x] No new dependencies added
   - [x] Clear inline comments explain the logic
   
   #### Manual Testing Checklist (for reviewers):
   - [ ] Start Breeze with `breeze start-airflow --dev-mode`
   - [ ] Create DAG with `TriggerDagRunOperator`
   - [ ] Trigger the parent DAG
   - [ ] Verify "Triggered DAG" button appears immediately (no refresh needed)
   - [ ] Verify button remains visible while child DAG runs
   - [ ] Verify polling stops once button appears (check Network tab in 
DevTools)
   - [ ] Verify respects DAG paused state
   
   ### Performance Impact
   ✅ **Positive**: Polling stops when links appear, actually reducing server 
load compared to continuous polling  
   ✅ Respects `auto_refresh_interval` config (user-configurable)  
   ✅ Only polls when DAG is active (not paused)
   
   ### Related
   This fix uses the same auto-refresh pattern already established in 
`Details.tsx` for task instance polling, ensuring consistency and 
maintainability across the codebase.
   
   ---
   
   **Type**: Bug Fix  
   **Component**: UI (React)  
   **Breaking Changes**: None  
   **New Dependencies**: None


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