Repository navigation
Fix flaky glossary hierarchy test and websocket cross-talk in ChangeParentHierarchy - #33440
Conversation
…s-talk Two root causes behind the 2/11 failure rate: 1. The test navigated to verify the moved term without waiting for the async move to complete — moveAsync returns 200 immediately while the backend processes the hierarchy change asynchronously. Added expect.poll (matching the pattern from the passing H-M05 test) to wait for the term's glossary FQN to update before asserting the UI. 2. ChangeParentHierarchy's websocket handler processed ALL move events on the MOVE_GLOSSARY_TERM_CHANNEL regardless of job ID. Under parallel execution, a COMPLETED event from another move operation caused the modal to navigate away prematurely. Added job ID filtering via a ref so only the submitted job's events are processed. Also added test.slow() since the cross-glossary move with async poll needs more than the default 60s budget under load. Verified: 40/40 green at --repeat-each=20 --workers=6 (previously 2/11). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
…oves Use a Map<jobId, event> instead of a single ref so concurrent move events from different operations cannot overwrite each other during the brief HTTP-response window. The map is cleared after replay. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
| Count | Rule |
|---|---|
| 1 | react-hooks/exhaustive-deps |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Modals/ChangeParentHierarchy/ChangeParentHierarchy.component.tsx:118:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changedCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code Review ✅ Approved 1 closed / 1 findingsFixes the flaky glossary hierarchy test by addressing two root causes: adding async move polling in the test to wait for backend completion, and filtering websocket events by job ID in ✅ 1 closed✅ Bug: Single-slot event buffer drops early terminal event under cross-talk
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Fixes the quarantined
should move term to root of different glossaryE2E test (2/11 pass rate in merge queue) by addressing three root causes:1. Missing async move poll (test-side)
changeTermHierarchyFromModalcalls themoveAsyncAPI which returns 200 immediately — the actual glossary-term move is processed asynchronously on the backend. The test navigated to glossary2 and asserted the moved term without waiting for the backend to complete the move. Added anexpect.pollthat waits up to 60s for the term'sglossary.fullyQualifiedNameto reflect the target glossary (same pattern already used by the passing H-M05 test).2. Unfiltered websocket events (component-side bug)
ChangeParentHierarchy's websocket handler listened to all events onMOVE_GLOSSARY_TERM_CHANNELwithout filtering by job ID. When multiple glossary moves happen concurrently (parallel tests, or multiple users), aCOMPLETEDevent from a different operation would triggerhandleMoveSuccess, which callsnavigate()— closing the modal prematurely. Fixed by tracking the submitted job ID in a ref and only processing matching events.3. Early terminal websocket event race (component-side bug)
If the backend processes the move and broadcasts the
COMPLETEDwebsocket event before the HTTP response assignssubmittedJobId, the job-ID guard would discard the only terminal notification — leaving the modal stuck in the saving state indefinitely. Fixed by buffering websocket events that arrive while the HTTP response is in flight (awaitingResponseref), keyed byjobIdin a boundedMap(capped at 100 entries). When the HTTP response resolves, any buffered event matching the job ID is replayed.Also added
test.slow()since the cross-glossary move with async polling needs more than the 60s default timeout under load.Verification:
--repeat-each=20 --workers=1GlossaryHierarchy.spec.tspass with no regressionsTest run evidence (10 reps, 6 workers):
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>