Skip to content

ci(e2e): run the Docker-free lane from the E2E Tests parent workflow - #21678

Merged
devashish2203 merged 2 commits into
ci/pfp-7310-e2e-tests-parent-workflowfrom
ci/pfp-7310-docker-free-callable
Nov 27, 2026
Merged

devashish2203 merged 2 commits into
ci/pfp-7310-e2e-tests-parent-workflowfrom
ci/pfp-7310-docker-free-callable

Conversation

@devashish2203

@devashish2203 devashish2203 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #21673 (E2E Tests parent workflow + callable docker-unified.yml).

Summary

docker-free-e2e.yml becomes a reusable workflow that the E2E Tests parent (e2e-tests.yml) calls next to the Docker lane. The lane gets the same smart-testing pipeline as the Docker lane: one classification in the parent, its own batch plan on the Docker-free stack's weights, its own PR comment and PostHog events.

  • docker-free-e2e.yml: push, pull_request, the docker-free:pytests label gate and the label-aware concurrency group are removed. It now has workflow_call (the 9 classifier inputs docker-unified.yml takes, plus smoke_tier and smoke_changed_tests) and workflow_dispatch (full tier, 9 batches, smart testing off).
    • New smoke_test_matrix job: resolves the smart-testing mode like the Docker lane and runs plan_pytest_batches.sh with SMOKE_BACKEND=local, so batches are packed on pytest_test_weights_docker_free.json (cap 9, 8-minute target). Plan artifact: pytest-smoke-plan-local. Same fallbacks as the Docker lane: fixed 9 batches for the full tier, 3 for p0, and p0 in 3 batches if an active plan fails.
    • pytest_tests reads the matrix, tier and plan from smoke_test_matrix. PostHog failure events keep --workflow-name "Docker-free E2E" and --batch-label docker-free.
    • New comment_smart_testing job posts the lane's own sticky comment.
  • e2e-tests.yml: setup decides run_pytest, smoke_tier and smoke_changed_tests. These are copies of the Docker lane's PR logic, with "keep in step" comments on both sides. The new docker_free job calls the lane on pull requests when the Docker lane runs pytest, and on every push to master.
  • Scripts: render_comment.py compose --lane gives a lane its own comment marker. send_smart_selection_to_posthog.py adds a lane property (docker, docker-free).
  • Listeners:
    • post-workflow-actions.yml: the Docker build success message for an E2E Tests push follows the run's docker / * jobs, so a Docker-free-only failure does not suppress it. It waits for the retry when attempt 1 failed. Docker Build, Scan, Test pushes from older release branches still notify. The escape check downloads only the Docker lane's pytest results.
    • update-test-weights.yml reads Docker-free results from e2e-tests.yml.
    • validate_post_workflow_list.py allows Docker-free E2E, which now has dispatch runs only.
    • The ci-optimization pytest-workflow filter covers the lane and its stack action.
  • Docs: smoke-test/README.md describes both lanes in a table, with labels and dispatch. AGENTS.md no longer mentions the label.

Workflow after this PR

flowchart LR
  PR["pull_request"]
  PUSH["push: master, releases/**"]
  DISP_D["workflow_dispatch: docker-unified.yml"]
  DISP_F["workflow_dispatch: docker-free-e2e.yml"]
  REL["release"]

  subgraph PARENT["E2E Tests (e2e-tests.yml)"]
    SETUP["setup: change flags, run_pytest, smoke_tier"]
    CLASSIFY["classify_pr: smart-testing tags"]
    DJOB["docker"]
    FJOB["docker_free"]
  end

  subgraph DOCKER["Docker lane (docker-unified.yml)"]
    D_BUILD["setup, base_build"]
    D_MATRIX["smoke_test_matrix"]
    D_PYTEST["pytest_tests batches"]
    D_PW["playwright_plan, Playwright shards"]
    D_OTHER["Java SDK, AI smoke, publish"]
    D_COMMENT["comment_smart_testing"]
  end

  subgraph FREE["Docker-free lane (docker-free-e2e.yml)"]
    F_BUILD["build"]
    F_MATRIX["smoke_test_matrix: plan on local weights"]
    F_PYTEST["pytest_tests batches"]
    F_COMMENT["comment_smart_testing"]
  end

  subgraph POST["post-workflow-actions.yml"]
    RETRY["retry on first failure"]
    SLACK_F["Slack: failure"]
    SLACK_S["Slack: Docker build success"]
    METRICS["metrics"]
    ESCAPE["escape check"]
  end

  PR --> SETUP
  SETUP -->|"same-repo PR, not run-all-tests"| CLASSIFY
  PUSH --> DJOB
  SETUP --> DJOB
  CLASSIFY -->|"tags or empty"| DJOB
  CLASSIFY -->|"tags or empty"| FJOB
  SETUP -->|"run_pytest (forks too)"| FJOB
  PUSH -->|"master only (stability window)"| FJOB

  DJOB --> D_BUILD
  D_BUILD --> D_MATRIX --> D_PYTEST
  D_BUILD --> D_PW
  D_BUILD --> D_OTHER
  D_MATRIX -->|"same-repo PR, mode not off"| D_COMMENT
  DISP_D --> D_BUILD
  REL --> D_BUILD

  FJOB --> F_BUILD
  FJOB --> F_MATRIX
  F_BUILD --> F_PYTEST
  F_MATRIX --> F_PYTEST
  F_MATRIX -->|"same-repo PR, mode not off"| F_COMMENT
  DISP_F -->|"full tier, 9 batches, smart off"| F_BUILD

  PARENT -->|"workflow_run: E2E Tests"| POST
  DOCKER -->|"workflow_run: Docker Build, Scan, Test (release, dispatch)"| POST
  FREE -->|"workflow_run: Docker-free E2E (dispatch)"| POST
Loading

Smart-testing mode for each lane's pytest comes from the SMART_TESTING_MODE repository variable on same-repo PRs. It is off on pushes, on dispatch, on fork PRs, and with the run-all-tests or run-all-tests:pytest label. SMART_TESTING_MODE and PYTEST_P0_SMOKE are set in this repository, so same-repo PRs run the p0 tier with planned batches. A PR that only changes the pytest wiring runs a canary.

What changes for contributors

  • Same-repo PRs that run pytest on the Docker lane also run it on the Docker-free stack. You'll see docker-free / … jobs and a second sticky comment, "Smart test selection (docker-free lane)". The docker-free:pytests label is no longer needed.
  • Fork PRs run the Docker-free lane too, on GitHub-hosted runners: full tier, 9 batches, smart testing off, no comment.
  • run-all-tests / run-all-tests:pytest turn smart testing off in both lanes. They don't start a lane the change wouldn't start.
  • To run the Docker-free lane alone, dispatch Docker-free E2E from the Actions tab.

Decisions

  • Forks run the lane. Repository variables and secrets don't reach fork PRs, so the lane falls back to ubuntu-24.04 runners, no remote Gradle cache and smart testing off.
  • No gate job. Branch protection (Mergeable) blocks on the lane's own docker-free / * jobs.
  • Lane-specific comment marker (<!-- smart-testing-selection:docker-free -->), so the two lanes don't overwrite each other's comment.
  • PostHog lane property on ci_smart_selection events (docker / docker-free). Failure events keep their pinned workflow names.
  • Every push to master runs the lane while it runs next to the Docker lane. It is a temporary stability window, to be narrowed later.
  • Batch counts (9 full, 3 p0) are unchanged here. A follow-up will right-size them from real runs.

Validation

Checks run locally:

  • actionlint on the changed workflows
  • githubActionsPrettierCheck and mdPrettierCheck
  • validate_post_workflow_list.py
  • pytest .github/scripts/test .github/scripts/release/test .github/smart-testing/test: 858 passed
  • plan_pytest_batches.sh with SMOKE_BACKEND=local: a canary plans 1 batch

To run on the branch:

  1. This PR touches only workflow files (all pytest-workflow changes). Under active mode, both lanes should plan a canary. Expect docker-free / smoke_test_matrix in active mode, pytest-smoke-plan-local uploaded, a small planned matrix, and two sticky comments.
  2. A connector-source-only change: docker_free is skipped, along with the Docker lane's pytest.
  3. A backend change: p0 tier, planned batches in both lanes, ci_smart_selection events with each lane.
  4. The run-all-tests:pytest label: fixed 9 batches at the full tier, no lane comment.
  5. A forced batch failure: the docker-free / … batch job and the run go red.
  6. Dispatch docker-free-e2e.yml alone: 9 batches, smart testing off, jobs without a prefix.
  7. "Re-run failed jobs" on one Docker-free batch: smoke-test-retry finds its previous results.
  8. After merge: first master push runs both lanes; the Docker build success message follows the docker / * jobs; weekly weights find Docker-free results under e2e-tests.yml.

Checklist

🤖 Generated with Claude Code


Summary by cubic

Makes docker-free-e2e.yml a reusable lane of the E2E Tests parent workflow, giving the Docker-free pytest suite the same smart-testing pipeline as the Docker lane: one PR classification, batches planned on the lane's own weights, its own sticky PR comment, and PostHog events tagged with a lane property.

  • The lane loses its own push/pull_request triggers and the docker-free:pytests label. For now e2e-tests.yml calls it only on every push to master as a temporary stability window, so docker / … and docker-free / … jobs run side by side. The PR wiring (the Docker lane's run_pytest decision, tier, changed tests, and classifier tags) is in place, so enabling PRs later is one condition on the calling job. workflow_dispatch still runs the lane alone with smart testing off.
  • New smoke_test_matrix and comment_smart_testing jobs mirror the Docker lane's planning and comment logic: batches are planned on pytest_test_weights_docker_free.json via SMOKE_BACKEND=local, with the same fallbacks (9 batches full, 3 for p0), and each lane keeps its own comment marker.
  • post-workflow-actions.yml now bases the Docker build success Slack message for E2E Tests pushes on the run's docker / * jobs, so a Docker-free-only failure doesn't suppress it; it waits for retry-on-failure before notifying. The escape check uses only the Docker lane's pytest results.
  • update-test-weights.yml reads Docker-free results from e2e-tests.yml; ci-optimization's pytest-workflow filter now covers the lane and its stack action.

What changes for contributors

  • master pushes now run the Docker-free lane next to the Docker lane, adding docker-free / … jobs. The docker-free:pytests label is no longer used.
  • To run the lane alone, dispatch Docker-free E2E from the Actions tab.

Written for commit 319253a. Summary will update on new commits.

View guided diff Turn on auto-fix

docker-free-e2e.yml becomes a reusable workflow that e2e-tests.yml calls
next to docker-unified.yml. Its own push and pull_request triggers and the
docker-free:pytests label gate are removed; workflow_dispatch stays for
running the lane alone (full tier, 9 batches, smart testing off).

- e2e-tests.yml: setup decides run_pytest, smoke_tier and
  smoke_changed_tests (copies of docker-unified's PR logic, commented on
  both sides). The docker_free job calls the lane on pull requests,
  forks included, when the Docker lane runs pytest, and on every push to
  master while the lane runs next to the Docker lane.
- docker-free-e2e.yml: takes classify_pr's outputs plus smoke_tier and
  smoke_changed_tests. A new smoke_test_matrix job resolves the smart
  testing mode and plans batches with SMOKE_BACKEND=local on the lane's
  own weights (artifact pytest-smoke-plan-local), with the same
  fallbacks as docker-unified (9 batches full tier, 3 for p0). The lane
  posts its own sticky smart testing comment and pins its PostHog
  failure events to "Docker-free E2E".
- render_comment.py: compose --lane gives a lane its own comment marker.
  send_smart_selection_to_posthog.py: events carry a lane property
  (docker, docker-free).
- post-workflow-actions.yml: the Docker build success message for an
  E2E Tests push now follows the run's docker / * jobs, and Docker
  Build, Scan, Test pushes from older release branches still notify.
  The escape check compares Docker-lane results only.
- update-test-weights.yml reads Docker-free results from e2e-tests.yml;
  validate_post_workflow_list.py allows "Docker-free E2E" (dispatch
  runs); ci-optimization's pytest-workflow filter covers the lane.
- smoke-test/README.md describes both lanes, labels and dispatch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devashish2203 devashish2203 changed the title ci/pfp 7310 docker free callable ci(e2e): run the Docker-free lane from the E2E Tests parent workflow Nov 27, 2026
@github-actions github-actions Bot added devops PR or Issue related to DataHub backend & deployment smoke_test Contains changes related to smoke tests labels Nov 27, 2026
@cursor

cursor Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

PR Summary

Overview
Makes docker-free-e2e.yml a callable lane of e2e-tests.yml instead of its own push/PR workflow. The docker-free:pytests label, label-aware concurrency, and fixed 9-batch matrix in build are removed; workflow_call takes classifier inputs plus smoke_tier / smoke_changed_tests, and workflow_dispatch still runs the lane alone with smart testing off.

The lane gets the same pytest smart-testing path as Docker: new smoke_test_matrix (mode resolution, plan_pytest_batches.sh with SMOKE_BACKEND=local, artifact pytest-smoke-plan-local), comment_smart_testing with a lane-specific PR comment marker, and pytest_tests driven by that matrix (including plan download). PostHog smart-selection events gain a lane property (docker / docker-free).

e2e-tests.yml adds setup logic for run_pytest, tier, and changed smoke modules (kept in sync with docker-unified.yml) and a docker_free job that calls the lane on every master push for now; PR enablement is wired but gated on stability.

Follow-on CI behavior: Docker build success Slack for E2E Tests push runs keys off docker / * jobs only; escape-check artifact patterns exclude docker-free results; update-test-weights reads docker-free artifacts from e2e-tests.yml; docs drop the label in favor of the parent workflow.

Reviewed by Cursor Bugbot for commit 319253a. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

Smart test selection (docker-free lane)

pytest smoke tests

Mode: active. Only the selection below runs for the pytest smoke tests on this PR (applied: canary).

  • Selection: canary: always-run modules plus this PR's changed tests (no product feature identified)
  • Size: 10 of 784 tests in 1 batch, predicted longest batch ~0 min
  • Tags: change-type: ci, docs, tooling
  • Confidence: HIGH (13 changed files)
  • Classifier reasoning: Only CI, test-infrastructure, docs or tooling files changed, so the classifier was not called.
Selected scopes (3 files or classes, 10 tests)
  • tests/e2e/authorization/test_self_entity_auth.py
  • tests/e2e/read_only/test_services_up.py
  • tests/e2e/search/test_search_projection.py::TestSearchProjection

Add the run-all-tests:pytest label to run the full pytest suite on this PR.

commit 48bc2ab · workflow run

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Smart test selection

pytest smoke tests

Mode: active. Only the selection below runs for the pytest smoke tests on this PR (applied: canary).

  • Selection: canary: always-run modules plus this PR's changed tests (no product feature identified)
  • Size: 10 of 846 tests in 1 batch, predicted longest batch ~0 min
  • Tags: change-type: ci, docs, tooling
  • Confidence: HIGH (13 changed files)
  • Classifier reasoning: Only CI, test-infrastructure, docs or tooling files changed, so the classifier was not called.
Selected scopes (3 files or classes, 10 tests)
  • tests/e2e/authorization/test_self_entity_auth.py
  • tests/e2e/read_only/test_services_up.py
  • tests/e2e/search/test_search_projection.py::TestSearchProjection

Add the run-all-tests:pytest label to run the full pytest suite on this PR.

commit 319253a · workflow run

The lane runs on every push to master to build up a record of stable
runs before it runs on pull requests. The PR wiring (run_pytest,
smoke_tier and smoke_changed_tests from setup, the classifier's tags)
stays in place, so enabling pull requests is one condition on the
docker_free job.

The calling job is named docker-free, so the lane's jobs show as
"docker-free / <job>" rather than "docker_free / <job>".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 319253a. Configure here.

if (( total > 0 && bad == 0 )); then
success=true
fi
echo "success=$success" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Retry omits Docker lane jobs

High Severity

docker-lane-result lists jobs from the attempt-scoped API. After rerun-failed-jobs, that attempt only contains the jobs that reran, so a Docker-free-only failure leaves no docker / * jobs. Combined with skipping the Slack success message on attempt 1, a passing Docker lane never notifies — the case this job was added to cover.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 319253a. Configure here.

- ".github/workflows/e2e-tests.yml"
- ".github/workflows/docker-unified.yml"
- ".github/workflows/docker-free-e2e.yml"
- ".github/actions/docker-free-stack"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stack action path filter incomplete

Medium Severity

The new path .github/actions/docker-free-stack has no trailing /**, so it does not match files inside that action. !.github/** still excludes them, so a stack-action-only change does not start E2E Tests and the Docker-free lane never runs. The pytest-workflow filter in the same PR correctly uses docker-free-stack/**.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 319253a. Configure here.

@devashish2203
devashish2203 enabled stacked auto-merge (squash) November 27, 2026 12:31
@devashish2203
devashish2203 merged commit 81f06b1 into master Nov 27, 2026
48 of 49 checks passed
@devashish2203
devashish2203 deleted the ci/pfp-7310-docker-free-callable branch November 27, 2026 12:33

This branch was successfully deployed

1 active deployment
Preview — 319253a0 Deployed Nov 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops PR or Issue related to DataHub backend & deployment smoke_test Contains changes related to smoke tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants