feat: mount distributed_cli for hops service (drop local adapter)#56
Conversation
…pter `hops service` now re-exports distributed_cli's command surface rather than carrying its own scaffold/describe/schema adapter: the Service variant holds distributed_cli::ServiceArgs and dispatches with distributed_cli::run. Deletes src/commands/service (the former ~930-line adapter) and swaps the dependency from distributed_tooling to distributed_cli. This makes hops a thin, optional front-end: new flags/commands added in distributed_cli (e.g. `schema --format atlas`) reach `hops service` on a plain cargo update, with no code changes here. Temporary git dep on the distributed branch until distributed_cli is published; swap to a registry version once distributed PR #74 releases.
|
Warning Review limit reached
More reviews will be available in 30 minutes and 40 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR migrates the service subcommand implementation from the local hops-cli crate to an external ChangesService Command External Migration
Possibly Related PRs
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Cargo.toml`:
- Around line 11-13: The Cargo.toml currently uses a temporary git dependency
for distributed_cli; open a tracked issue (or add to the project board)
referencing distributed PR `#74` to replace the git dep with a registry version
when published and link to this PR; in that issue also add a checklist to verify
that the crate re-exports ServiceArgs and run at the crate root (pub use
cli::{..., ServiceArgs, ...} and pub use cli::{..., run, ...}) and that run has
the signature pub fn run(args: &ServiceArgs) -> Result<(), Box<dyn Error>> so
the public API remains compatible before swapping the dependency.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: dc5edf29-0ab5-4700-9fd3-e6f5a9f87340
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
Cargo.tomlsrc/commands/mod.rssrc/commands/service/mod.rssrc/main.rs
💤 Files with no reviewable changes (2)
- src/commands/service/mod.rs
- src/commands/mod.rs
distributed PR #74 merged and released distributed_cli 1.6.x, so replace the temporary git dependency with the registry version. No git source or branch tracking; `hops service` resolves the command surface from the published crate. Closes #58
Summary
Make
hops servicea thin proxy overdistributed_cliinstead of carrying its own scaffold/describe/schema adapter.Servicevariant now holdsdistributed_cli::ServiceArgsand dispatches withdistributed_cli::run.src/commands/service/(the former ~930-line adapter).distributed_toolingtodistributed_cli.distributed_cliis the in-workspace crate in thedistributedrepo that owns the generation logic and thedsvccommand surface. By mounting its clap types here rather than reimplementing them, new flags/commands added there (e.g.schema --format atlas) reachhops serviceon a plaincargo update— no code changes in this repo.Verified:
hops service scaffold|describe|schemaresolve, andhops service schema --helpshows the Atlas flags. Build green.Sequencing note
distributed_cliisn't published yet (distributed PR #74 is open), so this temporarily uses a git dependency on the distributed branch. Once #74 merges and releases, swap to the registry version (distributed_cli = "<version>") — a one-line change. This is the last cross-repo coordination step; afterwards it's justcargo update.🤖 Generated with Claude Code
Summary by CodeRabbit