Repository navigation
test(playwright): run MCP Chat AUT describe serially to avoid shared-app race - #29169
Conversation
…app race The MCP Chat sidebar-navigation tests share one globally-named installed app (McpChatApplication) created in beforeAll and hard-deleted in afterAll. The project runs `fullyParallel`, so the describe's tests are split across workers and beforeAll/afterAll execute per worker. The fast direct-navigation test finishes first and its afterAll hardDeletes the app while the slower sidebar-dependent tests are still polling for `app-bar-item-mcp-chat`, so the item never renders and they time out. Force serial execution so the shared app stays installed for the whole describe. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
❌ 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 |
|
🔴 Playwright Results — 3 failure(s), 11 flaky✅ 4300 passed · ❌ 3 failed · 🟡 11 flaky · ⏭️ 88 skipped
Genuine Failures (failed on all attempts)❌
|
Code Review ✅ ApprovedForces Playwright MCP Chat tests to run serially to prevent worker-level race conditions from deleting the shared application prematurely. The spec now maintains the required app state throughout the test suite. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
…s/Memory Agent (#30041) * revert(ai): remove AISettings + Memory/Ontology Agent (#29201) Removes the AISettings config plane and the Memory/Ontology Agent that derived glossary terms and metrics from ContextMemory. Keeps the ContextMemory entity (schemas frozen), CreateContextMemoryTool, and the Persona AI Context feature that reads ContextMemory. Restores the base McpApplication files #29201 had refactored away. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * revert(context): remove page knowledge-pill extraction (#29119) Reverts the Context Center *page* extraction pipeline (generic ContextProcessingEngine + File/Page engines, ContextMemoryReconciler, sourceEntity generalization, ExtractedMemoriesCard UI). Keeps the frozen ContextMemory/ContextFile/Page schemas, file-side sourceFile handling (removed later with #28973), and all follow-on work (pinning, pagination, attachment widget, ui-core-components migration). This reverts commit 506c8c9. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * chore(ai): keep metric.json/createMetric.json schema frozen Extends the D1 schema-freeze decision to the Metric schema: the AI revert (#29201) removed the Memory/Ontology Agent *code* that populated Metric's 'derivedFrom'/'provider', but the JSON schema fields are left intact (inert) so re-introducing the feature later needs no schema change. Verified the service compiles with the fields present and unused. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * revert(context-center): remove file knowledge-pill extraction (#28973) Removes the file extraction pipeline (ContextFileProcessingService, ContextMemoryExtractor, the LLM completion-client layer, KnowledgePill, DocumentStatusBadge UI) and restores the pre-#28973 ContextFileExtractionService stub. Keeps the 3 MCP context tools (Get/Search/CreateContextMemory), the object-storage upload + /system/validate stack (D3), and the frozen ContextMemory/ContextFile schemas (D1). This reverts commit 03530b2. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * revert(mcp): remove MCP Chat client, conversation tracking, chat UI (#26343, #29169) Removes the MCP Chat feature: chat client service (mcpclient/*), the chat LLM-client layer (clients/llm/* except LlmConfigHolder), McpConversation/ McpMessage entities+repos+resource+schemas, McpChatApplication, the chat UI (McpChatPage, /mcp-chat routes) and its playwright spec (#29169), and the mcp_conversation/mcp_message tables. KEPT (now load-bearing for semantic-search embeddings, not chat): llmConfiguration.json + LlmConfigHolder + OpenMetadataApplicationConfig. llmConfiguration — the vector-embedding stack (SystemRepository, the *EmbeddingClient family, OpenSearchBulkSink, #29678 AI Context Platform) depends on it, so a wholesale revert would break semantic search. Follow-up UI reconciliation (package.json deps, locale keys, ApplicationsProvider, generated TS) lands in the codegen/i18n commit. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * revert(ui): reconcile MCP-chat/AI UI removal + checkstyle Finalizes the UI side of the reverts: removes the residual MCP-chat route, plugin, and provider state; reverse-applies #26343's UI wiring (sidebar, constants, ApplicationsClassBase); restores getContextMemoryById (still used by the surviving memories page); fixes the DocumentPreviewPanel status-row JSX left by the badge removal; and runs the organize-imports + eslint + prettier sequence. Locale files and orphaned i18n keys are intentionally left in place (harmless, re-introduction-friendly, in-sync). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Update generated TypeScript types * fix(revert): keep full objectStorage config for file upload The extraction revert (#28973) over-reverted objectStorage down to a NOOP stub, but file upload (ContextFile) survives and needs the full s3/azure/env-overridable config (D3). Restore it to main's version. Net conf diff is now only the llmConfiguration comment, updated to reference its surviving consumer (semantic-search embeddings) instead of the removed extraction/MCP-chat. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * minor fix * lint fix * fixed playwright test --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Rohit0301 <[email protected]>



Problem
The
MCP Chat - Sidebar NavigationPlaywright spec (McpChat.spec.ts, added in #26343) fails deterministically in the nightly AUT runs. Two of its three tests fail every night:MCP Chat nav item should appear in sidebar when app is installed→expect(getByTestId('app-bar-item-mcp-chat')).toBeVisible()→ element(s) not foundClicking MCP Chat sidebar nav should navigate to chat page→ 60s timeout waiting for the same sidebar itemThe third test,
Send button should enable when input has text, passes — it reaches the page via a directpage.goto('/mcp-chat')and does not depend on the sidebar item.Root cause
The describe shares one globally-named installed app (
McpChatApplication): installed inbeforeAll, hard-deleted inafterAll. The project runs withfullyParallel: true(workers: 3), so:beforeAll/afterAllrun once per worker.afterAllthenDELETE …?hardDelete=trueremoves the shared app.GET /api/v1/apps/installedno longer returns it, the UI'sApplicationsProviderbuilds noMcpChatPlugin, and theapp-bar-item-mcp-chatsidebar entry never renders.It is deterministic (not flaky) because the direct-navigation test is always the quickest to reach its
afterAll. The/mcp-chatroute is registered unconditionally, which is why that test still passes.Fix
Force the describe to run serially in a single worker:
beforeAll/afterAllthen run exactly once andafterAllonly fires after all three tests complete, so the shared app stays installed for the whole describe. No production code change — test isolation only.🤖 Generated with Claude Code
Greptile Summary
Fixes a deterministic nightly AUT failure in the
MCP Chat - Sidebar Navigationspec by configuring the describe block to run in serial mode, preventing worker-level race conditions around the sharedMcpChatApplicationinstall/teardown lifecycle.fullyParallel: true, each worker ran its ownbeforeAll/afterAll— the fastest test'safterAllhard-deleted the app while slower sibling tests were still asserting the sidebar item.test.describe.configure({ mode: 'serial' })— ensuresbeforeAll/afterAllfire exactly once andafterAllonly runs after all three tests finish. No production code is touched.Confidence Score: 5/5
Safe to merge — one-line test configuration change with no production code impact.
The change is a single test.describe.configure({ mode: 'serial' }) call that corrects a well-documented, deterministic race condition in the test suite. It does not touch any application code, only test isolation semantics. The comment accurately describes the problem, and the fix is the standard Playwright-recommended approach for describes that share global state through beforeAll/afterAll.
No files require special attention.
Important Files Changed
Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant W1 as Worker 1 participant W2 as Worker 2 participant W3 as Worker 3 participant API as OpenMetadata API Note over W1,W3: BEFORE (fullyParallel, no serial mode) W1->>API: beforeAll: POST /api/v1/apps (install McpChatApplication) W2->>API: beforeAll: POST /api/v1/apps (409 already installed) W3->>API: beforeAll: POST /api/v1/apps (409 already installed) W3->>W3: Test: Send button enables (page.goto, fast ~4.5s) W3->>API: "afterAll: DELETE McpChatApplication?hardDelete=true" Note over W1,W2: App deleted — sidebar item disappears W1--xW1: FAIL: app-bar-item-mcp-chat not found W2--xW2: FAIL: 60s timeout waiting for sidebar item Note over W1,W3: AFTER (test.describe.configure serial mode) W1->>API: beforeAll: POST /api/v1/apps (runs once) W1->>W1: Test 1: MCP Chat nav item appears in sidebar W1->>W1: Test 2: Clicking nav navigates to chat page W1->>W1: Test 3: Send button enables with text W1->>API: "afterAll: DELETE McpChatApplication?hardDelete=true"%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant W1 as Worker 1 participant W2 as Worker 2 participant W3 as Worker 3 participant API as OpenMetadata API Note over W1,W3: BEFORE (fullyParallel, no serial mode) W1->>API: beforeAll: POST /api/v1/apps (install McpChatApplication) W2->>API: beforeAll: POST /api/v1/apps (409 already installed) W3->>API: beforeAll: POST /api/v1/apps (409 already installed) W3->>W3: Test: Send button enables (page.goto, fast ~4.5s) W3->>API: "afterAll: DELETE McpChatApplication?hardDelete=true" Note over W1,W2: App deleted — sidebar item disappears W1--xW1: FAIL: app-bar-item-mcp-chat not found W2--xW2: FAIL: 60s timeout waiting for sidebar item Note over W1,W3: AFTER (test.describe.configure serial mode) W1->>API: beforeAll: POST /api/v1/apps (runs once) W1->>W1: Test 1: MCP Chat nav item appears in sidebar W1->>W1: Test 2: Clicking nav navigates to chat page W1->>W1: Test 3: Send button enables with text W1->>API: "afterAll: DELETE McpChatApplication?hardDelete=true"Reviews (2): Last reviewed commit: "Merge branch 'main' into pmbrull/fix-mcp..." | Re-trigger Greptile