Skip to content

bin/local-dev.sh up / auto: sbt build precedes infra_up, jOOQ codegen fails before postgres is ready #6007

Closed

Description

@Yicong-Huang

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 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):

  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 downs 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
```

Activity

  1. added theissue type on Jun 29, 2026
  2. added a commit that references this issue on Jun 29, 2026
    50d5206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions