mengw15 commented on code in PR #6031: URL: https://github.com/apache/texera/pull/6031#discussion_r3508455923
########## bin/local-dev/main.sh: ########## @@ -624,9 +763,13 @@ amap_set SVC_HEALTH frontend "" # --------- docker infra config --------- DOCKER_PROJECT="texera-local-dev" -DOCKER_COMPOSE_FILE="$REPO_ROOT/bin/single-node/docker-compose.yml" -DOCKER_OVERLAY_FILE="$REPO_ROOT/bin/local-dev/docker-compose.override.yml" -DOCKER_ENV_FILE="$REPO_ROOT/bin/single-node/.env" +# Infra orchestration is part of the tooling, not the deployed app — pin it to +# the self tree so a deployed worktree always comes up against main's known-good +# docker compose (the app schema/DDL it applies still comes from the source tree +# via $REPO_ROOT). +DOCKER_COMPOSE_FILE="$SELF_ROOT/bin/single-node/docker-compose.yml" +DOCKER_OVERLAY_FILE="$SELF_ROOT/bin/local-dev/docker-compose.override.yml" +DOCKER_ENV_FILE="$SELF_ROOT/bin/single-node/.env" Review Comment: The intentional split (`SOURCE_ROOT` for app, `SELF_ROOT` for infra) is the right call for the common case — 95% of PRs only touch app code and this is a huge quality-of-life win. But it silently deposits a real footgun for the other 5%: - PR adds a new docker service (Redis, ClickHouse, etc.) in its compose file → deployed stack silently misses it (self's compose wins) - PR adds a required env var → app starts, hits NPE at runtime (self's `.env` has no such var) - PR adds a new backend service to the `SERVICES=(...)` array in `main.sh` → self's `main.sh` never launches it - PR is itself a tooling change (like *this* PR) → self's tooling doesn't have the change under test Worth surfacing this boundary to the user. Two lightweight options: 1. Add a note in `--help` (and the TUI `?` help): "`--worktree` / `--branch` assumes the target only differs in app code — if it modifies `bin/local-dev/**`, `bin/single-node/**`, `docker-compose*`, or `.env`, checkout that branch and run its own `local-dev.sh` instead." 2. At startup of `up --worktree=...`, `diff -q $SELF_ROOT/bin/local-dev/ $SOURCE_ROOT/bin/local-dev/` (same for `bin/single-node/`) and print a one-line warn if there's drift. Non-fatal, just informational. Not blocking — the design is sound and the failure modes are recoverable. Just want future users to have a chance to notice the boundary before they burn 30 minutes debugging. -- 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]
