Skip to content

fix(playwright): use createAdminApiContext in IngestionListNameSorting hooks on 1.13 - #31964

Merged
anuj-kumary merged 3 commits into
1.13from
fix/aut-ingestion-sort-login-1.13
Aug 24, 2026
Merged

fix(playwright): use createAdminApiContext in IngestionListNameSorting hooks on 1.13#31964
anuj-kumary merged 3 commits into
1.13from
fix/aut-ingestion-sort-login-1.13

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Aug 24, 2026

Copy link
Copy Markdown
Member

The beforeAll and afterAll hooks in this spec only need an API token to create/delete test data. They never actually need a browser window at all.

So instead of calling performAdminLogin(browser) (which opens a browser), we now call createAdminApiContext() (which just makes a direct API call to get a token). No browser = no redirect problem.

Only this one spec file is changed. No shared utilities are touched.

…ndle pre-authenticated AUT sessions

In the upgrade test (1.11.13 → 1.13), playwright/.auth/admin.json carries a
valid JWT in localStorage from the pre-upgrade instance. The old performAdminLogin
called admin.login() directly, which navigated to /signin and timed out when the
frontend redirected to /my-data instead (active session detected).

authenticateAdminPage already exists on this branch and handles both paths: it
waits for either /my-data or /signin, logs in only when /signin is reached, so
it degrades gracefully in both fresh and pre-authenticated browser contexts.

Fixes the IngestionListNameSorting spec that was backported via #31915.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@anuj-kumary
anuj-kumary requested a review from a team as a code owner August 24, 2026 11:57
@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.

@anuj-kumary anuj-kumary self-assigned this Aug 24, 2026
@github-actions github-actions Bot added the UI UI specific issues label 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!

@anuj-kumary anuj-kumary added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check and removed UI UI specific issues labels Aug 24, 2026
anuj-kumary and others added 2 commits August 24, 2026 17:29
…in to handle pre-authenticated AUT sessions"

This reverts commit 4b74175.
…g hooks on 1.13

The beforeAll/afterAll hooks only need an API context to seed and teardown test
data — they never use a browser page. On 1.13, performAdminLogin always creates
a browser page and calls admin.login() directly. In the AUT (1.11.13 → 1.13),
playwright/.auth/admin.json carries a valid JWT in localStorage from the pre-upgrade
instance, so the page redirects to /my-data instead of /signin and the login
attempt times out.

createAdminApiContext() (pure REST, no browser) is the correct primitive for
hooks that only need an apiContext. This matches how the test behaves on main,
where performAdminLogin takes an API-only fast path for the same reason.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@anuj-kumary anuj-kumary changed the title fix(playwright): handle pre-authenticated browser in performAdminLogin on 1.13 AUT fix(playwright): use createAdminApiContext in IngestionListNameSorting hooks on 1.13 Aug 24, 2026
@github-actions github-actions Bot added the UI UI specific issues label Aug 24, 2026
@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

@gitar-bot

gitar-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Replaces performAdminLogin with createAdminApiContext in IngestionListNameSorting spec hooks to avoid browser navigation and JWT session redirect timeouts during 1.13 upgrades. 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 a140d8d into 1.13 Aug 24, 2026
79 of 80 checks passed
@anuj-kumary
anuj-kumary deleted the fix/aut-ingestion-sort-login-1.13 branch August 24, 2026 13:58
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 skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants