Skip to content

WIP - chore(ci): update playwright workflow to run ingestion with dataAsset… - #24753

Merged
chirag-madlani merged 34 commits into
mainfrom
update-playwright-workflow
Feb 6, 2026
Merged

chirag-madlani merged 34 commits into
mainfrom
update-playwright-workflow

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Dec 9, 2025 •

Copy link
Copy Markdown
Collaborator

This pull request refactors the Playwright E2E testing configuration and test files to introduce and standardize the use of test tags for better test selection, sharding, and parallelization. It adds new tags for ingestion, sample data, and basic tests, updates the Playwright config to use these tags, and modifies the GitHub Actions workflow to shard and run tests more efficiently based on these tags.

Test Tagging and Organization

  • Introduced new tag objects in config.ts for @ingestion, @sample-data, and @basic, enabling more granular test selection and grouping.
  • Updated numerous test suites to use the new tag objects, grouping tests by their dependencies on ingestion, sample data, or basic functionality. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Playwright Configuration Enhancements

  • Modified playwright.config.ts to:
    • Add new projects for Basic and ingestion tests, each with appropriate grep patterns and dependencies.
    • Use grepInvert arrays to exclude tests by tag, improving test isolation and parallelization. [1] [2]

CI Workflow Improvements

  • Refactored .github/workflows/playwright-postgresql-e2e.yml to:
    • Dynamically pass arguments to the test environment setup step based on the shard index, ensuring ingestion is only set up for the appropriate shard.
    • Update test execution logic to run ingestion tests only on a dedicated shard and distribute other tests more efficiently across remaining shards. [1] [2]

Test File Updates

  • Updated test files to import and use the new tag objects, ensuring tests are properly grouped and can be selected or excluded via tags. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Test Selection Improvements

  • Enhanced the ability to run or exclude tests based on tags, supporting more flexible and efficient test runs in both local and CI environments. [1] [2] [3]

These changes improve the maintainability, scalability, and efficiency of the Playwright E2E test suite and CI pipeline.…Rules

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

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • 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.

Summary by Gitar

  • CI workflow optimization:
    • Modified playwright-postgresql-e2e.yml to run ingestion setup on shard 2 with proper conditional logic (shardIndex == 2)
    • Fixed ingestion args to match setup location (shard 2 gets -d postgresql, others get -d postgresql -i false)
    • Simplified shell syntax (elif instead of nested conditions) for better readability and reliability
    • Shard 2 dedicated to ingestion tests; shards 3-6 run chromium tests in 4-way split
    • Added doc generator paths to workflow skip list for optimization
    • Fixed BigQuery project ID environment variable name (PLAYWRIGHT_BQ_PROJECT_ID)
  • Test project configuration:
    • Added ingestion project in playwright.config.ts for @ingestion and @sample-data tagged tests
    • Configured ingestion project with dedicated setup/teardown and dependency management
    • Removed ingestion project from shard 1 execution to ensure proper test distribution
  • Test tagging and organization:
    • Added @sample-data tag to 16 test files requiring sample data ingestion
    • Updated ingestion project grep pattern to match both @ingestion and @sample-data tags
    • Rearranged spec files: moved TestCase and TestSuite tests to Pages directory for better organization
  • Test isolation improvements:
    • Updated chromium project's grepInvert to properly exclude /data-insight/, /ingestion/, and /sample-data/ patterns
    • Ensures clean separation between chromium and ingestion test execution
  • Bug fixes:
    • Fixed configuration mismatch where ingestion setup ran on wrong shard
    • Aligned ingestion test execution with ingestion setup location (both on shard 2)
    • Merged latest changes from main branch for compatibility

This will update automatically on new commits.


@github-actions

github-actions Bot commented Dec 9, 2025 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
65.84% (56032/85108) 45.18% (29334/64923) 47.95% (8848/18454)

aniketkatkar97
aniketkatkar97 previously approved these changes Feb 5, 2026
npx playwright test \
--project=chromium \
--grep-invert @dataAssetRules \
--shard=${CHROMIUM_SHARD}/4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Bug: Missing --workers flag in chromium test execution

The chromium test execution on shards 3-6 is missing the --workers flag that was previously present in the old code. The original code had --workers=50% which controlled parallelization within each shard.

Old code:

npx playwright test \
  --project=chromium \
  --grep-invert @dataAssetRules \
  --shard=${CHROMIUM_SHARD}/5
  --workers=50%

New code:

npx playwright test \
  --project=chromium \
  --grep-invert @dataAssetRules \
  --shard=${CHROMIUM_SHARD}/4

Without the --workers flag, the tests will use Playwright's default worker count, which may not be optimal for CI runners and could lead to resource issues or slower test execution.

Suggested fix: Add the --workers flag back:

npx playwright test \
  --project=chromium \
  --grep-invert @dataAssetRules \
  --shard=${CHROMIUM_SHARD}/4 \
  --workers=50%

Was this helpful? React with 👍 / 👎

await overview.shouldShowGlossaryTermsSection();
})

test(`Should update owners for ${entityType}`, PLAYWRIGHT_SAMPLE_DATA_TAG_OBJ, async ({ adminPage }) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Bug: Inconsistent tag placement - tag applied to single test instead of describe

In ExplorePageRightPanel.spec.ts, the PLAYWRIGHT_SAMPLE_DATA_TAG_OBJ tag is applied inconsistently. The parent test.describe('Right Panel Test Suite') is not tagged, but an individual test Should update owners for ${entityType} at line 195 is tagged with PLAYWRIGHT_SAMPLE_DATA_TAG_OBJ.

This creates an inconsistency because:

  1. Other tests in the same describe block (Should update description, Should update/edit tags, Should update/edit tier, etc.) don't have this tag
  2. If the parent describe needs sample data (as the beforeAll creates entities), all tests in this block should have the same tag

Looking at other tests in this file (e.g., lines 218, 252, 262), the tag is also applied to individual tests rather than the parent describe block.

Suggested fix: Either:

  1. Apply PLAYWRIGHT_SAMPLE_DATA_TAG_OBJ to the parent test.describe('Right Panel Test Suite') so all tests are consistently tagged, OR
  2. Ensure all tests that need sample data within this file have the tag applied individually

Given that the beforeAll creates entities via API context, the entire test suite likely depends on sample data setup, so tagging the parent describe block would be more appropriate.

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Feb 6, 2026 •

Copy link
Copy Markdown
🔍 CI failure analysis for 768b56d: Shard 4 at 99.8% (1 browser crash) on commit with Learning Resources fixes. Maintains excellent performance. Expected improvement on Shard 1 in next run. Ingestion: 54.3% → 99.8%.

Issue

CI job failed on commit 768b56dd82 (with Learning Resources fixes from main):

  • Shard 4 (Chromium 2/5): 1 failed, 22 skipped, 528 passed (99.8% pass rate) ✅

Root Cause

Shard 4 (Chromium 2/5) - Single failure ✅:

Entity.spec.ts:1814 - "Chart › User should be denied access to edit description when deny policy rule is applied on an entity"

  • Error: page.goto: Target page, context or browser has been closed
  • Location: common.ts:63 in redirectToHomePage() function during test setup
  • Type: Browser/page crash during navigation
  • Context: Test tries to navigate to homepage but browser crashed
  • Impact: Single environmental failure
  • Result: 99.8% pass rate (528/529 tests) - EXCELLENT ✅

Details

EXCELLENT PERFORMANCE - Shard 4: ✅

  • 99.8% pass rate on commit with Learning Resources fixes
  • Single flaky failure: Browser crash during test setup (environmental)
  • Not related to Learning Resources fixes or PR changes

Learning Resources Fix Impact:

Consistency Analysis:

  • Shard 4 across commits:
    • Previous runs: 99.8% (various single failures)
    • Current: 99.8% (single browser crash)
  • Consistent 99.8% pass rate - demonstrates stability ✅

Test Infrastructure:

  • Single environmental browser crash
  • Excellent performance maintained with Learning Resources fixes merged
  • Test tagging and sharding working correctly

Summary

Commit 768b56dd82 Status - Shard 4: ✅ EXCELLENT

  • 99.8% pass rate (528/529 tests)
  • Single browser crash failure (environmental)
  • Learning Resources fixes merged successfully
  • Performance maintained at exceptional levels

Expected Next:

  • Shard 1 should improve significantly (from 94.3% to ~99%+) with Learning Resources fixes
  • Shard 2 (Ingestion) should maintain 99.7-99.8%
  • Shard 6 should maintain 99.8%

PR Validation: ✅ HIGHLY SUCCESSFUL

  • Ingestion infrastructure recovery: 54.3% → 99.7-99.8% 🎉
  • Test tagging and CI workflow optimization working excellently
  • Consistent 99.8% on critical chromium shards
  • Learning Resources fixes merged and validated
Code Review ⚠️ Changes requested 7 resolved / 11 findings

CI workflow and test tagging refactor with 3 previously-identified issues still unresolved (trailing backslash in ingestion command, missing --workers flag, inconsistent tag on single test). New minor finding: duplicate JSX props on MUITagSuggestion component.

⚠️ Bug: Inconsistent tag placement - tag applied to single test instead of describe

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ExplorePageRightPanel.spec.ts:195

In ExplorePageRightPanel.spec.ts, the PLAYWRIGHT_SAMPLE_DATA_TAG_OBJ tag is applied inconsistently. The parent test.describe('Right Panel Test Suite') is not tagged, but an individual test Should update owners for ${entityType} at line 195 is tagged with PLAYWRIGHT_SAMPLE_DATA_TAG_OBJ.

This creates an inconsistency because:

  1. Other tests in the same describe block (Should update description, Should update/edit tags, Should update/edit tier, etc.) don't have this tag
  2. If the parent describe needs sample data (as the beforeAll creates entities), all tests in this block should have the same tag

Looking at other tests in this file (e.g., lines 218, 252, 262), the tag is also applied to individual tests rather than the parent describe block.

Suggested fix: Either:

  1. Apply PLAYWRIGHT_SAMPLE_DATA_TAG_OBJ to the parent test.describe('Right Panel Test Suite') so all tests are consistently tagged, OR
  2. Ensure all tests that need sample data within this file have the tag applied individually

Given that the beforeAll creates entities via API context, the entire test suite likely depends on sample data setup, so tagging the parent describe block would be more appropriate.

⚠️ Bug: Missing --workers flag in chromium test execution

📄 .github/workflows/playwright-postgresql-e2e.yml:141

The chromium test execution on shards 3-6 is missing the --workers flag that was previously present in the old code. The original code had --workers=50% which controlled parallelization within each shard.

Old code:

npx playwright test \
  --project=chromium \
  --grep-invert @dataAssetRules \
  --shard=${CHROMIUM_SHARD}/5
  --workers=50%

New code:

npx playwright test \
  --project=chromium \
  --grep-invert @dataAssetRules \
  --shard=${CHROMIUM_SHARD}/4

Without the --workers flag, the tests will use Playwright's default worker count, which may not be optimal for CI runners and could lead to resource issues or slower test execution.

Suggested fix: Add the --workers flag back:

npx playwright test \
  --project=chromium \
  --grep-invert @dataAssetRules \
  --shard=${CHROMIUM_SHARD}/4 \
  --workers=50%
💡 Quality: Duplicate data-testid and filterOptions props on Autocomplete

📄 openmetadata-ui/src/main/resources/ui/src/components/common/MUITagSuggestion/MUITagSuggestion.tsx:184-185

The PR adds data-testid="tag-suggestion" at line 184 and filterOptions={asyncFilterOptions} at line 185, but both props already exist on the same <Autocomplete> component:

  • data-testid="tag-suggestion" is already at line 176
  • filterOptions={asyncFilterOptions} is already at line 266

In JSX, duplicate props are allowed but the last value wins. Since the values are identical, this is functionally harmless but creates confusing redundancy. Remove the duplicate props — keep the existing ones at lines 176 and 266, and remove the newly added duplicates at lines 184-185.

💡 Bug: Trailing backslash in ingestion test command is unnecessary

📄 .github/workflows/playwright-postgresql-e2e.yml:131-133

Line 132 has a trailing \ after --project=ingestion, but the next line (133) is blank. While this technically works (the continuation joins with an empty line, producing just npx playwright test --project=ingestion), it's misleading — it looks like additional arguments were intended but omitted. This should be cleaned up to avoid confusion.

Suggested fix: Remove the trailing \ on the --project=ingestion line:

npx playwright test \
  --project=ingestion
✅ 7 resolved
✅ Bug: Typo in echo message: "tests tests" duplicated word

📄 .github/workflows/playwright-postgresql-e2e.yml:127-128
The echo message on line 128 contains a duplicated word "tests tests":

echo "🔹 Running ingestion tests tests on shard 2"

Should be:

echo "🔹 Running ingestion tests on shard 2"

While this doesn't affect functionality, it makes the CI output confusing and suggests the line wasn't reviewed carefully.

✅ Bug: Shard 1 now runs both DataAssetRules projects AND Basic project

📄 .github/workflows/playwright-postgresql-e2e.yml:121-126
The PR adds --project=Basic to shard 1, which now runs:

  • setup
  • DataAssetRulesEnabled
  • DataAssetRulesDisabled
  • Basic (newly added)

However, the Basic project in playwright.config.ts greps for @basic tags, and the PR also adds @basic to the grepInvert array for the chromium project (grepInvert: [/@data-insight/, /@ingestion/, /@sample-data/, /@basic/]).

This means:

  1. @basic tagged tests will run ONLY on shard 1 (via Basic project)
  2. They'll be excluded from shards 3-6 (chromium project with grepInvert)

Make sure this is the intended behavior - having @basic tests run only on shard 1 while other shards (3-6) run chromium tests. The documentation comment says "Shards 3-6 handle chromium tests (4 workers total)" but the distribution logic needs verification:

Please confirm this test distribution is correct, as running Basic tests only on shard 1 may create a bottleneck if there are many @basic tagged tests.

✅ Bug: Comment says shard 1 but condition checks for shard 2

📄 .github/workflows/playwright-postgresql-e2e.yml:9-13
The comment in the workflow file states "shard 1: run with ingestion setup" but the actual condition checks for shardIndex == 2. This documentation mismatch could cause confusion for future maintainers.

Based on the rest of the workflow logic where:

  • Shard 1 runs DataAssetRules tests
  • Shard 2 runs ingestion tests
  • Shards 3-6 run chromium tests

The condition is correct (shardIndex == 2), but the comment should be updated to say "shard 2" instead of "shard 1".

Suggested fix:

# Pass different args depending on the shardIndex:
# - shard 2: run with ingestion setup
# - other shards: skip ingestion setup
args: ${{ matrix.shardIndex == 2 && '-d postgresql' || '-d postgresql -i false' }}
✅ Bug: Typo in Playwright config: grap should be grep

📄 openmetadata-ui/src/main/resources/ui/playwright.config.ts:110-111
In the Playwright configuration file, there's a typo where grap: /@basic/ should be grep: /@basic/. This will cause the test filtering to not work as intended for the DataAssetRulesEnabled project, as grap is not a valid Playwright config option.

Impact: Tests tagged with @basic won't be properly filtered for the DataAssetRulesEnabled project.

Fix: Change grap to grep:

{
  name: 'DataAssetRulesEnabled',
  testMatch: '**/DataAssetRulesEnabled.spec.ts',
  grep: /@basic/,  // Fixed typo
  use: { ...devices['Desktop Chrome'] },
  ...
}
✅ Bug: grepInvert doesn't match new @sample-data tag pattern

📄 openmetadata-ui/src/main/resources/ui/playwright.config.ts:68
The grepInvert pattern for the chromium project excludes /data-insight/ and /ingestion/ but doesn't exclude /sample-data/. However, the new ingestion project uses grep: /@ingestion|@sample-data/ to match tests tagged with either @ingestion or @sample-data.

Since grepInvert: [/data-insight/, /ingestion/] only excludes tests matching /ingestion/ (without the @), and tests are being tagged with @sample-data, these tests may still be picked up by the chromium project in addition to the ingestion project, causing them to run twice.

Suggested fix: Update the chromium project's grepInvert to:

grepInvert: [/data-insight/, /@ingestion/, /@sample-data/],

This ensures consistency between what the ingestion project includes and what the chromium project excludes.

...and 2 more resolved from earlier reviews

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

sonarqubecloud Bot commented Feb 6, 2026

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
test — 768b56dd Deployed Feb 6, 2026 by chirag-madlani via playwright-ci-postgresql (6, 6) #33185
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.

4 participants