Skip to content

fix(playwright): stabilize bulk re-deploy and Persona AI Context entity-type tests - #33176

Merged
ShaileshParmar11 merged 4 commits into
mainfrom
fix/testsuite-redeploy-own-pipelines
Sep 11, 2026
Merged

fix(playwright): stabilize bulk re-deploy and Persona AI Context entity-type tests#33176
ShaileshParmar11 merged 4 commits into
mainfrom
fix/testsuite-redeploy-own-pipelines

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

No linked issue: test-only merge-queue flake fixes, bypassed with skip-pr-checks.

Fixes two merge-queue Playwright flakes, plus the checkstyle baseline the first one touches.

1. Bulk re-deploy picked pipelines it does not own

TestSuitePipelineRedeploy.spec.tsRe-deploy all test-suite ingestion pipelines selected the first two rows of the Data Observability grid. That grid lists every test-suite pipeline in the deployment, ordered by pipeline name. Data Contract DQ pipelines are named with a bare UUID (DataContractRepository.createIngestionPipelineUUID.randomUUID()), so they always sort ahead of the spec's own pw-test-suite-pipeline-* pipelines — including the dim_address_comprehensive_contract pipeline that ships in sample data. The test was redeploying pipelines it does not own, and failed whenever one of those did not deploy.

Seen in merge-queue run 34475633731 (ingestion-01): the deploy of a foreign Data Contract pipeline returned 400 (Airflow returned 500 while refreshing the DAG) on both attempts. The PR in the queue did not touch this area.

Changes:

  • Select the spec's own two pipelines by name (getRowByName pinned with toHaveCount(1)), click TableV2's label[slot="selection"], and assert toBeChecked().
  • Widen the grid with ?pageSize=100 (usePaging seeds pageSize from the URL) so both pipelines are always on the page the test reads.
  • Key collected deploy statuses by pipeline id: a failure names the pipeline in the assertion diff, and an unrelated deploy cannot pad the count.
  • Add afterAll cleanup: the spec leaked both database services (and their suites/pipelines) into the shared listing for the rest of the shard.
  • Prune the now-stale om-playwright/no-positional-locator suppression and regenerate impact-map.generated.json.
  • Lower the recorded om-playwright/no-positional-locator total in playwright/eslint-rules/tests/corpus.test.mjs from 1298 to 1297 to match the pruned baseline (UI Checkstyle's "suppressions baseline matches its recorded state exactly" test).

2. Persona AI Context: entity-type popover closed under the click

PersonaAIContextRules.spec.tsknowledge entity type forces Fully rendered on and disables it failed on both attempts in merge-queue run 34521159069 (chromium-07) and was flaky in this branch's dispatch run. The trace shows the Add Rule drawer's entity-type popover closing on its own about 0.1s after it opened — while the match preview and filter builder were still re-rendering as their requests landed — with the value still Table. The pending click on the glossaryTerm option then waited out the 60s budget for a listbox that never came back.

  • Use the existing selectOptionWithRetry helper, which reopens the popover and retries the option click — the same helper the entity-type switch test in this spec already uses on this dropdown.

Type of change:

  • Bug fix

High-level design:

N/A — small, test-only change (5 files).

Tests:

Use cases covered

  • Bulk re-deploy of selected test-suite pipelines from Settings › Services › Data Observability succeeds and shows the success toast, regardless of which other test-suite pipelines exist in the deployment.
  • Switching a Persona AI Context rule to a knowledge entity type (Glossary Term) forces Fully rendered on and disables it, even when the entity-type popover closes before the option click lands.

Unit tests

Not applicable — Playwright spec change only; no product code changed.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Files updated: openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TestSuitePipelineRedeploy.spec.ts, openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/PersonaAIContextRules.spec.ts, openmetadata-ui/src/main/resources/ui/playwright/eslint-rules/tests/corpus.test.mjs
  • CI: full-suite dispatch run 34564006493 on this branch (before the PersonaAIContextRules fix) — passed. TestSuitePipelineRedeploy passed on the first attempt in ingestion-02 (6.1s); run totals: 4505 passed, 0 failed, 7 flaky (all unrelated chromium specs).
  • Static, on the branch after merging main: yarn lint:playwright 0 errors, yarn test:eslint-rules 114/114, rule-table --check clean, tsc 0 errors in both specs, prettier clean, generate_playwright_impact_map.py --check up to date.

Manual testing performed

  1. Ran the spec against a local stack (OpenMetadata server + Airflow) with PW_DEDICATED_INGESTION=true PW_PRESEEDED_STATE=true npx playwright test playwright/e2e/Features/TestSuitePipelineRedeploy.spec.ts --project=Ingestion.
  2. Fixed spec: the server log shows exactly two POST /ingestionPipelines/deploy/{id} calls, both 200, for the two pipelines beforeAll created; afterAll then hard-deleted both services.
  3. Pre-fix spec on the same instance: it deployed the Data Contract - dim_address_comprehensive_contract pipeline, reproducing the CI selection bug.
  4. Caveats: that local instance's sidebar had no Settings entry, so settingClick was swapped for a direct goto to the same route for these runs, and it served the pre-TableV2 grid. The committed spec (TableV2 selection + settingClick) passed in the CI run above; its deploy assertion is keyed to the spec's own pipeline ids, so the pass confirms it deployed exactly those two.
  5. PersonaAIContextRules: diagnosed from the merge-queue trace (DOM snapshots and screencast frames), not reproduced locally. The fix reuses a helper already proven on this dropdown in the same spec; this PR's Playwright run exercises it.

UI screen recording / screenshots:

Not applicable — no product UI change; Playwright spec only.

Checklist:

  • I have read the CONTRIBUTING document.

  • My PR title is Fixes <issue-number>: <short explanation> — N/A, no linked issue (skip-pr-checks).

  • My PR is linked to a GitHub issue via Fixes #<issue-number> above. — N/A, bypassed with skip-pr-checks.

  • I have commented on my code, particularly in hard-to-understand areas.

  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed. — N/A, no schema changes.

  • For UI changes: I attached a screen recording and/or screenshots above. — N/A, no product UI change.

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

  • I have added a test that covers the exact scenario we are fixing. (The fix is to the test itself; verified locally that the pre-fix selection deploys a foreign Data Contract pipeline and the fixed selection does not.)

🤖 Generated with Claude Code

TestSuitePipelineRedeploy selected the first two rows of the Data
Observability grid, which lists every test-suite pipeline in the
deployment ordered by name. Data Contract DQ pipelines are named with a
bare UUID, so they sort ahead of the spec's own `pw-*` pipelines: the
test was redeploying pipelines it does not own, and failed whenever one
of those did not deploy (merge-queue run 34475633731).

- select the spec's own pipelines by name via getRowByName
- widen the page with ?pageSize=100 so both are always listed
- key deploy statuses by pipeline id so a failure names the pipeline
- add afterAll cleanup; the spec leaked both services into the shard
- prune the now-stale no-positional-locator suppression
- regenerate impact-map.generated.json

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 11, 2026
ShaileshParmar11 and others added 3 commits September 11, 2026 11:54
Pruning the TestSuitePipelineRedeploy suppression dropped the
no-positional-locator total from 1298 to 1297, but corpus.test.mjs still
recorded 1298, failing "the suppressions baseline matches its recorded
state exactly" in UI Checkstyle.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Add Rule drawer can close the entity-type popover right after it
opens, while the match preview and filter builder are still re-rendering.
The pending click on the glossaryTerm option then waited out the whole
test budget for a listbox that never came back (merge-queue run
34521159069, both attempts).

Use the existing selectOptionWithRetry helper, which reopens the popover
and retries the option click, as the entity-type switch test in the same
spec already does.

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

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Fixes two Playwright test flakes by selecting test-suite pipelines by name instead of grid position (preventing redeployment of unowned Data Contract pipelines) and retrying entity-type popover selection when the dropdown closes prematurely. Checkstyle baseline updated accordingly. No issues found.

Options

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

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

Compact
gitar display:verbose         

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants