The GitHub Actions job "Required Checks" on texera.git/main has succeeded.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
50d520634a0bd6673c85e81882f1e050722e79f3 / Yicong Huang 
<[email protected]>
fix(infra): start postgres before sbt build in local-dev up/auto (#6008)

### What changes were proposed in this PR?

`bin/local-dev.sh up` / `auto` were running `sbt dist` before postgres
was reachable. `common/dao`'s `jooqGenerate` sourceGenerator connects to
postgres via JDBC at compile time; with no postgres the catch block in
[`common/dao/build.sbt`](common/dao/build.sbt) logs `Continuing
compilation with existing generated files...` and returns `Seq.empty`.
Because the generated jOOQ dir is not git-tracked, fresh checkouts have
no fallback and the downstream Scala compile fails on missing `Tables` /
`Keys` / etc.

| Path | Before | After |
| --- | --- | --- |
| `cmd_up` | Build → Infra (`infra_up` + `infra_ensure_db_schema`) →
Services | **Infra → Build → Services** (minio/lakefs/litellm warm up in
parallel with the build) |
| `cmd_auto` | Scan → Build (no postgres precondition) → Bounce | Scan →
Build (calls new `ensure_postgres_for_build`) → Bounce |

`ensure_postgres_for_build` is a new helper that starts only the
`postgres` container (if it isn't already running) and applies the
schema — minimal blast radius for `cmd_auto`, which by contract only
touches what its scan flagged dirty.

### Any related issues, documentation, discussions?

Closes #6007.

### How was this PR tested?

- `bash bin/local-dev/tests/test_local_dev_sh.sh` — 12/12 pass; added a
static regression assertion #11 that scans `cmd_up` and `cmd_auto` and
fails if any postgres-ready step (`infra_ensure_db_schema` /
`ensure_postgres_for_build`) does not precede the first `build_all` /
`sbt -no-colors dist` invocation. Verified red-then-green: before the
source change the new assertion reports `schema_at=1935 build_at=1903`
for `cmd_up` and `schema_at=0 build_at=2062` for `cmd_auto`.
- `bash -n bin/local-dev/main.sh` — clean.
- `bin/local-dev.sh --help` — unchanged usage.

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

Generated-by: Claude Opus 4.7

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

With regards,
GitHub Actions via GitBox

Reply via email to