Skip to content

test(teams): fix TeamsDragAndDrop on 1.13 (backport #31932) - #31933

Merged
anuj-kumary merged 5 commits into
1.13from
fix/teams-drag-drop-nightly-flake-1.13
Aug 24, 2026
Merged

test(teams): fix TeamsDragAndDrop on 1.13 (backport #31932)#31933
anuj-kumary merged 5 commits into
1.13from
fix/teams-drag-drop-nightly-flake-1.13

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Backport of #31932 to 1.13, plus the earlier utils/team.ts hardening 1.13 never received.

Fixes TeamsDragAndDrop.spec.ts on AUT EKS/RDS MySQL 1.11.13 ➡ 1.13.

Why this isn't a plain cherry-pick

#31932 cherry-picks cleanly, but on its own it does not make 1.13 green. git log --oneline origin/main ^origin/1.13 -- playwright/utils/team.ts shows three commits 1.13 is missing that main and 2.0 both have:

Commit PR main 2.0 1.13
51ecf4502f (team.ts hunk only) #25894 Task redesign
b481bcc629 #30334 Fix flaky team hierarchy creation wait
af609a6237 #31734 stop the add-team click landing in a toast

1.13's addTeamHierarchy is still the original:

const saveTeamResponse = page.waitForResponse('/api/v1/teams');
await page.click('[form="add-team-form"]');
await saveTeamResponse;

No method or status filter, no wait for the ?parentTeam=…&fields=… GET that repaints the table, no modal-hidden wait, no row-visible wait — so the helper returns while the table is still refetching. That is the retry-#1/#2 failure at TeamsDragAndDrop.spec.ts:119, where toContainText(description) runs against a row that hasn't painted.

#25894 is a 500-file redesign, so its team.ts hunk is hand-backported rather than cherry-picked. #30334 and #31734 fold in on top.

Commits

  1. test(teams): backport addTeamHierarchy hardening to 1.13 — the three commits above, team.ts only. The delete-modal changes from Replaced old entity delete modal with untitles delete modal #29760 / Replaced entity delete modal with hard delete modal #29851 are deliberately not included; 1.13 still ships the radio-based delete modal.
  2. test(teams): stop the teams landing from eating the test budget — clean cherry-pick of test(teams): stop the teams landing from eating the test budget #31932. RCA in that PR.

Verification

tsc --noEmit -p playwright/tsconfig.json, eslint, and prettier --check are clean on the touched files. The spec itself needs a live deployment and was not run locally.

🤖 Generated with Claude Code

Greptile Summary

The backport hardens team hierarchy navigation and creation synchronization while adding explicit cleanup for teams created by the drag-and-drop suite.

  • Adds retry-aware opening of the add-team modal and waits for the hierarchy table to finish repainting after creation.
  • Reuses a settled Teams-page navigation helper across the affected suites.
  • Adds recursive post-suite cleanup that aggregates and reports lookup and deletion failures.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the cleanup helper now surfaces both unsuccessful DELETE responses and non-404 lookup failures through its aggregated assertion.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts Adds synchronized Teams navigation and creation helpers plus cleanup that now reports non-404 lookup failures and unsuccessful DELETE responses.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsDragAndDrop.spec.ts Uses the hardened navigation helper, expands the suite timeout, and performs recursive cleanup after the suite.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts Replaces duplicated Teams-page navigation waits with the shared settled-page helper.

Reviews (4): Last reviewed commit: "test(teams): attempt every cleanup delet..." | Re-trigger Greptile

harsh-vador and others added 2 commits August 24, 2026 11:44
1.13 never received the addTeamHierarchy waits that main and 2.0 carry, so
the helper returns while the teams table is still refetching: it opens the
modal on a plain click a toast can swallow, resolves on the first
`/api/v1/teams` response regardless of method or status, and never waits
for the modal to close or the row to render.

Backports the team.ts changes from #25894, #30334 and #31734.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
TeamsDragAndDrop's beforeEach spent the whole 60s test timeout before any
test body ran. settingClick already ends in waitForAllLoadersToDisappear
(30s), and the hook then called it a second time. The Teams table's antd
spinner is the shared `data-testid="loader"`, and it stays up until both
the child-teams fetch and the per-team asset-count aggregation settle — on
a long-lived deployment that is tens of seconds, so the two waits together
consumed the budget and the hook timed out on the second one.

Give the suite test.slow(true) so the landing has headroom, and hard-delete
the four teams the suite creates. Without that cleanup every nightly run
left four more teams under Organization, growing the aggregation the
landing waits on and making the next run slower.

Fold the duplicated navigation into visitTeamsPage and reuse it from
TeamsHierarchy, which had the same hook with looser glob waits.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@harsh-vador
harsh-vador requested a review from a team as a code owner August 24, 2026 06:16
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Aug 24, 2026
@harsh-vador harsh-vador self-assigned this Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@harsh-vador harsh-vador added the safe to test Add this label to run secure Github workflows on PRs label Aug 24, 2026
Comment thread openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts Outdated
@github-actions

Copy link
Copy Markdown
Contributor

❌ UI Checkstyle Failed

❌ Core Components - I18n Sync

Core-components t() keys, locale files, or language-set are out of sync. Run yarn check-i18n-all locally.

❌ Antd + Less Deprecation Guard

A new antd import or new .less file was added. Use UntitledUI + Tailwind for new work.

Affected files

at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {


Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

hardDeleteTeamByName issued the DELETE and ignored the result, so a delete
rejected on permissions or failing with a 500 left the team behind with no
signal in the run — quietly reintroducing the accumulation this cleanup
exists to prevent. Assert the response instead, with the status and body in
the message.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts Outdated
harsh-vador and others added 2 commits August 24, 2026 12:57
The lookup guard keyed off `ok()`, which is false for an auth error or a 500
just as it is for a 404. A broken lookup therefore took the same path as a
team that was already gone: return without deleting, and report success.

Tolerate 404 alone — the spec may have deleted the team itself, and a
recursive delete of its parent takes its children — and assert every other
lookup failure.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The assertion sat inside hardDeleteTeamByName, so the first team that failed
to delete threw out of the caller's loop and the remaining names were never
attempted — leaving those teams on the deployment, which is the accumulation
the cleanup exists to prevent.

Move the assertion up into hardDeleteTeamsByName: the per-team helper now
reports a failure instead of throwing (network errors included), every name
is attempted, and one assertion at the end names every team that survived
along with the status and body that explain why.

Wrap the call in try/finally in the spec so the API context is disposed even
when cleanup fails.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gitar-bot

gitar-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Backports team hierarchy hardening and drag-and-drop test fixes to stabilize the 1.13 branch. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@anuj-kumary
anuj-kumary merged commit 90c99bf into 1.13 Aug 24, 2026
71 of 75 checks passed
@anuj-kumary
anuj-kumary deleted the fix/teams-drag-drop-nightly-flake-1.13 branch August 24, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants