villebro opened a new pull request, #43486:
URL: https://github.com/apache/superset/pull/43486

   ### SUMMARY
   
   Targets `gaq-to-gtf`. Polling and task-list display polish surfaced while 
testing async chart data on Postgres.
   
   **Poll lifecycle — stop when idle, back off when quiet.** The chart-data 
status poll previously rescheduled a heartbeat timer forever (no network when 
idle, but never truly stopped). Now:
   - it **stops entirely** once every awaited task settles, and **restarts 
eagerly** when a new waiter registers;
   - it applies **exponential backoff** — starts at the eager interval, doubles 
(capped at 8× the base) while awaited tasks are quiet, and snaps back to eager 
the moment an awaited task changes or a new waiter registers. A long-running 
task stays responsive without hammering `/status_changes` while it's quiet.
   
   **Duration display at second granularity.** `283ms 200μs`-style output is 
noise for task tracking. Durations under a second now render as `<1s`; larger 
ones round to whole seconds (`6m 6s`).
   
   **No duration for pending tasks.** A task that hasn't started has no 
execution time (queue time isn't duration), so `duration_seconds` returns 
`None` until it starts.
   
   ### TESTING INSTRUCTIONS
   
   - `npm run test -- src/middleware/asyncEvent.test.ts` — polling stops once 
all awaited tasks settle, and restarts for a new job after going idle.
   - `npm run test -- src/features/tasks/timeUtils.test.ts` — sub-second → 
`<1s`, whole-second rounding.
   - `pytest tests/unit_tests/tasks/test_handlers.py -k duration` — pending 
task has no duration.
   
   End-to-end: load an async dashboard and watch the network panel — 
`/status_changes` polling ramps down while charts are slow and stops when all 
charts finish; reloading a fully-cached dashboard issues no polls.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [x] Required feature flags: `GLOBAL_ASYNC_QUERIES`
   - [x] Changes UI (task duration formatting)
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to