Skip to content

ci: Python integration tests and Playwright E2E only in the merge queue - #34740

Merged
karanh37 merged 4 commits into
mainfrom
ulixius9/python-tests-ci-splitting
Oct 7, 2026
Merged

karanh37 merged 4 commits into
mainfrom
ulixius9/python-tests-ci-splitting

Conversation

@ulixius9

@ulixius9 ulixius9 commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

PR runs of py-tests / py-tests-postgres now run only the unit tests and static checks. The backend build and the integration shards run only in merge_group (and on workflow_dispatch), to keep PR feedback fast. The Postgres Playwright E2E suite gets the same treatment: it no longer runs on PRs at all and runs only in the merge queue (plus schedule / dispatch). The pr-checklist skill and the PR template now require running the unit + integration tests that cover changed ingestion/ files locally, with the results recorded in the PR body.

Type of change:

  • Improvement

High-level design:

  • py-tests-shared.yml: the changes job emits a new integration output: true on merge_group (when Python paths changed) and on workflow_dispatch, false on pull_request_target. build-distribution and py-integration-tests gate on it. prepare-spacy-model is skipped when neither unit nor integration jobs will consume it. verify expects build/integration to be skipped on PRs and success in the merge queue.
  • Coverage combine now accepts a skipped integration lane. shopt -s nullglob stops the shard loop from failing the step when there are no integration coverage files, so PR Sonar coverage is unit-only.
  • Required check names (py-tests-status) are unchanged, so no ruleset change is needed.
  • skills/pr-checklist/SKILL.md: a shell recipe lists the changed test files plus the tests importing changed metadata.* modules, then runs them. A new quality gate requires those results in the PR body.
  • playwright-postgresql-e2e.yml: the playwright and playwright-summary jobs are skipped by if: on pull_request, so PRs start no Playwright runner. The workflow still triggers on PRs because playwright-summary is a required check; GitHub counts a job skipped by if: as passing, so the PR is not blocked. With no PR trigger at all the check would hang at "Expected — waiting". The pull_request_target fork path and the dead gate-skip step are removed.
  • playwright-e2e-reusable.yml: the gate is reduced to an event switch (run on merge_group / schedule / workflow_dispatch / push). The fork-label wait, label lookup, and "safe to test" logic are gone, and the gate job gets permissions: {}.
  • playwright-postgresql-pr-comment.yml: the comment publisher runs only for workflow_dispatch runs, so it no longer starts a runner after every PR run.
  • Collate is not changed here: its py-tests have no merge_group trigger, so the same split there first needs a merge-queue decision.

Behaviour before vs after this PR

Change type Before: PR Before: merge queue After: PR After: merge queue
UI only nothing nothing nothing nothing
ingestion/** or openmetadata-spec/** unit + integration unit + integration unit only unit + integration
Java in service/resources/**, plus JsonPatchMessageBodyReader, JsonPatchProvider, ResourceRegistry unit + integration unit + integration unit only unit + integration
Any other Java (repositories, jdbi3, search, auth, migrations…) nothing nothing nothing nothing

Only the PR column changes: integration moves out of PRs. Which changes count as Python-relevant is still decided by the same python: path filter. That filter has been narrow since e9318cf6f8e (#30310), so a Java-only change outside the listed paths, such as TableRepository, already skipped the Python suite before this PR, even though it can break ingestion.

Open question: we could also run the integration suite in the merge queue for any backend change. PRs would stay unit-only. That means replacing the four openmetadata-service/... entries in the python: filter with:

- 'openmetadata-service/src/main/java/**'
- 'openmetadata-service/src/main/resources/**'
- 'bootstrap/sql/**'

The cost: most backend PRs would then run the backend build and 9 integration jobs in the queue, twice (MySQL + Postgres). A cheaper middle ground is openmetadata-service/src/main/java/** alone.

Tests:

Use cases covered

  • PR touching ingestion/: unit tests + static checks run, integration shards and backend build skipped, py-tests-status green.
  • Merge queue: full integration matrix (3 shards × 3 Python versions, MySQL + Postgres) runs as before.
  • Any PR: playwright-summary shows as skipped (not blocking), no Playwright build/shard jobs start, no Playwright PR comment.
  • Merge queue / schedule / workflow_dispatch: the full Playwright suite runs as before.

Unit tests

  • Not applicable (CI/docs only). actionlint passes on py-tests.yml, py-tests-shared.yml, py-tests-postgres.yml.
  • I ran the skill's affected-test recipe on the last 40 commits in bash and zsh. Both listed the same 13 test files.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion code changes). This PR's own checks cannot test the PR-side skip, because pull_request_target runs the workflow file from main, so this PR ran the old full suite. The merge-queue path is exercised when this PR enters the queue, since merge_group uses the PR's workflow file. The PR-side skip first shows on the next Python PR after merge.

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

  1. uvx --from actionlint-py actionlint on the three py-tests workflows: no findings.
  2. actionlint on the three Playwright workflows: the same 9 findings as on main (pre-existing jobs.<id>.result in reusable outputs), nothing new.
  3. Ran the skill's affected-test listing + pytest -n auto on the unit subset.

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

🤖 Generated with Claude Code

…rge queue

PR runs of py-tests / py-tests-postgres now skip the backend build and the
integration shards; merge_group and workflow_dispatch still run them. The
pr-checklist skill and PR template now require running the affected unit
and integration tests locally for ingestion changes.
@ulixius9
ulixius9 requested review from a team, akash-jain-10, harshach and tutte as code owners October 6, 2026 08:58
Copilot AI balanced review requested due to automatic review settings October 6, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Oct 6, 2026
Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit e3b290e5b4511f12233da65814bc45198cbac0f8 in Playwright run 37440672702, attempt 1.

✅ 213 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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) 37m 20s

⏱️ Max setup 5m 8s · max shard execution 7m 34s · max shard-job elapsed before upload 11m 8s · reporting 3s

🌐 202.75 requests/attempt · 1.76 app boots/UI scenario · 0.00% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 202.75 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 1.76 per UI scenario (383 boots / 217 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 74 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard global-state-01 62 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-rbac-01 9 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Skip every job on pull_request so PRs start no Playwright runners; the
required playwright-summary check reports as skipped, which GitHub counts
as passing. Drop the pull_request_target fork path and its label gate,
and stop the PR-comment publisher from spinning up for PR runs.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 10:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · PR checks defer integration and Playwright suites to merge-queue execution.

Restructures Python test CI to run unit tests and static checks on PRs while deferring integration tests to the merge queue, keeping PR feedback fast. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@karanh37 karanh37 changed the title ci(py-tests): unit tests on PRs, integration suite only in the merge queue ci: Python integration tests and Playwright E2E only in the merge queue Oct 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

@karanh37
karanh37 enabled auto-merge October 7, 2026 05:18
@karanh37
karanh37 added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit 79d391a Oct 7, 2026
110 of 113 checks passed
@karanh37
karanh37 deleted the ulixius9/python-tests-ci-splitting branch October 7, 2026 07:29
mohityadav766 added a commit that referenced this pull request Oct 7, 2026
…ava-test-ci-gating

Conflict in skills/pr-checklist/SKILL.md with #34740: kept this branch's Java
section, which replaces the old `mvn test -pl openmetadata-integration-tests
-Dtest=<NewIT>` block, and took #34740's Ingestion (Python) section as is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timothybrush pushed a commit to timothybrush/OpenMetadata that referenced this pull request Oct 7, 2026
…metadata#34835)

Since open-metadata#34740 skips Python integration tests on PRs, py-combine-coverage
downloads only coverage-unit. download-artifact extracts a single matched
artifact directly into the target path rather than a per-artifact
subdirectory, so the prepare step never found the .coverage file and
coverage combine failed with "No data to combine".
ayush-shah added a commit that referenced this pull request Oct 12, 2026
Since #34740 the Postgres Playwright suite runs only in the merge queue.
The queue now sees ~3.7 entries per PR (was 2.3) and half of its runs
fail (was 9%), mostly in playwright-ci shards: breakage that the PR-time
targeted run used to catch now ejects the entry and rebuilds every entry
behind it, at ~8.5 runner-hours per full run.

PRs run the targeted plan again: smoke, changed specs and impact-mapped
specs. The merge queue, the nightly schedule and dispatches are
unchanged and still run the full suite.

- select_playwright_tests.py caps the escalation on pull_request: an
  unmapped code path (every Java change is one) keeps the PR on smoke +
  canary + mapped specs instead of the full suite, and the selection
  records escalationCapped and unmappedCodeFiles. Dispatches keep the
  escalation. The detect-changes step leaves a notice on capped runs.
  plan_local_playwright.py reads the recorded files instead of waiting
  for a full plan.
- The reusable gate runs same-repo, non-draft PRs. Fork PRs and drafts
  still skip; pull_request_target stays removed, so forks rely on the
  queue.
- On PRs, cache-keys and detect-changes (and so every heavy job) skip
  when the e2e paths filter is false. playwright-summary reports green
  for that case from an explicit step that requires check-changes to have
  succeeded with e2e == 'false', so a broken change detection still
  fails the check.
- The PR concurrency group keys on the PR number, not the head branch
  name; PR runs still cancel superseded commits.
- The PR-comment publisher runs for pull_request runs again.
- The PR template and the pr-checklist skill no longer say PRs never
  run Playwright.
ayush-shah added a commit that referenced this pull request Oct 12, 2026
playwright-knowledge-graph-postgresql-e2e.yml triggered on both
pull_request and pull_request_target, each including `labeled`, so every
PR event started two workflow runs: one did the work and the other only ran
its gate to decide it should skip. Labelling a PR started two more.

Following #34740, which made the same move for playwright-postgresql-e2e:
drop pull_request_target and the `labeled` type. Same-repo PRs still run the
suite under pull_request. Fork PRs cannot read the connector secrets there,
so the gate skips them and the merge queue (which always runs the suite)
is where fork code is tested, matching the Postgres E2E workflow. The fork
label-reconciliation steps, the head-SHA checkout override and the
pull_request_target cache-poisoning guards go with the trigger.

With no sibling run, an early green skip can no longer satisfy branch
protection before the real run finishes, so the summary always publishes
the required `Playwright RDF (Knowledge Graph + Ontology)` name; a skipped
gate (draft or fork PR) reports it green and a gate failure still fails it.
cancel-in-progress is now unconditional, since the label special cases no
longer exist.

A test pins the trigger set, the summary name and the gate decision.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants