-
Notifications
You must be signed in to change notification settings - Fork 1.5k
3.8.x continuous matrix testing #653
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
e983feb
ad624f4
ed6ea84
a5a63f6
129d7db
ab13eab
f58395a
3c49599
424d17c
bddbb54
34c7f43
5a4de01
cfd33c6
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 |
|---|---|---|
|
|
@@ -194,7 +194,7 @@ functions: | |
| "upload test results": | ||
| - command: attach.xunit_results | ||
| params: | ||
| file: ./src/*/build/test-results/TEST-*.xml | ||
| file: ./src/*/build/test-results/test/TEST-*.xml | ||
|
|
||
| "bootstrap mongo-orchestration": | ||
| - command: shell.exec | ||
|
|
@@ -316,15 +316,6 @@ functions: | |
| ${PREPARE_SHELL} | ||
| echo '{"results": [{ "status": "FAIL", "test_file": "Build", "log_raw": "No test-results.json found was created" } ]}' > ${PROJECT_DIRECTORY}/test-results.json | ||
|
|
||
| "install dependencies": | ||
|
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. The presence of this function caused evergreen to refuse to load the file, so had to remove it. 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. Ack |
||
| type: test | ||
| params: | ||
| working_dir: "src" | ||
| script: | | ||
| ${PREPARE_SHELL} | ||
| file="${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh" | ||
| [ -f ${file} ] && sh ${file} || echo "${file} not available, skipping" | ||
|
|
||
| # Anchors | ||
|
|
||
| hosts: &hosts | ||
|
|
@@ -337,7 +328,6 @@ pre: | |
| - func: "fix absolute paths" | ||
| - func: "init test-results" | ||
| - func: "make files executable" | ||
| - func: "install dependencies" | ||
|
|
||
| post: | ||
| # Removed, causing timeouts | ||
|
|
@@ -357,9 +347,6 @@ tasks: | |
| - func: "upload build" | ||
|
|
||
| - name: "test" | ||
| depends_on: | ||
| - variant: "static-checks" | ||
| name: "static-analysis" | ||
| commands: | ||
| - func: "bootstrap mongo-orchestration" | ||
| - func: "run tests" | ||
|
|
@@ -408,6 +395,18 @@ axes: | |
| - id: version | ||
| display_name: MongoDB Version | ||
| values: | ||
| - id: "latest" | ||
| display_name: "latest" | ||
| variables: | ||
| VERSION: "latest" | ||
| - id: "4.4" | ||
| display_name: "4.4" | ||
| variables: | ||
| VERSION: "4.4" | ||
| - id: "4.2" | ||
| display_name: "4.2" | ||
| variables: | ||
| VERSION: "4.2" | ||
| - id: "4.0" | ||
| display_name: "4.0" | ||
| variables: | ||
|
|
@@ -539,14 +538,14 @@ buildvariants: | |
|
|
||
| - matrix_name: "tests-jdk6-secure" | ||
| matrix_spec: { auth: "auth", ssl: "ssl", jdk: "jdk6", version: "*", topology: "*", os: "*" } | ||
| exclude_spec: { auth: "auth", ssl: "ssl", jdk: "jdk6", version: ["4.0"], topology: "*", os: "*" } | ||
| exclude_spec: { auth: "auth", ssl: "ssl", jdk: "jdk6", version: ["4.0", "4.2", "4.4", "latest"], topology: "*", os: "*" } | ||
| display_name: "${version} ${topology} ${auth} ${ssl} ${jdk} ${os} " | ||
| tags: ["tests-variant"] | ||
| tasks: | ||
| - name: "test" | ||
|
|
||
| - matrix_name: "tests-jdk8-secure" | ||
| matrix_spec: { auth: "auth", ssl: "ssl", jdk: "jdk8", version: ["4.0"], topology: "*", os: "*" } | ||
| matrix_spec: { auth: "auth", ssl: "ssl", jdk: "jdk8", version: ["4.0", "4.2", "4.4", "latest"], topology: "*", os: "*" } | ||
| display_name: "${version} ${topology} ${auth} ${ssl} ${jdk} ${os} " | ||
| tags: ["tests-variant"] | ||
| tasks: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ### Incompatibilities with MongoDB 4.2 | ||
|
|
||
| MongoDB 4.2 introduced the "NonResumableChangeStreamError" error label, which is not recognized | ||
| by the 4.0-era Java driver. This may cause the 4.0-era driver to resume a change stream in cases | ||
| where the server has indicated that it should not. This may cause iteration of a change stream to | ||
| loop infinitely instead of reporting an error to the application | ||
|
|
||
| ### Incompatibilities with MongoDB 4.4 | ||
|
|
||
| MongoDB 4.4 introduced the "ResumableChangeStreamError" error label, which is not recognized | ||
| by the 4.0-era Java driver. This may cause the 4.0-era driver to not resume a change stream in cases | ||
| where the server has indicated that it should. | ||
|
|
||
| MongoDB 4.4 removed support for mapReduce statistics. The 4.0-era driver assumes statistics are always | ||
| included in the reply, so any use of mapReduce with the 4.0-era driver will fail. MongoDB 4.4 also | ||
| removed support for the default values of sharded and nonAtomic fields for mapReduce to a collection. | ||
| The 4.0-era driver always includes the default values of these fields (even if unset by the application), | ||
| so this will cause any mapReduce with $out to fail as well. | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ | |
| package com.mongodb.operation; | ||
|
|
||
| import org.bson.BsonDocument; | ||
| import org.bson.BsonInt32; | ||
|
|
||
| final class MapReduceHelper { | ||
|
|
||
|
|
@@ -26,19 +27,19 @@ static MapReduceStatistics createStatistics(final BsonDocument result) { | |
| } | ||
|
|
||
| private static int getInputCount(final BsonDocument result) { | ||
| return result.getDocument("counts").getNumber("input").intValue(); | ||
|
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. These changes are to prevent the driver from failing when no statistics are present in the reply. Without this change, we can't run mapReduce operations at all. 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. Ack |
||
| return result.getDocument("counts", new BsonDocument()).getNumber("input", new BsonInt32(0)).intValue(); | ||
| } | ||
|
|
||
| private static int getOutputCount(final BsonDocument result) { | ||
| return result.getDocument("counts").getNumber("output").intValue(); | ||
| return result.getDocument("counts", new BsonDocument()).getNumber("output", new BsonInt32(0)).intValue(); | ||
| } | ||
|
|
||
| private static int getEmitCount(final BsonDocument result) { | ||
| return result.getDocument("counts").getNumber("emit").intValue(); | ||
| return result.getDocument("counts", new BsonDocument()).getNumber("emit", new BsonInt32(0)).intValue(); | ||
| } | ||
|
|
||
| private static int getDuration(final BsonDocument result) { | ||
| return result.getNumber("timeMillis").intValue(); | ||
| return result.getNumber("timeMillis", new BsonInt32(0)).intValue(); | ||
| } | ||
|
|
||
| private MapReduceHelper() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,8 +42,10 @@ | |
| import static com.mongodb.assertions.Assertions.isTrue; | ||
| import static com.mongodb.assertions.Assertions.notNull; | ||
| import static com.mongodb.internal.async.ErrorHandlingResultCallback.errorHandlingCallback; | ||
| import static com.mongodb.internal.operation.ServerVersionHelper.serverIsAtLeastVersionFourDotFour; | ||
| import static com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol; | ||
| import static com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocolAsync; | ||
| import static com.mongodb.operation.DocumentHelper.putIfNotNull; | ||
| import static com.mongodb.operation.DocumentHelper.putIfNotZero; | ||
| import static com.mongodb.operation.DocumentHelper.putIfTrue; | ||
| import static com.mongodb.operation.OperationHelper.AsyncCallableWithConnection; | ||
|
|
@@ -581,21 +583,23 @@ public MapReduceStatistics apply(final BsonDocument result, final ServerAddress | |
|
|
||
| private BsonDocument getCommand(final ConnectionDescription description) { | ||
| BsonDocument outputDocument = new BsonDocument(getAction(), new BsonString(getCollectionName())); | ||
| outputDocument.append("sharded", BsonBoolean.valueOf(isSharded())); | ||
| outputDocument.append("nonAtomic", BsonBoolean.valueOf(isNonAtomic())); | ||
| if (description != null && !serverIsAtLeastVersionFourDotFour(description)) { | ||
|
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. Without this change, the server will fail to execute the operation |
||
| putIfTrue(outputDocument, "sharded", isSharded()); | ||
| putIfTrue(outputDocument, "nonAtomic", isNonAtomic()); | ||
| } | ||
| if (getDatabaseName() != null) { | ||
| outputDocument.put("db", new BsonString(getDatabaseName())); | ||
| } | ||
| BsonDocument commandDocument = new BsonDocument("mapreduce", new BsonString(namespace.getCollectionName())) | ||
| .append("map", getMapFunction()) | ||
| .append("reduce", getReduceFunction()) | ||
| .append("out", outputDocument) | ||
| .append("query", asValueOrNull(getFilter())) | ||
| .append("sort", asValueOrNull(getSort())) | ||
| .append("finalize", asValueOrNull(getFinalizeFunction())) | ||
| .append("scope", asValueOrNull(getScope())) | ||
| .append("verbose", BsonBoolean.valueOf(isVerbose())); | ||
| putIfNotZero(commandDocument, "limit", getLimit()); | ||
| .append("map", getMapFunction()) | ||
| .append("reduce", getReduceFunction()) | ||
| .append("out", outputDocument); | ||
|
|
||
| putIfNotNull(commandDocument, "query", getFilter()); | ||
| putIfNotNull(commandDocument, "sort", getSort()); | ||
| putIfNotNull(commandDocument, "finalize", getFinalizeFunction()); | ||
| putIfNotNull(commandDocument, "scope", getScope()); | ||
| putIfTrue(commandDocument, "verbose", isVerbose()); putIfNotZero(commandDocument, "limit", getLimit()); | ||
jyemin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| putIfNotZero(commandDocument, "maxTimeMS", getMaxTime(MILLISECONDS)); | ||
| putIfTrue(commandDocument, "jsMode", isJsMode()); | ||
| if (bypassDocumentValidation != null && description != null && serverIsAtLeastVersionThreeDotTwo(description)) { | ||
|
|
||
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.
Test uploading was actually broken in the 3.x branch, so I just fixed it.