ci(e2e): add E2E Tests parent workflow and make docker-unified callable
Summary
Adds .github/workflows/e2e-tests.yml ("E2E Tests"). It becomes the parent of the end-to-end test lanes: it owns the pull_request and push triggers, classifies the PR once for smart testing, and calls docker-unified.yml as a reusable workflow. PR, push, release and dispatch runs should behave the same as before.
e2e-tests.yml: samepaths:lists as docker-unified plus itself. Jobs:setup(PR only, just the change flags the classifier reads),classify_pr(moved from docker-unified), anddocker: uses: ./.github/workflows/docker-unified.ymlwithsecrets: inherit.dockeralso runs whenclassify_pris skipped (push, forks) or fails. The concurrency group moves here unchanged.docker-unified.yml:pushandpull_requestare replaced byworkflow_call, with 9 string inputs carrying the classifier outputs.releaseandworkflow_dispatchstay.needs.classify_pr.outputs.*becomesinputs.*, andgithub.event.inputs.*becomesinputs.*. The concurrency group is removed: underworkflow_call,github.workflowis the caller's name, so it would have shared the parent's group. No other job bodies move.- PostHog: failure events from this lane keep the workflow name
Docker Build, Scan, Test. The pytest step is pinned.resusable-playwright-tests.ymlgets an optionalworkflow_nameinput; its other callers are unchanged. - Listeners and filters:
post-workflow-actions.yml:E2E Testsis added to the list and to retry-on-failure.- The success notification fires for
E2E Testson a push and forDocker Build, Scan, Teston a release. - The escape check uses
E2E Testsruns and falls back todocker-unified.ymlruns for PRs whose last run predates the parent.
update-test-weights.yml,docker-unified-nightly.yml,download_test_artifacts.shand theci-optimizationpytest-workflow filter now point ate2e-tests.yml.validate_post_workflow_list.pyallowsDocker Build, Scan, Test, which release runs still use.
workflow_metrics.py: nested job names (docker / <job>) no longer collapse into onedockerentry. A test is added.
Job check names on PRs change from <job> to docker / <job>. Anything keyed on the old names (branch protection rules, dashboards) needs a look.
Workflow flow after this PR
flowchart LR
subgraph T["Triggers"]
PR["pull_request"]
PUSH["push: master, releases/**"]
REL["release"]
DISP["workflow_dispatch"]
end
subgraph E2E["E2E Tests (e2e-tests.yml)"]
SETUP["setup (PRs only)"]
CLS["classify_pr (once)"]
DOCKER["docker job"]
SETUP --> CLS --> DOCKER
end
subgraph DU["docker-unified.yml (Docker Build, Scan, Test)"]
DSETUP["setup"] --> BB["base_build"]
DSETUP --> STM["smoke_test_matrix"]
STM --> PYT["pytest_tests"]
BB --> PYT
DSETUP --> PWP["playwright_plan"]
PWP --> PWT["playwright_test"] --> PWR["playwright_report"]
BB --> PWT
BB --> AI["ai_smoke_test / java_integration_tests"]
PYT --> PUB["publish_images / deploy (master only)"]
PWT --> PUB
end
PR --> SETUP
PUSH --> DOCKER
DOCKER -- "workflow_call + classifier inputs" --> DSETUP
REL -- "runs directly" --> DSETUP
DISP -- "runs directly" --> DSETUP
subgraph PWA["post-workflow-actions.yml (workflow_run)"]
RETRY["retry on first failure"]
FAIL["Slack: failure"]
OK["Slack: Docker build success"]
MET["metrics"]
ESC["smart-selection escape check"]
end
E2E -- "named E2E Tests (PR, push)" --> PWA
DU -- "named Docker Build, Scan, Test (release, dispatch)" --> PWA
- PR and push runs report as E2E Tests, with the lane's jobs nested as
docker / <job>. A called workflow has no run of its own, so it sends no separateworkflow_runevent. - Release and
workflow_dispatchruns still startdocker-unified.ymldirectly and report as Docker Build, Scan, Test. - Slack "Docker build success" fires for E2E Tests on push and for Docker Build, Scan, Test on release. The failure notification, retry and metrics cover both names.
- The escape check runs on E2E Tests push runs. It looks up the merged PR's run under
e2e-tests.ymlfirst, thendocker-unified.yml.
Validation
Done locally: actionlint, githubActionsPrettierCheck, .github/scripts/test and .github/smart-testing/test, and validate_post_workflow_list.py.
Runs on this branch (temporary commits have been reverted; the branch content now equals the original change plus the escape-check fallback):
- PR run 45980359571 (
.github-only diff): success. Oneclassify_prin the parent, lane jobs nameddocker / *, classifier tags reachedsmoke_test_matrix, no separate Docker Build, Scan, Test run. Manual dispatch 45980878460: success, default inputs applied, smart testing off, full 5 pytest batches and 5 Playwright shards. run-all-testslabel, PR run 45982424953: success, classifier stepped aside. Push run 45982420814 (temporary push trigger): parentsetup/classify_prskipped,dockerran, publish and deploy stayed off, full 5 pytest batches. One known-flaky glossary test failed, the same one master's push runs flake on.post-workflow-actionsmetrics dispatch 45988457229: nested job names kept (docker / Pytest Smoke Tests, matrixBatch 1/5), no publish, no Slack. Re-run of failed jobs on 45982420814: only the failed batch re-ran, the retry step ran just the failed module, and the run turned green. A new push cancelled the superseded run 45988728203 together with all its nested jobs.- PR run 45988847358 (temporary backend change +
run-all-tests): success. Full 5 pytest batches, Playwright plan + 8 shards + merged report underdocker / *, all test artifacts present. - PR run 45991631117 (final content, label removed): success. Classifier ran in shadow mode, 0 pytest batches for a workflow-only diff (same as master).
- PR run 45994405218 (smart testing active): success. Pytest canary of 10 tests in 1 batch,
pytest-smoke-planartifact, sticky smart-testing comment posted, selection telemetry step succeeded.
Checklist
- The PR conforms to DataHub's Contributing Guideline (PR title format)
- Tests for the changes have been added/updated
- Docs: smoke-test README lane table follows in the next PR
- No breaking change for users (CI only)
š¤ Generated with Claude Code
Summary by cubic
Adds a new E2E Tests parent workflow that owns the PR and push triggers for the end-to-end test lane, classifies each PR once for smart testing, and calls docker-unified.yml as a reusable workflow. Release and manual runs still start docker-unified.yml directly, which now receives the classifier outputs as workflow_call inputs.
Migration
- PR job check names change from
<job>todocker / <job>; branch protection rules and dashboards keyed on the old names need a look.
Behavior preserved
- PostHog failure events keep the workflow name
Docker Build, Scan, Test; the pytest step is pinned and the Playwright reusable gets an optionalworkflow_nameinput. post-workflow-actions,update-test-weights,docker-unified-nightly,download_test_artifacts.sh, and theci-optimizationpytest-workflow filter now point ate2e-tests.yml.- The escape check looks up
e2e-tests.ymlruns and falls back todocker-unified.ymlfor PRs that predate the parent. workflow_metrics.pykeeps nested job names (docker / <job>) instead of collapsing them into onedockerentry.