Repository navigation
test(playwright): add ImportExport and AdvancedSearch projects to 2.0 config - #34224
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
| const hasDedicatedImportExportLane = | ||
| Boolean(shardPlan) || process.env.PW_DEDICATED_IMPORT_EXPORT === 'true'; |
There was a problem hiding this comment.
⚠️ Bug: 2.0 merge-queue/nightly workflow silently stops running these tests
The 2.0 branch's own .github/workflows/playwright-postgresql-e2e.yml (merge_group/schedule/dispatch) runs its Discover step (lines 425-439) without the ImportExport or AdvancedSearch projects and without PW_DEDICATED_IMPORT_EXPORT. Discovery therefore puts Features/AdvancedSearch.spec.ts nowhere, because this PR adds it to chromium testIgnore unconditionally. @import-export tests such as ClassificationImportExport.spec.ts land in the plan under chromium. At run time PW_SHARD_PLAN is set (line 925), so hasDedicatedImportExportLane becomes true and chromium's grepInvert drops @import-export. Only the planned projects are passed, and ImportExport isn't one of them. As a result, both suites stop running in 2.0 merge-queue and nightly CI with no error. Fix this by adding --project=ImportExport --project=AdvancedSearch and PW_DEDICATED_IMPORT_EXPORT: "true" to the 2.0 workflow's Discover step, the same way PW_DEDICATED_INGESTION is handled.
Update the 2.0 workflow Discover step to include the new lanes:
env:
PLAYWRIGHT_IS_OSS: "true"
PW_DEDICATED_INGESTION: "true"
PW_DEDICATED_IMPORT_EXPORT: "true"
run: |
npx playwright test --list --reporter=json \
--project=chromium \
--project=ImportExport \
--project=AdvancedSearch \
...
Was this helpful? React with 👍 / 👎
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
…ecycle projects in coverage on 2.0 The 2.0 CI discovery step never sets PW_DEDICATED_IMPORT_EXPORT or lists an ImportExport project, so @Import-Export specs are planned into the chromium lane. The config added in #34224 still dropped them from chromium whenever a shard plan was set, so planned tests such as ClassificationImportExport never ran and the coverage gate reported them missing. Gate the dedicated lane on the env flag only. Also backport the lifecycle-project filter from main's verify_playwright_coverage.py: setup projects like data-insight-application run once per shard that includes a dependent project, so splitting @Data-insight specs across shards flagged them as unexpected and duplicate.
The
mainPlaywright workflow runs on2.0PRs (pull_request_target). Its "Discover tests" step passes--project=ImportExportand--project=AdvancedSearch.2.0'splaywright.config.tsdefines neither, so any2.0PR that touches UI files failsplan-playwrightwith:Copies the minimal pieces from
main:hasDedicatedImportExportLaneflag (PW_SHARD_PLANorPW_DEDICATED_IMPORT_EXPORT=true)ImportExportproject (grep@import-export), plus the matchingchromiumgrepInvertentryAdvancedSearchproject, plus**/AdvancedSearch.spec.tsinchromiumtestIgnoreso it does not run twiceVerified locally:
npx playwright test --list --project=ImportExport --project=AdvancedSearchresolves with no errors.Not a full config sync with
main(~220 lines differ); only what the workflow's project list requires.