Skip to content

Fixes 33549: remove four Playwright flake sources at their source - #33551

Open
harshach wants to merge 4 commits into
mainfrom
harshach/playwright-flake-fixes
Open

harshach wants to merge 4 commits into
mainfrom
harshach/playwright-flake-fixes

Conversation

@harshach

@harshach harshach commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #33549. Salvaged from the closed PR #33248 (tracking: #33528).

Four Playwright flake sources, each removed at its source rather than absorbed by a longer timeout.

1. A weekly reindex can rewrite shared search results mid-shard. entity-data.setup.ts creates
the entities every spec in the shard shares, but nothing pinned SearchIndexingApplication's
schedule. If its weekly rebuild fired partway through a shard, search results changed underneath
specs that had already asserted on them. The setup now patches appSchedule.scheduleTimeline to
None and asserts the patch took.

2. KnowledgeGraph.spec.ts started before the RDF projection caught up. beforeAll created a
table and proceeded immediately; the projection is asynchronous, so the first assertions could run
against a graph that had not seen the table. It now polls a SPARQL ASK for the schema→table edge
with a 60 s budget. afterAction() also moves into a finally, so a failure during setup stops
leaking the API context.

3. GlobalPageSize.spec.ts reopened a popover it had already opened. The retry block clicked the
"Records" button unconditionally, so on a retry where the menu was already open the click closed it
and the next assertion failed. It now clicks only when the option is not already visible, and the
clicks are bounded so the outer expect(async () => …) retry can reopen the popover if the summary
panel resizes the page mid-check.

4. LineageFilters.spec.ts asserted a node existed before selecting it. The visibility assertion
for lineage-node-${topicFqn} ran before the click that adds the node. Order swapped.

Type of change:

  • Bug fix

High-level design:

N/A — four independent test-stability fixes, 54 lines total.

Tests:

Use cases covered

  • A CI shard's shared entity data is not rewritten by a background reindex mid-run.
  • The knowledge-graph suite runs against a projection that contains its fixture.
  • Page-size and lineage-filter specs no longer depend on popover/render timing.

Unit tests

Not applicable — these are Playwright specs.

Backend integration tests

Not applicable — no product code changes.

Ingestion integration tests

Not applicable.

Playwright (UI) tests

This PR is the Playwright change: entity-data.setup.ts, KnowledgeGraph.spec.ts,
GlobalPageSize.spec.ts, LineageFilters.spec.ts.

Manual testing performed

  1. yarn lint:base on all four files — 0 errors (4 pre-existing
    require-aggregation-wait-helper warnings in LineageFilters.spec.ts at lines 503/625/705/785,
    none at the changed line 1037).
  2. npx prettier --check on all four — "All matched files use Prettier code style!".
  3. These specs need the full stack, so their green runs come from CI's Playwright lanes rather than
    locally — stating that plainly rather than implying I ran them here.

UI screen recording / screenshots:

Not applicable — no product UI change.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #33549.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: not applicable.
  • For UI changes: not applicable (test-only).
  • I have added tests: this PR is the tests.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with no outstanding correctness or repository-rule issues.

Summary

This PR removes four Playwright flake sources by disabling scheduled search reindexing during shared fixture setup, waiting for RDF projection readiness, making the page-size popover interaction retry-safe, and correcting lineage node selection order.

  • Extends the Knowledge Graph hook to 180 seconds around its 120-second RDF readiness poll, fully addressing the previous timeout-budget finding.
  • Ensures API contexts are cleaned up when Knowledge Graph setup fails.
  • Stabilizes page-size and lineage interactions without weakening their assertions.
  • Verifies that the search indexing schedule patch succeeds before creating shared entities.

Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'origin/har..."

entity-data.setup.ts: pin SearchIndexingApplication's schedule to None. Its
weekly rebuild could otherwise fire partway through a shard and rewrite the
shared search results specs had already asserted on.

KnowledgeGraph.spec.ts: poll a SPARQL ASK for the schema->table edge before the
suite runs. The RDF projection is asynchronous, so beforeAll could hand the
suite a graph that had not seen the table yet. afterAction() also moves into a
finally so a setup failure stops leaking the API context.

GlobalPageSize.spec.ts: only click the Records button when the option is not
already visible. The retry block clicked unconditionally, so a retry with the
menu already open closed it and failed the next assertion; the clicks are now
bounded so the outer retry can reopen it if the summary panel resizes the page.

LineageFilters.spec.ts: click the option before asserting the lineage node
exists, rather than the other way round.

Each is removed at its source rather than absorbed by a longer timeout.

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

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Four Playwright flake sources: unpinned reindex schedule, RDF projection race, popover re-click, premature node assertion

2 participants