Repository navigation
refactor(local-dev): unify the CLI surface for agent use - #6138
Merged
Merged
Conversation
- every one-shot subcommand (status/up/down/auto/version) accepts --json - up <service> / down <service> replace start/stop; the single-service form builds-if-changed by default, --build forces, --skip-build skips, and it follows the active deployment instead of resetting the persisted worktree pointer - --skip-build replaces --no-build - every --json payload carries elapsed_seconds (total command runtime) Closes apache#6137 Co-Authored-By: Claude Fable 5 <[email protected]>
Contributor
Automated Reviewer SuggestionsBased on the
|
aglinxinyuan
approved these changes
Jul 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
The local-dev CLI grew unevenly, which makes it awkward to drive from agent CLIs and scripts. This PR unifies the surface:
--jsonon every one-shot subcommand.status/up/downalready had it;autoandversionnow accept it too. The convention is unchanged: human progress goes to stderr, one machine-readable status JSON object goes to stdout.up <service>/down <service>replacestart/stop. The single-serviceupuses the same build knob as the full-stack form: rebuild + bounce only if the service's source changed since the last build (default),--buildforces it,--skip-buildnever builds. It also handles the amber-sibling dist sharing (texera-web/computing-unit-masterbounce together) and runs the jOOQ postgres-readiness check before any sbt build (bin/local-dev.sh up / auto: sbt build precedes infra_up, jOOQ codegen fails before postgres is ready #6007). The oldstart/stopand the bare<service>shorthand now refuse with a pointer to the new spelling. In the TUI,u <svc>,d <svc>,s <svc>, and a bare<svc>map onto the new forms.--skip-buildreplaces--no-build(the old flag refuses with a rename hint).--jsonpayload carrieselapsed_seconds— the command's total wall-clock runtime, so agents can log how long anup/autotook without wrapping the call in their own timer.One behavioral fix that falls out of (2): a full-stack
upwith no selector re-decides (and resets) the persisted deploy-source pointer, butup <service>is a scoped operation, so the startup peek now leaves the pointer alone when a positional service argument is present — a single-service bounce on a deployed PR worktree no longer silently re-points the deployment at the main checkout.Any related issues, documentation, discussions?
Closes #6137. The
--helpheader and thestatusfooter hints are updated in place;bin/local-dev/README.mdneeded no changes.How was this PR tested?
bash bin/local-dev/tests/test_local_dev_sh.sh— 45 passed, 0 failed. Updated/added cases: unknown subcommand andup <unknown-service>errors,start/stoprefuse with the new spelling,--no-buildrefuses with the rename hint, full-stack-only knobs (--fresh,--skip, selectors) are rejected in the single-service form, at most one positional service,cmd_autowires--json,version --jsonandstatus --jsoncarryelapsed_seconds, and the startup peek guards the deploy-pointer reset (isolatedTEXERA_LOCAL_DEV_DIRso the flag-errorupinvocations never touch a real deployment's state).pytest bin/local-dev/tests/test_local_dev_tui.py— 43 passed.version --json,status --json(14/14 running,elapsed_secondspresent),--helprenders through the new end-markersedrange.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Fable 5)