Repository navigation
Fixes 34944: faster unit tests, no cache saves or runners spent on no-ops in CI - #37493
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 |
- Profiler unit tests: skip the per-metric forced gc.collect() only in the high-volume test_metrics module; a new test keeps the real collection covered - Service unit tests run in two surefire forks and drop the unused JaCoCo agent and apt/ANTLR setup - Pull-request jobs restore caches but never save them (ref-scoped entries were never reused and evicted the Playwright fixture cache); main keeps writing - java-checkstyle: no disk purge, restore the Maven cache - Integration-test lanes: check Docker storage after checkout and purge disk only when short of space; drop the unused apt/ANTLR install - ui-coverage: 4 Jest workers in CI; drop a cache step keyed on a missing file - backport-automerge only takes a runner for backport branches - data-access-request-e2e no longer runs a no-op gate job on pull requests - Guard tests for each change run in validate-jsons-yamls.yml
…to the existing profiler tests
dbacace to
669d3ef
Compare
…, case-insensitively
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsChanging CI cache writes, workflow triggers, and runner setup could alter cache availability or whether validation jobs execute. Speeds up CI by cutting unused work: profiler tests no longer force ✅ 1 closed✅ Quality: New CI-wide rule "PR jobs never save caches" has no decision record
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #34944
CI stops spending runner time and PR wait on work nothing uses. Nothing tested today stops being tested; required check names are unchanged.
gc.collect()is stubbed only in the high-volumetest_metrics.py; a new unpatched test keeps the real collection covered on success, failure and retry. Product code unchanged.test_metrics.py60.5 s → 1.1 s; same 827 testsRdfLiveWriterTestfailed because another test leaks anullrepository into the staticEntityregistry, which only shows under a different test order.package-lock.jsonthe repo doesn't havebackport/branches (the provenance gate is unchanged)pull_requesttrigger: its e2e job never ran for PRsType of change:
High-level design:
Each change is independent and has its own guard test in
.github/scripts/tests/test_ci_speed_*.py, run byvalidate-jsons-yamls.yml(new step, plus trigger paths). Analysis: 7 days of runs (2026-11-03..09, ~411k runner-min). OSS minutes are free on GitHub-hosted runners, so the targets are PR wall-clock and cache space, not cost.Rejected after measurement: turning coverage off where not uploaded in py-tests (108 s vs 110 s), Trivy DB caching (no Trivy workflow), the RDF "duplicate" lane (<1 min), dropping push IT runs (an existing decision record relies on them).
Companion Collate PR: https://github.com/open-metadata/openmetadata-collate/pull/8455
Tests:
Use cases covered
origin/main(30 failed) and passes on this branch (55 passed, 2 skipped — the 2 need a Linux/mnt; checked against a stubbed copy)..github/scripts/tests/overall: same 6 failures as an untouchedorigin/mainworktree in this local environment, 0 new.check_pr_workflow_security.py: OK.actionlint: no new findings.ruff: clean.-n 4: 830 passed, 2 skipped. Mutations (removegc.collect,gc.collect(0), collect only on success, stub the whole tree) each fail the new tests.Backend integration tests
MetricMigrationIT,RdfLibraryPackActivationIT,ContextFileIT,FolderIT,DomainMoveApprovalAuthorizationIT…). Failures are assertions in the test step; no disk errors. retry-queue and multi-node pass.Still needs this PR's own CI
Not in this PR (owners / settings)
Entity's static repository map need cleaning up (one leaves anullentry;Entity.clearRepositoryThreadLocalsthen throws).integration-tests-*and Playwright checks pass as skipped on PRs and run only after merge, where they failed 112 of 140 runs last week.prune-ephemeral-caches.ymlruns onmerge_groupwithactions: write; on that event the workflow file and checkout come from the queued PR. The Collate port drops that trigger for this reason.maven-sonar-build.ymlstill saves~/.m2on PRs (allow-listed by exact step in the guard; needs a main writer first).yarn-coverage.ymlonworkflow_dispatch:check-changeshas no checkout and fails, tests skip, yet theui-coveragegate reports success.maven-build-collate.ymlholds a runner ~50 min per main push waiting for the Collate build.Checklist:
Fixes #34944above.