You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Yicong-Huang (via GitHub)" <gi...@apache.org> on 2026/06/29 00:31:59 UTC

[PR] fix(infra): start postgres before sbt build in local-dev up/auto [texera]

Yicong-Huang opened a new pull request, #6008:
URL: https://github.com/apache/texera/pull/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


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(infra): start postgres before sbt build in local-dev up/auto [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang merged PR #6008:
URL: https://github.com/apache/texera/pull/6008


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(infra): start postgres before sbt build in local-dev up/auto [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6008:
URL: https://github.com/apache/texera/pull/6008#issuecomment-4828016491

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - No candidates found from `git blame` history.
   


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org