SERVER-24623 removed support for single document aggregate command results. That is, the aggregate command now requires either the 'cursor' or 'explain' options. We have a few test cases in the v2.9 branch that fail because of this change. This ticket tracks fixing them.
====================================================================== ERROR: test_aggregate (test.test_collection.TestCollection) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/test/test_collection.py", line 1463, in test_aggregate db.test.aggregate(pipeline), File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/collection.py", line 1827, in aggregate "aggregate", self.__name, **command_kwargs) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/database.py", line 438, in _command result, self.connection._disconnect, None, allowable_errors) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/helpers.py", line 213, in _check_command_response raise OperationFailure(msg % errmsg, code, response) OperationFailure: The 'cursor' option is required, unless 'explain' is true ====================================================================== ERROR: test_aggregate_with_compile_re (test.test_collection.TestCollection) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/test/test_collection.py", line 1481, in test_aggregate_with_compile_re result = db.test.aggregate([]) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/collection.py", line 1827, in aggregate "aggregate", self.__name, **command_kwargs) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/database.py", line 438, in _command result, self.connection._disconnect, None, allowable_errors) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/helpers.py", line 213, in _check_command_response raise OperationFailure(msg % errmsg, code, response) OperationFailure: The 'cursor' option is required, unless 'explain' is true ====================================================================== ERROR: test_aggregation_cursor_validation (test.test_collection.TestCollection) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/test/test_collection.py", line 1496, in test_aggregation_cursor_validation cursor = db.test.aggregate(projection) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/collection.py", line 1827, in aggregate "aggregate", self.__name, **command_kwargs) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/database.py", line 438, in _command result, self.connection._disconnect, None, allowable_errors) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/helpers.py", line 213, in _check_command_response raise OperationFailure(msg % errmsg, code, response) OperationFailure: The 'cursor' option is required, unless 'explain' is true ====================================================================== ERROR: test_command_max_time_ms (test.test_database.TestDatabase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/test/test_database.py", line 739, in test_command_max_time_ms db.command('aggregate', 'test', pipeline=pipeline) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/database.py", line 533, in command codec_options, **kwargs)[0] File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/database.py", line 438, in _command result, self.connection._disconnect, None, allowable_errors) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/helpers.py", line 213, in _check_command_response raise OperationFailure(msg % errmsg, code, response) OperationFailure: The 'cursor' option is required, unless 'explain' is true ====================================================================== ERROR: test_command_with_compile_re (test.test_database.TestDatabase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/test/test_database.py", line 353, in test_command_with_compile_re result = db.command('aggregate', 'test', pipeline=[]) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/database.py", line 533, in command codec_options, **kwargs)[0] File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/database.py", line 438, in _command result, self.connection._disconnect, None, allowable_errors) File "/mnt/jenkins/workspace/mongo-python-driver-v2.9-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_server/master-nightly/python_language_version/2.7/pymongo/helpers.py", line 213, in _check_command_response raise OperationFailure(msg % errmsg, code, response) OperationFailure: The 'cursor' option is required, unless 'explain' is true
- is depended on by
-
DRIVERS-350 Deprecate methods and classes related to inline results for the aggregate command
- Closed