From b4e1b6f09548e497bee9681c4e4f5a99fe87656b Mon Sep 17 00:00:00 2001 From: Sid <30566406+siddhant1@users.noreply.github.com> Date: Fri, 17 Apr 2026 11:17:07 +0530 Subject: [PATCH 1/4] test(domains): fix flaky "Rename domain with data products attached at domain and subdomain levels" Two races were observed in CI: 1. renameDomain reloaded the page before the browser URL had been updated to the new FQN, so the reload hit the old (now 404) URL and the app redirected to the domains list. Wait for the URL to reflect the new name before reloading. 2. The search-index reindex for data products can take longer than 30s when the parent domain is renamed under CI load. Raise the poll budget to 90s. --- .../src/main/resources/ui/playwright/utils/domain.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts index 061dc1b3f0b3..833dea102b6d 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts @@ -1395,8 +1395,8 @@ export const verifyDataProductsCount = async ( }, { message: `Wait for data product search index to show ${expectedCount} results for domain "${domainFqn}"`, - timeout: 30_000, - intervals: [2_000, 3_000, 5_000], + timeout: 90_000, + intervals: [2_000, 3_000, 5_000, 5_000], } ) .toEqual(expectedCount); @@ -1621,6 +1621,7 @@ export const renameDomain = async (page: Page, newName: string) => { const patchRes = page.waitForResponse('/api/v1/domains/*'); await page.getByTestId('save-button').click(); await patchRes; + await page.waitForURL((url) => url.pathname.includes(newName)); const domainRes = page.waitForResponse('/api/v1/domains/name/*'); await page.reload(); From c4b6e3aa87e97a0178c3131fc3f0056f97706541 Mon Sep 17 00:00:00 2001 From: Sid <30566406+siddhant1@users.noreply.github.com> Date: Fri, 17 Apr 2026 11:27:37 +0530 Subject: [PATCH 2/4] Revert search-index poll timeout bump, keep only URL-wait fix --- .../src/main/resources/ui/playwright/utils/domain.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts index 833dea102b6d..42a1d98247f6 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts @@ -1395,8 +1395,8 @@ export const verifyDataProductsCount = async ( }, { message: `Wait for data product search index to show ${expectedCount} results for domain "${domainFqn}"`, - timeout: 90_000, - intervals: [2_000, 3_000, 5_000, 5_000], + timeout: 30_000, + intervals: [2_000, 3_000, 5_000], } ) .toEqual(expectedCount); From f613690dfa288ba080604dd5c0a74e40288142c7 Mon Sep 17 00:00:00 2001 From: Sid <30566406+siddhant1@users.noreply.github.com> Date: Fri, 17 Apr 2026 11:32:06 +0530 Subject: [PATCH 3/4] Update openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/main/resources/ui/playwright/utils/domain.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts index 42a1d98247f6..f139c7fb86c7 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts @@ -1618,7 +1618,12 @@ export const renameDomain = async (page: Page, newName: string) => { await page.locator('#name').clear(); await page.locator('#name').fill(newName); - const patchRes = page.waitForResponse('/api/v1/domains/*'); + const patchRes = page.waitForResponse( + (response) => + response.url().includes('/api/v1/domains/') && + response.request().method() === 'PATCH' && + response.ok() + ); await page.getByTestId('save-button').click(); await patchRes; await page.waitForURL((url) => url.pathname.includes(newName)); From 97964fde59eac00cdc58aa236ebc716ba91dd04e Mon Sep 17 00:00:00 2001 From: Sid <30566406+siddhant1@users.noreply.github.com> Date: Fri, 17 Apr 2026 11:32:23 +0530 Subject: [PATCH 4/4] Update openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/main/resources/ui/playwright/utils/domain.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts index f139c7fb86c7..ecec928c3412 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts @@ -1626,7 +1626,9 @@ export const renameDomain = async (page: Page, newName: string) => { ); await page.getByTestId('save-button').click(); await patchRes; - await page.waitForURL((url) => url.pathname.includes(newName)); + await page.waitForURL((url) => + url.pathname.includes(encodeURIComponent(newName)) + ); const domainRes = page.waitForResponse('/api/v1/domains/name/*'); await page.reload();