-
Notifications
You must be signed in to change notification settings - Fork 27
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
DRIVERS-828 comprehensive Atlas testing #98
Changes from 162 commits
2e8bbc1
46c1627
cac3bb8
64a0496
0fe25ee
8560798
75144cf
4a409fb
a0091d1
bf97152
c2ae81c
257c4c2
808b853
a29c304
64f4016
20adcb3
96f8caf
ee20807
c24f583
b151269
f8ea7e1
4154a61
0cdd9da
7956354
f647ae9
c39861f
ed08894
0620091
cffff62
9288746
ba675ff
93f9775
b85f487
6b6f70e
6142358
88e12d8
ea66890
e4c8c45
176e12c
c84be0a
a96a9cc
f838abd
29e0554
ec3bb72
39c6739
c3bf87e
a936029
b20e8a9
f7d27c5
9616d34
bb21bb1
ec98340
38dcab3
1d06648
5f542b1
b7ac619
3a5303c
ae84859
0711305
518c935
82011c0
5833c7d
31c7bdf
3223c22
b53da32
f7385b4
42a1d3b
47079ba
d32dc29
cf76904
429b783
2489cae
d106f74
09e05a0
f5634e9
d14357f
80ef2ba
66f4cdd
86b0108
9d5768c
b741789
49a0853
eeedc87
ca6bf53
90b5adc
36570af
72099fb
8c1bfed
6a86057
6884512
2a7bfbc
b59a58f
19d754f
529a684
50e811c
5c264ce
73f5abb
ea69fcd
77a6bf5
b56ab0f
a732857
18cf8c0
a5a9562
8287f72
26963fc
d9cc799
c831b78
57d33d6
eed4aae
0b2a8bf
b73db85
5424854
d97a233
c2f7003
49e35a3
9bc8248
32c4ebf
446caaf
986f1a3
da8d62f
def442f
006ea23
b64ed10
c07e622
48da544
55ed299
c934f1a
017257d
d819387
318ece8
08d62c9
477f657
be8dbbf
a3e3c9b
3a18de3
0250677
c5c1323
cc48c29
aca6b5c
b7c7a74
58ce52d
7317796
8d81138
566caa5
45d963c
4e06e90
d748119
e8f90eb
78fb5e6
5d68eda
83285fe
7c2d0aa
da1448f
32caa8a
2923250
96778b1
18a4ff5
f4f5150
01a68db
5583764
849fa47
1f7529a
afa7f0c
ed4bafa
9504d1b
9f417ec
f8271f9
a71d6f4
5b03146
887a336
28ea6af
244f00b
c25c664
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 |
---|---|---|
|
@@ -30,6 +30,11 @@ functions: | |
working_dir: astrolabe-src | ||
command: | | ||
${PYTHON3_BINARY} -m pip install virtualenv | ||
- command: subprocess.exec | ||
params: | ||
working_dir: astrolabe-src | ||
command: | | ||
cat /etc/resolv.conf | ||
# Create virtualenv using a CPython 3.5+ binary. | ||
- command: subprocess.exec | ||
params: | ||
|
@@ -78,11 +83,13 @@ functions: | |
CLUSTER_NAME_SALT: ${build_id} | ||
ATLAS_API_USERNAME: ${atlas_key} | ||
ATLAS_API_PASSWORD: ${atlas_secret} | ||
ATLAS_API_BASE_URL: ${atlas_url} | ||
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. Is there a reason you are hardcoding this? We should prefer configuring this value in the corresponding Evergreen variable (via the UI) instead of committing it here. 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 also noticied that we are currently using 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. With the private endpoints the last path segment had to be removed, since I didn't have admin access I set the override in the PR. I can edit the project but this would break existing builds, therefore I suggest making this change in project config when the PR is ready to be merged. 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. In that case can you revert this change? We can update the |
||
ATLAS_API_BASE_URL: https://cloud-dev.mongodb.com/api | ||
ATLAS_ORGANIZATION_NAME: ${atlas_organization} | ||
ATLAS_ADMIN_API_USERNAME: ${atlas_admin_api_username} | ||
ATLAS_ADMIN_API_PASSWORD: ${atlas_admin_api_password} | ||
add_expansions_to_env: true | ||
command: | | ||
astrolabevenv/${PYTHON_BIN_DIR}/astrolabe spec-tests run-one tests/${TEST_NAME}.yaml -e integrations/${DRIVER_DIRNAME}/workload-executor | ||
astrolabevenv/${PYTHON_BIN_DIR}/astrolabe spec-tests run-one tests/${TEST_NAME}.yml -e integrations/${DRIVER_DIRNAME}/workload-executor | ||
|
||
"validate executor": | ||
# Run a MongoDB instance locally. | ||
|
@@ -98,7 +105,7 @@ functions: | |
working_dir: astrolabe-src | ||
add_expansions_to_env: true | ||
command: | | ||
astrolabevenv/${PYTHON_BIN_DIR}/astrolabe spec-tests validate-workload-executor -e integrations/${DRIVER_DIRNAME}/workload-executor --connection-string "mongodb://localhost:27017/" | ||
astrolabevenv/${PYTHON_BIN_DIR}/astrolabe spec-tests validate-workload-executor -e integrations/${DRIVER_DIRNAME}/workload-executor --connection-string "mongodb://localhost:27017/?serverselectiontimeoutms=10000" | ||
prashantmital marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
"delete test cluster": | ||
# Delete the cluster that was used to run the test. | ||
|
@@ -110,18 +117,51 @@ functions: | |
CLUSTER_NAME_SALT: ${build_id} | ||
ATLAS_API_USERNAME: ${atlas_key} | ||
ATLAS_API_PASSWORD: ${atlas_secret} | ||
ATLAS_API_BASE_URL: ${atlas_url} | ||
ATLAS_API_BASE_URL: https://cloud-dev.mongodb.com/api | ||
ATLAS_ORGANIZATION_NAME: ${atlas_organization} | ||
ATLAS_ADMIN_API_USERNAME: ${atlas_admin_api_username} | ||
ATLAS_ADMIN_API_PASSWORD: ${atlas_admin_api_password} | ||
add_expansions_to_env: true | ||
command: | | ||
astrolabevenv/${PYTHON_BIN_DIR}/astrolabe spec-tests delete-cluster tests/${TEST_NAME}.yaml | ||
astrolabevenv/${PYTHON_BIN_DIR}/astrolabe spec-tests delete-cluster tests/${TEST_NAME}.yml | ||
|
||
"upload test results": | ||
# Upload the xunit-format test results. | ||
- command: attach.xunit_results | ||
params: | ||
file: "astrolabe-src/xunit-output/*.xml" | ||
|
||
"upload server logs": | ||
- command: s3.put | ||
params: | ||
aws_key: ${aws_key} | ||
aws_secret: ${aws_secret} | ||
local_file: astrolabe-src/logs.tar.gz | ||
remote_file: ${UPLOAD_BUCKET}/${version_id}/${build_id}-${task_id}-${execution}/server-logs.tar.gz | ||
bucket: mciuploads | ||
permissions: public-read | ||
content_type: ${content_type|application/x-gzip} | ||
display_name: "mongodb-logs.tar.gz" | ||
|
||
"upload event logs": | ||
- command: shell.exec | ||
params: | ||
working_dir: astrolabe-src | ||
continue_on_err: true # Because script may not exist OR platform may not be Windows. | ||
add_expansions_to_env: true | ||
command: | | ||
gzip <events.json >events.json.gz | ||
- command: s3.put | ||
params: | ||
aws_key: ${aws_key} | ||
aws_secret: ${aws_secret} | ||
local_file: astrolabe-src/events.json.gz | ||
remote_file: ${UPLOAD_BUCKET}/${version_id}/${build_id}-${task_id}-${execution}/events.json.gz | ||
bucket: mciuploads | ||
permissions: public-read | ||
content_type: ${content_type|application/x-gzip} | ||
display_name: "events.json.gz" | ||
|
||
# Functions to run before the test. | ||
pre: | ||
- func: "install astrolabe" | ||
|
@@ -131,6 +171,8 @@ pre: | |
post: | ||
- func: "delete test cluster" | ||
- func: "upload test results" | ||
- func: "upload server logs" | ||
- func: "upload event logs" | ||
|
||
tasks: | ||
# Workload executor validation task (patch-only). | ||
|
@@ -140,26 +182,101 @@ tasks: | |
commands: | ||
- func: "validate executor" | ||
# One test-case per task. | ||
# Use .evergreen/generate-tasks.sh to generate this list. | ||
prashantmital marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: retryReads-move-sharded | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-move-sharded | ||
- name: retryReads-move | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-move | ||
- name: retryReads-primaryRemoval | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-primaryRemoval | ||
- name: retryReads-primaryTakeover | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-primaryTakeover | ||
- name: retryReads-processRestart-sharded | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-processRestart-sharded | ||
- name: retryReads-processRestart | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-processRestart | ||
- name: retryReads-resizeCluster | ||
tags: ["all", "retryReads", "resizeCluster"] | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-resizeCluster | ||
- name: retryReads-testFailover-sharded | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-testFailover-sharded | ||
- name: retryReads-testFailover | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-testFailover | ||
- name: retryReads-toggleServerSideJS | ||
tags: ["all", "retryReads", "toggleServerSideJS"] | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-toggleServerSideJS | ||
- name: retryReads-vmRestart-sharded | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-vmRestart-sharded | ||
- name: retryReads-vmRestart | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryReads-vmRestart | ||
- name: retryWrites-resizeCluster | ||
tags: ["all", "retryWrites", "resizeCluster"] | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: retryWrites-resizeCluster | ||
- name: retryWrites-toggleServerSideJS | ||
tags: ["all", "retryWrites", "toggleServerSideJS"] | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
|
@@ -307,22 +424,6 @@ axes: | |
GOPATH: /home/ubuntu/go | ||
|
||
buildvariants: | ||
- matrix_name: "tests-python" | ||
matrix_spec: | ||
driver: ["pymongo-master"] | ||
platform: ["ubuntu-18.04"] | ||
runtime: ["python38"] | ||
display_name: "${driver} ${platform} ${runtime}" | ||
tasks: | ||
- ".all" | ||
- matrix_name: "tests-python-windows" | ||
matrix_spec: | ||
driver: ["pymongo-master"] | ||
platform: ["windows-64"] | ||
runtime: ["python37-windows"] | ||
display_name: "${driver} ${platform} ${runtime}" | ||
tasks: | ||
- ".all" | ||
- matrix_name: "tests-ruby" | ||
matrix_spec: | ||
driver: ["ruby-master"] | ||
|
@@ -331,46 +432,65 @@ buildvariants: | |
display_name: "${driver} ${platform} ${runtime}" | ||
tasks: | ||
- ".all" | ||
- matrix_name: tests-node | ||
matrix_spec: | ||
driver: | ||
- node-master | ||
platform: | ||
- ubuntu-18.04 | ||
runtime: | ||
- node-dubnium | ||
- node-erbium | ||
display_name: "${driver} ${platform} ${runtime}" | ||
tasks: | ||
- .all | ||
- matrix_name: "tests-java" | ||
matrix_spec: | ||
driver: ["java-master"] | ||
platform: ["ubuntu-18.04"] | ||
runtime: ["java11"] | ||
display_name: "${driver} ${platform} ${runtime}" | ||
tasks: | ||
- ".all" | ||
- matrix_name: "tests-dotnet-windows" | ||
matrix_spec: | ||
driver: ["dotnet-master"] | ||
platform: ["windows-64"] | ||
runtime: | ||
- "dotnet-async-netcoreapp2.1" | ||
- "dotnet-sync-netcoreapp2.1" | ||
- "dotnet-async-netcoreapp1.1" | ||
- "dotnet-sync-netcoreapp1.1" | ||
- "dotnet-async-net452" | ||
- "dotnet-sync-net452" | ||
display_name: "${driver} ${platform} ${runtime}" | ||
tasks: | ||
- ".all" | ||
- matrix_name: "tests-go" | ||
matrix_spec: | ||
driver: ["go-master"] | ||
platform: ubuntu-18.04 | ||
runtime: go-13 | ||
display_name: "${driver} ${platform} ${runtime}" | ||
tasks: | ||
- ".all" | ||
|
||
# TODO: re-enable language builds once workload executors have been | ||
# re-implemented to work with the new format | ||
#- matrix_name: "tests-python" | ||
prashantmital marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# matrix_spec: | ||
# driver: ["pymongo-master"] | ||
# platform: ["ubuntu-18.04"] | ||
# runtime: ["python27", "python38"] | ||
# display_name: "${driver} ${platform} ${runtime}" | ||
# tasks: | ||
# - ".all" | ||
#- matrix_name: "tests-python-windows" | ||
# matrix_spec: | ||
# driver: ["pymongo-master"] | ||
# platform: ["windows-64"] | ||
# runtime: ["python37-windows"] | ||
# display_name: "${driver} ${platform} ${runtime}" | ||
# tasks: | ||
# - ".all" | ||
#- matrix_name: tests-node | ||
# matrix_spec: | ||
# driver: | ||
# - node-master | ||
# platform: | ||
# - ubuntu-18.04 | ||
# runtime: | ||
# - node-dubnium | ||
# - node-erbium | ||
# display_name: "${driver} ${platform} ${runtime}" | ||
# tasks: | ||
# - .all | ||
#- matrix_name: "tests-java" | ||
# matrix_spec: | ||
# driver: ["java-master"] | ||
# platform: ["ubuntu-18.04"] | ||
# runtime: ["java11"] | ||
# display_name: "${driver} ${platform} ${runtime}" | ||
# tasks: | ||
# - ".all" | ||
#- matrix_name: "tests-dotnet-windows" | ||
# matrix_spec: | ||
# driver: ["dotnet-master"] | ||
# platform: ["windows-64"] | ||
# runtime: | ||
# - "dotnet-async-netcoreapp2.1" | ||
# - "dotnet-sync-netcoreapp2.1" | ||
# - "dotnet-async-netcoreapp1.1" | ||
# - "dotnet-sync-netcoreapp1.1" | ||
# - "dotnet-async-net452" | ||
# - "dotnet-sync-net452" | ||
# display_name: "${driver} ${platform} ${runtime}" | ||
# tasks: | ||
# - ".all" | ||
#- matrix_name: "tests-go" | ||
# matrix_spec: | ||
# driver: ["go-master"] | ||
# platform: ubuntu-18.04 | ||
# runtime: go-13 | ||
# display_name: "${driver} ${platform} ${runtime}" | ||
# tasks: | ||
# - ".all" | ||
# | ||
# |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
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. Nit: can you add a comment somewhere (either here or to a readme in this directory or to the config.yml) that tells the user when and how to use this script? |
||
|
||
for f in tests/*.yml; do | ||
task=`basename $f |sed -e s/.yml//` | ||
|
||
cat <<-EOT | ||
- name: $task | ||
cron: '@weekly' | ||
tags: ["all"] | ||
commands: | ||
- func: "run test" | ||
vars: | ||
TEST_NAME: $task | ||
EOT | ||
|
||
done |
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.
Is this to get debugging information for the DNS issue? If so, can we do this in a separate PR?
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.
@p-mongo what about this?