-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-4062 test load balancer on evg #837
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
Changes from all commits
a6820cc
1e27b95
ab80362
783710c
47e3f7c
33aa413
557184f
eaaf361
72d0065
9a8ce2d
57e52e1
7d000b0
f448895
9fdd109
4171f56
326acae
9411cc4
39b093a
1b8c27e
a651033
c4d1f4c
b303183
d0ecd1f
535befa
7031fb0
3dc5887
143b21a
86582a7
17789c4
2a0922c
808424c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,11 +51,11 @@ get_mongodb_download_url_for () | |
_DISTRO=$1 | ||
_VERSION=$2 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an updated copy of the file in mongodb-labs/drivers-evergreen-tools. |
||
VERSION_50="5.0.0-rc0" | ||
VERSION_44="4.4.3" | ||
VERSION_42="4.2.11" | ||
VERSION_40="4.0.22" | ||
VERSION_36="3.6.21" | ||
VERSION_50="5.0.0" | ||
VERSION_44="4.4.6" | ||
VERSION_42="4.2.15" | ||
VERSION_40="4.0.25" | ||
VERSION_36="3.6.23" | ||
VERSION_34="3.4.24" | ||
VERSION_32="3.2.22" | ||
VERSION_30="3.0.15" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -311,6 +311,9 @@ | |
export MONGOC_TEST_GCP_EMAIL="${client_side_encryption_gcp_email}" | ||
export MONGOC_TEST_GCP_PRIVATEKEY="${client_side_encryption_gcp_privatekey}" | ||
fi | ||
export LOADBALANCED=${LOADBALANCED} | ||
export SINGLE_MONGOS_LB_URI="${SINGLE_MONGOS_LB_URI}" | ||
export MULTI_MONGOS_LB_URI="${MULTI_MONGOS_LB_URI}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these values coming from the Evergreen project configuration? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, these are Evergreen expansions that are created when the Evergreen task is run. In config.yml, the "start load balancer" function runs the run-load-balancer.sh script from driver-evergreen-tools. It generates these URIs and writes them to a file on this line. The "start load balancer" function then uses the expansions.update command to load these values as Evergreen expansions. |
||
set -o errexit | ||
sh .evergreen/run-tests.sh | ||
'''), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1074,4 +1074,71 @@ def _check_allowed(self): | |
|
||
all_tasks = chain(all_tasks, OCSPTask.matrix()) | ||
|
||
class LoadBalancedTask(MatrixTask): | ||
axes = OD([ | ||
('asan', [True]), | ||
('build_ssl', ['openssl']), # The SSL library the C driver is built with. | ||
('test_ssl', [True, False]), # Whether tests are run with SSL connections. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since there are two Booleans there, does this mean "either true or false" or does one flag signify something else? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kevinAlbs can confirm, but I think the list of values is used to build the matrix. So we'll end up with LB tests running both with and without SSL. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jmikola is right. This is to build a matrix to test with SSL and without SSL. This is to satisfy the requirement in the load balancer test readme:
The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, got it, thanks. |
||
('test_auth', [True, False]), | ||
('version', ['5.0', 'latest']) | ||
]) | ||
|
||
def _check_allowed (self): | ||
# Test with both SSL and auth, or neither. | ||
prohibit (self.test_ssl != self.test_auth) | ||
|
||
def __init__(self, *args, **kwargs): | ||
super(LoadBalancedTask, self).__init__(*args, **kwargs) | ||
if self.asan and self.build_ssl == "openssl": | ||
self.add_dependency ('debug-compile-asan-clang-openssl') | ||
self.add_tags('test-asan') | ||
else: | ||
raise RuntimeError ("unimplemented configuration for LoadBalancedTask") | ||
|
||
self.add_tags(self.version) | ||
self.options['exec_timeout_secs'] = 3600 | ||
|
||
# Return the task name. | ||
# Example: test-loadbalanced-asan-auth-openssl-latest | ||
@property | ||
def name(self): | ||
name = "test-loadbalanced" | ||
if self.asan: | ||
name += "-asan" | ||
if self.test_auth: | ||
name += "-auth" | ||
else: | ||
name += "-noauth" | ||
if self.test_ssl: | ||
name += "-" + self.build_ssl | ||
else: | ||
name += "-nossl" | ||
if self.version: | ||
name += "-" + self.version | ||
return name | ||
|
||
def to_dict(self): | ||
task = super(MatrixTask, self).to_dict() | ||
commands = task['commands'] | ||
commands.append( | ||
func('fetch build', BUILD_NAME=self.depends_on['name'])) | ||
|
||
|
||
orchestration = bootstrap(TOPOLOGY='sharded_cluster', | ||
AUTH='auth' if self.test_auth else 'noauth', | ||
SSL='ssl' if self.test_ssl else 'nossl', | ||
VERSION=self.version) | ||
commands.append(orchestration) | ||
commands.append (func("clone drivers-evergreen-tools")) | ||
commands.append (func("start load balancer", | ||
MONGODB_URI="mongodb://localhost:27017,localhost:27018")) | ||
commands.append(run_tests(ASAN='on' if self.asan else 'off', | ||
SSL='ssl' if self.test_ssl else 'nossl', | ||
AUTH='auth' if self.test_auth else 'noauth', | ||
LOADBALANCED='loadbalanced')) | ||
|
||
return task | ||
|
||
all_tasks = chain(all_tasks, LoadBalancedTask.matrix()) | ||
|
||
all_tasks = list(all_tasks) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -657,7 +657,7 @@ def days(n): | |
], {}, batchtime=days(7)), | ||
Variant ('packaging', 'Linux Distro Packaging', 'ubuntu1804-test', [ | ||
'debian-package-build', | ||
OD([('name', 'rpm-package-build'), ('distros', ['rhel80-test'])]), | ||
OD([('name', 'rpm-package-build'), ('distros', ['rhel82-arm64-small'])]), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Drive-by fix. The config.yml file was manually updated in CDRIVER-4112 without the python generation files being updated. |
||
], {}, batchtime=days(1)), | ||
Variant('tsan-ubuntu', | ||
'Thread Sanitizer (TSAN) Tests (Ubuntu 18.04)', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2321,6 +2321,7 @@ _mongoc_cluster_stream_for_server (mongoc_cluster_t *cluster, | |
mongoc_server_stream_cleanup (server_stream); | ||
mongoc_cluster_disconnect_node (cluster, server_id); | ||
bson_mutex_unlock (&topology->mutex); | ||
_mongoc_bson_init_if_set (reply); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a bug fix. If a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume no ticket is needed for this since it's fixing a bug from a previous PR that was never released. Correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, this was introduced in CDRIVER-4056: 4919d4f#diff-7723202fa2b19410a0b6dd42b6dda8d3708c52f85e7b553977c0bbe324031b41R2299 I do not think a ticket is necessary since CDRIVER-4056 is unreleased and is part of load balancer support. |
||
return NULL; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the Evergreen config file is generated from Python scripts. The relevant changes are in tasks.py, functions.py, and variants.py.