Skip to content

test(sso): route login/SSO admin specs through the sso-auth project only - #34056

Merged
chirag-madlani merged 5 commits into
mainfrom
sso-tests-off-main-lane
Sep 28, 2026
Merged

chirag-madlani merged 5 commits into
mainfrom
sso-tests-off-main-lane

Conversation

@chirag-madlani

Copy link
Copy Markdown
Collaborator

Summary

Three specs were still running on the main Playwright lane while touching auth surface (login flow, login-config admin, SSO admin config). Their beforeAll/beforeEach flows can mutate authenticationConfiguration server-wide via applyProviderConfig, which — when co-scheduled with feature specs — has already caused false failures (a /api/v1/users/signup hitting a mid-run self-signup toggle → 501).

Route them through the sso-auth project so their auth-config mutations can't race feature specs:

Spec Was running via Now runs via
Features/SSOTestLogin.spec.ts chromium (untagged) sso-auth
Pages/Login.spec.ts Basic (@basic) sso-auth
Pages/LoginConfiguration.spec.ts Basic (@basic) sso-auth

Changes

  • playwright.config.ts
    • sso-auth.testMatch gains the three paths.
    • chromium.testIgnore and Basic.testIgnore mirror the same three paths so the main lane skips them.
  • The three specs each get @sso at the top-level describe (existing @basic kept — the SSO nightly's Basic leg picks them up via --grep @basic; SSOTestLogin gets both).
  • .github/workflows/playwright-sso-login-nightly.yml's paths: filter gains the three spec files so touching them re-triggers the SSO matrix.

Every other /Auth/** spec (SsoScenarios, OktaSelfSignupClaims, SSOSelfSignup, SSOSessionLimit) was already SSO-workflow-only via the existing chromium / Basic testIgnore '**/Auth/**'.

Test plan

  • yarn lint + yarn pretty:check clean on all four touched files.
  • Main lane after this PR: no spec whose describe carries @sso or lives under the moved paths.
  • SSO nightly's Basic leg (--grep @basic) enrols the moved specs + SsoScenarios.spec.ts's Basic-fixture row.

🤖 Generated with Claude Code

@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

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 804 → 804
- 0 added, 0 removed, 1 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ SSO Login Nightly — PASSED

View workflow run · Commit 77e9a0b

Provider Status Pass Fail Flaky Skip Duration
basic ✅ pass 23 0 0 0 6m 42s
ldap ✅ pass 7 0 0 0 1m 16s
keycloak-oidc-confidential ✅ pass 10 0 0 0 1m 55s
keycloak-oidc-public ✅ pass 9 0 0 0 1m 16s
msal-mock ✅ pass 6 0 0 0 0m 59s
auth0-mock ✅ pass 6 0 0 0 1m 09s
okta ⏩ skipped - - - - -
keycloak-azure-saml ✅ pass 18 0 0 0 6m 27s
keycloak-azure-saml-crosssite ⏩ skipped - - - - -

Totals: 79 passed · 0 failed · 0 flaky · 0 skipped · duration 19m 48s

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 805 → 798
- 0 added, 7 removed, 17 changed spec-list

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/playwright/constant/login.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/login.ts
  openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SsoTestLogin/SsoTestLoginModal.tsx
  openmetadata-ui/src/main/resources/ui/src/pages/Configuration/LoginConfigurationDetails/LoginConfigurationPage.tsx
  openmetadata-ui/src/main/resources/ui/src/pages/ForgotPassword/ForgotPassword.component.tsx
  openmetadata-ui/src/main/resources/ui/src/pages/LoginPage/SignInPage.tsx
  openmetadata-ui/src/main/resources/ui/src/pages/SignUp/BasicSignup.component.tsx

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/constant/config.ts
  openmetadata-ui/src/main/resources/ui/playwright/constant/settings.ts
  openmetadata-ui/src/main/resources/ui/playwright/e2e/fixtures/pages.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/base.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/user/AdminClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/user/UserClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/admin.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/sidebar.ts
  … and 7 more

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-09-28T10:09:07Z)

Blocked the queue: ui-checkstyle

@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-09-28T13:13:51Z)

The entry left the queue before it was built, so no checks ran against it.

chirag-madlani and others added 5 commits September 28, 2026 19:12
Three specs were still running on the main Playwright lane while
touching auth surface (login flow, login config, SSO admin config):

  - Features/SSOTestLogin.spec.ts   (untagged, ran via `chromium`)
  - Pages/Login.spec.ts             (`@basic`, ran via `Basic`)
  - Pages/LoginConfiguration.spec.ts (`@basic`, ran via `Basic`)

Route them through the `sso-auth` project so their backend
authenticationConfiguration mutations can't race feature specs:

  - Add each path to `sso-auth.testMatch`
  - Mirror the same paths on `chromium.testIgnore` and
    `Basic.testIgnore` so the main lane skips them
  - Tag each with `@sso` (Login / LoginConfiguration keep `@basic`
    so the SSO nightly's Basic leg picks them up via `--grep @basic`;
    SSOTestLogin gets both `@basic` and `@sso`)
  - Extend the SSO workflow's `paths:` filter to trigger on the
    Features/ and Pages/ spec files themselves

Rest of `/Auth/**` (SsoScenarios, OktaSelfSignupClaims, SSOSelfSignup,
SSOSessionLimit) was already SSO-workflow-only via existing
testIgnore on chromium and Basic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cleans up the pattern from the previous commit. All three specs now
live under playwright/e2e/Auth/ so the existing `'**/Auth/**'`
testIgnore covers them — no per-file exceptions on chromium.testIgnore
or Basic.testIgnore. sso-auth's testMatch becomes `'**/Auth/**/*.spec.ts'`.

Also fixes the CI failure surfaced on the previous push: the moved
specs use `test.use({ storageState: 'playwright/.auth/admin.json' })`
which requires auth.setup.ts to have run. Added
`dependencies: authDependencies` on the sso-auth project so setup
runs before it. Per-provider SsoScenarios legs still work — auth.setup
runs BEFORE the scenario's beforeAll swaps the backend provider, and
the Basic-only moved specs run only on the Basic leg where the
setup's admin session stays valid.

Workflow paths filter shrinks back to just the /Auth/** entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…uppression

Moving SSOTestLogin.spec.ts under /Auth/ changed its path key in
eslint-suppressions.json, orphaning the old
`Features/SSOTestLogin.spec.ts` entry that whitelisted one
`no-positional-locator` violation at the `.first()` call. Rather
than migrate the suppression to the new path (the guardrail
baseline exists to force us NOT to add), fix the underlying
locator: exact-match `/^public$/i` uniquely picks the Public radio
in the client-type toggle without needing `.first()`. Prune
removes the orphan; the new file adds zero suppressions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merge queue at 36405090119 failed the corpus baseline test:
another burn-down PR landed on main while this PR was queued
(1149 → 1148), and my prune removes one more (SSOTestLogin's
orphaned entry), so the actual count is 1147. Match it.

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

gitar-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 2 closed / 2 findings

🟡 Medium risk · Playwright project routing changes which authentication specs run in each lane.

Routes three auth-surface specs (SSOTestLogin, Login, LoginConfiguration) through the sso-auth project to prevent their authenticationConfiguration mutations from racing feature specs on the main lane. Two issues were resolved: admin.json creation dependency and --grep-invert leg coverage for the moved Basic specs.

✅ 2 closed
✅ Bug: sso-auth has no setup dependency, so admin.json is never created

📄 openmetadata-ui/src/main/resources/ui/playwright.config.ts:358-370 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/LoginConfiguration.spec.ts:55-61 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SSOTestLogin.spec.ts:49 📄 .github/workflows/playwright-sso-login-nightly.yml:34-36
The sso-auth project doesn't declare dependencies or storageState. The SSO workflow only runs npx playwright test --project=sso-auth ... (workflow line 445), so the setup project (auth.setup.ts, which writes playwright/.auth/admin.json) never runs. Two of the moved specs load that file: LoginConfiguration.spec.ts calls test.use({ storageState: 'playwright/.auth/admin.json' }), and SSOTestLogin.spec.ts uses the fixtures/pages page fixture, which calls browser.newPage({ storageState: 'playwright/.auth/admin.json' }). On a fresh CI runner the file doesn't exist, so these specs will error out on every leg, and they no longer run anywhere else. Fix: add dependencies: ['setup'] to the sso-auth project (or have these specs log in themselves, the way Login.spec.ts does with performAdminLogin).

✅ Edge Case: --grep-invert legs (okta, SAML) now also run the moved Basic specs

📄 .github/workflows/playwright-sso-login-nightly.yml:34-36 📄 openmetadata-ui/src/main/resources/ui/playwright.config.ts:363-365 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Login.spec.ts:46-49
The Okta and both keycloak-azure-saml legs select tests with --grep-invert '@okta|@tokenRenewal|@sso-matrix|...' instead of a positive --grep. Now that Login.spec.ts, LoginConfiguration.spec.ts and SSOTestLogin.spec.ts are in sso-auth.testMatch, their @basic/@sso tags don't match any excluded pattern, so they also run in those three provider legs, not just the Basic leg the PR describes. These specs assume Basic username/password auth (and Login.spec changes JWT expiry and login-attempt settings). Running them in Okta/SAML environments makes them run multiple times, and a failure there gets blamed on those provider legs. Fix: add @basic to the invert patterns (e.g. '@basic|@okta|...'), or switch those legs to a positive grep.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

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

This branch was previously deployed

1 inactive deployment
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.

3 participants