Skip to content

TOOLS-4319 Fix TestReadDumpServerVersionFromArchive to work when run with all Server builds - #1103

Open
autarch wants to merge 1 commit into
masterfrom
dump-server-version-assertion
Open

TOOLS-4319 Fix TestReadDumpServerVersionFromArchive to work when run with all Server builds#1103
autarch wants to merge 1 commit into
masterfrom
dump-server-version-assertion

Conversation

@autarch

@autarch autarch commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

If we use a Server binary built from an arbitrary git commit, this test will fail because it compares the literal Server version string against the version returned by the Server's buildInfo command, e.g. "8.0.16-353-gb19191c" vs [8, 0, 17, -199]).

…n with all Server builds

If we use a Server binary built from an arbitrary git commit, this test will fail because it compares the literal Server version string against the version returned by the Server's `buildInfo` command, e.g. "8.0.16-353-gb19191c" vs `[8, 0, 17, -199]`).
@autarch
autarch requested a review from a team as a code owner August 10, 2026 21:42
@autarch
autarch requested review from mattb-mdb and removed request for a team August 10, 2026 21:42

autarch commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

// [8, 0, 17, -100]), which would not match.
serverVersionStr, err := sessionProvider.ServerVersion()
require.NoError(err)
expectedVersion, err := db.StrToVersion(serverVersionStr)

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.

This test is checking this error but L379 in mongorestore.go has restore.dumpServerVersion, _ = db.StrToVersion(dumpServerVersionStr) - shouldn't that follow the same pattern and at least check the error rather than discard it?

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.

It probably should, but that's much earlier work. @FGasper It looks like you wrote that. Do you remember why this doesn't check the error, by any chance?

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.

Felipe is out until next week, and I don't think this needs to block merging this test change.

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.

Commenting just to postpone this at least until the release process for tools is complete.

@autarch
autarch requested a review from mattb-mdb August 11, 2026 17:14
@autarch
autarch dismissed mattb-mdb’s stale review August 13, 2026 16:31

Re-requesting

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