Yicong-Huang opened a new issue, #6007:
URL: https://github.com/apache/texera/issues/6007
### What happened?
`bin/local-dev.sh up` runs `sbt dist` before bringing up Docker infra. sbt
triggers `common/dao`'s `jooqGenerate` sourceGenerator, which calls
`org.jooq.codegen.GenerationTool` against the configured JDBC URL. PostgreSQL
hasn't been started yet, so the `catch` block in
[`common/dao/build.sbt:99-104`](common/dao/build.sbt) logs `Continuing
compilation with existing generated files...` and returns `Seq.empty`. But
`common/dao/src/main/scala/org/apache/texera/dao/jooq/generated/` is not
git-tracked, so a fresh checkout has nothing to fall back on; the downstream
Scala compile then fails on missing `Tables` / `Keys` / `…/tables/*` references.
**Root cause.** Order in `cmd_up`
([`bin/local-dev/main.sh:1852`](bin/local-dev/main.sh)):
1. `tui_section "Build"` → `build_all` → `sbt dist` (L1901-1908)
2. `tui_section "Services"` → `infra_up` + `infra_ensure_db_schema`
(L1925-1936)
`cmd_auto` (L2000) has the same hazard: a user who `down`s the stack and
then runs `auto` triggers `sbt dist` (L2061) with no Docker infra running.
```
Before: sbt dist (jooq codegen, postgres down) -> compile failure (Tables
not found)
After: docker up postgres -> apply schema -> sbt dist (jooq codegen ok) ->
rest of stack
```
### How to reproduce?
1. Fresh clone, or `docker compose -p texera-local-dev down -v && rm -rf
common/dao/src/main/scala/org/apache/texera/dao/jooq/generated/`
2. `bin/local-dev.sh up`
3. Tail `${TEXERA_LOCAL_DEV_DIR:-/tmp/texera-local-dev}/logs/sbt-dist.log`:
jOOQ generation failed (Connection refused); then `not found: value FEEDBACK` /
`not a member of org.apache.texera.dao.jooq.generated.Tables`.
### Version/Branch
1.3.0-incubating-SNAPSHOT (main)
### Commit Hash (Optional)
_No response_
### What browsers are you seeing the problem on?
_No response_
### Relevant log output
\`\`\`shell
JOOQ code generation failed: Connection refused (Connection refused)
Continuing compilation with existing generated files...
...
[error] value FEEDBACK is not a member of
org.apache.texera.dao.jooq.generated.Tables
\`\`\`
--
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]