-
Type: Task
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
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 that fail because of this change. This ticket tracks fixing them.
====================================================================== ERROR: test_aggregate (test_collection.TestCollection) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/behackett/work/mongo-python-driver/test/test_collection.py", line 1487, in test_aggregate result = db.test.aggregate([pipeline], useCursor=False) File "/home/behackett/work/mongo-python-driver/pymongo/collection.py", line 1870, in aggregate collation=collation) File "/home/behackett/work/mongo-python-driver/pymongo/collection.py", line 232, in _command collation=collation) File "/home/behackett/work/mongo-python-driver/pymongo/pool.py", line 419, in command collation=collation) File "/home/behackett/work/mongo-python-driver/pymongo/network.py", line 116, in command parse_write_concern_error=parse_write_concern_error) File "/home/behackett/work/mongo-python-driver/pymongo/helpers.py", line 210, in _check_command_response raise OperationFailure(msg % errmsg, code, response) OperationFailure: The 'cursor' option is required, unless 'explain' is true ====================================================================== ERROR: test_aggregate_raw_bson (test_collection.TestCollection) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/behackett/work/mongo-python-driver/test/test_collection.py", line 1509, in test_aggregate_raw_bson ).aggregate([pipeline], useCursor=False) File "/home/behackett/work/mongo-python-driver/pymongo/collection.py", line 1870, in aggregate collation=collation) File "/home/behackett/work/mongo-python-driver/pymongo/collection.py", line 232, in _command collation=collation) File "/home/behackett/work/mongo-python-driver/pymongo/pool.py", line 419, in command collation=collation) File "/home/behackett/work/mongo-python-driver/pymongo/network.py", line 116, in command parse_write_concern_error=parse_write_concern_error) File "/home/behackett/work/mongo-python-driver/pymongo/helpers.py", line 210, in _check_command_response raise OperationFailure(msg % errmsg, code, response) OperationFailure: The 'cursor' option is required, unless 'explain' is true ====================================================================== ERROR: test_command_with_regex (test_database.TestDatabase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/behackett/work/mongo-python-driver/test/__init__.py", line 326, in wrap return f(*args, **kwargs) File "/home/behackett/work/mongo-python-driver/test/test_database.py", line 357, in test_command_with_regex result = db.command('aggregate', 'test', pipeline=[]) File "/home/behackett/work/mongo-python-driver/pymongo/database.py", line 494, in command codec_options, **kwargs) File "/home/behackett/work/mongo-python-driver/pymongo/database.py", line 406, in _command parse_write_concern_error=parse_write_concern_error) File "/home/behackett/work/mongo-python-driver/pymongo/pool.py", line 419, in command collation=collation) File "/home/behackett/work/mongo-python-driver/pymongo/network.py", line 116, in command parse_write_concern_error=parse_write_concern_error) File "/home/behackett/work/mongo-python-driver/pymongo/helpers.py", line 210, 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