[DRIVERS-2609] Deprecate sharded-replicaset topology type and clean up redundant runOnRequirements Created: 20/Apr/23 Updated: 21/Aug/23 |
|
| Status: | Implementing |
| Project: | Drivers |
| Component/s: | Change Streams, CSOT, Retryability, Sessions, Stable API, Transactions, Unified Test Runner |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Jeremy Mikola | Assignee: | Jeremy Mikola |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | leads-triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Changes: | Needed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Downstream Changes Summary: | Sync spec tests to mongodb/specifications@474ddfc for the following directories:
No test runner changes should be required. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Engineering Lead: | |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Start date: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Compliance: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
SummaryI came across some redundant runOnRequirement definitions in various spec tests while reviewing mongodb/specifications#1389 for DRIVERS-2577. For instance, some specs include both "sharded-replicaset" and "sharded" in the same topologies array. MongoDB 3.6+ requires that all shards be replica sets (see: Shard Replica Sets from the MongoDB 3.6 release notes). With that in mind, the "sharded-replicaset" topology is not useful for runOnRequirements that specify a minServerVersion of 3.6+. Historically, I cannot recall a case where a test incorrectly used "sharded" instead of "sharded-replicaset". This would only have been an issue for testing on pre-3.6 servers, but most of the features that require replica sets already require 3.6+ (e.g. change streams, transactions). Additionally, the mongo-orchestration configs in drivers-evergreen-tools have historically used replica sets for shards. The Unified Test Format spec format would do well to deprecate "sharded-replicaset" and encourage tests to use "sharded" in its place (when targeting 3.6+ servers). MotivationWho is the affected end user?Driver developers. How does this affect the end user?Using "sharded-replicaset" adds unnecessary overhead. Additionally, redundant runOnRequirements make tests files more verbose. Is this issue urgent?No. Is this ticket required by a downstream team?No. Is this ticket only for tests?Yes. |
| Comments |
| Comment by Githook User [ 25/May/23 ] |
|
Author: {'name': 'Dmitry Rybakov', 'email': 'dmitry.rybakov@mongodb.com', 'username': 'comandeo'}Message: POC for DRIVERS-2609 (#2714) |
| Comment by Githook User [ 12/May/23 ] |
|
Author: {'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}Message: DRIVERS-2609: Deprecate sharded-replicaset topology type and clean up redundant runOnRequirements (#1408)
MongoDB 3.6+ requires all shards to be replica sets, so there is no reason use "sharded-replicaset" instead of "sharded". The "sharded-replicaset" topology type dates back to the first version of the Unified Test Format, but it's not clear it was ever truly necessary. It appears to have only been used in conjunction with 3.6+ minServerVersion requirements.
A replica set will already be matched by the first runOnRequirement.
|
| Comment by Jeremy Mikola [ 20/Apr/23 ] |