Skip to content

fix(playwright): unblock chromium shards after Domains re-enable - #30812

Merged
chirag-madlani merged 1 commit into
mainfrom
fix/planner-domains-shard-timeout
Aug 2, 2026
Merged

chirag-madlani merged 1 commit into
mainfrom
fix/planner-domains-shard-timeout

Conversation

@chirag-madlani

Copy link
Copy Markdown
Collaborator

Summary

Chromium-12 in run 30716060441 hit exit code 124 — the outer timeout 25m SIGTERM'd the shard while every test was passing. The planner had packed too much work into one shard because Pages/Domains.spec.ts was weighted at 0 ms.

Root cause

load_history records skipped-outcome tests as authoritative 0 ms weight:

elif test_id and test.get("outcome") == "skipped":
    durations[test_id].append(0)

When #30451 re-enabled the Domains suite, the baseline still had all 46 entries as outcome: skipped, durationMs: 0 from when the suite was disabled. test_weights[id] = 0 for each, so the entire file weighed 0 ms in the plan. LPT bin-packing dumped every Domains describe onto one shard at zero apparent cost; real runtime 20.1 min + everything else on that shard blew past the 25-min wrapper.

Changes

  • Planner (build_playwright_shards.py): an all-zero history is treated as no data. Falls through to identity match / FALLBACK_TEST_MS instead of pinning weight at 0. Prevents silent recurrence when any other skipped suite is re-enabled.
  • FALLBACK_TEST_MS: 20 s → 30 s. The old value was below the observed 25 s per-test average on Domains; 30 s gives the first plan-after-re-enable a reasonable margin before the next full-run baseline capture organically refreshes weights.
  • Baseline seed (timing-baseline.json): observed durations from the failing run for Pages/Domains.spec.ts (47 entries, 20.1 min real) and Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts (6 entries, 213.8 s real). Makes the very next plan accurate without waiting for the organic refresh.
  • Tests: two tests renamed and updated to reflect the deliberate behavior change (the old assertions pinned weights["known-skip"] == 0 and weight_ms == 0; both were the exact expression of the bug). Comments in the renamed tests explain the trade-off — a legitimately-skipped test now consumes 30 s of planning slack per re-run, negligible vs. under-budgeting a re-enabled suite by tens of minutes.

Trade-off — legitimately-skipped tests

The only other file with a fully-skipped baseline is Features/BulkImport.spec.ts (6 tests). Under this fix its plan cost goes from 0 → 30 × 6 = 180 s of slack. Trivial.

Follow-ups (separate PRs)

  • Plan-time ::warning:: when a file uses fallback weights for ≥N tests — cheap awareness so re-enabling a suite becomes visible.
  • Harness-integrity check that flags baseline files with all-skipped entries when the corresponding spec actually contains live test(...) blocks.

Test plan

  • python3 -m pytest .github/scripts/tests/test_playwright_ci_planning.py — 60 passed locally.
  • Next merge-queue run: plan-playwright produces a matrix that distributes Domains describes across shards (no single shard receives the full 20-min block).
  • Chromium shards complete inside the 25-min wall.

🤖 Generated with Claude Code

Two related problems, one root cause: the shard planner records
skipped-outcome tests in timing-baseline.json as authoritative 0 ms
weight. When #30451 re-enabled `Pages/Domains.spec.ts`, all 46 baseline
entries still had `outcome: skipped, durationMs: 0`, so LPT dumped every
Domains describe onto one shard at zero apparent cost. Chromium-12 in
run 30716060441 blew past the 25-minute wall timeout (exit 124) while
every test was passing.

Changes:

- `load_history`: an all-zero history is treated as no data. The unit
  now falls through to identity match / FALLBACK_TEST_MS instead of
  pinning weight at 0. Prevents silent recurrence when any other
  suite is re-enabled.
- `FALLBACK_TEST_MS`: 20 s → 30 s. The old value was noticeably below
  the observed 25 s average on the re-enabled Domains suite; 30 s gives
  the first plan-after-re-enable a reasonable margin before the next
  full-run baseline capture organically refreshes weights.
- `timing-baseline.json`: seeded observed durations for
  `Pages/Domains.spec.ts` (47 entries, 20.1 min real) and
  `Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts`
  (6 entries, 213.8 s real) so the very next plan is accurate without
  waiting for the organic refresh.
- Tests: `test_history_includes_retry_time_and_only_preserves_explicit_skips`
  → `..._and_skipped_only_ids_fall_to_fallback` (renamed + comment
  explaining the deliberate behavior change). Same for the sibling
  `test_versioned_baseline_only_uses_zero_weight_for_skipped_ids`.
  60 planning tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 1, 2026 21:28
@github-actions

github-actions Bot commented Aug 1, 2026

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 safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Aug 1, 2026
@gitar-bot

gitar-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Refactors Playwright shard planning to treat all-zero historical test durations as missing data, using fallback weights and seeding baseline metrics to prevent chromium shard timeouts after re-enabling skipped suites. 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 👍 / 👎 | Gitar | Powered by Gitar — free for open source

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the Playwright CI shard planner to avoid under-budgeting suites whose historical timings are all 0ms due to previously-skipped tests, which can cause LPT bin-packing to overload a shard and hit the 25-minute wall timeout (as observed when Domains was re-enabled).

Changes:

  • Treat “all-zero” per-test timing history as “no data” (omit from weights) so planning falls back to identity match / FALLBACK_TEST_MS instead of pinning to 0ms.
  • Increase FALLBACK_TEST_MS from 20s to 30s to better match observed per-test runtime when suites are re-enabled before fresh timing data accumulates.
  • Update/rename planner unit tests to reflect the deliberate behavior change (skipped-only IDs no longer produce 0ms weights).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/scripts/build_playwright_shards.py Updates fallback timing constant and changes load_history() to omit all-zero timing histories from computed weights.
.github/scripts/tests/test_playwright_ci_planning.py Renames/updates tests to assert skipped-only histories fall back to FALLBACK_TEST_MS (and omitted from weights).

Comment on lines +307 to +311
weights = {
test_id: percentile_75(values)
for test_id, values in durations.items()
if any(v > 0 for v in values)
}
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 9b78141ae5cf8b7406d956d0459f63dded368cf3 in Playwright run 30719213971, attempt 1.

✅ 549 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 3 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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) 51m 27s

⏱️ Max setup 3m 12s · max shard execution 18m 20s · max shard-job elapsed before upload 21m 31s · reporting 6s

🌐 201.21 requests/attempt · 2.83 app boots/UI scenario · 7.00% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 201.21 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.83 per UI scenario (1620 boots / 572 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 139 0 0 3 0 0
🟡 Shard chromium-02 135 0 1 0 0 0
✅ Shard chromium-03 124 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 10 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 1 flaky test(s) (passed on retry)
  • Pages/Entity.spec.ts › Domain Propagation (shard chromium-02, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@chirag-madlani
chirag-madlani merged commit 5b0ae69 into main Aug 2, 2026
76 of 77 checks passed
@chirag-madlani
chirag-madlani deleted the fix/planner-domains-shard-timeout branch August 2, 2026 05:55
akashverma0786 pushed a commit to itsroshanharry/OpenMetadata that referenced this pull request Aug 3, 2026
…is stale (open-metadata#30827)

* ci(playwright): fail the plan step at PR time when a spec's baseline is stale

Extends PR open-metadata#30813's soft warning into a hard PR-time gate for the exact
pattern that caused the chromium-12 SIGTERM (open-metadata#30812): a spec file where
every planned test falls through to FALLBACK_TEST_MS — no test_weights
hit, no identity_weights hit — because the baseline is stale.

Catches this at plan time, before any test runs. The merge queue never
sees the mismatch, so we don't burn a 25-minute shard wall to discover
it. Also fires on wholly-new spec files, where the author has just
written the tests and knows the durations.

Trigger:
  * A file has >= STALE_BASELINE_MIN_TESTS (5) planned tests.
  * Every one of those tests is on the fallback path.

Non-triggers (kept as warnings via emit_unweighted_warnings):
  * A file with < 5 fallback tests.
  * A file where any test carries real history — mixed coverage is
    the "someone added a couple of new tests" case, not a re-enable.
  * Identity fallback covers the file — @tag drift or renamed IDs
    still resolve, so the planner uses real weights.

Message names the file, the count, and gives three concrete fixes
(seed durations, wait for nightly refresh, or run locally). PR authors
who re-enable a suite get told what to do without having to open the
raw log.

6 new pytest cases cover the threshold, the ignore paths, and the
end-to-end SystemExit path from main(). 69 planning tests pass.

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

* address Copilot review

- Skip the stale-baseline gate in full mode. The gate blocking a
  full-mode run creates a deadlock: the run is what generates the new
  timing-history artifact that unblocks the "wait for the next full
  run" remediation. Only enforce for targeted (PR) planning; full mode
  still gets the softer emit_unweighted_warnings info.

- Prefix `::error file=...::` annotations with
  `openmetadata-ui/src/main/resources/ui/playwright/e2e/` so GitHub
  Actions resolves them relative to the repo root and the annotation
  attaches inline to the spec file in the PR checks UI.

- Rewrite the end-to-end test to use a targeted selection (matching
  what a real PR selection artifact carries) so it continues to
  exercise the gate after the full-mode exemption above. Also assert
  the full repo-relative annotation path is present.

- Add a second end-to-end test that runs the same scenario in full
  mode and confirms the gate does NOT fire — matrix.json is written
  and planning succeeds so the run can capture fresh timing evidence.

70 planning tests pass locally.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
anuj-kumary added a commit to anuj-kumary/OpenMetadata that referenced this pull request Aug 4, 2026
…sTray tests

The shard planner hard-fails when every test in a file (≥5) has no
timing history (stale-baseline gate from open-metadata#30812). EntityExportJobsTray.spec.ts
is a wholly-new file with 5 tests — exactly the threshold — so the plan step
exits 1.

Seed identity-based entries (file + title) for all 5 EntityExportJobsTray
tests and the 4 new CsvJobsTray tests added in this PR. The planner falls
back to (file, title) identity lookup when a test_id has no history, so
these entries will match even before a full CI run records the real IDs.

Durations are conservative estimates (6s / 7s) consistent with the
hermetic, mocked nature of both suites. The first full-mode run will
overwrite them with real measurements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
anuj-kumary added a commit to anuj-kumary/OpenMetadata that referenced this pull request Aug 7, 2026
…verrun

All 5 tests are new (no-mock rewrite changed every test name) so timing-
baseline.json has no history for them. Without delegation the planner falls
back to FALLBACK_TEST_MS and under-budgets the shard, reproducing the
chromium-12 SIGTERM from run 30716060441 (PR open-metadata#30812).

Same treatment as EntityExportJobsTray.spec.ts: delegated specs are excluded
from targeted PR plans but still run in full-mode nightly builds (where they
will seed real durations into the baseline) and via the source-file mapping
whenever CsvJobsTray, EntityExportModalProvider, or csvAPI changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
k-anshul pushed a commit to k-anshul/OpenMetadata that referenced this pull request Aug 12, 2026
…n-metadata#30812)

Two related problems, one root cause: the shard planner records
skipped-outcome tests in timing-baseline.json as authoritative 0 ms
weight. When open-metadata#30451 re-enabled `Pages/Domains.spec.ts`, all 46 baseline
entries still had `outcome: skipped, durationMs: 0`, so LPT dumped every
Domains describe onto one shard at zero apparent cost. Chromium-12 in
run 30716060441 blew past the 25-minute wall timeout (exit 124) while
every test was passing.

Changes:

- `load_history`: an all-zero history is treated as no data. The unit
  now falls through to identity match / FALLBACK_TEST_MS instead of
  pinning weight at 0. Prevents silent recurrence when any other
  suite is re-enabled.
- `FALLBACK_TEST_MS`: 20 s → 30 s. The old value was noticeably below
  the observed 25 s average on the re-enabled Domains suite; 30 s gives
  the first plan-after-re-enable a reasonable margin before the next
  full-run baseline capture organically refreshes weights.
- `timing-baseline.json`: seeded observed durations for
  `Pages/Domains.spec.ts` (47 entries, 20.1 min real) and
  `Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts`
  (6 entries, 213.8 s real) so the very next plan is accurate without
  waiting for the organic refresh.
- Tests: `test_history_includes_retry_time_and_only_preserves_explicit_skips`
  → `..._and_skipped_only_ids_fall_to_fallback` (renamed + comment
  explaining the deliberate behavior change). Same for the sibling
  `test_versioned_baseline_only_uses_zero_weight_for_skipped_ids`.
  60 planning tests pass.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
k-anshul pushed a commit to k-anshul/OpenMetadata that referenced this pull request Aug 12, 2026
…n-metadata#30814)

When a Playwright suite is re-enabled after being skipped at baseline
capture, `timing-baseline.json` keeps 0-ms skipped entries for each test
until the next full-run captures new timings. Under the old planner
(pre-open-metadata#30812) that was catastrophic (LPT dumped the suite on one shard);
under the new planner it just under-budgets the first plan after
re-enable. Either way, the misalignment goes unnoticed until a shard
times out.

Adds a 7th harness-integrity check that catches the discrepancy
directly: for every spec file whose timing-baseline entries are ALL
{outcome: skipped, durationMs: 0}, if the spec file has any live
`test(...)` calls, emit a warning naming the file and the count. The
check is intentionally cheap (regex over the spec text) and picks up
`test.skip(` correctly (a legitimately skipped case is not counted as
live). Non-blocking — a `::warning::`, not a failure — matching the
other six checks.

Running the new check locally on origin/main today flags three real
cases: `Pages/Domains.spec.ts` (47 live vs 46 skipped baseline entries),
`Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts` (6 vs 6),
and `Features/BulkImport.spec.ts` (5 vs 6). The first two are seeded in
open-metadata#30812; BulkImport was previously believed to be legitimately skipped
but the check reveals its .spec.ts has live `test(...)` calls too —
worth a follow-up refresh.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
k-anshul pushed a commit to k-anshul/OpenMetadata that referenced this pull request Aug 12, 2026
…is stale (open-metadata#30827)

* ci(playwright): fail the plan step at PR time when a spec's baseline is stale

Extends PR open-metadata#30813's soft warning into a hard PR-time gate for the exact
pattern that caused the chromium-12 SIGTERM (open-metadata#30812): a spec file where
every planned test falls through to FALLBACK_TEST_MS — no test_weights
hit, no identity_weights hit — because the baseline is stale.

Catches this at plan time, before any test runs. The merge queue never
sees the mismatch, so we don't burn a 25-minute shard wall to discover
it. Also fires on wholly-new spec files, where the author has just
written the tests and knows the durations.

Trigger:
  * A file has >= STALE_BASELINE_MIN_TESTS (5) planned tests.
  * Every one of those tests is on the fallback path.

Non-triggers (kept as warnings via emit_unweighted_warnings):
  * A file with < 5 fallback tests.
  * A file where any test carries real history — mixed coverage is
    the "someone added a couple of new tests" case, not a re-enable.
  * Identity fallback covers the file — @tag drift or renamed IDs
    still resolve, so the planner uses real weights.

Message names the file, the count, and gives three concrete fixes
(seed durations, wait for nightly refresh, or run locally). PR authors
who re-enable a suite get told what to do without having to open the
raw log.

6 new pytest cases cover the threshold, the ignore paths, and the
end-to-end SystemExit path from main(). 69 planning tests pass.

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

* address Copilot review

- Skip the stale-baseline gate in full mode. The gate blocking a
  full-mode run creates a deadlock: the run is what generates the new
  timing-history artifact that unblocks the "wait for the next full
  run" remediation. Only enforce for targeted (PR) planning; full mode
  still gets the softer emit_unweighted_warnings info.

- Prefix `::error file=...::` annotations with
  `openmetadata-ui/src/main/resources/ui/playwright/e2e/` so GitHub
  Actions resolves them relative to the repo root and the annotation
  attaches inline to the spec file in the PR checks UI.

- Rewrite the end-to-end test to use a targeted selection (matching
  what a real PR selection artifact carries) so it continues to
  exercise the gate after the full-mode exemption above. Also assert
  the full repo-relative annotation path is present.

- Add a second end-to-end test that runs the same scenario in full
  mode and confirms the gate does NOT fire — matrix.json is written
  and planning succeeds so the run can capture fresh timing evidence.

70 planning tests pass locally.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
anuj-kumary added a commit that referenced this pull request Aug 16, 2026
The plan-playwright gate hard-fails when a wholly-new spec file has
>= 5 tests with no timing history — the FALLBACK_TEST_MS reservation
(30s × 8 = 4 min) would under-budget the shard and risk a SIGTERM on
the merge queue (see PR #30812).

Add 8 entries using the real Playwright test IDs (obtained via
`playwright test --list`) and calibrated durations based on comparable
tests in PersonaAIContext.spec.ts and PersonaFlow.spec.ts. The nightly
full-mode run will replace these estimates with measured values via the
auto-refresh workflow once the spec first executes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
anuj-kumary added a commit that referenced this pull request Aug 17, 2026
…31581)

* test(playwright): add E2E coverage for Persona AI Context rule builder

Adds 11 Playwright tests covering the full rule CRUD flow, filter
validation, and individual field behaviours for the AI Context tab in
Persona settings.

The most important addition is a regression test for #31564: before
PR #31565 a fully-completed single-value condition (e.g. Description
Contains "…") was incorrectly rejected with the "unfinished condition"
error because `elasticSearchFormat` passed raw `config` instead of
`extendedConfig` to `buildEsRule`, causing widget resolution to fail
and `hasUnfinishedRule` to return true.

Tests added:
- Rule CRUD serial group: empty state, create, edit, delete
- Filter validation serial group: incomplete condition blocks save,
  regression #31564 (Description Contains allows save), entity-type
  switch clears filter, duplicate name rejected
- Rule editor fields: max-assets clamping, toggle visibility,
  knowledge entity-type forces Fully rendered on

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(playwright): fix regression test selector and add operator selection step

Live browser testing revealed two issues with the Persona AI Context
regression spec:

1. `page.locator('.rule').first()` finds the GROUP container which can
   be hidden in some builds — go directly to `.rule--field .ant-select`
   at page level instead.

2. The Description field uses `match_phrase` operators. The text widget
   (`.rule--widget--TEXT`) only renders after an operator is selected.
   Add an explicit "Contains" operator selection step so the input is
   available before we try to fill it.

Also: add `.first()` guard on the Fully rendered switch locator in the
knowledge-entity-type test (multiple elements can match) and add a note
that react-aria Switch stores state in the checked property, not
aria-checked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(playwright): address gitar-bot review findings in AI Context spec

Three issues raised in PR #31581 review:

1. `openAddRuleDrawer`: `isVisible({ timeout: 500 })` silently ignores
   the timeout and returns synchronously — replace with
   `emptyBtn.or(headerBtn).first().waitFor()` so we genuinely wait,
   then branch on `isVisible()` after the element is confirmed present.

2. `waitForTimeout(300)` sleeps after clicking add-context-condition are
   flaky: replaced with `page.locator('.rule--field .ant-select').first()
   .waitFor({ state: 'visible' })` at all three call sites.

3. Comment on the Fully rendered switch assertion said "use .isChecked()"
   but the code uses Playwright's `toBeChecked()` matcher — reworded to
   accurately describe why the property-based check is needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(playwright): merge CRUD serial tests into one test, remove serial from filter validation

CRUD tests (empty→create→edit→delete) are an inherently sequential
flow where edit and delete depend on state created by earlier steps.
Collapsing them into a single test with test.step() makes the
dependency explicit and atomic: a step failure aborts only that test
rather than silently skipping later ones via describe.serial.

Filter validation tests are each self-contained (each creates and
discards its own rule within a single test body), so describe.serial
was unnecessary. Removing it ensures a failure in the "incomplete
condition" test never prevents the regression test (#31564) from
running.

Also replace waitForTimeout(300) with waitFor({ state: 'visible' })
on the condition-row field selector to eliminate timing-based flakes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci(playwright): add impact mapping for PersonaAIContextRules spec

Adds a mapping so changes to the PersonaAIContext component tree
(src/components/Settings/Persona/PersonaAIContext/**) or PersonaAPI.ts
on a future PR automatically include the three AI Context spec files
in the CI plan rather than falling through to an unmapped-file warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci(playwright): seed timing-baseline.json for PersonaAIContextRules spec

The plan-playwright gate hard-fails when a wholly-new spec file has
>= 5 tests with no timing history — the FALLBACK_TEST_MS reservation
(30s × 8 = 4 min) would under-budget the shard and risk a SIGTERM on
the merge queue (see PR #30812).

Add 8 entries using the real Playwright test IDs (obtained via
`playwright test --list`) and calibrated durations based on comparable
tests in PersonaAIContext.spec.ts and PersonaFlow.spec.ts. The nightly
full-mode run will replace these estimates with measured values via the
auto-refresh workflow once the spec first executes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(playwright): address gitar-bot/greptile PR comments for PersonaAIContextRules spec

- Wrap all tests in test.describe.serial: shared PersonaClass instance running
  under fullyParallel:true caused the CRUD "empty state" assertion to race against
  filter/editor tests concurrently creating rules on the same persona
- Move beforeAll/afterAll inside the serial describe using test.beforeAll/test.afterAll
  (not base.beforeAll), matching the pattern in PersonaAIContext.spec.ts
- Remove test.slow(true) from both hooks — Playwright throws "can only be called
  inside test" when used in beforeAll/afterAll
- Remove two redundant // Cleanup inline comments (greptile P2) that just restated
  the next line of code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci(playwright): refresh PersonaAIContextRules test IDs in timing-baseline.json

The describe.serial wrapper added in the previous commit changed all 8
test-ID hashes for PersonaAIContextRules.spec.ts (test ID is computed
from the full describe-path, so wrapping the suite in an outer
describe.serial changes every hash). The plan-playwright gate hard-fails
when every test in a file >= 5 tests falls through to FALLBACK_TEST_MS
with no timing history.

Surgically replace the 8 stale IDs with the IDs from the current structure
obtained via `npx playwright test --list --reporter=json`. File and title
fields are unchanged; only the `"id"` values are updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: retrigger plan-playwright after timing-baseline refresh

The previous CI run used a merge commit that predated the timing-baseline
ID refresh in 7fa030d. Force a new run against the updated merge commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(plan-playwright): always include timing-baseline.json alongside history artifacts

The stale-baseline gate fires when all tests in a new spec file have no
timing history. Previously, timing-baseline.json was only used as a
fallback when NO history artifacts were downloaded from recent CI runs.
Once any artifact existed (typical for an active repo), the baseline was
skipped entirely — so seeding a new spec's durations into the baseline had
no effect and the gate would always fire for newly-added spec files.

Fix: unconditionally append --history timing-baseline.json so it is always
consulted alongside downloaded artifacts. When artifacts exist the baseline
acts as a supplemental seed for new specs not yet in any full-run artifact;
when no artifacts were downloaded it remains the sole source.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Revert "fix(plan-playwright): always include timing-baseline.json alongside history artifacts"

This reverts commit 25613c8.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 31cca94)
anuj-kumary added a commit to anuj-kumary/OpenMetadata that referenced this pull request Aug 17, 2026
…pen-metadata#31581)

* test(playwright): add E2E coverage for Persona AI Context rule builder

Adds 11 Playwright tests covering the full rule CRUD flow, filter
validation, and individual field behaviours for the AI Context tab in
Persona settings.

The most important addition is a regression test for open-metadata#31564: before
PR open-metadata#31565 a fully-completed single-value condition (e.g. Description
Contains "…") was incorrectly rejected with the "unfinished condition"
error because `elasticSearchFormat` passed raw `config` instead of
`extendedConfig` to `buildEsRule`, causing widget resolution to fail
and `hasUnfinishedRule` to return true.

Tests added:
- Rule CRUD serial group: empty state, create, edit, delete
- Filter validation serial group: incomplete condition blocks save,
  regression open-metadata#31564 (Description Contains allows save), entity-type
  switch clears filter, duplicate name rejected
- Rule editor fields: max-assets clamping, toggle visibility,
  knowledge entity-type forces Fully rendered on

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(playwright): fix regression test selector and add operator selection step

Live browser testing revealed two issues with the Persona AI Context
regression spec:

1. `page.locator('.rule').first()` finds the GROUP container which can
   be hidden in some builds — go directly to `.rule--field .ant-select`
   at page level instead.

2. The Description field uses `match_phrase` operators. The text widget
   (`.rule--widget--TEXT`) only renders after an operator is selected.
   Add an explicit "Contains" operator selection step so the input is
   available before we try to fill it.

Also: add `.first()` guard on the Fully rendered switch locator in the
knowledge-entity-type test (multiple elements can match) and add a note
that react-aria Switch stores state in the checked property, not
aria-checked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(playwright): address gitar-bot review findings in AI Context spec

Three issues raised in PR open-metadata#31581 review:

1. `openAddRuleDrawer`: `isVisible({ timeout: 500 })` silently ignores
   the timeout and returns synchronously — replace with
   `emptyBtn.or(headerBtn).first().waitFor()` so we genuinely wait,
   then branch on `isVisible()` after the element is confirmed present.

2. `waitForTimeout(300)` sleeps after clicking add-context-condition are
   flaky: replaced with `page.locator('.rule--field .ant-select').first()
   .waitFor({ state: 'visible' })` at all three call sites.

3. Comment on the Fully rendered switch assertion said "use .isChecked()"
   but the code uses Playwright's `toBeChecked()` matcher — reworded to
   accurately describe why the property-based check is needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(playwright): merge CRUD serial tests into one test, remove serial from filter validation

CRUD tests (empty→create→edit→delete) are an inherently sequential
flow where edit and delete depend on state created by earlier steps.
Collapsing them into a single test with test.step() makes the
dependency explicit and atomic: a step failure aborts only that test
rather than silently skipping later ones via describe.serial.

Filter validation tests are each self-contained (each creates and
discards its own rule within a single test body), so describe.serial
was unnecessary. Removing it ensures a failure in the "incomplete
condition" test never prevents the regression test (open-metadata#31564) from
running.

Also replace waitForTimeout(300) with waitFor({ state: 'visible' })
on the condition-row field selector to eliminate timing-based flakes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci(playwright): add impact mapping for PersonaAIContextRules spec

Adds a mapping so changes to the PersonaAIContext component tree
(src/components/Settings/Persona/PersonaAIContext/**) or PersonaAPI.ts
on a future PR automatically include the three AI Context spec files
in the CI plan rather than falling through to an unmapped-file warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci(playwright): seed timing-baseline.json for PersonaAIContextRules spec

The plan-playwright gate hard-fails when a wholly-new spec file has
>= 5 tests with no timing history — the FALLBACK_TEST_MS reservation
(30s × 8 = 4 min) would under-budget the shard and risk a SIGTERM on
the merge queue (see PR open-metadata#30812).

Add 8 entries using the real Playwright test IDs (obtained via
`playwright test --list`) and calibrated durations based on comparable
tests in PersonaAIContext.spec.ts and PersonaFlow.spec.ts. The nightly
full-mode run will replace these estimates with measured values via the
auto-refresh workflow once the spec first executes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(playwright): address gitar-bot/greptile PR comments for PersonaAIContextRules spec

- Wrap all tests in test.describe.serial: shared PersonaClass instance running
  under fullyParallel:true caused the CRUD "empty state" assertion to race against
  filter/editor tests concurrently creating rules on the same persona
- Move beforeAll/afterAll inside the serial describe using test.beforeAll/test.afterAll
  (not base.beforeAll), matching the pattern in PersonaAIContext.spec.ts
- Remove test.slow(true) from both hooks — Playwright throws "can only be called
  inside test" when used in beforeAll/afterAll
- Remove two redundant // Cleanup inline comments (greptile P2) that just restated
  the next line of code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci(playwright): refresh PersonaAIContextRules test IDs in timing-baseline.json

The describe.serial wrapper added in the previous commit changed all 8
test-ID hashes for PersonaAIContextRules.spec.ts (test ID is computed
from the full describe-path, so wrapping the suite in an outer
describe.serial changes every hash). The plan-playwright gate hard-fails
when every test in a file >= 5 tests falls through to FALLBACK_TEST_MS
with no timing history.

Surgically replace the 8 stale IDs with the IDs from the current structure
obtained via `npx playwright test --list --reporter=json`. File and title
fields are unchanged; only the `"id"` values are updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: retrigger plan-playwright after timing-baseline refresh

The previous CI run used a merge commit that predated the timing-baseline
ID refresh in 7fa030d. Force a new run against the updated merge commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(plan-playwright): always include timing-baseline.json alongside history artifacts

The stale-baseline gate fires when all tests in a new spec file have no
timing history. Previously, timing-baseline.json was only used as a
fallback when NO history artifacts were downloaded from recent CI runs.
Once any artifact existed (typical for an active repo), the baseline was
skipped entirely — so seeding a new spec's durations into the baseline had
no effect and the gate would always fire for newly-added spec files.

Fix: unconditionally append --history timing-baseline.json so it is always
consulted alongside downloaded artifacts. When artifacts exist the baseline
acts as a supplemental seed for new specs not yet in any full-run artifact;
when no artifacts were downloaded it remains the sole source.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Revert "fix(plan-playwright): always include timing-baseline.json alongside history artifacts"

This reverts commit 25613c8.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
ShaileshParmar11 added a commit to TeddyCr/OpenMetadata that referenced this pull request Aug 26, 2026
…uality lane and seed its timings

The spec sat directly under `playwright/e2e/Features/`, where no
impact-map mapping covers it — it ran on this PR only because it was a
directly changed file, and would have gone dark for every later change
to the components it guards. Under `Features/DataQuality/` it is matched
by the existing DataQuality mapping, whose `sources` already list
`src/components/DataQuality/**` — the two components changed here — so
edits to either re-select it without another map entry. The file has no
relative imports, so the move is path-neutral.

`plan-playwright` also hard-failed on this PR (run 32933633223): all
seven of the file's tests fell through to FALLBACK_TEST_MS with no entry
in `timing-baseline.json`, tripping the stale-baseline gate added in
open-metadata#30812. With the plan step dead the whole shard matrix was skipped, so
`playwright-ci` never ran a single test. Seeding the durations clears
the gate and gets the tests executing in the PR check instead of
surfacing for the first time on the merge queue.

The seeded durations are ~2x the slowest of three local runs against
this branch's own UI, where all seven passed (81s measured -> 177s
seeded). The buffer covers a hosted runner's slower CPU, three workers
contending, and a cold bundle; the total still sits under the 210s the
planner would have reserved via FALLBACK_TEST_MS, and per-test values
land in the same 21-31s band as that fallback, so the plan is no more
optimistic than the planner's own default guess for an unmeasured test.
`leaves a short severity label ... collapsed` is budgeted at its
describe-block sibling's cold cost rather than the 2975 ms it measured
warm as the second test scheduled in that worker. The first full-mode
run replaces all seven via refresh_timing_baseline.py.

`origin/main` is merged in so the seeding applies on top of the baseline
auto-refresh from open-metadata#31914. The file is a single JSON line, so any drift
between the branch point and main resolves as a whole-line conflict.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ShaileshParmar11 added a commit to ShaileshParmar11/OpenMetadata that referenced this pull request Aug 26, 2026
…annot push the Assignee column off screen (open-metadata#31898)

* fix(ui): stop a long severity translation pushing the Assignee column off screen

Fixes open-metadata#30522.

The inline severity/status chip carried `max-w-max` + `whitespace-nowrap`, so in
an auto-layout table its intrinsic width was the column's floor — the column grew
to whatever the translation needed, with no bound.

In ru-RU the severity placeholder composes `label.no-entity` with `label.severity`
into "Критичность инцидента отсутствует": 208px of text against 67px for English
"No Severity". Measured on /incident-manager at 1440x900 with unassigned rows, the
chip rendered 254px wide, the Severity column 306px (194px in en-US) and the table
1256px inside a 1178px scroll container — so the Assignee column sat at x=1508 and
was cut off at the right edge. At 1280 the column and its header were gone entirely.

The chip is now capped at 11rem and the label truncates inside it, with `title`
surfacing the full string on hover. Truncation is visual only: the text stays in
the DOM, so the button's accessible name is unchanged.

11rem is measured, not guessed. It leaves 140px of text room, which clears the
longest translated *status* label in any of the 20 shipped locales (131px, ru-RU
"Назначен исполнитель"), so the two status-chip call sites — the Incident Manager
Status column and the Data Quality tab — do not start truncating. English is
unchanged at the pixel: the chip measures 103px before and after, so the visual
regression snapshots are unaffected.

ru-RU at 1440 now lays out at 1178px, identical to English, with zero horizontal
overflow and the Assignee column fully on screen.

Note this is not the mechanism the 1.13.1 report described. That screenshot came
from an antd Table whose Severity column was pinned at `width: 100`, which made
the string overlap its neighbour; that table was replaced by the ui-core-components
Table in 8570d36 / 2c90c83, which has no per-column width. What survived the
migration is column inflation, not overlap.

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

* test(ui): cover the incident table's ru-RU layout with measured geometry

Fixes open-metadata#30522.

The regression this guards is a layout one, so the assertions are geometric:
boundingBox widths and scrollWidth/clientWidth, never a class name. Asserting
`toHaveClass('tw:truncate')` would pass just as happily with the column still
overflowing.

Three cases, all verified RED against the unfixed chip:

- the Assignee cell's right edge stays inside the 1440px viewport
  (was 1508px);
- the ru-RU severity pill is capped (was 254px), paired with an en-US control
  asserting a short label is still *not* clipped, so a cap that started
  ellipsising labels that already fit would fail too;
- the truncated label is genuinely clipped (scrollWidth > clientWidth), exposes
  the full string via `title`, and keeps it in the button's accessible name.

Rows are route-mocked so the geometry depends on string length rather than on
whatever the environment happens to have ingested, and the helper waits on
`document.fonts.ready` — fallback font metrics shift column widths by a few px
and made the measurements flaky without it.

This establishes the ru-RU pattern; LanguageOverride.spec.ts (de-DE) was the only
other non-English spec in the repo. Note the visual regression suite cannot cover
this: staticPages.spec.ts masks the incident table outright.

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

* fix(ui): make the chip label cap opt-in so status chips stay unbounded

Follow-up to review on open-metadata#30522. The cap was applied to the shared CHIP_PILL_CLASS,
which put the *status* chip 3.3px from truncating.

The 176px budget was derived from an off-DOM probe span that under-reports
Cyrillic by ~6px, because Inter's `unicode-range` subset is not active for a probe
that never paints those glyphs. Measured in-DOM on the rendered chip, ru-RU
"Назначен исполнитель" (Assigned) is a 136.7px label in a 172.7px pill, not the
130.2px the probe reported. Any retranslation, a fifth resolution status, or a
typography-token change would have silently rendered "Назначен исполнит…" in the
Incident Manager's primary column — a worse regression than the bug being fixed.

A single shared constant cannot serve both columns. Measured by overriding
max-width on the live pill, ru-RU at 1440x900:

  cap    pill   sevCol  table   overflow  assignee right edge
  none   254px  306px   1263px  85px      1508px  (off screen)
  176px  176px  228px   1185px   7px      1430px  (on screen)
  192px  192px  244px   1201px  23px      1446px  (off screen again)

192px is the smallest cap with real headroom over the 172.7px status pill, and it
re-inflates the severity column by 16px and reinstates the bug. So the constraint
is per-call-site: `truncateLabel` is opt-in and only severity uses it. Status keeps
`max-w-max` and can no longer truncate by construction, which is a stronger
guarantee than a threshold test.

176px still sits above every non-Russian severity pill (widest 168.6px, pt-BR) and
below the Russian one, so exactly one locale truncates — the pathological one.

The pill also gains its own `-pill` testid: react-aria's Button wraps children in
an unstyled span.transition-inherit-all, so a positional `chip > span` locator
measures that wrapper instead.

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

* test(ui): target the real pill, fail fast, and guard status chips

Follow-up to review on open-metadata#30522.

- The pill assertion measured react-aria's `span.transition-inherit-all` wrapper,
  not the capped pill. It shrink-wraps to the same width today, so the test passed
  while measuring the wrong box and would have kept passing if the library ever
  added padding there. Addressed by its own testid now.

- Test 2 asserts the severity `<td>` width before the pill width. The cell exists
  in both versions, so the RED is a real measurement (306px against a 240px
  budget) rather than a missing-testid error; the pill assertion then pins which
  box does the bounding.

- Tests 3 and 4 assert `toBeVisible()` before measuring. `.evaluate()` on a
  missing locator never rejects, so without the fix they hung for 135s (tripled by
  test.slow) and reported "Target page has been closed". They now fail in 16.7s
  on the real assertion.

- New guard: status chips must never truncate, exercised against all four
  resolution statuses in ru-RU where their labels are longest. This does not
  reproduce the bug — status is unbounded before and after — it guards the
  decision that the cap stays off the shared chip.

The status fixture is deliberately separate from the reported-scenario fixture: in
ru-RU an "Assigned" incident renders a 172.7px status pill and widens the Status
column by ~98px, which would confound the severity geometry assertions. That is
its own width contributor and is disclosed rather than fixed — the headline test
is scoped to the reported all-New scenario and says so.

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

* fix(ui): correct the chip-bound rationale and gate the tooltip on the bound

Follow-up to round-2 review on open-metadata#30522. Two corrections, one of them to a claim
this branch asserted as established fact.

**The "forced choice" justification was wrong.** The previous comment said a
shared cap safe for the status column "needs >= ~192px". It does not: the widest
status pill is 172.7px (ru-RU "Назначен исполнитель") and 176 > 172.7, so a
shared 176px cap is already safe today. Measured cap sweep on the live pill,
ru-RU at 1440x900 with the nav expanded:

  cap    severity td  assignee right edge
  176px  228          1430  on screen
  180px  232          1434  on screen
  184px  236          1438  on screen
  188px  240          1442  off screen
  192px  244          1446  off screen

Any cap in [173, 184] satisfies both columns, so opt-in is a preference, not a
necessity. The real argument — now the one in the code — is that the band is 11px
wide and Tailwind's scale offers exactly one step inside it, and that a shared cap
would leave status 3.3px of headroom where opt-in leaves it unbounded. Robustness,
honestly labelled.

**`title` and `truncate` were applied unconditionally**, so every status chip and
every already-fitting chip advertised a native tooltip repeating its own visible
text. Both are now gated on the bound.

`truncateLabel` becomes `maxLabelWidth?: string`, which drops the 4th boolean and
puts the value where it belongs: the budget is a property of the column, so the
severity column now owns its own constant and its derivation.

Status chips keep max-content sizing and gain no tooltip; their DOM gains one
inert span wrapper, which is what makes the status guard test measurable.

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

* test(ui): pin the left nav, and bound the chip rather than its column

Follow-up to round-2 review on open-metadata#30522. The spec was passing for the wrong reason
and failing on this branch.

**It failed as committed.** `severity <td> <= 240px` is not a chip bound — it
asserts how CSS auto-layout hands out *surplus* container width. The same
correctly-capped 176px pill yields a 228px column with the nav expanded and 266px
with it collapsed, so the assertion failed whenever the nav was collapsed. It is
replaced by a bound on the chip button, which measures 258px unbounded and 180px
capped in both states, and the case now runs against both.

**The headline test was a false GREEN.** `isSidebarCollapsed` is persisted in
localStorage per user, so it rides inside the saved storageState and varies by
machine. It moves the table's container between 1178px (expanded) and 1334px
(collapsed), and at 1334px the *unfixed* layout already fits — assignee edge
1423px, zero overflow. A run with a collapsed nav therefore passed against
b4a27e7 without the fix present.

The nav is now pinned explicitly, defaulting to expanded (the product default,
`defaultPreferences.isSidebarCollapsed: false`), and the container width is
asserted as a precondition so a layout change that moves it fails loudly instead
of quietly changing what the geometry means.

Pinning waits on the sidebar's settled offsetWidth rather than its `sidebar-open`
class: the class flips synchronously with the preference while the Sider
animates, so a class-based wait returns mid-transition and the container reads
1329px instead of 1178px.

Verified RED under the pinned condition: 1508 > 1440 for the assignee edge, and
258 > 182 for the chip in both nav states.

Also asserts status labels carry no `title`, matching the tooltip gating.

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

* refactor(ui): drop the dead pill testid and name the chip bound for what it bounds

Follow-up to round-3 review on open-metadata#30522. Both are cleanups; neither changes layout.

**Dead test hook.** `data-testid="${dataTestId}-pill"` was added in round 2 to
target the pill directly, then made redundant in round 3 when the assertion moved
to the chip button (the button is the element that exists in both the fixed and
unfixed trees, which is what gives that test a real geometric RED). Nothing
referenced it — not the Jest suite, not the new spec, not any existing test — so
it was shipping an unused hook into production DOM. Removed.

**`maxLabelWidth` -> `maxChipWidth`.** The class lands on the pill, not the label:
the pill also carries 16px of horizontal padding, 2px of border, a 2px gap and a
16px chevron. `tw:max-w-44` (176px) therefore leaves the label 140px, and the
button around it measures 180px. The old name invited a future caller to size the
prop from a measured text width and come out ~36px short — the same
measure-the-wrong-thing mistake that cost this branch two review rounds. The
JSDoc now states the chrome breakdown explicitly.

Removing the attribute changes rendered DOM, so the Playwright spec was re-run:
5 passed. Jest 102 suites / 1305 tests pass; tsc unchanged at its 549-error
baseline.

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

* test(ui): build the incident-locale fixtures with test.use and beforeEach

Review feedback: the bespoke `base.extend` fixture stood up its own
BrowserContext per call, which is both more setup than this spec needs and
more surface to go flaky on. The admin session is one `test.use` line, and
routing + navigation belong in `beforeEach`.

Locale can then be declared per describe rather than threaded through a
fixture argument, so the ru-RU and en-US assertions split into their own
blocks — which also removes the one test that drove two pages at once. The
status guard gets its own block for the same reason: its fixture rows differ,
so it no longer has to re-navigate over the default ones.

`test.slow` is dropped everywhere. Each case now loads a single page and
measures it; the whole file runs in ~18s against the default 60s timeout.

Behaviour is unchanged: 14/14 at --repeat-each=2, and with the bound removed
the same four cases still fail RED (chip 258px vs <= 182px, label overflow 0
vs > 0, assignee edge off screen).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXvtzE39do8yqojYWGKTaX

* refactor(ui): compose the chip pill classes with classNames

Review feedback on the template literal. The palette classes move to their own
constant so the call reads as three named parts rather than an interpolation
split across lines.

The label's conditional class stays a ternary on purpose: it resolves to
`undefined` so an unbounded chip carries no `class` attribute at all, where
classNames would leave an empty one.

Also collapses the `label.no-entity`/`label.severity` composition in
InlineSeverity into one local — it was rendered three times, which is the
sonarjs/no-duplicate-string warning CI reported on this PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXvtzE39do8yqojYWGKTaX

* test(playwright): route IncidentManagerLocaleLayout through the DataQuality lane and seed its timings

The spec sat directly under `playwright/e2e/Features/`, where no
impact-map mapping covers it — it ran on this PR only because it was a
directly changed file, and would have gone dark for every later change
to the components it guards. Under `Features/DataQuality/` it is matched
by the existing DataQuality mapping, whose `sources` already list
`src/components/DataQuality/**` — the two components changed here — so
edits to either re-select it without another map entry. The file has no
relative imports, so the move is path-neutral.

`plan-playwright` also hard-failed on this PR (run 32933633223): all
seven of the file's tests fell through to FALLBACK_TEST_MS with no entry
in `timing-baseline.json`, tripping the stale-baseline gate added in
open-metadata#30812. With the plan step dead the whole shard matrix was skipped, so
`playwright-ci` never ran a single test. Seeding the durations clears
the gate and gets the tests executing in the PR check instead of
surfacing for the first time on the merge queue.

The seeded durations are ~2x the slowest of three local runs against
this branch's own UI, where all seven passed (81s measured -> 177s
seeded). The buffer covers a hosted runner's slower CPU, three workers
contending, and a cold bundle; the total still sits under the 210s the
planner would have reserved via FALLBACK_TEST_MS, and per-test values
land in the same 21-31s band as that fallback, so the plan is no more
optimistic than the planner's own default guess for an unmeasured test.
`leaves a short severity label ... collapsed` is budgeted at its
describe-block sibling's cold cost rather than the 2975 ms it measured
warm as the second test scheduled in that worker. The first full-mode
run replaces all seven via refresh_timing_baseline.py.

`origin/main` is merged in so the seeding applies on top of the baseline
auto-refresh from open-metadata#31914. The file is a single JSON line, so any drift
between the branch point and main resolves as a whole-line conflict.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(ci): fold the checked-in timing baseline in at lowest precedence

The plan step passes one `--history` per downloaded full-run artifact and
falls back to `.github/playwright/timing-baseline.json` only when *no*
artifact could be downloaded:

    if [[ ${#history_args[@]} -eq 0 ]]; then
      history_args=(--history .github/playwright/timing-baseline.json)
    fi

`gh run download` prints nothing on success, so a run that logs 49
failures across its 50 candidates still downloaded one artifact — and
that one non-empty `history_args` drops the checked-in baseline
entirely. A newly added spec file is in the baseline (its author seeds
the durations there, exactly as the stale-baseline gate's own error text
instructs) but in no artifact yet, so its seeded timings were discarded
and the gate fired on a file that does have history. Runs 32933633223
and 32937328644 both failed this way on PR open-metadata#31898; the artifact they
used, from run 32653484382, carries 4504 tests and none of the new file's.

The effect is that a brand-new spec file is unseedable whenever any full
history artifact is available, which is most of the time.

Fold the baseline in after the passed histories and merge it with
setdefault, so an artifact weight always wins where one exists and the
baseline only backfills tests no artifact has ever observed. Replaying
run 32937328644's own selection with only its artifact as history: the
planner exits 1 before this change and 0 after, and planning that same
selection minus the new spec produces byte-identical shard plans either
way, so nothing the artifacts already cover moves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test(playwright): address the incident rows by name instead of by position

Every severity assertion in this spec reached its element positionally,
which is a strict-mode escape hatch rather than a locator: it resolves to
whichever chip the DOM happens to order first and keeps passing if the
row under test stops rendering one at all. The fixtures already give each
row a unique test-case name, so scope to `pw_locale_incident_0` — the row
deliberately built without a `severity`, which is what makes it render
the "No Severity" placeholder these assertions measure. Each locator now
resolves to exactly one element, and strict mode enforces that rather
than the test silently measuring a neighbour.

The status-chip guard kept a positional visibility check purely as a wait
before `toHaveCount`, which already retries on its own. Drop it and
assert the layout instead: a label that never laid out measures 0/0,
which the clipping check below would read as "not clipped", so the widths
are now established before anything is concluded from them.

Titles and file path are untouched, so the seeded timing-baseline entries
still key correctly — re-running discovery returns the same seven stable
IDs. All seven pass locally against the branch's own UI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com>
ShaileshParmar11 added a commit that referenced this pull request Sep 15, 2026
`plan-playwright` hard-fails when every planned test in a spec file has no
entry in `timing-baseline.json`: each one falls through to FALLBACK_TEST_MS,
the planner under-budgets the shard, and the merge-queue wrapper times out
(the chromium-12 SIGTERM in #30812). `TestCaseDetailsPage.spec.ts` had zero
entries — it is new to main as of #32966, and that PR planned in full mode,
where the gate is deliberately skipped. Now that the impact map routes the
spec, planning is targeted and the gate applies.

Seeded via the remedy the gate itself prescribes for a wholly-new spec file:
ran it locally against a live stack, all five tests passing, and copied the
observed durations with `outcome: expected`.

Durations come from a Vite dev server rather than a production build, so they
run slower than CI will. That biases the planner towards over-budgeting the
shard, which is the safe direction for a gate that exists to catch
under-budgeting.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
harshach pushed a commit to Automattic/OpenMetadata that referenced this pull request Sep 15, 2026
…ata#33110)

* feat(dq): move the test case configuration into the right rail card

TCD-10a. The parameters and the assertion SQL were the last two blocks the
redesign wants in the rail and TCD-0 left in the main column. The existing
layout could not fit the rail: `.parameter-label` sets `min-width: 200px` and
rows are chunked two-up inside a 12-column sub-grid, so each half-cell is
~140px and the *label* overflows before any value does. That is why the ticket
says redesign rather than relocate.

The card follows the prototype: one row per parameter, label left and value
right, the value truncating with a tooltip so a long `tableDiff` `table2`
degrades instead of forcing width. The prototype's four shapes are independent
`sc-if` blocks, not a switch — a custom-SQL test shows parameters *and* SQL —
so `getConfigurationShapes` returns one flag per section with `isEmpty` as the
"nothing at all" fallback. The version page keeps its parameter diff and
suppresses the assertion SQL, which has no diff rendering.

The SQL block is rendered directly rather than through `SchemaEditor`: the
prototype highlights keyword-vs-plain only, a keyword set rather than a parser,
so the bespoke block is less code than CodeMirror and keeps a lazy editor chunk
out of a rail rendering three static lines. `toSqlLines` keeps the separators
and each token's column offset, so text round-trips byte-for-byte and the
offset doubles as a stable render key.

The rail moves from `col-span-3` to `col-span-4`. Measured at a 1280px
viewport it was 205px, not the ~315px assumed in the ticket discussion — that
figure only holds near 1920px — against the prototype's fixed 320px. That is
where the wrapping and the clipped SQL came from. At `col-span-4` the rail is
276px and nothing wraps.

The per-SQL-param pencil merges into the single header pencil the prototype
shows, and `parameterItems` goes away — it baked the dynamic-assertion badge
into a parameter row, which the card now renders as its own callout. Colours
map to semantic tokens, so the card gets dark mode.

The collapse toggle is kept per the epic's Sep 8 decision, so collapsing the
rail now also hides the configuration; that trade is asserted in a test and
flagged for product on open-metadata#6116. Also fixes the mock store's `isTabExpanded`
default, which was `false` while `useTestCase.store` defaults to `true` —
several tests only passed because the rail was absent.

Replanted onto main after open-metadata#32966 was squash-merged: this is the branch's net
change over the squashed base, byte-identical to the previously verified tip
(ec115e3) for every file it touches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore(playwright): refresh impact-map.generated.json

Regenerated for the configuration card's specs on the replanted branch, so the
drift workflow has nothing to push after the force-push.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore(playwright): seed timing baseline for the details-page spec

`plan-playwright` hard-fails when every planned test in a spec file has no
entry in `timing-baseline.json`: each one falls through to FALLBACK_TEST_MS,
the planner under-budgets the shard, and the merge-queue wrapper times out
(the chromium-12 SIGTERM in open-metadata#30812). `TestCaseDetailsPage.spec.ts` had zero
entries — it is new to main as of open-metadata#32966, and that PR planned in full mode,
where the gate is deliberately skipped. Now that the impact map routes the
spec, planning is targeted and the gate applies.

Seeded via the remedy the gate itself prescribes for a wholly-new spec file:
ran it locally against a live stack, all five tests passing, and copied the
observed durations with `outcome: expected`.

Durations come from a Vite dev server rather than a production build, so they
run slower than CI will. That biases the planner towards over-budgeting the
shard, which is the safe direction for a gate that exists to catch
under-budgeting.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(dq): let long parameter values wrap instead of being clipped

The value was wrapped in `Tooltip`, whose trigger renders as a `w-max`
`<button>`. max-content sizing means it cannot shrink below the full string, so
the row overflowed its container and the card's `overflow-hidden` cut the value
off — a `tableDiff` test's `table2` fully-qualified name lost its tail. The
inner `truncate` never engaged, because its parent was already max-content wide;
the ellipsis it promised could not happen.

Dropping the tooltip and letting the value wrap keeps the whole value readable,
which matters more here than one-line rows: the part that distinguishes one
table from another is the end of the FQN, exactly what was being cut. The
`break-words` breaks the FQN itself, which has no spaces to break at.

It also stops wrapping a non-interactive value in a focusable `<button>`.

Measured on the details page at a 1440px viewport: the value occupies two lines
and the row no longer overflows (scrollWidth == clientWidth).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(dq): restore the configuration card's vertical rhythm

The card set `tw:mb-0.5` on the test-definition name and `tw:mb-3` on the
category line, but both render through `Typography`, which wraps its content in
a `.prose` container. Prose's own rules win over utility margins set on the
element inside it, so both computed to 0: the category sat flush against the
parameters box instead of the prototype's 12px, and the name/category pair had
no separation at all.

Moving the spacing onto a plain wrapper — which prose does not style — restores
it. Measured on the details page at 1440px: name→category 2px (prototype 3),
category→box 12px (prototype 12, previously 0).

The remaining 1px deltas are the deliberate Tailwind-scale snapping already
noted on this PR (px-4 for 15px, py-2.5 for 9px, gap-0.5 for 3px).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* style(dq): align the dynamic-assertion callout with the prototype

Four measured adjustments to the callout, from comparing the rendered card
against the prototype's markup:

* Gap 12px to 10px. `Box`'s `gap` prop only accepts integers, so the exact
  value comes from `tw:gap-2.5` on the class instead.
* The supporting line gains the prototype's 1px top offset.
* The supporting line moves from `utility-blue-600` to `utility-blue-700/80`.
  The prototype uses #3E7BC2, which is not on the palette (blue-600 #1570EF,
  blue-700 #175CD3) — blue-600 reads too vivid beside it. The 80% blend lands
  within ~26 RGB units rather than ~62 and keeps the supporting line lighter
  than the title, as the prototype has it. Opacity rather than a raw hex so the
  token still flips for dark mode.
* The icon takes the title's colour. This one is a deliberate deviation: the
  prototype fills the glyph with blue-600 against a blue-700 title, but the
  callout reads better as a single colour family.

The icon glyph itself is unchanged and still differs from the prototype — that
is a separate decision, since the asset is the app's AI-suggestion icon used in
14 places and the design system ships no sparkle.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
harsh-vador added a commit that referenced this pull request Sep 16, 2026
The plan-playwright gate fails this PR because all 10 planned tests in
Features/AIMode/CustomPropertiesPanel.spec.ts have no timing history (the
spec was added in #33062 / re-gated in #33280 after the current baseline's
source run). Seed the observed durations from the successful run 35006649519
(PR #33280 head), taken from its playwright-timings artifacts: stable IDs
match `playwright test --list` on this branch, outcome expected, real
durationMs — the #30812 pattern the gate message prescribes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chronillogical-Potato pushed a commit to Chronillogical-Potato/OpenMetadata that referenced this pull request Sep 16, 2026
…get + phantom login-wait cleanup (open-metadata#33412)

* fix(e2e): give 'Create a new public team' its measured budget; stop the login race leaking a phantom wait

Nightly run 35066461002 (mysql) failed Teams.spec 'Create a new public team'
with 'Test timeout of 60000ms exceeded' on all three attempts. Trace analysis
showed the test was never stuck: login resolved in ~2.6s and the test body ran
to completion pace — it simply measured 66-84s against the 60s default budget,
with loader waits of 9-25s stacking up under nightly load. test.slow() gives
it the 3x budget the handbook prescribes for multi-API UI flows.

The trace also showed a giant red 78s 'Wait for selector #email' that pointed
at a login stall which never happened: authenticateAdminPage raced '#email'
against 'left-sidebar', and Promise.race leaves the losing waitFor running
until it times out, surfacing as misleading unhandled-rejection noise in every
trace of a slow test. Promise.any consumes the loser; behavior is otherwise
identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(playwright): seed timing baseline for CustomPropertiesPanel spec

The plan-playwright gate fails this PR because all 10 planned tests in
Features/AIMode/CustomPropertiesPanel.spec.ts have no timing history (the
spec was added in open-metadata#33062 / re-gated in open-metadata#33280 after the current baseline's
source run). Seed the observed durations from the successful run 35006649519
(PR open-metadata#33280 head), taken from its playwright-timings artifacts: stable IDs
match `playwright test --list` on this branch, outcome expected, real
durationMs — the open-metadata#30812 pattern the gate message prescribes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
ShaileshParmar11 added a commit that referenced this pull request Sep 21, 2026
plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (#30812). The
seven newly-moved files had no history at all, so Observability (17),
TestCaseBreadcrumb (6) and TestCaseEdit (5) tripped the >=5-test hard
fail and the rest warned.

Durations are real, not estimates: captured from a local
`--project=chromium --workers=1 --reporter=json` run against a live
stack, in which all 39 of these tests passed. Only passing results are
recorded, with outcome: expected.
ShaileshParmar11 added a commit that referenced this pull request Sep 21, 2026
plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (#30812). The
seven newly-moved files had no history at all, so Observability (17),
TestCaseBreadcrumb (6) and TestCaseEdit (5) tripped the >=5-test hard
fail and the rest warned.

Durations are real, not estimates: captured from a local
`--project=chromium --workers=1 --reporter=json` run against a live
stack, in which all 39 of these tests passed. Only passing results are
recorded, with outcome: expected.
timothybrush pushed a commit to timothybrush/OpenMetadata that referenced this pull request Sep 22, 2026
…rom Collate to OSS (open-metadata#33683)

* test(ui): move the AI-mode observability e2e suite from Collate to OSS

The AI shell and the observability module live in OSS since open-metadata#31911, and
open-metadata#33502 moved the /observability link prefixing there too, so the e2e
coverage for those pages belongs in OSS rather than collate-ui.

Seven specs move into playwright/e2e/Features/AIMode/, alongside the
CustomPropertiesPanel spec migrated earlier. Their imports already
pointed almost entirely at the OSS tree, so the move is mostly dropping
the src/openmetadata-ui/playwright/ prefix.

Two helpers the specs needed come across into e2e/Utils/appMode.ts:
redirectToAiModeHomePage and expandAiSubPanel. Both shed their
AskCollate-only parts — the chat query-cache clear and the
chatConversations bootstrap wait — and ObservabilityPermissions now
waits on the ask-sidebar to confirm the shell booted instead.

Pipeline observability pages are still Collate-only (observability.module
routes them through the app-mode fallback), so those blocks stay behind:
the whole Pipeline describe in ClickPaths, the Pipeline page-rendering
and breadcrumb rows, and the pipeline detail-URL test.

OSS's playwright guardrails are stricter than Collate's, and the
suppressions baseline may not grow, so the positional locators that came
across carry justified inline disables naming why the position is the
assertion. One Buffer.compare became a base64 comparison, which this
repo's @types/node accepts.

* chore(playwright): auto-refresh impact-map.generated.json

* test(ui): seed timing-baseline for the moved AI-mode observability specs

plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (open-metadata#30812). The
seven newly-moved files had no history at all, so Observability (17),
TestCaseBreadcrumb (6) and TestCaseEdit (5) tripped the >=5-test hard
fail and the rest warned.

Durations are real, not estimates: captured from a local
`--project=chromium --workers=1 --reporter=json` run against a live
stack, in which all 39 of these tests passed. Only passing results are
recorded, with outcome: expected.

* test(ui): assert the alert modal and settle permissions before absence checks

Two review findings on the migrated specs, both carried over verbatim from
Collate rather than introduced by the move.

Add Alert opened nothing observable: the test asserted the URL, the AI
sidebar and the text "Add Alert", all of which are already true before the
click — "Add Alert" labels the trigger as well as the modal. Measured on a
running stack: before the click the page has 0 `role="dialog"` nodes and no
`alert-name-input`, while the text is already present. Assert the dialog and
two of its fields instead, which a broken open handler cannot satisfy. The
positional-locator suppression that the text match needed goes away with it.

The permission absence checks could pass before permissions loaded.
`SubPanel` filters a gated item on
`Boolean(permissions?.[resource]?.[operation])`, which is equally false when
access is denied and while the provider still holds its empty initial value,
so a permission-loading regression would have kept the suite green. Settle
the boot-time `GET /api/v1/permissions` in the fixture, hoisted above
`login()` — that navigation boots the app and issues the fetch, confirmed by
the suite passing in 13s rather than hanging on the listener.

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
anuj-kumary pushed a commit that referenced this pull request Sep 22, 2026
…o OSS (#33683)

* test(ui): move the AI-mode observability e2e suite from Collate to OSS

The AI shell and the observability module live in OSS since #31911, and
#33502 moved the /observability link prefixing there too, so the e2e
coverage for those pages belongs in OSS rather than collate-ui.

Seven specs move into playwright/e2e/Features/AIMode/, alongside the
CustomPropertiesPanel spec migrated earlier. Their imports already
pointed almost entirely at the OSS tree, so the move is mostly dropping
the src/openmetadata-ui/playwright/ prefix.

Two helpers the specs needed come across into e2e/Utils/appMode.ts:
redirectToAiModeHomePage and expandAiSubPanel. Both shed their
AskCollate-only parts — the chat query-cache clear and the
chatConversations bootstrap wait — and ObservabilityPermissions now
waits on the ask-sidebar to confirm the shell booted instead.

Pipeline observability pages are still Collate-only (observability.module
routes them through the app-mode fallback), so those blocks stay behind:
the whole Pipeline describe in ClickPaths, the Pipeline page-rendering
and breadcrumb rows, and the pipeline detail-URL test.

OSS's playwright guardrails are stricter than Collate's, and the
suppressions baseline may not grow, so the positional locators that came
across carry justified inline disables naming why the position is the
assertion. One Buffer.compare became a base64 comparison, which this
repo's @types/node accepts.

* chore(playwright): auto-refresh impact-map.generated.json

* test(ui): seed timing-baseline for the moved AI-mode observability specs

plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (#30812). The
seven newly-moved files had no history at all, so Observability (17),
TestCaseBreadcrumb (6) and TestCaseEdit (5) tripped the >=5-test hard
fail and the rest warned.

Durations are real, not estimates: captured from a local
`--project=chromium --workers=1 --reporter=json` run against a live
stack, in which all 39 of these tests passed. Only passing results are
recorded, with outcome: expected.

* test(ui): assert the alert modal and settle permissions before absence checks

Two review findings on the migrated specs, both carried over verbatim from
Collate rather than introduced by the move.

Add Alert opened nothing observable: the test asserted the URL, the AI
sidebar and the text "Add Alert", all of which are already true before the
click — "Add Alert" labels the trigger as well as the modal. Measured on a
running stack: before the click the page has 0 `role="dialog"` nodes and no
`alert-name-input`, while the text is already present. Assert the dialog and
two of its fields instead, which a broken open handler cannot satisfy. The
positional-locator suppression that the text match needed goes away with it.

The permission absence checks could pass before permissions loaded.
`SubPanel` filters a gated item on
`Boolean(permissions?.[resource]?.[operation])`, which is equally false when
access is denied and while the provider still holds its empty initial value,
so a permission-loading regression would have kept the suite green. Settle
the boot-time `GET /api/v1/permissions` in the fixture, hoisted above
`login()` — that navigation boots the app and issues the fetch, confirmed by
the suite passing in 13s rather than hanging on the listener.

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
timothybrush pushed a commit to timothybrush/OpenMetadata that referenced this pull request Sep 22, 2026
… assertion in non-existent glossary test (open-metadata#33760)

* fix(playwright): replace flaky isVisible chain with deterministic 404 assertion for non-existent glossary test

The original test checked six conditions with isVisible({ timeout })
which does not retry — it snapshotted the current DOM state instantly.
The .left-panel-card skeleton renders before the API response arrives,
so the test short-circuited to true on that last condition and passed
as a false positive. On slower runs nothing had rendered yet and all
six checks returned false, causing the intermittent failure.

Replace with:
- page.waitForResponse() hoisted before page.goto() to intercept
  /api/v1/glossaries/name/* and assert HTTP 404
- expect().toBeVisible() on data-testid="empty-placeholder" (the
  actual element GlossaryPage renders via EmptyPlaceholder when
  isGlossaryNotFound is true) with a 10 s auto-retry timeout

Also removes the suppressed waitForAllLoadersToDisappear().catch(()=>{})
which masked the incomplete page state.

* remove narrating comments per review

* chore(playwright): prune 2 stale no-positional-locators suppressions after .first() removal

* chore(playwright): lower corpus no-positional-locator total 1183→1181 after removing 2 .first() calls

* fix(checkstyle): restore 2-space indent and trailing comma in import block

* Fixes open-metadata#33502: Keep observability links on /observability routes in AI app mode (open-metadata#33681)

* Fixes open-metadata#33502: Keep observability links on /observability routes in AI app mode

ObservabilityRouterClassBase returned classic paths regardless of app mode, so
in-app navigation from the AI Data Quality page (tabs, test case links,
breadcrumbs) fell back to classic pages rendered inside the AI shell.

- isEmbeddedMode() now mirrors AppRouter's AI-shell check (AI_APP_MODE or an
  active app-mode session).
- Data quality, incident manager, test suite, test case, version and dimension
  paths get the /observability prefix in that mode; each matches a route in
  observability.module.tsx. Alert paths already live under /observability.
- A path method a subclass overrides is left unprefixed so Collate's override,
  which still prefixes on top of super, does not produce a double prefix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Fixes open-metadata#33502: note that OSS also namespaces the test suite path in AI mode

open-metadata#33679 relaxed this assertion to a suffix match because `getTestSuitePath`
was a no-op in OSS and only Collate's override namespaced the route. This
branch makes OSS namespace it too, in AI app mode, which `openDetailsPage`
enables — so the comment's reasoning no longer matches the code.

The regex is already correct for both builds. Only the comment changes.

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fixes open-metadata#33502: Move the AI-mode observability e2e suite from Collate to OSS (open-metadata#33683)

* test(ui): move the AI-mode observability e2e suite from Collate to OSS

The AI shell and the observability module live in OSS since open-metadata#31911, and
open-metadata#33502 moved the /observability link prefixing there too, so the e2e
coverage for those pages belongs in OSS rather than collate-ui.

Seven specs move into playwright/e2e/Features/AIMode/, alongside the
CustomPropertiesPanel spec migrated earlier. Their imports already
pointed almost entirely at the OSS tree, so the move is mostly dropping
the src/openmetadata-ui/playwright/ prefix.

Two helpers the specs needed come across into e2e/Utils/appMode.ts:
redirectToAiModeHomePage and expandAiSubPanel. Both shed their
AskCollate-only parts — the chat query-cache clear and the
chatConversations bootstrap wait — and ObservabilityPermissions now
waits on the ask-sidebar to confirm the shell booted instead.

Pipeline observability pages are still Collate-only (observability.module
routes them through the app-mode fallback), so those blocks stay behind:
the whole Pipeline describe in ClickPaths, the Pipeline page-rendering
and breadcrumb rows, and the pipeline detail-URL test.

OSS's playwright guardrails are stricter than Collate's, and the
suppressions baseline may not grow, so the positional locators that came
across carry justified inline disables naming why the position is the
assertion. One Buffer.compare became a base64 comparison, which this
repo's @types/node accepts.

* chore(playwright): auto-refresh impact-map.generated.json

* test(ui): seed timing-baseline for the moved AI-mode observability specs

plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (open-metadata#30812). The
seven newly-moved files had no history at all, so Observability (17),
TestCaseBreadcrumb (6) and TestCaseEdit (5) tripped the >=5-test hard
fail and the rest warned.

Durations are real, not estimates: captured from a local
`--project=chromium --workers=1 --reporter=json` run against a live
stack, in which all 39 of these tests passed. Only passing results are
recorded, with outcome: expected.

* test(ui): assert the alert modal and settle permissions before absence checks

Two review findings on the migrated specs, both carried over verbatim from
Collate rather than introduced by the move.

Add Alert opened nothing observable: the test asserted the URL, the AI
sidebar and the text "Add Alert", all of which are already true before the
click — "Add Alert" labels the trigger as well as the modal. Measured on a
running stack: before the click the page has 0 `role="dialog"` nodes and no
`alert-name-input`, while the text is already present. Assert the dialog and
two of its fields instead, which a broken open handler cannot satisfy. The
positional-locator suppression that the text match needed goes away with it.

The permission absence checks could pass before permissions loaded.
`SubPanel` filters a gated item on
`Boolean(permissions?.[resource]?.[operation])`, which is equally false when
access is denied and while the provider still holds its empty initial value,
so a permission-loading regression would have kept the suite green. Settle
the boot-time `GET /api/v1/permissions` in the fixture, hoisted above
`login()` — that navigation boots the app and issues the fetch, confirmed by
the suite passing in 13s rather than hanging on the listener.

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Move the query-builder and filter glossary fields onto GlossaryTermPicker (open-metadata#33736)

* feat(ui): move the query-builder glossary fields onto GlossaryTermPicker

Migrates the remaining glossary-term selectors: the Workflow Builder
condition values, the Data Quality dashboard filter, and the three
query-builder fields (advanced search, JSONLogic related terms, and the
data contract semantics rule).

The query-builder fields mark themselves with `withGlossaryTermField`
rather than being matched by path, because the JSONLogic builders reach
glossary terms, classification tags and tier through the same
`tags.tagFQN` subfield. The widgets swap only the rendered control and
still hand RAQB the same FQN string, so operators and the ES/JSONLogic
serialisation are unchanged.

`fqnsToGlossaryTags`/`glossaryTagsToFqns` centralise the FQN mapping the
CSV editor already needed.

* fix(ui): keep the DQ glossary filter as a chip, with the shared tree inside

The filter bar renders every filter as a labelled button chip, and its
regression test asserts that. Rendering the picker's input trigger there
broke both that check and the flow that drives the chip's search box.

Give the picker the button trigger and staged commit the other filters
use, so the chip affordance is unchanged and only the dropdown contents
become the shared tree.

* fix(ui): key the DQ glossary filter testid off the label, as the specs do

The dashboard's E2E locators are label-based (search-dropdown-Tag,
search-dropdown-Glossary Term); switching to searchKey broke the
domain-tab filter-bar check.

* fix(ui): decide the glossary control in the widget config, not the widget

OMSelectWidget returned its async ComboBox before reaching the glossary
check, so a glossary field — which sets asyncFetch and useAsyncSearch —
kept the flat select for single-value operators and the migration never
took effect there.

Branching in the OMConfig factories fixes that for both operators and
keeps either widget's complexity unchanged. Adds a test that pins which
control each factory returns.

Also forwards the dashboard chip's isOpen/onOpenChange so the filter bar
can still close it, and extracts the widget's nested ternary.

* test(ui): assert the glossary factory against real widgets and the real marker

Renders the actual OMSelectWidget/OMMultiSelectWidget rather than mocks,
and builds the field settings with withGlossaryTermField, so the test
covers the production marker path instead of mock wiring. Only the picker
stays mocked — it mounts the glossary tree and fetches on open.

* refactor(ui): fold the picker's map+filter into one reduce

The filter existed as a type predicate to narrow the intermediate array
that map produced. Building the list in one pass drops both the extra
array and the predicate.

* refactor(ui): name the DQ filter discriminants and reduce the FQN mapping

Adds DQ_FILTER_TYPES alongside the existing DQ_FILTER_KEYS and uses it
for every `type` on DqFilterDescriptor — the declarations, the emitted
descriptors, both renderers and the hook test — so the discriminant is
no longer a bare string.

Also folds fqnsToGlossaryTags into a single reduce.

* refactor(ui): use DQ_FILTER_TYPES in the remaining type comparisons

The earlier sweep only matched `type === '...'`, so the `type !== '...'`
guards in the hook test and the `type: '...' as const` fixtures in the
chip and bar tests were left as bare strings.

* fix checkstyle

* Fixes open-metadata#33753: de-flake visitUserProfilePage by dropping its Elasticsearch dependency (open-metadata#33757)

* Fixes open-metadata#33753: de-flake visitUserProfilePage by dropping its Elasticsearch dependency

visitUserProfilePage() reached a profile by driving the Users list UI:
search the name, wait for /api/v1/search/query?index=user, click the row.
That list is Elasticsearch-backed, so a user created seconds earlier may
not be indexed yet — and the wait cannot recover, because exactly one
search is issued and nothing re-queries once the empty result renders.
The 15s visibility wait runs against a list that will never repopulate.

Navigate straight to /users/<name> and wait on the profile page's own
users/name read, which is immediately consistent. No search index, no
list-refresh race, one request instead of three.

All six callers only want the profile page; Users.spec re-enters the list
explicitly via visitUserListPage afterwards, so nothing depended on the
side effect. Specs that genuinely exercise list search already use
searchUserByEmail.

Also drop UserProfileOnlineStatus's createOrFetchUser: its fallback did
GET /api/v1/users?email=... but UserResource's list endpoint has no email
query param, so the filter was ignored and an arbitrary user came back.
UserClass.create() already re-fetches by name when the user exists.

* Encode the username and assert the profile response succeeded

Review feedback on open-metadata#33757.

The helper interpolated the raw username into both the route and the
response matcher. The app encodes it in both, so a name containing a
reserved character produced a matcher that never matched and a wait that
timed out instead of failing on the real problem.

Awaiting the response also accepted a 404/5xx: the page drops its loader
and renders an error state, and callers that guard assertions on
visibility (UserProfileOnlineStatus) would then assert nothing and pass.
Assert the response is ok, with the status in the message.

* fix(ui): hide Login Configuration when an external SSO provider is configured (open-metadata#33598)

* fix(ui): hide Login Configuration when an external SSO provider is configured

The login configuration (failed-attempt lockout, access block time, JWT
expiry) is enforced by OpenMetadata's own login flow. Under an external IdP
those settings are inert, but the page was still listed under Settings >
Preferences for every admin.

LoginConfigurationPage already knew this and skipped the fetch for non-basic
providers, but still rendered — so the page showed "--" for every field, and
the Edit button stayed live, letting an admin save values that never take
effect.

Gate the menu item on the provider alongside the existing admin check, and
404 both the details and edit routes so a bookmarked URL cannot reach them,
matching the existing Navigate-to-NOT_FOUND guards in SettingsRouter. With
the route as the single gate, the page's own unreachable provider check is
removed.

LDAP is treated as basic: the server enforces the same login config for it.

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

* fix(ui): keep Login Configuration visible for the openmetadata provider

Review caught that the provider predicate excluded AuthProvider.Openmetadata.
That is wrong: the server routes `openmetadata` through BasicAuthServletHandler
("OpenMetadata provider uses Basic auth internally",
AuthServeletHandlerFactory), and JwtFilter#isSameProvider documents `basic` and
`openmetadata` as two historical names for the same native-password
authenticator. The login configuration is therefore enforced for it, and hiding
the page removed access to settings that were still live.

LDAP stays included — LdapAuthenticator reads the same three settings
(maxLoginFailAttempts, accessBlockTime, jwtTokenExpiryTime).

Renamed isBasicAuthProvider to isLoginConfigurationApplicable: the set is three
providers, not "basic", and the name now states the rule it encodes rather than
one of its members.

Tests assert all three providers keep the page; the hidden set stays derived
from the enum so a newly added provider defaults to hidden.

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

* chore(playwright): auto-refresh impact-map.generated.json

* fix(ui): stop the settings menu reaching into the application store

CI failed with "useApplicationStore.getState is not a function". Reading the
store inside getGlobalSettingsMenuWithPermission made a pure util depend on a
hook, so every test that mocks useApplicationStore as a bare jest.fn() — 141
files do — crashed the moment it reached the settings menu.
EntitySearchSettings.test.tsx was the one that broke.

frontend-performance.md already forbids this ("pure utilities cannot depend on
React, UI/state layers, pages, hooks, or REST"). It was dismissed because lint
did not flag it and TableClassBase does the same thing; the rule was right and
the precedent is a latent bug of the same shape.

The provider is now an optional third argument, passed by the two pages that
actually render the entry. Omitting it leaves the entry visible: showing an
inert settings page is cosmetic, hiding a live one takes working settings away
from admins.

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

* Merge branch 'main' into fix/hide-login-configuration-under-sso

Resolved .github/playwright/impact-map.generated.json by regenerating it
(python3 .github/scripts/generate_playwright_impact_map.py) on top of main's
version rather than hand-merging a generated file.

AuthProvider.util.ts auto-merged: main's AuthCoordinator/validator refactor
(open-metadata#31675) and this branch's isLoginConfigurationApplicable predicate touch
different parts of the file; both verified present afterwards.

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

* chore(playwright): auto-refresh impact-map.generated.json

* chore(playwright): auto-refresh impact-map.generated.json

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(e2e): stabilise SubDomainPagination and GlossaryHierarchy flaky Playwright tests (open-metadata#33747)

* fix(e2e): stabilise SubDomainPagination and GlossaryHierarchy flaky tests

SubDomainPagination: 60 subdomains were created in parallel then
tests began immediately.  checkSubDomainCount polls Elasticsearch,
so it raced the async indexing pipeline.  Fix: after the parallel
creates, poll all 60 FQNs concurrently via waitForSearchIndexed
(domain_search_index, 60 s timeout) so the beforeAll only returns
once every subdomain is searchable.

GlossaryHierarchy H-M03 ("move nested term to root level"):
changeTermHierarchyFromModal triggers moveAsync on the backend, which
returns HTTP 200 immediately but applies the hierarchy change
asynchronously.  H-M04 and H-M05 already had expect.poll guards for
this (added in open-metadata#33440); H-M03 was missing the same pattern.  Fix:
add expect.poll on GET /api/v1/glossaryTerms/:id checking term.parent
is falsy, with 60 s timeout and backoff intervals, matching the
existing H-M04/H-M05 pattern exactly.  Also add test.slow(true) since
the async processing can take longer than the default timeout.

* fix(playwright): guard against transient API errors in GlossaryHierarchy H-M03 poll

Without res.ok() check, a non-2xx transient response returns a body
without a parent field (undefined), which falsely satisfies .toBeFalsy()
and exits the poll before the async move completes.

* revert(playwright): remove redundant subdomain waitForSearchIndexed in SubDomainPagination

checkSubDomainCount already polls the UI count with a 120s timeout and
page reloads, so the parallel waitForSearchIndexed for 60 subdomains in
beforeAll was unnecessary and only slowed setup.

* fix(playwright): wait for domain dropdown to close in openDataProductDrawer

After clicking a domain option in the Ant Design Select, the dropdown
overlay lingers briefly during its close animation. The next click (on
the Glossary Terms TreeSelect trigger) was being intercepted by that
overlay, preventing the tree popover from opening. Wait for the selected
domain title to appear in the selector before returning — this confirms
the dropdown has fully closed.

* refactor(playwright): shorten comments to one-liners

* fix(playwright): wait for domain dropdown to close in openDataProductDrawer

* fix(playwright): wait for domain dropdown to close in openDataProductDrawer

* style(playwright): format domain.ts to satisfy Prettier line-length

* fix: add domain filter to GlossaryResource list endpoint (open-metadata#31971)

* fix: add domain filter to Glossary list endpoint

* fix: handle empty domain filter and add regression IT for glossary domain listing

- Skip the filter for a null/empty ?domain= instead of resolving an empty
  FQN (which 404s), matching ServiceEntityResource/DataProductResource
- Add GlossaryResourceIT#test_listGlossaries_domainFilter covering
  in-domain/out-of-domain scoping and the empty-domain regression

* test: make glossary domain-filter IT pagination-safe

- Set an explicit high limit on the list calls so a busy shared IT instance
  cannot page a target glossary out of the asserted results
- Drop comments that restated the assertions; keep the empty-domain rationale

* test: split glossary domain-filter IT into focused cases

- One nameable behaviour per test (in-domain include, other-domain exclude,
  empty-domain unfiltered) via a shared seedGlossaryInDomain helper
- final locals; keeps the explicit high limit so results stay deterministic

---------

Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com>

* chore(playwright): lower no-positional-locator corpus count 1175→1173 after main merge

Two additional positional-locator suppressions were removed by PRs that landed in
main after the last sync; the recorded global total must match the live suppression
count exactly.

---------

Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Harsh Vador <58542468+harsh-vador@users.noreply.github.com>
Co-authored-by: Sweta Agarwalla <105535990+sweta1308@users.noreply.github.com>
Co-authored-by: Arvin <31638790+zhang-arvin@users.noreply.github.com>
Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com>
TeddyCr added a commit that referenced this pull request Sep 22, 2026
plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (#30812).

Features/DataQuality/RunTestCase.spec.ts landed in #33499 on 22 Sep, a day
after the last baseline refresh (run 35555097423, #33690), so its five tests
have no history at all and every targeted plan that impact-maps a
DataQuality source file trips the gate. The planner only reaches back
through the last 50 successful runs for organic history, and the full run
that did cover the spec is already past that window, so the checked-in
baseline has to carry it.

Durations are real, not estimates: taken from the coverage-complete
full-mode run 35691431799 (4516/4516 accounted, no missing IDs), where all
five tests passed on the first attempt. Only those passing results are
recorded, with outcome: expected. The stable IDs match what
`playwright test --list` discovers today, so the planner weights them by ID
rather than falling back to the (file, title) identity match.
ulixius9 pushed a commit to zhang-arvin/OpenMetadata that referenced this pull request Sep 23, 2026
… at the table (open-metadata#33839)

* fix(data-quality): point test suite pipeline entityFullyQualifiedName at the table

`buildTestSuitePipelinePayload` wrote the test suite's own FQN into
`sourceConfig.config.entityFullyQualifiedName`. Per testSuitePipeline.json that
field is the FQN of "the entity to be tested" — the table — so the ingestion
workflow looks the value up as a Table, gets nothing back, and silently falls
through to the logical-suite path instead of running the basic suite.

Take the table FQN from the context the builder already holds. Note it must be
the raw FQN, not the `replaceAllSpacialCharWith_` result used for the display
name, which would mangle a service name containing a space.

Also narrow `PipelinePayloadContext.testSuite` to `Pick<TestSuite, 'id'>`: `id`
is the only field read, and callers pass `TestCase.testSuite`, which is an
`EntityReference` rather than a `TestSuite`. The previous cast was unsound and
made the wrong field look available.

* fix(data-quality): prefer the raw form FQN over the fetched table entity

`canCreatePipeline` is gated on `selectedTableFqn` — derived synchronously from
the form field — but the form context only exposed `selectedTableData`, which is
fetched from that FQN. The two diverge while the fetch is in flight, or
permanently if it fails, and with no `table` prop both of the drawer's sources
are then undefined.

That left `entityFullyQualifiedName` omitted on the pipeline payload, and would
also collapse `resolveEntityLink`'s three-source fallback to a single effective
source, since the drawer fed all of them from the same fetched entity.

Expose `selectedTableFqn` on `TestCaseFormContext` and prefer it at both call
sites.

* test(data-quality): assert the pipeline request body, not the payload-builder call

The FQN regression test asserted on the mocked buildTestSuitePipelinePayload's
arguments, so it would have stayed green on a wrong pipeline payload. Run the
real builder for that one call and assert on the CreateIngestionPipeline body
handed to addIngestionPipeline instead, with no table prop so the builder's
table fallback cannot mask a missing FQN.

* chore(playwright): seed the timing baseline for RunTestCase.spec.ts

plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (open-metadata#30812).

Features/DataQuality/RunTestCase.spec.ts landed in open-metadata#33499 on 22 Sep, a day
after the last baseline refresh (run 35555097423, open-metadata#33690), so its five tests
have no history at all and every targeted plan that impact-maps a
DataQuality source file trips the gate. The planner only reaches back
through the last 50 successful runs for organic history, and the full run
that did cover the spec is already past that window, so the checked-in
baseline has to carry it.

Durations are real, not estimates: taken from the coverage-complete
full-mode run 35691431799 (4516/4516 accounted, no missing IDs), where all
five tests passed on the first attempt. Only those passing results are
recorded, with outcome: expected. The stable IDs match what
`playwright test --list` discovers today, so the planner weights them by ID
rather than falling back to the (file, title) identity match.
TeddyCr added a commit that referenced this pull request Sep 23, 2026
… at the table (#33839) (#33907)

* fix(data-quality): point test suite pipeline entityFullyQualifiedName at the table

`buildTestSuitePipelinePayload` wrote the test suite's own FQN into
`sourceConfig.config.entityFullyQualifiedName`. Per testSuitePipeline.json that
field is the FQN of "the entity to be tested" — the table — so the ingestion
workflow looks the value up as a Table, gets nothing back, and silently falls
through to the logical-suite path instead of running the basic suite.

Take the table FQN from the context the builder already holds. Note it must be
the raw FQN, not the `replaceAllSpacialCharWith_` result used for the display
name, which would mangle a service name containing a space.

Also narrow `PipelinePayloadContext.testSuite` to `Pick<TestSuite, 'id'>`: `id`
is the only field read, and callers pass `TestCase.testSuite`, which is an
`EntityReference` rather than a `TestSuite`. The previous cast was unsound and
made the wrong field look available.

* fix(data-quality): prefer the raw form FQN over the fetched table entity

`canCreatePipeline` is gated on `selectedTableFqn` — derived synchronously from
the form field — but the form context only exposed `selectedTableData`, which is
fetched from that FQN. The two diverge while the fetch is in flight, or
permanently if it fails, and with no `table` prop both of the drawer's sources
are then undefined.

That left `entityFullyQualifiedName` omitted on the pipeline payload, and would
also collapse `resolveEntityLink`'s three-source fallback to a single effective
source, since the drawer fed all of them from the same fetched entity.

Expose `selectedTableFqn` on `TestCaseFormContext` and prefer it at both call
sites.

* test(data-quality): assert the pipeline request body, not the payload-builder call

The FQN regression test asserted on the mocked buildTestSuitePipelinePayload's
arguments, so it would have stayed green on a wrong pipeline payload. Run the
real builder for that one call and assert on the CreateIngestionPipeline body
handed to addIngestionPipeline instead, with no table prop so the builder's
table fallback cannot mask a missing FQN.

* chore(playwright): seed the timing baseline for RunTestCase.spec.ts

plan-playwright hard-fails when every planned test in a spec file falls
through to FALLBACK_TEST_MS, because the planner then under-budgets the
shard holding them and the merge-queue wrapper times out (#30812).

Features/DataQuality/RunTestCase.spec.ts landed in #33499 on 22 Sep, a day
after the last baseline refresh (run 35555097423, #33690), so its five tests
have no history at all and every targeted plan that impact-maps a
DataQuality source file trips the gate. The planner only reaches back
through the last 50 successful runs for organic history, and the full run
that did cover the spec is already past that window, so the checked-in
baseline has to carry it.

Durations are real, not estimates: taken from the coverage-complete
full-mode run 35691431799 (4516/4516 accounted, no missing IDs), where all
five tests passed on the first attempt. Only those passing results are
recorded, with outcome: expected. The stable IDs match what
`playwright test --list` discovers today, so the planner weights them by ID
rather than falling back to the (file, title) identity match.

(cherry picked from commit aa6f8c2)

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