...
Python test suite fails while executing this dropRole command against a standalone mongod with requireApiVersion=1: {'dropRole': 'noremove', 'apiVersion': '1'} The error: ERROR: test_no_remove (test.test_bulk.TestBulkAuthorization) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/shane/git/mongo-python-driver/test/test_bulk.py", line 385, in tearDown self.db.command('dropRole', 'noremove') File "/Users/shane/git/mongo-python-driver/pymongo/database.py", line 741, in command return self._command(sock_info, command, slave_ok, value, File "/Users/shane/git/mongo-python-driver/pymongo/database.py", line 629, in _command return sock_info.command( File "/Users/shane/git/mongo-python-driver/pymongo/pool.py", line 718, in command return command(self, dbname, spec, slave_ok, File "/Users/shane/git/mongo-python-driver/pymongo/network.py", line 160, in command helpers._check_command_response( File "/Users/shane/git/mongo-python-driver/pymongo/helpers.py", line 164, in _check_command_response raise OperationFailure(errmsg, code, response, max_wire_version) pymongo.errors.OperationFailure: Failed to remove role noremove@pymongo_test from all users :: caused by :: The apiVersion parameter is required, please configure your MongoClient's API version, full error: {'ok': 0.0, 'errmsg': "Failed to remove role noremove@pymongo_test from all users :: caused by :: The apiVersion parameter is required, please configure your MongoClient's API version", 'code': 498870, 'codeName': 'Location498870'} This error is unexpected because apiVersion was included in the dropRole command. The server version is: v4.9.0-alpha-1082-g399f119
xgen-internal-githook commented on Fri, 15 Jan 2021 23:30:37 +0000: Author: {'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'} Message: SERVER-53499 Handle UMC commands with requireApiVersion and standalone mongod Branch: master https://github.com/mongodb/mongo/commit/bc942ef3f9e7bb0c92147abe9bd680b62ee837c1 ian@10gen.com commented on Tue, 12 Jan 2021 22:53:23 +0000: Author: {'username': u'ShaneHarvey', 'name': u'Shane Harvey', 'email': u'shane.harvey@mongodb.com'} Message:PYTHON-2453 Add MongoDB Versioned API (#536) Add pymongo.server_api.ServerApi and the MongoClient server_api option. Support Unified Test Format version 1.1 (serverParameters in runOnRequirements) Skip dropRole tests due to SERVER-53499. Branch:master https://github.com/mongodb/mongo-python-driver/commit/ac2f506ba262b6360275fba96bb4fa1d43ae50f7 ian@10gen.com commented on Tue, 12 Jan 2021 22:53:18 +0000: Author: {'username': u'ShaneHarvey', 'name': u'Shane Harvey', 'email': u'shane.harvey@mongodb.com'} Message:PYTHON-2453 Add MongoDB Versioned API (#536) Add pymongo.server_api.ServerApi and the MongoClient server_api option. Support Unified Test Format version 1.1 (serverParameters in runOnRequirements) Skip dropRole tests due to SERVER-53499. (cherry picked from commit ac2f506ba262b6360275fba96bb4fa1d43ae50f7) Branch:v3.12 https://github.com/mongodb/mongo-python-driver/commit/43d246f234d2ce8d728e5b114fa403d05cec75c8 mark.benvenuto commented on Tue, 12 Jan 2021 21:12:19 +0000: Original fix only worked for replica sets and not standalone mongod shane.harvey commented on Tue, 12 Jan 2021 01:24:16 +0000: Can we reopen this issue? I still see the same bug on 4.9.0-alpha-1216-gb366fe3 which has the commit above: $ git describe 59678f3ae24fe03116c5b1652f6f152ead3f5966 r4.9.0-alpha-1150-g59678f3ae2 $ mongodb-macos-x86_64-enterprise-4.9.0-alpha-1216-gb366fe3/bin/mongod --version db version v4.9.0-alpha-1216-gb366fe3 Build Info: { "version": "4.9.0-alpha-1216-gb366fe3", "gitVersion": "b366fe33ed8bf3135664e612a6e90e4cb2acffd9", "modules": [ "enterprise" ], "allocator": "system", "environment": { "distarch": "x86_64", "target_arch": "x86_64" } } Same failure: ERROR: test_no_remove (test.test_bulk.TestBulkAuthorization) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/shane/git/mongo-python-driver/test/test_bulk.py", line 386, in tearDown self.db.command('dropRole', 'noremove') File "/Users/shane/git/mongo-python-driver/pymongo/database.py", line 747, in command return self._command(sock_info, command, slave_ok, value, File "/Users/shane/git/mongo-python-driver/pymongo/database.py", line 629, in _command return sock_info.command( File "/Users/shane/git/mongo-python-driver/pymongo/pool.py", line 724, in command return command(self, dbname, spec, slave_ok, File "/Users/shane/git/mongo-python-driver/pymongo/network.py", line 159, in command helpers._check_command_response( File "/Users/shane/git/mongo-python-driver/pymongo/helpers.py", line 164, in _check_command_response raise OperationFailure(errmsg, code, response, max_wire_version) pymongo.errors.OperationFailure: Failed to remove role noremove@pymongo_test from all users :: caused by :: The apiVersion parameter is required, please configure your MongoClient's API version, full error: {'ok': 0.0, 'errmsg': "Failed to remove role noremove@pymongo_test from all users :: caused by :: The apiVersion parameter is required, please configure your MongoClient's API version", 'code': 498870, 'codeName': 'Location498870'} xgen-internal-githook commented on Wed, 6 Jan 2021 01:51:17 +0000: Author: {'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'} Message: SERVER-53499 User Management commands must set apiVersion internally Branch: master https://github.com/mongodb/mongo/commit/59678f3ae24fe03116c5b1652f6f152ead3f5966