goutamadwant opened a new pull request, #12474:
URL: https://github.com/apache/seatunnel/pull/12474
### Purpose of this pull request
Related: #11513. This is a correctness fix: it adds runs where tests were
silently skipped. It does not overlap #11515, which routes docs/UI/dependency
jobs and scopes unit tests, or #9976, which moves long connector modules into
dedicated jobs. The UI-build routing gap is left to #11515.
Three places in `backend.yml` never select tests that exist:
1. **`engine-k8s-it` skips engine changes.** Its condition is `api == 'true'
|| it-modules contains seatunnel-engine-k8s-e2e`. For a change under
`seatunnel-engine/**`, `it-modules` holds only the fixed smoke modules, so
`KubernetesIT` does not run, although it deploys the Zeta image that the change
affects. The job takes 7–9 minutes per leg (fork runs 35959479197 and
35958652409).
2. **`ExampleUdfIT` is never run.** `seatunnel-transforms-v2-e2e-udf` (added
with #9195 and extended in #10489) is not in any job's `-pl` list. The
transform jobs run only `part-1` and `part-2`. The updated-modules path drops
modules with `transform` in the name.
3. **`seatunnel-trace/**` and `seatunnel-e2e/seatunnel-core-e2e/**` match no
change filter.** A PR touching only these starts no Java build or test. The
tests there, `seatunnel-trace-analyzer` (2 test classes) and
`seatunnel-starter-e2e` (`SeaTunnelConnectorTest` and one more), only run when
some other change triggers the full unit-test job.
Changes:
- `engine-k8s-it`: add `|| needs.changes.outputs.engine == 'true'`.
- `transform-v2-it-part-1`: `-pl
:seatunnel-transforms-v2-e2e-part-1,:seatunnel-transforms-v2-e2e-udf`.
`ExampleUdfIT` is disabled on Flink and Spark, so this adds two Zeta-only test
methods. The job's `timeout-minutes` goes from 120 to 135, because part-1 alone
already takes 99–107 minutes and the UDF module adds its own build and tests.
- New `standalone` filter for the two paths. A `standalone` helper in
`update_modules_check.py` maps the changed files to `seatunnel-trace-analyzer`
/ `seatunnel-starter-e2e`, and the `Make unit test modules` step adds them to
`ut-modules`, in the same way `seatunnel-dist` is handled today. That starts
the `unit-test` job. On `dev` this is the full reactor; with #11515 it becomes
`-pl <module> -am`.
`seatunnel-examples/**` is left out on purpose. Those modules have no tests,
and the merge queue compiles them.
### Does this PR introduce _any_ user-facing change?
No. CI only.
### How was this patch tested?
1. Unit tests: `python3 -m unittest discover -s tools/update_modules_check
-p 'test_*.py'` → 33 tests OK. New tests:
- the standalone path → module mapping;
- the mapped modules exist with that artifactId, and the workflow filter
uses exactly those paths;
- `engine-k8s-it` runs for `engine == 'true'`;
- every non-connector E2E module that has `*IT` classes appears in some
job's `-pl` list.
Run against the current `dev` workflow, the last three fail. The last one
names `seatunnel-transforms-v2-e2e-udf`, the only such module missing.
2. YAML parsing; `git diff --check`.
3. A local simulation of the `changes` job and job `if:` conditions:
| Changed files | Before | After |
|---|---|---|
| `seatunnel-trace/**` only | 6 gate jobs, no tests | + `unit-test` × 4
(`ut-modules=["seatunnel-trace-analyzer"]`) |
| `seatunnel-e2e/seatunnel-core-e2e/**` only | 6 gate jobs, no tests | +
`unit-test` × 4 (`ut-modules=["seatunnel-starter-e2e"]`) |
| Engine server change | 79 legs, `engine-k8s-it` skipped | 81 legs,
`engine-k8s-it` runs |
| Transform (api) / connector-only / docs-only | unchanged | unchanged |
4. `ExampleUdfIT` run locally with the same command as the job, `./mvnw -B
-T 1 verify -DskipUT=true -DskipIT=false -D"license.skipAddThirdParty"=true
-D"skip.ui"=true --no-snapshot-updates -pl :seatunnel-transforms-v2-e2e-udf -am
-Pci`:
- JDK 8 (1.8.0_172): `Tests run: 2, Failures: 0, Errors: 0` for
`ExampleUdfIT` (65.5 s); BUILD SUCCESS in 7:53 min.
- JDK 11 (Temurin 11.0.19): `Tests run: 2, Failures: 0, Errors: 0` for
`ExampleUdfIT` (67.7 s); BUILD SUCCESS in 7:56 min.
- Engines: Zeta only. The class is disabled on Flink and Spark, so no
Flink or Spark containers start for it.
Fork CI on this branch:
https://github.com/goutamadwant/seatunnel/actions/runs/36140943691. It was
queued when this PR was opened. Only workflow and CI-tooling files change here,
so only the gate and `changes` jobs run on the fork, and none of the jobs
changed by this PR run there. The routing proof is the `changes` job output and
the unit tests. After merge, an engine-only PR should show `engine-k8s-it`
legs, and `transform-v2-it-part-1` logs should show `ExampleUdfIT` running.
Cost: engine PRs add 2 legs of 7–9 minutes. API/engine PRs add about 1–2
minutes of test time (65–68 s locally) plus the UDF module build to
`transform-v2-it-part-1`, which took 99–107 minutes against its previous
120-minute limit in recent full runs (now 135). PRs touching only trace or
starter-e2e now run the unit-test job.
### Check list
* [ ] If any new Jar binary package adding in your PR, please add License
Notice according
[New License
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
* [ ] If necessary, please update the documentation to describe the new
feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If necessary, please update `incompatible-changes.md` to describe the
incompatibility caused by this PR.
* [ ] If you are contributing the connector code, please check that the
following files are updated:
1. Update
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
and add new connector information in it
2. Update the pom file of
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]