[SERVER-85922] Improve sharding suites test exclusions Created: 30/Jan/24  Updated: 30/Jan/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Catalin Sumanaru Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:

 Description   

Currently the sharding suites exclude unsupported tests via explicit paths on a per-test basis. This could be potentially error prone, as there is currently no centralized mechanism for updating all the relevant suites once the original problem has been addressed. This also means that if a new exclusion is needed, the author would need to manually go through all the failing suites and add the exclusion.

For example, consider the following extract from sharded_collections_jscore_passthrough:

  # The following tests fail because a certain command or functionality is not supported by
  # mongos. This command or functionality is placed in a comment next to the failing test.
  - jstests/core/**/apitest_db.js  # serverStatus output doesn't have storageEngine.
  - jstests/core/**/awaitdata_getmore_cmd.js  # capped collections.
  - jstests/core/**/bypass_doc_validation.js  # sharded $out output not permitted
  - jstests/core/**/check_shard_index.js  # checkShardingIndex.
  - jstests/core/**/collection_truncate.js  # emptycapped.
  - jstests/core/**/compact_keeps_indexes.js  # compact.
  - jstests/core/**/currentop.js  # uses fsync.
  - jstests/core/**/dbhash.js  # dbhash.
  - jstests/core/**/fsync.js  # uses fsync.
  - jstests/core/**/geo_s2cursorlimitskip.js  # profiling.
  - jstests/core/**/geo_update_btree2.js  # notablescan.
  - jstests/core/**/index9.js  # "local" database.
  - jstests/core/**/queryoptimizera.js  # "local" database.
  - jstests/core/**/stages*.js  # stageDebug.
  - jstests/core/**/startup_log.js  # "local" database.
  - jstests/core/**/tailable_cursor_invalidation.js # capped collections.
  - jstests/core/**/tailable_getmore_batch_size.js # capped collections.
  - jstests/core/**/tailable_skip_limit.js # capped collections.
  - jstests/core/**/top.js  # top. 

The preferred approach in this specific case would be to mark each of those tests with assumes_against_mongod_not_mongos

Other common exclusions could be improved by using YAML placeholders such as:

testNotWorkingInSharding: &createAnAnchorThatWillBeUsedInOtherSuites
- testA
- testB
 
// in some other suite
 
exclude_files:
- *createAnAnchorThatWillBeUsedInOtherSuites
- otherTest 


Generated at Thu Feb 08 06:58:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.