Skip to content

feat(mongodb-runner): add --json output to start and ls - #923

Merged
autarch merged 1 commit into
mainfrom
mongodb-runner-json-output
Oct 8, 2026
Merged

autarch merged 1 commit into
mainfrom
mongodb-runner-json-output

Conversation

@autarch

@autarch autarch commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

No description provided.

@autarch
autarch requested review from a team as code owners October 7, 2026 18:42
@autarch
autarch requested review from esvm and a balanced review from Copilot October 7, 2026 18:42
@autarch
autarch marked this pull request as draft October 7, 2026 18:42
@autarch
autarch removed the request for review from esvm October 7, 2026 18:42

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.

🟡 Changes recommended

JSON output and serialization have unresolved correctness and credential-exposure issues.

3 open findings
What changed in this PR

Adds machine-readable output to mongodb-runner for CLI automation.

Changes:

  • Adds --json output for start and ls.
  • Exports serialization types and records cluster options and server commands.
  • Adds JSON-output tests and documentation.
File Description
packages/​mongodb-runner/​src/​runner-helpers.ts Types stored cluster metadata.
packages/​mongodb-runner/​src/​mongoserver.ts Preserves server command lines.
packages/​mongodb-runner/​src/​mongocluster.ts Types serialization and preserves options.
packages/​mongodb-runner/​src/​index.ts Exports serialization types.
packages/​mongodb-runner/​src/​cli.ts Implements JSON output.
packages/​mongodb-runner/​src/​cli.spec.ts Tests structured output.
packages/​mongodb-runner/​README.md Documents JSON usage and formats.
packages/​mongodb-runner/​docs/​disaggregated-storage.md Documents structured SLS output.

🧠 Review effort: Balanced


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

Comment thread packages/mongodb-runner/src/cli.ts Outdated
Comment thread packages/mongodb-runner/src/cli.ts Outdated
Comment thread packages/mongodb-runner/src/mongocluster.ts Outdated
@autarch
autarch force-pushed the mongodb-runner-json-output branch from 58a5e35 to 7fcdd00 Compare October 7, 2026 19:36
@autarch
autarch marked this pull request as ready for review October 7, 2026 19:39
@autarch

autarch commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

This takes the changes in #626 and adds some additional SLS-specific output on top of that.

@autarch
autarch force-pushed the mongodb-runner-json-output branch from 7fcdd00 to 57833ca Compare October 7, 2026 20:25
@autarch
autarch requested a review from esvm October 7, 2026 20:26
@nbbeeken
nbbeeken requested review from nbbeeken and removed request for esvm October 8, 2026 14:16

@nbbeeken nbbeeken left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

mostly questions, I think the one-line idea is worth consideration

Comment thread packages/mongodb-runner/src/cli.ts Outdated
Comment thread packages/mongodb-runner/src/cli.ts Outdated
Comment thread packages/mongodb-runner/src/cli.ts Outdated
Comment thread packages/mongodb-runner/src/cli.ts
start --json prints a JSON object with the cluster id and connection string (plus OIDC and SLS details when applicable) instead of the bare connection string. ls --json prints a JSON array of the running instances, including their serialized cluster data with credentials redacted. Both print single-line JSON for easier parsing in shell scripts.
@autarch
autarch force-pushed the mongodb-runner-json-output branch from 57833ca to 4e179da Compare October 8, 2026 15:42
@autarch
autarch requested a review from nbbeeken October 8, 2026 15:42
@autarch
autarch merged commit 0839446 into main Oct 8, 2026
19 checks passed
@autarch
autarch deleted the mongodb-runner-json-output branch October 8, 2026 18:05
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.

4 participants