villebro commented on PR #43701:
URL: https://github.com/apache/superset/pull/43701#issuecomment-5473653852

   Pushed `799934d` addressing the follow-ups + the CI failure.
   
   **CI (`sharded-jest`) fix.** The failing shards traced to a flaky test I 
added: the poll-mode "gives up on a persistent error" case used a fetch-mock `{ 
throws }` route, which `SupersetClient` **retries over real timers (~3s)** — 
leaving a slow in-flight request that could reject across a test boundary and 
destabilize sibling files in the same worker. Switched it to a `400` (not 
retried), so it rejects deterministically in ~50ms. Verified `src/middleware`, 
`src/views/CRUD`, and `src/views` all green locally.
   
   **Keepalive can still mask a real disconnect (external review).** Correct — 
the timer only checked `generation` + `socket === ws`, but `onclose` merely 
*schedules* a delayed reconnect without clearing `socket`, so a just-closed 
socket still matched and the keepalive path could cancel the real `reconnect` 
and reopen as `keepalive` (which list views skip). Added a `readyState === 
WS_OPEN` guard on both the timer entry and the `.finally`, so a close just 
before keepalive now yields a `reconnect` (list views reconcile the outage). 
Added the exact test you suggested (close just before keepalive → eventual open 
reason is `reconnect`).
   
   **`patchRows` race (CodeAnt).** Valid — a delayed reconcile could merge a 
stale snapshot after a newer page/filter/refresh. `patchRows` now snapshots 
`latestRequestIdRef.current` and discards the merge if a newer full fetch 
landed meanwhile.
   
   **Timeout after `mark_execution_completed` (CodeAnt).** Valid — the timeout 
callback wasn't gated on `_execution_completed` (the abort listener is). It now 
elects under `_abort_lock` and skips when execution already completed, so a 
timeout in the post-completion window can't flip a finished task to TIMED_OUT.
   
   Tests: 462 Python task tests + the frontend middleware/CRUD/views suites 
green; ruff/mypy/oxfmt/oxlint clean on changed files.
   


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