Skip to content

Update to latest ext-mongodb and MongoDB server versions #669

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

Merged
merged 8 commits into from
Aug 23, 2019

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Aug 22, 2019

This pulls in alpha3 of the driver for travis-ci builds and updates the build pipeline to test against MongoDB 4.2.0 by default. MongoDB 4.0.12 is still tested as part of the "older server versions" sections in travis-ci.

This PR also fixes some leftover warnings from the PHPUnit upgrade that was done in #665.

Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of questions and suggested change for MONGODB_URI prep, but LGTM.

@@ -18,6 +18,10 @@
*/
class ChangeStreamsSpecTest extends FunctionalTestCase
{
private static $incompleteTests = [
'change-streams-errors: Change Stream should error when _id is projected out' => 'PHPC-1419',
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this test previously passing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test fails on sharded clusters, but for different reasons.

On a sharded cluster backed by standalone servers, $changeStream obviously isn't supported. This causes an exception when trying to run the watch operation from the spec test, but that exception does not contain the NonResumableChangeStreamError (because it's not a change stream error) label, causing the test to fail.
This is caused because the spec requires this test to run on both replicaset and sharded topologies. Unfortunately, the spec does not differentiate between the two types of sharded clusters (backed entirely by replicasets or not), so this is something we may want to address in the specification in the future. However, since the spec test also require testing change streams on a standalone server to ensure an exception is thrown, we can't just skip these tests on unsupported platforms. I may have to hardcode an exception for this one particular test.

On a sharded cluster backed by replica sets, we're seeing the behaviour described in #659 (comment). In a nutshell, the first getMore call does not return any results as mongos hasn't received returnable results from all shards yet. A subsequent getMore would return a document, causing the getMore call to fail with the expected error. Even then, the test still fails because of PHPC-1419: the NonResumableChangeStreamError is not present in the exception.

With that in mind, I'd skip the test for now and properly fix it in #659 where we take care of other change stream tests as well.

FWIW, debugging this issue made me realise that PHPC-1419 only appears on sharded clusters. I'll investigate that further separately to figure out the cause of the bug.

@alcaeus alcaeus force-pushed the update-travis-versions branch from a84ab8a to 49d32aa Compare August 23, 2019 05:36
alcaeus added a commit that referenced this pull request Aug 23, 2019
@alcaeus alcaeus merged commit 83260b5 into mongodb:master Aug 23, 2019
@alcaeus alcaeus deleted the update-travis-versions branch August 23, 2019 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants