Skip to content

feat(mongodb-runner): include full topology in start --json output - #962

Open
autarch wants to merge 1 commit into
mainfrom
11-05-mongodb-runner_start-json-full-topology
Open

autarch wants to merge 1 commit into
mainfrom
11-05-mongodb-runner_start-json-full-topology

Conversation

@autarch

@autarch autarch commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

start --json now includes the full serialized cluster topology, the same data ls --json reports for that id (topology, servers, shards, ...). This eliminates the need for a separate ls --json invocation after start to learn each server's host, port, and role.

Checklist

@autarch
autarch requested review from a team as code owners November 5, 2026 19:38
@autarch
autarch requested review from nbbeeken and a balanced review from Copilot November 5, 2026 19:38

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

The README’s redaction guarantee needs to clarify that connection strings may still contain passwords and should not be assumed safe to log or share.

1 open issue
What changed in this PR

This PR adds full cluster topology to mongodb-runner start --json, eliminating the separate ls --json call needed to discover server details.

Changes:

  • Reuses the serialized metadata and applies the same redaction as ls --json.
  • Adds tests for standalone and sharded topology, output consistency, and credential redaction.
  • Documents the expanded JSON output.
File Description
packages/​mongodb-runner/​src/​runner-helpers.ts Returns serialized metadata and the connection string from start.
packages/​mongodb-runner/​src/​cli.ts Includes redacted topology data in start JSON output.
packages/​mongodb-runner/​src/​cli.spec.ts Tests topology fields, listing consistency, and redaction.
packages/​mongodb-runner/​README.md Describes the expanded output and updates the example.

Review effort: Balanced

Comment thread packages/mongodb-runner/README.md Resolved
@autarch
autarch force-pushed the 11-05-mongodb-runner_start-json-full-topology branch 2 times, most recently from 8240884 to 86bdb75 Compare November 5, 2026 20:44
start --json now spreads in redactSerializedCluster(cluster.serialize()),
the same redacted serialized data that ls --json reports for the id
(topology, servers, shards), so callers no longer need a separate ls
invocation after start to learn each server's host, port, and role.
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.

2 participants