Skip to content
Success

Changes

Summary

  1. ci(tiflow): simplify dm integration test flow (#4539) (commit: 51d4469) (details)
Commit 51d44697f13ebc4ff0d8844e172280bb1270ae47 by noreply
ci(tiflow): simplify dm integration test flow (#4539)

## Summary

Skip `make dm_integration_test_build` (~5-10 min) when the PR only
changes test scripts (`dm/tests/`), not Go source code. Applies to both
classic and next-gen DM integration test pipelines.

### How it works

1. **Check diff files** stage computes `needBuild` by matching changed
files against a build pattern:
   - `dm/**/*.go` (excluding `dm/tests/`) → rebuild
   - `pkg/**/*.go` → rebuild
   - `go.mod` / `go.sum` → rebuild
   - `Makefile` → rebuild
   - Everything else (test scripts, configs, SQL) → skip build

2. **Binary cache** now uses `restoreKeys` to fall back to a previous
build from the same base SHA when the exact cache key misses.

3. **Prepare stage** has three paths:
   - Cache miss (no binaries at all) → build
   - Cache hit + Go source changed (`needBuild=true`) → rebuild
- Cache hit + only test scripts changed (`needBuild=false`) → skip
build, reuse cached binaries

### Also

- Added `Check diff files` stage to the next-gen pipeline (was missing —
all PRs ran tests unconditionally).

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: wuhuizuo <wuhuizuo@126.com>
(commit: 51d4469)
The file was modifiedprow-jobs/pingcap/tiflow/latest-presubmits.yaml (diff)
The file was modifiedpipelines/pingcap/tiflow/latest/pull_dm_integration_test.groovy (diff)
The file was modifiedpipelines/pingcap/tiflow/latest/pod-pull_dm_integration_test.yaml (diff)