Skip to content

test(DRIVERS-3034): remove/update 4.0 related tests #1796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 7, 2025
Merged

Conversation

durran
Copy link
Member

@durran durran commented May 5, 2025

Removes SDAM tests that were testing pre-4.2 functionality due to drivers removing support for 4.0. Also updates other SDAM spec tests testing pre 6.0 server versions to the wire version for 5.3.

Driver test with these changes in Node: https://spruce.mongodb.com/version/6819065e84440c0007073813/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC

Related PR: mongodb/node-mongodb-native#4534

Please complete the following before merging:

  • Update changelog.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, sharded
    clusters, and serverless).

@durran
Copy link
Member Author

durran commented May 5, 2025

Dead link errors on the lint task exist on previous commit.

@@ -15,7 +15,7 @@ phases: [
setVersion: 1,
setName: "rs",
minWireVersion: 0,
maxWireVersion: 7
maxWireVersion: 16
Copy link
Member Author

Choose a reason for hiding this comment

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

Wire version 16 is server 5.3

Copy link
Contributor

Choose a reason for hiding this comment

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

The Java and C drivers are able to pass these tests still, I think because it's only in server selection where the maxWireVersion is checked. Do you expect other drivers to fail these tests, and if so, what causes the failure?

Copy link
Member Author

@durran durran May 6, 2025

Choose a reason for hiding this comment

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

My expectation is that no drivers would fail these tests currently as they are for pre 6.0 and this sets the max wire version for 5.3. If the drivers remove support for 4.0, I expect these tests to fail without this change on drivers that do wire version checks outside of server selection as the maxWireVersion would then be lower than the minWireVersion. (For example, Node does do this check outside of server selection in https://github.com/mongodb/node-mongodb-native/blob/fcbc6edfc3d54f5dbd3b142c06ef205ecd2729b8/src/cmap/connect.ts#L60)

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, this seems like a harmless change to make, even for drivers using submodules. There is no loss of test coverage, and the tests should pass all drivers.

But why stop at 5.3? Any reason not to just bump it up the MongoDB 8.0 wire version?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, as you explained in Slack, this is for pre-6.0

@durran durran marked this pull request as ready for review May 5, 2025 19:11
@durran durran requested a review from a team as a code owner May 5, 2025 19:11
@durran durran requested review from W-A-James and ShaneHarvey and removed request for a team May 5, 2025 19:11
@@ -19,7 +19,7 @@ phases: [
# servers from a primary isWritablePrimary are added to the working server set
me: "a:27017",
minWireVersion: 0,
maxWireVersion: 7
maxWireVersion: 25
Copy link
Member Author

Choose a reason for hiding this comment

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

These I just updated to latest to not need to continually update them.

@dariakp dariakp removed the request for review from W-A-James May 5, 2025 20:06
@jyemin
Copy link
Contributor

jyemin commented May 5, 2025

@durran, given that many drivers are using git submodules to pull in the specification tests, we actually have to wait until all drivers have implements DRIVERS-3034 before we actually delete these tests. Otherwise any drivers that have not yet implemented DRIVERS-3034 will be missing test coverage once they update their git submodules.

So I don't think we should merge this PR as is.

@jyemin jyemin self-requested a review May 5, 2025 21:03
@durran
Copy link
Member Author

durran commented May 5, 2025

@durran, given that many drivers are using git submodules to pull in the specification tests, we actually have to wait until all drivers have implements DRIVERS-3034 before we actually delete these tests. Otherwise any drivers that have not yet implemented DRIVERS-3034 will be missing test coverage once they update their git submodules.

So I don't think we should merge this PR as is.

Fine with that. I just wanted exposure that I needed to do this to do the work for Node. Happy to close and create a DRIVERS ticket if you think that's the better approach.

Also as a note, for drivers that do have this repo as a submodule, this change is not going to break anything. It's basically a setup for when they do remove 4.0 support.

@jyemin
Copy link
Contributor

jyemin commented May 6, 2025

What to do with this PR depends in part on the answer to my question here. It's easy for drivers to start skipping a bunch of tests, but tests that need modification are a problem.

@durran durran requested a review from a team as a code owner May 6, 2025 19:27
@durran durran requested review from abr-egn and removed request for a team May 6, 2025 19:27
@durran
Copy link
Member Author

durran commented May 6, 2025

Link check fixed in #1797

Copy link
Contributor

@abr-egn abr-egn left a comment

Choose a reason for hiding this comment

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

LGTM for the removed change streams test.

Copy link
Contributor

@jyemin jyemin left a comment

Choose a reason for hiding this comment

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

LGTM!

@durran durran merged commit cea6c7d into master May 7, 2025
5 checks passed
@durran durran deleted the fix-4-0-tests branch May 7, 2025 20:38
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.

3 participants