-
Notifications
You must be signed in to change notification settings - Fork 266
PHPLIB-565: Add MongoDB version axis to build matrix #780
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
Conversation
@@ -174,7 +174,7 @@ functions: | |||
params: | |||
script: | | |||
${PREPARE_SHELL} | |||
MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} AUTH=${AUTH} SSL=${SSL} STORAGE_ENGINE=${STORAGE_ENGINE} sh ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh | |||
MONGODB_VERSION=${VERSION} ORCHESTRATION_FILE=${ORCHESTRATION_FILE} TOPOLOGY=${TOPOLOGY} AUTH=${AUTH} SSL=${SSL} STORAGE_ENGINE=${STORAGE_ENGINE} sh ${PROJECT_DIRECTORY}/.evergreen/run-orchestration.sh |
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.
Using our own file allows us to add logic to override the used file. Passing ORCHESTRATION_FILE
as well allows configurations to select a specific file instead of relying on the filename being assembled by the logic included.
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.
Was this borrowed from PHPC or is it new for PHPLIB (in which case it may be something you'd like to add back to PHPC)?
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.
I didn't find ORCHESTRATION_FILE
in https://github.com/mongodb/mongo-php-driver/blob/master/.evergreen/config.yml, so I assume this is new. Feel free to create a ticket if you think it's worth porting this over to PHPC down the line.
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.
Created PHPC-1676 to track this.
display_name: "1.8.0beta2" | ||
variables: | ||
DRIVER_VERSION: "1.8.0beta2" | ||
display_name: "1.8-stable" |
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.
This was left over from earlier tests where we didn't have 1.8 stable yet. We can now omit the DRIVER_VERSION
constant to always install the current stable release.
if ($this->isShardedCluster()) { | ||
$this->assertObjectHasAttribute('shards', $result); | ||
|
||
if (isset($result->shards)) { |
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.
This was necessary as the output of explain
on a cluster with a single shard does not contain the shards
key but rather looks like the result on a standalone.
@@ -174,7 +174,7 @@ functions: | |||
params: | |||
script: | | |||
${PREPARE_SHELL} | |||
MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} AUTH=${AUTH} SSL=${SSL} STORAGE_ENGINE=${STORAGE_ENGINE} sh ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh | |||
MONGODB_VERSION=${VERSION} ORCHESTRATION_FILE=${ORCHESTRATION_FILE} TOPOLOGY=${TOPOLOGY} AUTH=${AUTH} SSL=${SSL} STORAGE_ENGINE=${STORAGE_ENGINE} sh ${PROJECT_DIRECTORY}/.evergreen/run-orchestration.sh |
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.
Was this borrowed from PHPC or is it new for PHPLIB (in which case it may be something you'd like to add back to PHPC)?
@@ -22,9 +22,4 @@ OLD_PATH=$PATH | |||
PATH=/opt/php/${PHP_VERSION}-64bit/bin:$OLD_PATH | |||
|
|||
# Run the tests, and store the results in a Evergreen compatible JSON results file |
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.
I assume "store the results in a Evergreen compatible JSON results file" doesn't happen here, nor in PHPC, which uses run-tests.php
. Should we revise this comment?
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.
I was going to look at the result file format and see if this makes test results easier to analyse. Going through the build log to see what's going on isn't really sustainable.
Looking at the five errors in the patch build, four are related to:
And one is the "double free or corruption" error (oddly no FLE error for that environment). |
Yep, I'm not sure what the cause for the encryption errors is. @kevinAlbs are you aware of anything that could cause these "not all keys requested were satisfied" errors on replica sets? Note that these don't always show up. |
If that only occurs on a replica set, my first thought was that either creating data keys was not using a majority write concern, or finding data keys was not using a majority read concern. I recall seeing that errors during development due to that. However, the key vault collection does get write concern majority set: https://github.com/mongodb/mongo-c-driver/blob/1.16.0/src/libmongoc/src/mongoc/mongoc-client-side-encryption.c/#L1449-L1454 And obtaining keys does use read concern majority: Looking through the patch build all of those appear on the external key vault test. I think this insert just needs a majority write concern: https://github.com/mongodb/mongo-php-library/blob/master/tests/SpecTests/ClientSideEncryptionSpecTest.php#L320 (see https://github.com/mongodb/mongo-c-driver/blob/master/src/libmongoc/tests/test-mongoc-client-side-encryption.c#L674-L683) |
Thanks @kevinAlbs, that was the reason for the failures. Builds now pass, save for one double-free: https://spruce.mongodb.com/version/5f50e8d432f41749d8020f87/tasks 🎉 |
@jmikola I restarted the build this morning to see if the failure is intermittent or more permanent. Merging as-is sounds good as we still haven't been able to reproduce this in real-life conditions. Edit: looks like kicking it still helps :) |
PHPLIB-565
This PR expands evergreen test coverage by testing against different driver versions, MongoDB server versions, and topologies. Summary:
In all cases, we test against standalone, replica set, and sharded cluster topologies. The latter uses a replica set by default, but we override the provided file to make sure the replica set has secondaries, which is required for some tests. All other files are removed as they are not used.
Patch build: https://spruce.mongodb.com/version/5f4fa2e73e8e863a703f0b4e/tasks. Note that replica set builds fail intermittently due to segmentation faults (double free when closing cursors).