fix(test): prevent flaky OktaSessionRenewalPublic second test - #31830
Conversation
…ing home first Test 1 ends on the Explore page; clicking app-bar-item-explore in test 2 was a no-op same-path navigation, so no API call / 401 / renewal was triggered and the interactive-authorize poll timed out. Navigating home before the click ensures a real navigation always fires. Co-Authored-By: Claude Sonnet 4.6 <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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 551 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 57m 16s ⏱️ Max setup 6m 11s · max shard execution 15m 26s · max shard-job elapsed before upload 23m 2s · reporting 4s 🌐 214.56 requests/attempt · 2.83 app boots/UI scenario · 22.79% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Overrides the global on-first-retry setting so traces are collected on every SSO test run (pass or fail), making them available in the HTML report artifact for easier debugging. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…failure Replaces 'on' with 'retain-on-failure' so traces are kept for the first failing attempt rather than only on retry, without generating trace files for passing tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review ✅ Approved 1 resolved / 1 findingsStabilizes the Okta session renewal Playwright test by ensuring a home-page redirect before the second test's Explore navigation, resolving the intermittent test timeout. No issues found. ✅ 1 resolved✅ Performance: trace: 'on' records traces for every sso-auth test run
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
Code Review ✅ Approved 1 resolved / 1 findingsStabilizes the Okta session renewal Playwright test by ensuring a home-page redirect before the second test's Explore navigation, resolving the intermittent test timeout. No issues found. ✅ 1 resolved✅ Performance: trace: 'on' records traces for every sso-auth test run
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
* fix(test): prevent flaky Okta silent-renewal fallback test by navigating home first Test 1 ends on the Explore page; clicking app-bar-item-explore in test 2 was a no-op same-path navigation, so no API call / 401 / renewal was triggered and the interactive-authorize poll timed out. Navigating home before the click ensures a real navigation always fires. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(test): enable trace always for sso-auth Playwright project Overrides the global on-first-retry setting so traces are collected on every SSO test run (pass or fail), making them available in the HTML report artifact for easier debugging. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(test): use retain-on-failure trace for sso-auth to capture first failure Replaces 'on' with 'retain-on-failure' so traces are kept for the first failing attempt rather than only on retry, without generating trace files for passing tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 22c80c1)
Describe your changes:
The
should fall back to interactive login when silent renewal returns login_requiredtest was intermittently timing out in the Okta SSO suite. The suite runs in serial mode: test 1 ends by clickingapp-bar-item-explore, leaving the browser on the Explore page. Test 2 then clicks the same sidebar item — but since React Router short-circuits same-path navigation, no API call fires, no 401 is received, and the renewal flow never triggers. The 60 s poll forinteractive-authorizeevents times out with 0 hits.The fix calls
redirectToHomePageat the start of test 2 so the subsequent Explore click is always a real navigation.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
interactive-authorizewhen silent renewal returnslogin_requiredUnit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Auth/OktaSessionRenewalPublic.spec.tsManual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Greptile Summary
The PR stabilizes the second Okta public-session-renewal test by returning to the home page before navigating to Explore, ensuring the navigation triggers the renewal flow.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
/my-databefore installing renewal mocks, expiring the token, and navigating to Explore.Reviews (4): Last reviewed commit: "fix(test): use retain-on-failure trace f..." | Re-trigger Greptile