Skip to content

Commit

Permalink
SERVER-47093 Re-enable multiversion passthroughs
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonjhchan authored and Evergreen Agent committed Apr 29, 2020
1 parent 52a7369 commit ab21bf5
Show file tree
Hide file tree
Showing 22 changed files with 96 additions and 80 deletions.
6 changes: 3 additions & 3 deletions buildscripts/evergreen_gen_multiversion_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
BURN_IN_TASK = "burn_in_tests_multiversion"
MULTIVERSION_CONFIG_KEY = "use_in_multiversion"
PASSTHROUGH_TAG = "multiversion_passthrough"
RANDOM_REPLSETS_TAG = "random_multiversion_replica_sets"
RANDOM_REPLSETS_TAG = "random_multiversion_ds"
EXCLUDE_TAGS = f"{REQUIRES_FCV_TAG},multiversion_incompatible"

# The directory in which BACKPORTS_REQUIRED_FILE resides.
Expand Down Expand Up @@ -91,8 +91,8 @@ def get_backports_required_last_stable_hash(task_path_suffix: str):
shell_version = check_output([last_stable_shell_exec, "--version"]).decode('utf-8')
last_stable_commit_hash = ""
for line in shell_version.splitlines():
if "git version" in line:
last_stable_commit_hash = line.split(':')[1].strip()
if "gitVersion" in line:
last_stable_commit_hash = line.split(':')[1].strip('"')
break
if not last_stable_commit_hash:
raise ValueError("Could not find a valid commit hash from the last-stable mongo binary.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_kind: js_test
use_in_multiversion: change_streams_sharded_collections_multiversion_passthrough
# use_in_multiversion: change_streams_sharded_collections_multiversion_passthrough

selector:
roots:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_kind: fsm_workload_test
use_in_multiversion: concurrency_sharded_replication_multiversion
# use_in_multiversion: concurrency_sharded_replication_multiversion

selector:
roots:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ selector:
exclude_with_any_tags:
- multiversion_incompatible
- requires_fcv_46
exclude_files:
- jstests/replsets/*.js
# Enable when 4.4 becomes last stable
- jstests/replsets/no_disconnect_on_stepdown.js
executor:
config:
shell_options:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_kind: js_test
use_in_multiversion: sharded_collections_jscore_multiversion_passthrough
# use_in_multiversion: sharded_collections_jscore_multiversion_passthrough

selector:
roots:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_kind: js_test
use_in_multiversion: sharding_jscore_multiversion_passthrough
# use_in_multiversion: sharding_jscore_multiversion_passthrough

selector:
roots:
Expand Down
5 changes: 4 additions & 1 deletion buildscripts/resmokelib/testing/fixtures/replicaset.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ def setup(self): # pylint: disable=too-many-branches,too-many-statements

for i in range(self.num_nodes):
steady_state_constraint_param = "oplogApplicationEnforcesSteadyStateConstraints"
if steady_state_constraint_param not in self.nodes[i].mongod_options["set_parameters"]:
# TODO (SERVER-47813): Set steady state constraint parameters on last-stable nodes.
if (steady_state_constraint_param not in self.nodes[i].mongod_options["set_parameters"]
and self.mixed_bin_versions is not None
and self.mixed_bin_versions[i] == "new"):
self.nodes[i].mongod_options["set_parameters"][steady_state_constraint_param] = True
if self.linear_chain and i > 0:
self.nodes[i].mongod_options["set_parameters"][
Expand Down
74 changes: 38 additions & 36 deletions buildscripts/tests/test_burn_in_tests_multiversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,25 @@ def test_one_task_one_test(self, mock_hash):
tasks = evg_config_dict["tasks"]
self.assertEqual(len(tasks), NUM_REPL_MIXED_VERSION_CONFIGS * n_tests)

@patch("buildscripts.evergreen_gen_multiversion_tests.get_backports_required_last_stable_hash")
def test_n_task_one_test(self, mock_hash):
mock_hash.return_value = MONGO_4_2_HASH
n_tasks = 2
n_tests = 1
gen_config = MagicMock(run_build_variant="variant", fallback_num_sub_suites=1,
project="project", build_variant="build_variant", task_id="task_id",
target_resmoke_time=60)
evg_api = MagicMock()

tests_by_task = create_multiversion_tests_by_task_mock(n_tasks, n_tests)
build_variant = under_test.create_multiversion_generate_tasks_config(
tests_by_task, evg_api, gen_config)
evg_config_dict = build_variant.as_dict()
tasks = evg_config_dict["tasks"]
self.assertEqual(
len(tasks),
(NUM_REPL_MIXED_VERSION_CONFIGS + NUM_SHARDED_MIXED_VERSION_CONFIGS) * n_tests)
# TODO (SERVER-47822): Uncomment once sharding tests are re-enabled.
# @patch("buildscripts.evergreen_gen_multiversion_tests.get_backports_required_last_stable_hash")
# def test_n_task_one_test(self, mock_hash):
# mock_hash.return_value = MONGO_4_2_HASH
# n_tasks = 2
# n_tests = 1
# gen_config = MagicMock(run_build_variant="variant", fallback_num_sub_suites=1,
# project="project", build_variant="build_variant", task_id="task_id",
# target_resmoke_time=60)
# evg_api = MagicMock()

# tests_by_task = create_multiversion_tests_by_task_mock(n_tasks, n_tests)
# build_variant = under_test.create_multiversion_generate_tasks_config(
# tests_by_task, evg_api, gen_config)
# evg_config_dict = build_variant.as_dict()
# tasks = evg_config_dict["tasks"]
# self.assertEqual(
# len(tasks),
# (NUM_REPL_MIXED_VERSION_CONFIGS + NUM_SHARDED_MIXED_VERSION_CONFIGS) * n_tests)

@patch("buildscripts.evergreen_gen_multiversion_tests.get_backports_required_last_stable_hash")
def test_one_task_n_test(self, mock_hash):
Expand All @@ -181,24 +182,25 @@ def test_one_task_n_test(self, mock_hash):
tasks = evg_config_dict["tasks"]
self.assertEqual(len(tasks), NUM_REPL_MIXED_VERSION_CONFIGS * n_tests)

@patch("buildscripts.evergreen_gen_multiversion_tests.get_backports_required_last_stable_hash")
def test_n_task_m_test(self, mock_hash):
mock_hash.return_value = MONGO_4_2_HASH
n_tasks = 2
n_tests = 3
gen_config = MagicMock(run_build_variant="variant", fallback_num_sub_suites=1,
project="project", build_variant="build_variant", task_id="task_id",
target_resmoke_time=60)
evg_api = MagicMock()

tests_by_task = create_multiversion_tests_by_task_mock(n_tasks, n_tests)
build_variant = under_test.create_multiversion_generate_tasks_config(
tests_by_task, evg_api, gen_config)
evg_config_dict = build_variant.as_dict()
tasks = evg_config_dict["tasks"]
self.assertEqual(
len(tasks),
(NUM_REPL_MIXED_VERSION_CONFIGS + NUM_SHARDED_MIXED_VERSION_CONFIGS) * n_tests)
# TODO (SERVER-47822): Uncomment once sharding tests are re-enabled.
# @patch("buildscripts.evergreen_gen_multiversion_tests.get_backports_required_last_stable_hash")
# def test_n_task_m_test(self, mock_hash):
# mock_hash.return_value = MONGO_4_2_HASH
# n_tasks = 2
# n_tests = 3
# gen_config = MagicMock(run_build_variant="variant", fallback_num_sub_suites=1,
# project="project", build_variant="build_variant", task_id="task_id",
# target_resmoke_time=60)
# evg_api = MagicMock()

# tests_by_task = create_multiversion_tests_by_task_mock(n_tasks, n_tests)
# build_variant = under_test.create_multiversion_generate_tasks_config(
# tests_by_task, evg_api, gen_config)
# evg_config_dict = build_variant.as_dict()
# tasks = evg_config_dict["tasks"]
# self.assertEqual(
# len(tasks),
# (NUM_REPL_MIXED_VERSION_CONFIGS + NUM_SHARDED_MIXED_VERSION_CONFIGS) * n_tests)


class TestRepeatConfig(unittest.TestCase):
Expand Down
4 changes: 4 additions & 0 deletions etc/backports_required_for_multiversion_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ replica_sets_multiversion:
test_file: jstests/replsets/apply_ops_inserts_do_not_include_fromMigrate_field.js
- ticket: SERVER-47190
test_file: jstests/replsets/force_shutdown_primary.js
- ticket: SERVER-47394
test_file: jstests/replsets/awaitable_ismaster_errors_on_horizon_change.js
- ticket: SERVER-47394
test_file: jstests/replsets/awaitable_ismaster_on_nodes_with_invalid_configs.js

sharding_multiversion:
- ticket: SERVER-31368
Expand Down
52 changes: 26 additions & 26 deletions etc/evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4841,7 +4841,7 @@ tasks:
## rollback multiversion fuzzer ##
- <<: *jstestfuzz_template
name: rollback_multiversion_fuzzer_gen
tags: ["multiversion_fuzzer"]
# tags: ["multiversion_fuzzer"]
commands:
- func: "generate fuzzer tasks"
vars:
Expand Down Expand Up @@ -5560,7 +5560,7 @@ tasks:

- <<: *task_template
name: change_streams_sharded_collections_multiversion_passthrough_gen
tags: ["multiversion_passthrough"]
# tags: ["multiversion_passthrough"]
depends_on:
- name: change_streams_multiversion_gen
commands:
Expand Down Expand Up @@ -6406,7 +6406,7 @@ tasks:

- <<: *task_template
name: sharded_collections_jscore_multiversion_passthrough_gen
tags: ["multiversion_passthrough"]
# tags: ["multiversion_passthrough"]
commands:
- func: "generate multiversion tasks"
vars:
Expand All @@ -6428,7 +6428,7 @@ tasks:

- <<: *task_template
name: sharding_jscore_multiversion_passthrough_gen
tags: ["multiversion_passthrough"]
# tags: ["multiversion_passthrough"]
commands:
- func: "generate multiversion tasks"
vars:
Expand Down Expand Up @@ -6669,7 +6669,7 @@ tasks:

- <<: *task_template
name: concurrency_sharded_replication_multiversion_gen
tags: [multiversion_passthrough]
# tags: [multiversion_passthrough]
commands:
- func: "generate multiversion tasks"
vars:
Expand Down Expand Up @@ -7021,7 +7021,7 @@ tasks:

- <<: *task_template
name: replica_sets_multiversion
tags: ["random_multiversion_replica_sets"]
tags: ["random_multiversion_ds"]
commands:
- func: "git get project"
- func: "do setup"
Expand Down Expand Up @@ -7058,7 +7058,7 @@ tasks:
fallback_num_sub_suites: 32

- name: sharding_multiversion_gen
tags: ["random_multiversion_replica_sets"]
# tags: ["random_multiversion_ds"]
commands:
- func: "generate randomized multiversion tasks"
vars:
Expand Down Expand Up @@ -8907,10 +8907,10 @@ buildvariants:
- name: .jstestfuzz_multiversion_gen
- name: libunwind_tests
- name: .logical_session_cache .one_sec
# - name: .multiversion_fuzzer
# - name: .multiversion_passthrough
- name: .multiversion_fuzzer
- name: .multiversion_passthrough
- name: .ocsp
# - name: .random_multiversion_replica_sets
- name: .random_multiversion_ds
- name: replica_sets_auth_gen
- name: replica_sets_jscore_passthrough
- name: sasl
Expand Down Expand Up @@ -10028,7 +10028,7 @@ buildvariants:
- name: lint_yaml
- name: lint_errorcodes
- name: burn_in_tests_gen
# - name: burn_in_tests_multiversion_gen
- name: burn_in_tests_multiversion_gen
- name: .aggfuzzer
- name: .aggregation
- name: audit
Expand Down Expand Up @@ -10058,13 +10058,13 @@ buildvariants:
- name: jsonSchema
- name: .jstestfuzz !.flow_control # Flow control jstestfuzz take longer.
- name: libunwind_tests
# - name: multiversion_sanity_check_gen
- name: multiversion_sanity_check_gen
- name: mqlrun
- name: .multi_shard
- name: multi_stmt_txn_jscore_passthrough_with_migration_gen
- name: multiversion_gen
- name: .query_fuzzer
# - name: .random_multiversion_replica_sets
- name: .random_multiversion_ds
- name: .read_write_concern .large
distros:
- rhel62-large
Expand Down Expand Up @@ -10264,7 +10264,7 @@ buildvariants:
- name: .jstestfuzz !.flow_control
- name: .logical_session_cache .repl
- name: multiversion_gen
# - name: .random_multiversion_replica_sets
- name: .random_multiversion_ds
- name: .read_write_concern .large
distros:
- rhel62-large
Expand Down Expand Up @@ -10317,9 +10317,9 @@ buildvariants:
- name: compile_all_run_unittests_TG
distros:
- rhel62-large
# - name: .multiversion_fuzzer
# - name: .multiversion_passthrough
# - name: .random_multiversion_replica_sets
- name: .multiversion_fuzzer
- name: .multiversion_passthrough
- name: .random_multiversion_ds

- name: enterprise-rhel-62-64-bit-flow-control-off
display_name: "Enterprise RHEL 6.2 (flow control off)"
Expand Down Expand Up @@ -10477,10 +10477,10 @@ buildvariants:
- name: .logical_session_cache .one_sec
- name: .multi_shard .common
- name: multiversion_gen
# - name: .multiversion_fuzzer
# - name: .multiversion_passthrough
- name: .multiversion_fuzzer
- name: .multiversion_passthrough
- name: .query_fuzzer
# - name: .random_multiversion_replica_sets
- name: .random_multiversion_ds
- name: .read_write_concern
- name: .replica_sets
- name: .read_only
Expand Down Expand Up @@ -12144,10 +12144,10 @@ buildvariants:
- name: .logical_session_cache
- name: .multi_shard .common
- name: multiversion_gen
# - name: .multiversion_fuzzer
# - name: .multiversion_passthrough
- name: .multiversion_fuzzer
- name: .multiversion_passthrough
- name: .query_fuzzer
# - name: .random_multiversion_replica_sets
- name: .random_multiversion_ds
- name: .read_write_concern
- name: replica_sets_large_txns_format_gen
- name: replica_sets_large_txns_format_jscore_passthrough
Expand Down Expand Up @@ -12234,9 +12234,9 @@ buildvariants:
- name: .logical_session_cache .one_sec
- name: .multi_shard .common
- name: multiversion_gen
# - name: .multiversion_fuzzer
# - name: .multiversion_passthrough
# - name: .random_multiversion_replica_sets
- name: .multiversion_fuzzer
- name: .multiversion_passthrough
- name: .random_multiversion_ds
- name: .read_write_concern
- name: replica_sets_large_txns_format_gen
- name: replica_sets_large_txns_format_jscore_passthrough
Expand Down
2 changes: 1 addition & 1 deletion jstests/core/command_let_variables.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Tests that commands like find, aggregate and update accepts a 'let' parameter which defines
// variables for use in expressions within the command.
// @tags: [assumes_against_mongod_not_mongos]
// @tags: [assumes_against_mongod_not_mongos, requires_fcv_46]

(function() {
"use strict";
Expand Down
3 changes: 2 additions & 1 deletion jstests/core/doc_validation_encrypt_keywords.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
//
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_non_retryable_commands]
// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_non_retryable_commands,
// requires_fcv_46]
(function() {
"use strict";

Expand Down
2 changes: 2 additions & 0 deletions jstests/core/index_partial_create_drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
//
// # Builds index in the background
// requires_background_index,
//
// requires_fcv_46,
// ]

// Test partial index creation and drops.
Expand Down
2 changes: 1 addition & 1 deletion jstests/core/index_partial_read_ops.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Cannot implicitly shard accessed collections because the explain output from a mongod when run
// against a sharded collection is wrapped in a "shards" object with keys for each shard.
// @tags: [assumes_unsharded_collection, does_not_support_stepdowns]
// @tags: [assumes_unsharded_collection, does_not_support_stepdowns, requires_fcv_46]

// Read ops tests for partial indexes.

Expand Down
2 changes: 1 addition & 1 deletion jstests/replsets/dbhash_lock_acquisition.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Tests that the dbHash command acquires IS mode locks on the global, database, and collection
* resources when reading a timestamp using the $_internalReadAtClusterTime option.
*
* @tags: [uses_transactions]
* @tags: [uses_transactions, requires_fcv_46]
*/
(function() {
"use strict";
Expand Down
1 change: 1 addition & 0 deletions jstests/replsets/initial_sync_during_stepdown.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Test that stepdown during collection cloning and oplog fetching does not interrupt initial sync.
* @tags: [requires_fcv_46]
*/
(function() {
"use strict";
Expand Down
2 changes: 2 additions & 0 deletions jstests/replsets/read_operations_during_step_up.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Test that the read operations are not killed and their connections are also not
* closed during step up.
*
* @tags: [requires_fcv_46]
*/
load('jstests/libs/parallelTester.js');
load("jstests/libs/curop_helpers.js"); // for waitForCurOpByFailPoint().
Expand Down
Loading

0 comments on commit ab21bf5

Please sign in to comment.