Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 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.
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
autarch
force-pushed
the
11-05-mongodb-runner_start-json-full-topology
branch
2 times, most recently
from
November 5, 2026 20:44
8240884 to
86bdb75
Compare
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.
autarch
force-pushed
the
11-05-mongodb-runner_start-json-full-topology
branch
from
November 5, 2026 20:45
86bdb75 to
4ee26d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
start --jsonnow includes the full serialized cluster topology, the same datals --jsonreports for that id (topology,servers,shards, ...). This eliminates the need for a separatels --jsoninvocation afterstartto learn each server's host, port, and role.Checklist