The GitHub Actions job "Required Checks" on texera.git/main has succeeded.
Run started by GitHub user Yicong-Huang (triggered by Yicong-Huang).

Head commit for run:
8a4f2ddf5d086457a555b0898543e4abf0918026 / Yicong Huang 
<[email protected]>
perf(ci): trim redundant scala compile and reorder for early lint failure 
(#4638)

### What changes were proposed in this PR?

Tighten the scala job in `build.yml`:

- Drop `Compile with sbt: sbt clean package` — its `package` output was
unused and it re-cleaned a tree the dist step had just compiled.
- Drop the leading `clean;` from the dist step so it can reuse the lint
compile.
- Merge `scalafmt`, `scalafix`, and all per-module `dist` commands into
a single `sbt` invocation with each as its own argument, so the whole
chain runs in one JVM and sbt exits at the first failing command.
- Move `Create Databases` ahead of any sbt step (the JOOQ source
generators connect to `texera_db` during compile).
- Move `Install dependencies` (pip) just before `Run backend tests`,
since only the test step needs the python deps.

New step order:

```
Create Databases
Setup sbt launcher / coursier cache
sbt scalafmtCheckAll "scalafixAll --check" <Service>/dist ...   # one JVM, 
fail-fast
Unzip / license check / audit
Install dependencies (pip)
Create texera_db_for_test_cases
Set docker-java API version
Run backend tests
```

### Any related issues, documentation, discussions?

Closes #4637.

### How was this PR tested?

Exercised by this PR's own scala matrix. Each individual command
(scalafmt, scalafix, dist, license check, audit, tests) is unchanged;
only ordering, the merged sbt invocation, and the removal of redundant
`sbt clean package` differ.

Timing comparison on the scala job, sbt-touching steps only (run
[25239784635](https://github.com/apache/texera/actions/runs/25239784635)
before, run
[25241165819](https://github.com/apache/texera/actions/runs/25241165819)
after):

| step | before | after |
|---|---|---|
| Lint with scalafmt | 45 s | (merged) |
| Build distributable bundles (`sbt 'clean; X/dist; ...'`) | 3 m 4 s |
(merged) |
| Compile with sbt (`sbt clean package`) | 1 m 26 s | removed |
| Lint with scalafix | 47 s | (merged) |
| **Combined `sbt scalafmtCheckAll "scalafixAll --check" X/dist ...`** |
— | **4 m 31 s** |
| sbt subtotal | **6 m 2 s** | **4 m 31 s** |

Net savings on the sbt portion ~1 m 30 s (matches the dropped redundant
compile plus one fewer sbt JVM cold-start). uv pip migration is
independent (#4636) and would shave another ~45 s off the python
`Install dependencies` step.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Opus 4.7

Co-authored-by: github-actions[bot] 
<github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/25242134779

With regards,
GitHub Actions via GitBox

Reply via email to