feat(mongodb-runner): add --json output to start and ls - #877
Conversation
|
I'd maybe suggest to take a look at #626. There's already some interfaces for serialization of these instances that should probably be used instead of building these from scratch right in the method |
@gribnoysup What's the state of #626? It would be good to build on top of that, but it's been open since March. I could fold those changes into this PR, which might be simplest. |
This works I think, this patch Anna opened is practically ready, was just waiting for feedback and got a bit lost over time, so would be good to use it as a starting point here |
4fc924b to
47a6565
Compare
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
Pull request overview
Adds --json output for mongodb-runner start and ls, enabling scripting with structured cluster metadata.
Changes:
- Implements JSON output handling.
- Adds tests for
startandls. - Updates usage and disaggregated-storage documentation.
File summaries
| File | Summary |
|---|---|
packages/mongodb-runner/src/cli.ts |
Implements JSON output modes. |
packages/mongodb-runner/src/cli.spec.ts |
Tests structured JSON output. |
packages/mongodb-runner/README.md |
Documents the new option and formats. |
packages/mongodb-runner/docs/disaggregated-storage.md |
Documents JSON output for DSC clusters. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
This adds a
--jsonoutput option. When this is enabled, the only output the runner prints to stdout is a JSON object containing information about the started cluster. The JSON always contains anidandconnectionStringkey.This is handy for scripting with the runner, and makes it easy to save the cluster information in a structured way, which is particularly helpful if you want to save multiple clusters.
Open Questions
None.
Checklist
Stack created with GitHub Stacks CLI • Give Feedback 💬