Yicong-Huang opened a new pull request, #5998:
URL: https://github.com/apache/texera/pull/5998

   ### What changes were proposed in this PR?
   
   `bin/single-node/` shipped the docker-compose deploy (compose file, `.env`, 
examples profile, nginx + litellm config, README) but had no script wrapper. 
Contributors had to `cd bin/single-node && docker compose --profile examples 
up` from a specific directory. After `bin/local-dev.sh` landed for the native 
dev stack, this left the two deploys with asymmetric UX.
   
   Mirror the local-dev shape: a thin `bin/single-node.sh` wrapper plus the 
engine inside the existing `bin/single-node/` folder.
   
   ```
   bin/
   ├── single-node.sh                # 3-line wrapper → bin/single-node/main.sh
   └── single-node/
       ├── main.sh                   # engine (new)
       ├── docker-compose.yml        (existing)
       ├── .env                      (existing)
       ├── litellm-config.yaml       (existing)
       ├── nginx.conf                (existing)
       ├── examples/                 (existing)
       ├── README.md                 (existing — Launch / Stop / Uninstall /
       │                              Volume recovery sections updated)
       └── tests/
           └── test_single_node_sh.sh
   ```
   
   Subcommands are deliberately minimal — the docker deploy doesn't need `auto` 
/ `-i` TUI / per-service restart that the dev tool offers:
   
   ```
   bin/single-node.sh up                 docker compose --profile examples up -d
   bin/single-node.sh down [--volumes]   docker compose down [+ drop data 
volumes]
   bin/single-node.sh status (no-arg)    docker compose ps + URL/login tip block
   bin/single-node.sh logs <service>     docker compose logs -f <service>
   bin/single-node.sh --help             usage reference
   ```
   
   Pre-flight check on `up` / `down` / `status` / `logs`: docker binary on 
PATH, daemon reachable, compose v2 available, compose file present. Failures 
exit cleanly with a one-line hint — no stack traces.
   
   Only `bin/single-node.sh` appears in `--help`, error messages, status-block 
tips, and the updated README. The engine at `bin/single-node/main.sh` is 
implementation detail — not surfaced in user-visible text — matching the 
local-dev convention.
   
   ### Any related issues, documentation, discussions?
   
   Closes #5996.
   
   ### How was this PR tested?
   
   * `bash bin/single-node/tests/test_single_node_sh.sh` → `6 passed, 0 
failed`. Six cases: bash-syntax across every `*.sh` under `bin/single-node/`, 
`--help` output, unknown-subcommand exit code + `--help` hint, `logs` without 
arg refuses cleanly without leaking the engine path, `down --not-a-real-flag` 
is rejected, and (when docker isn't running) every `*` subcommand aborts 
cleanly with a "Docker" hint.
   * End-to-end:
     * `bin/single-node.sh --help` and `bin/single-node.sh status` (no-arg) 
render the expected header + URL/login tip block; engine path not surfaced.
     * `bin/single-node.sh frobnicate` → `unknown subcommand: frobnicate (try 
\`bin/single-node.sh --help\`)`, exit 1.
     * `bin/single-node.sh logs` → `usage: bin/single-node.sh logs <service>`, 
exit 1 (no `main.sh` leak).
     * Did **not** spin up the actual stack — local machine already has 
`texera-local-dev` infra holding the same ports / images, so a real `up` would 
clash. The compose-side behavior is unchanged from before this PR (we're just 
wrapping `docker compose --profile examples up -d`).
   
   Smoke test is auto-discovered by the `infra` GitHub Actions job's `find bin 
-name 'test_*.sh'` step; no workflow edits needed. `bin/**` labeler glob 
already covers the new files.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Anthropic, 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to