Skip to content

feat(mongodb-runner): locate the DSC directory with --slsDir - #913

Merged
autarch merged 1 commit into
mainfrom
08-28-feat_mongodb-runner_add_sls_dir
Oct 9, 2026
Merged

autarch merged 1 commit into
mainfrom
08-28-feat_mongodb-runner_add_sls_dir

Conversation

@autarch

@autarch autarch commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR makes it easier to start SLS clusters. It adds a new --slsDir CLI parameter which takes a path. The runner verifies that the path contains all of the files needed to start an SLS cluster, which are:

  • sls-multicell-docker-compose.yml
  • slsbackup.proto
  • flags-state.json

The latter two files aren't used by the runner, but they're referenced from the sls-multicell-docker-compose.yml file, so attempting to start an SLS stack without them present will fail.

It also looks for the manifest.json file in this directory and will pull the SLS image tag from it by default. This can still be overridden with an explicit --slsTag argument.

Open Questions

  • We could remove the --slsCompose arg entirely in favor of --slsDir. Do we want to do that?

Checklist

@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from 929dc53 to d6c8410 Compare October 5, 2026 20:54
@autarch
autarch added this pull request to stack #914 October 5, 2026 20:54
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from d6c8410 to ddd4bed Compare October 5, 2026 20:57
Copilot AI balanced review requested due to automatic review settings October 5, 2026 20:57
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from ddd4bed to 7193bcb Compare October 5, 2026 21:10

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.

Copilot review overview

🟡 Changes recommended

Relative bundle paths can break teardown from another working directory, leaving SLS containers running after cluster metadata is deleted.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Adds automatic SLS bundle discovery to mongodb-runner’s disaggregated-storage support through --slsDir.

Changes:

  • Resolves and validates bundles from install roots or atlas directories.
  • Adds CLI directory inference and mutual exclusion with --slsCompose.
  • Adds resolver tests, fixtures, public exports, and usage documentation.
File Description
packages/​mongodb-runner/​test/​fixtures/​sls/​not-a-build/​.gitkeep Preserves an invalid-build fixture.
packages/​mongodb-runner/​test/​fixtures/​sls/​bundle-incomplete/​buildscripts/​modules/​atlas/​sls-multicell-docker-compose.yml Supplies an incomplete-bundle compose fixture.
packages/​mongodb-runner/​test/​fixtures/​sls/​bundle-incomplete/​buildscripts/​modules/​atlas/​manifest.json Supplies the incomplete bundle’s manifest.
packages/​mongodb-runner/​test/​fixtures/​sls/​bundle-complete/​buildscripts/​modules/​atlas/​slsbackup.proto Supplies a required bundle placeholder.
packages/​mongodb-runner/​test/​fixtures/​sls/​bundle-complete/​buildscripts/​modules/​atlas/​sls-multicell-docker-compose.yml Supplies a complete-bundle compose fixture.
packages/​mongodb-runner/​test/​fixtures/​sls/​bundle-complete/​buildscripts/​modules/​atlas/​manifest.json Supplies a pinned image-tag fixture.
packages/​mongodb-runner/​test/​fixtures/​sls/​bundle-complete/​buildscripts/​modules/​atlas/​flags-state.json Completes the valid bundle fixture.
packages/​mongodb-runner/​src/​sls.ts Implements bundle discovery and validation.
packages/​mongodb-runner/​src/​sls.spec.ts Tests bundle resolution and missing files.
packages/​mongodb-runner/​src/​index.ts Exports the resolver and bundle types.
packages/​mongodb-runner/​src/​cli.ts Adds --slsDir handling.
packages/​mongodb-runner/​README.md Introduces directory-based usage.
packages/​mongodb-runner/​docs/​disaggregated-storage.md Updates prerequisites and examples.

💡 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/sls.ts Outdated
Comment thread packages/mongodb-runner/src/cli.ts Outdated
Comment thread packages/mongodb-runner/src/sls.ts Outdated
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch 2 times, most recently from f189737 to 0895f47 Compare October 5, 2026 21:33
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from 0895f47 to f15d2a7 Compare October 6, 2026 15:31
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from f15d2a7 to 10d18c4 Compare October 6, 2026 15:34
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from 10d18c4 to 0fcfb17 Compare October 7, 2026 15:19
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from 0fcfb17 to fabb78b Compare October 7, 2026 15:42
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from fabb78b to 9f5b97e Compare October 7, 2026 15:57
Base automatically changed from 08-28-feat_mongodb-runner_default_sls_image_tag_from_build_manifest to main October 7, 2026 16:20
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch 3 times, most recently from def6dd1 to de0b5bb Compare October 7, 2026 16:36
@autarch
autarch requested a balanced review from Copilot October 7, 2026 16:37

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

Required-asset validation accepts directories in place of files, allowing invalid bundles to reach startup.

1 open finding
3 resolved since last review

🧠 Review effort: Balanced

Comment thread packages/mongodb-runner/src/sls.ts Outdated
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from de0b5bb to f1e96be Compare October 7, 2026 18:07
@autarch
autarch marked this pull request as ready for review October 7, 2026 18:07
@autarch
autarch requested review from a team as code owners October 7, 2026 18:07
@autarch
autarch requested a review from dudaschar October 7, 2026 18:07
@autarch autarch changed the title feat(mongodb-runner): locate the DSC bundle automatically with --slsDir feat(mongodb-runner): locate the DSC directory with --slsDir Oct 7, 2026
Comment thread packages/mongodb-runner/src/cli.ts Outdated
throw new Error(
'--slsDir was given without a value and --binDir is not set, so there is nowhere to look for the SLS dir',
);
})());

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.

What about checking for undefined or empty, and default to the regular flow if so?

Also, we could move this part to a helper function to make it easier to read the flow. Something like startWithSlsDir.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This had a feature where if it was an empty string, it'd resolve it relative the value in --binDir, but I removed that. It's kind of fiddly. If it's not present at all, yes, it uses the regular flow and requires --slsCompose for DSC. But per the PR description, I was wondering if we might want to get rid of the --slsCompose arg entirely.

If we merge this PR, we have two different ways to start SLS, but the --slsCompose way could fail if you pass a compose file that doesn't have the other required files in the same dir. So just using --slsDir as the only mechanism for starting SLS would make it clearer how to get a DSC cluster running.

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.

I'll ask someone from the team to have an opinion on this, I don't have much context to know the impact of the removal.

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.

@kmruiz could you take a look, please?

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.

I think dropping --slsCompose in favour of --slsDir makes sense, but it's a breaking change. In this case I believe it's fine because I think you folks are the only ones using mongodb-runner with SLS right now, but in the future whenever we have other parties using it we should reduce the amount of breaking changes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I removed --slsCompose

@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch 2 times, most recently from 4e8b9ee to 7b6b656 Compare October 8, 2026 15:39
@autarch
autarch requested a review from dudaschar October 8, 2026 15:39
@dudaschar
dudaschar requested review from kmruiz and removed request for dudaschar October 9, 2026 08:52
Comment thread packages/mongodb-runner/src/cli.ts Outdated
}
if (!argv.slsDir) {
throw new Error(
'--slsDir requires a path to a disaggregated-storage-capable MongoDB build',

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.

Probably we want to be more precise what this means?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I made this clearer

@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from 7b6b656 to fabdc6c Compare October 9, 2026 15:31
@autarch
autarch force-pushed the 08-28-feat_mongodb-runner_add_sls_dir branch from fabdc6c to 473118d Compare October 9, 2026 15:56
@autarch
autarch merged commit c35be01 into main Oct 9, 2026
19 checks passed
@autarch
autarch deleted the 08-28-feat_mongodb-runner_add_sls_dir branch October 9, 2026 16:22
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