mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
fix(ci): load all examples for Playwright E2E tests
**Problem**: Playwright duplicate test fails in CI because `members_channels_2` dataset is not loaded with `--load-test-data` flag. The `--load-test-data` flag only loads files matching `*.test.*` pattern (e.g., `unicode_test.test.yaml`). Regular example datasets like `members_channels_2.yaml` are skipped, causing the duplicate dataset test to fail with null. **Root Cause**: - CI uses `superset load_examples --load-test-data` (line 115 in bashlib.sh) - This loads ONLY `*.test.*` files (1 dataset: unicode_test) - Playwright test expects `members_channels_2` virtual dataset - Ephemeral environments use `superset load_examples` (all datasets) **Solution**: Create separate data loading function for Playwright 1. Added `playwright_testdata()` function in bashlib.sh: - Loads ALL examples via `superset load_examples` (no flag) - Includes all 17 datasets (16 virtual + 1 test) - Matches ephemeral environment behavior 2. Updated superset-e2e.yml: - Playwright job now uses `playwright_testdata` instead of `testdata` - Cypress tests still use `testdata` (unchanged) **Impact**: - ✅ Playwright tests can use realistic example datasets - ✅ Matches ephemeral environment data availability - ✅ No impact on Cypress tests (still use --load-test-data) - ⏱️ CI data loading ~30-60s slower (acceptable tradeoff) **Testing**: Will be validated by CI run after push 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
13
.github/workflows/bashlib.sh
vendored
13
.github/workflows/bashlib.sh
vendored
@@ -117,6 +117,19 @@ testdata() {
|
||||
say "::endgroup::"
|
||||
}
|
||||
|
||||
playwright_testdata() {
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
say "::group::Load all examples for Playwright tests"
|
||||
# must specify PYTHONPATH to make `tests.superset_test_config` importable
|
||||
export PYTHONPATH="$GITHUB_WORKSPACE"
|
||||
pip install -e .
|
||||
superset db upgrade
|
||||
superset load_test_users
|
||||
superset load_examples
|
||||
superset init
|
||||
say "::endgroup::"
|
||||
}
|
||||
|
||||
celery-worker() {
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
say "::group::Start Celery worker"
|
||||
|
||||
2
.github/workflows/superset-e2e.yml
vendored
2
.github/workflows/superset-e2e.yml
vendored
@@ -223,7 +223,7 @@ jobs:
|
||||
if: steps.check.outputs.python || steps.check.outputs.frontend
|
||||
uses: ./.github/actions/cached-dependencies
|
||||
with:
|
||||
run: testdata
|
||||
run: playwright_testdata
|
||||
- name: Setup Node.js
|
||||
if: steps.check.outputs.python || steps.check.outputs.frontend
|
||||
uses: actions/setup-node@v5
|
||||
|
||||
Reference in New Issue
Block a user