Repository navigation
fix(playwright): wait for the blocking Airflow deploy before asserting - #34055
Conversation
Since #33883, Airflow 3's deploy call keeps the request open until the scheduler registers the DAG (up to 60s). In CI the deploy went from about 0.1s to 15-19s, which is longer than the 15s expect that followed it. - AddTestCaseNewFlow: createTestCase() waits for the drawer to close, which only happens once the deploy answers. The no-pipeline check now runs after that, so a late pipeline POST can no longer slip past it. - TestSuitePipelineRedeploy: poll deploy results for 90s instead of 30s, and mark the test slow so the longer wait fits the test budget. - ServiceBaseClass.scheduleIngestion: wait for the deploy response, not the request, before checking the success line.
❌ 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 |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
Code Review ✅ Approved🟡 Medium risk · Playwright waits for deploy completion and extends test execution timeouts. Adds explicit waits for the blocking Airflow deploy to complete before asserting on test case pages and pipeline redeploy results. This fixes flaky OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
✅ Playwright Results — workflow succeededValidated commit ✅ 4600 passed · ❌ 0 failed · 🟡 5 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 53m 23s ⏱️ Max setup 4m 32s · max shard execution 24m 23s · max shard-job elapsed before upload 27m 45s · reporting 37s 🌐 127.33 requests/attempt · 2.23 app boots/UI scenario · 41.63% common-shard skew Optimization targets still in progress:
🟡 5 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Summary
Since #33883, the Airflow 3 deploy call keeps the request open until the scheduler registers the DAG (
_wait_for_dag_registration, up to 60s). In CI, deploy went from about 0.1s to 15–19s.Add Column Test Casethen waited only 15s for the test case page, which the UI opens after deploy answers, so it failed on every ingestion-lane run that included #33883 (run).The change: wait for the deploy to finish, then assert.
Moving the no-pipeline check after the drawer closes also fixes a check that could never fail. It used to run right after the test-case response, before a pipeline POST could arrive.
How I chose these three
I compared per-test durations from the ingestion-lane
playwright-timingsartifacts, 16 before #33883 and 23 after, and read each deploy-dependent flow in the tests that slowed down:TestSuiteMultiPipeline,utils/dataQuality.ts, andDataQuality,DimensionalityandTestSuitethroughsubmitTestCaseFormwait with no time limit, either on the deploy response or on the drawer closing.getAuthContext, whose timeout is 90s.DataContractsandAutoPilotalready have long enough test timeouts.Evidence
Deploy latency from the CI server access log, per ingestion lane:
Local run against Airflow 3.3.1 with #33883's
deploy.pyandapi/utils.py,--project=Ingestion --retries=0. Local deploy took 8.6s with only a few DAGs, so for the A/B I usedpage.routeto delay each deploy request to CI-like latency. The delay was only in temporary spec copies, which are not part of this PR.Add Column Test Case: failed withexpect(locator).toHaveText … Timeout: 15000ms … element(s) not found, the same error as CI.Re-deploy all test-suite ingestion pipelines: failed withWait for every selected pipeline to report a deploy result … Timeout 30000ms exceeded.AddTestCaseNewFlow.spec.tsandTestSuitePipelineRedeploy.spec.tspass.Not run: the
ServiceBaseClass.scheduleIngestionchange. It is only reached by the nightlyServiceIngestionspecs, which need external source services. ESLint, Prettier andtscpass on all three files.Merge Danger
Door: two-way
Test-only change; revert is trivial.
Blast Radius: tests
Only
@ingestionspecs and the nightly service-ingestion helper. There are no app changes. The Re-deploy test's worst-case failure time grows from 60s to 180s.🤖 Generated with Claude Code