Skip to content

Use modelardb_embedded Client in CLI - #421

Merged
CGodiksen merged 30 commits into
mainfrom
dev/client-in-cli
Aug 19, 2026
Merged

Use modelardb_embedded Client in CLI#421
CGodiksen merged 30 commits into
mainfrom
dev/client-in-cli

Conversation

@CGodiksen

Copy link
Copy Markdown
Collaborator

This PR closes #417 by refactoring the CLI in modelardb_client to use Client from modelardb_embedded instead of a separate manual Apache Arrow Flight client. This unifies the way we access the server in the system and removes unnecessary code in the CLI. Other than refactoring the existing functionality, new commands have also been added to the CLI so it supports all the relevant methods that we expose through the Client API.

The PR also changes tab completion slightly so we now update the possible completions when we create or drop tables, and it updates the KillNode action to make it consistent with how we handle ctrl+c in the server. We now no longer try to transfer data when killing a node, and now only flush to disk. If a user wants to flush to the remote object store before killing a node, they can call FlushNode separately.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the modelardb_client CLI to use the modelardb_embedded Client (instead of a bespoke Arrow Flight client) to unify server access patterns across the codebase, while also extending the CLI/REPL with additional commands and updating KillNode semantics and docs.

Changes:

  • Replace the CLI’s manual Arrow Flight client plumbing with modelardb_embedded::operations::client::Client and update dependencies accordingly.
  • Extend the REPL with commands for configuration, cluster/node introspection, and configuration updates; refresh tab-completions after CREATE/DROP.
  • Update KillNode behavior and documentation to no longer transfer to the remote object store (flush-to-disk only), aligning CLI/server semantics.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/user/README.md Updates REPL command documentation and adds newly supported commands.
crates/modelardb_server/src/remote/mod.rs Changes KillNode to flush-to-disk only (no remote transfer) and updates action docs/descriptions.
crates/modelardb_embedded/src/operations/client.rs Updates Client::kill_node documentation to reflect the new semantics.
crates/modelardb_client/src/main.rs Refactors CLI to use embedded Client, adds new REPL commands, and adjusts batch printing/confirmation logic.
crates/modelardb_client/src/error.rs Replaces Tonic-specific error variants with a ModelarDbEmbeddedError wrapper.
crates/modelardb_client/Cargo.toml Drops Arrow Flight/Tonic/auth deps and adds modelardb_embedded, modelardb_types, and futures.
Cargo.lock Updates lockfile to match dependency refactor.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread crates/modelardb_embedded/src/operations/client.rs Outdated
Comment thread crates/modelardb_server/src/remote/mod.rs Outdated
Comment thread crates/modelardb_client/src/main.rs
Comment thread crates/modelardb_client/src/main.rs
@CGodiksen
CGodiksen merged commit 9906618 into main Aug 19, 2026
5 checks passed
@CGodiksen
CGodiksen deleted the dev/client-in-cli branch August 19, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use modelardb_embedded Client in modelardb_client CLI

4 participants