Skip to content

chore(e2e): balance out shard allocation for reduce timing#29602

Merged
chirag-madlani merged 2 commits into
mainfrom
chore/shard-balancing-playwrights
Jun 30, 2026
Merged

chore(e2e): balance out shard allocation for reduce timing#29602
chirag-madlani merged 2 commits into
mainfrom
chore/shard-balancing-playwrights

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

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 #<issue-number> above.
  • 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.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Greptile Summary

This PR rebalances E2E test shard allocation by moving several Playwright test suites from the chromium project to the Basic project via the @basic tag (PLAYWRIGHT_BASIC_TEST_TAG_OBJ). The change affects 11 spec files spanning Lineage, Glossary, Login, ExploreTree, and SubDomain tests.

  • All 11 spec files receive the @basic tag import and the tag is attached to their top-level test.describe (or individual test) calls.
  • LineageSettings.spec.ts and LineageNodePagination.spec.ts are also reformatted from flat-style to parenthesised callback style to accommodate the tag parameter.
  • Three files — LineageInteraction.spec.ts, PlatformLineage.spec.ts, and LineageControls.spec.ts — have beforeAll hooks that consume EntityDataClass.user1/domain1.responseData.id. Because the Basic project only depends on setup (not entity-data-setup), those fields are undefined at runtime, causing API errors that break every test in the affected suites under the Basic project.

Confidence Score: 4/5

Safe to merge for 8 of 11 files; the three Lineage files (LineageInteraction, PlatformLineage, LineageControls) will have their beforeAll hooks fail when run under the Basic project.

Three spec files patch entities using EntityDataClass.user1/domain1.responseData.id inside their beforeAll hooks, but the Basic project that now runs their @basic-tagged tests only depends on setup, not entity-data-setup. Those IDs are undefined at that point, so every test in the affected suites will fail at setup time in CI.

LineageInteraction.spec.ts, PlatformLineage.spec.ts, and LineageControls.spec.ts — all three have beforeAll hooks that read from EntityDataClass before entity-data-setup has populated it.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/LineageInteraction.spec.ts Added @basic tag to 'Lineage Interactions' describe block, but its beforeAll uses EntityDataClass.user1/domain1.responseData.id which is unpopulated in the Basic project (no entity-data-setup dependency), causing setup to fail.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/PlatformLineage.spec.ts Added @basic tag to a top-level test(); the file-level beforeAll uses EntityDataClass.domain1.responseData.id which is undefined under the Basic project, breaking setup for any @basic-tagged test in this file.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/LineageControls.spec.ts Added @basic to 'Canvas Controls' and 'Lineage Layers' describe blocks; file-level beforeAll still accesses EntityDataClass.user1/domain1.responseData.id which is unset in the Basic project (already flagged in a previous review cycle).
openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/LineageSettings.spec.ts Wrapped entire test.describe.serial in PLAYWRIGHT_BASIC_TEST_TAG_OBJ and reformatted as callback-style describe; no EntityDataClass usage, setup is self-contained.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/LineageNodePagination.spec.ts Added @basic tag and reformatted test.describe.serial; self-contained setup with no EntityDataClass dependency.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/DataAssetLineage.spec.ts Added @basic tag to 'Data asset lineage' describe block; no EntityDataClass dependency, safe.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ExploreTree.spec.ts Added @basic to 'Explore Tree scenarios' describe block only; EntityDataClass usage is confined to the separate 'Explore page' describe block which does not carry the @basic tag.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryPagination.spec.ts Added @basic to 'Glossary tests' describe; no EntityDataClass dependency, self-contained setup.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Login.spec.ts Added @basic to 'Login flow should work properly' describe; no EntityDataClass usage, safe.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/LoginConfiguration.spec.ts Added @basic tag; tests are fully self-contained with no EntityDataClass dependency.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SubDomainPagination.spec.ts Added @basic tag; no EntityDataClass usage, self-contained test setup.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    setup["setup\n(auth.setup.ts)"]
    eds["entity-data-setup\n(entity-data.setup.ts)"]
    chromium["chromium project\ngrepInvert: @basic\ndeps: setup + entity-data-setup"]
    basic["Basic project\ngrep: @basic\ndeps: setup ONLY"]

    setup --> eds
    setup --> basic
    eds --> chromium

    lc["LineageControls.spec.ts\nbeforeAll → EntityDataClass.user1/domain1.id"]
    li["LineageInteraction.spec.ts\nbeforeAll → EntityDataClass.user1/domain1.id"]
    pl["PlatformLineage.spec.ts\nbeforeAll → EntityDataClass.domain1.id"]

    basic -->|"runs @basic tests"| lc
    basic -->|"runs @basic tests"| li
    basic -->|"runs @basic tests"| pl

    lc -->|"undefined id → API error"| fail["❌ beforeAll fails\nAll tests broken"]
    li -->|"undefined id → API error"| fail
    pl -->|"undefined id → API error"| fail

    eds -.->|"NOT a dependency\nof Basic"| basic
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    setup["setup\n(auth.setup.ts)"]
    eds["entity-data-setup\n(entity-data.setup.ts)"]
    chromium["chromium project\ngrepInvert: @basic\ndeps: setup + entity-data-setup"]
    basic["Basic project\ngrep: @basic\ndeps: setup ONLY"]

    setup --> eds
    setup --> basic
    eds --> chromium

    lc["LineageControls.spec.ts\nbeforeAll → EntityDataClass.user1/domain1.id"]
    li["LineageInteraction.spec.ts\nbeforeAll → EntityDataClass.user1/domain1.id"]
    pl["PlatformLineage.spec.ts\nbeforeAll → EntityDataClass.domain1.id"]

    basic -->|"runs @basic tests"| lc
    basic -->|"runs @basic tests"| li
    basic -->|"runs @basic tests"| pl

    lc -->|"undefined id → API error"| fail["❌ beforeAll fails\nAll tests broken"]
    li -->|"undefined id → API error"| fail
    pl -->|"undefined id → API error"| fail

    eds -.->|"NOT a dependency\nof Basic"| basic
Loading

Comments Outside Diff (2)

  1. openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/LineageControls.spec.ts, line 40-78 (link)

    P1 @basic tag conflicts with EntityDataClass dependency

    The beforeAll on line 57–70 patches the topic with EntityDataClass.user1.responseData.id and EntityDataClass.domain1.responseData.id. Those values are populated by entity-data-setup, but the Basic project only declares dependencies: ['setup'] — it does not list entity-data-setup as a dependency. If Basic starts (or runs in a separate shard) before entity-data-setup has written entity-response-data.json, loadResponseData() silently skips, leaving both responseData properties as empty objects ({}), and the PATCH request will send id: undefined. This would cause an API error that fails the shared beforeAll, breaking every test in this file when run under the Basic project.

  2. openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/LineageInteraction.spec.ts, line 48-79 (link)

    P1 EntityDataClass used in @basic-tagged suite without entity-data-setup dependency

    The beforeAll inside test.describe('Lineage Interactions', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, ...) patches the topic with EntityDataClass.user1.responseData.id (line 68) and EntityDataClass.domain1.responseData.id (line 76). The Basic project that picks up @basic tests declares dependencies: ['setup'] only — it does not list entity-data-setup. When entity-data.setup.ts has not run, EntityDataClass.user1.responseData and EntityDataClass.domain1.responseData are both {} as ResponseDataType, so .id is undefined. The PATCH request will therefore send id: undefined, causing an API error that breaks the entire beforeAll and fails every test in this describe block under Basic.

    The same pattern — a beforeAll consuming EntityDataClass while the file's suites carry @basic — also exists in PlatformLineage.spec.ts (line 48, patching domain1.responseData.id) and was previously noted in LineageControls.spec.ts. The fix is either to add entity-data-setup to the Basic project's dependencies, or to fetch the user/domain data fresh via API inside beforeAll rather than relying on the pre-populated static class.

Reviews (2): Last reviewed commit: "fix checkstyle" | Re-trigger Greptile

@chirag-madlani chirag-madlani requested a review from a team as a code owner June 30, 2026 07:42
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (2 flaky)

✅ 142 passed · ❌ 0 failed · 🟡 2 flaky · ⏭️ 7 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 142 0 2 7
🟡 2 flaky test(s) (passed on retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for container -> table (shard 1, 2 retries)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for apiEndpoint -> container (shard 1, 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 496a7e6 into main Jun 30, 2026
42 of 44 checks passed
@chirag-madlani chirag-madlani deleted the chore/shard-balancing-playwrights branch June 30, 2026 10:24
@gitar-bot

gitar-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Rebalances Playwright shard allocation to optimize test execution time. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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.

2 participants