SERVER-63108 Rename Versioned API to Stable API
This commit is contained in:
parent
cebfa751cb
commit
1b130329e1
@ -24,7 +24,7 @@
|
||||
# delete this exception statement from your version. If you delete this
|
||||
# exception statement from all source files in the program, then also delete
|
||||
# it in the license file.
|
||||
"""Check that mongod's and mongos's Versioned API commands are defined in IDL.
|
||||
"""Check that mongod's and mongos's Stable API commands are defined in IDL.
|
||||
|
||||
Call listCommands on mongod and mongos to assert they have the same set of commands in the given API
|
||||
version, and assert all these commands are defined in IDL.
|
||||
2
debian/mongo.1
vendored
2
debian/mongo.1
vendored
@ -295,7 +295,7 @@ currently the only supported value.
|
||||
.RS
|
||||
.PP
|
||||
Specifies that the server will respond with \fBAPIStrictError\f1 if your application uses a command or behavior
|
||||
outside of the \fBVersioned API\f1\&.
|
||||
outside of the \fBStable API\f1\&.
|
||||
.PP
|
||||
If you specify \fB\-\-apiStrict\f1\f1, you must also specify
|
||||
\fB\-\-apiVersion\f1\f1\&.
|
||||
|
||||
@ -7,7 +7,7 @@ set -o errexit
|
||||
set -o verbose
|
||||
activate_venv
|
||||
|
||||
$python buildscripts/idl/check_versioned_api_commands_have_idl_definitions.py -v --include src --include src/mongo/db/modules/enterprise/src --installDir dist-test/bin 1
|
||||
$python buildscripts/idl/check_stable_api_commands_have_idl_definitions.py -v --include src --include src/mongo/db/modules/enterprise/src --installDir dist-test/bin 1
|
||||
$python buildscripts/idl/checkout_idl_files_from_past_releases.py -v idls
|
||||
find idls -maxdepth 1 -mindepth 1 -type d | while read dir; do
|
||||
echo "Performing idl check compatibility with release: $dir:"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Test the shell's --apiVersion and other options related to the MongoDB Versioned API, and
|
||||
* Test the shell's --apiVersion and other options related to the MongoDB Stable API, and
|
||||
* test passing API parameters to the Mongo() constructor.
|
||||
*
|
||||
* @tags: [
|
||||
|
||||
@ -37,7 +37,7 @@ structs:
|
||||
# is like MongoClient(uri, api={version: "1", strict: true, deprecationErrors: true}).
|
||||
|
||||
ClientAPIVersionParameters:
|
||||
description: "Parser for Versioned API parameters passed to 'new Mongo()' in the mongo shell"
|
||||
description: "Parser for Stable API parameters passed to 'new Mongo()' in the mongo shell"
|
||||
strict: true
|
||||
fields:
|
||||
version:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# MongoDB Versioned API
|
||||
# MongoDB Stable API
|
||||
|
||||
The MongoDB API is the user-visible behavior of all commands, including their parameters and reply
|
||||
fields. An "API version" is a subset of the API for which we make an especially strong promise: For
|
||||
@ -84,7 +84,7 @@ This also applies to any `unstable` fields. This is to prevent unexpected errors
|
||||
a field from `unstable` to `stable`. By intentionally opting in, we assume the implementer
|
||||
understands the implications and has valid reasons to use `any`.
|
||||
|
||||
## Versioned API implementation
|
||||
## Stable API implementation
|
||||
|
||||
All `Command` subclasses implement `apiVersions()`, which returns the set of API versions the
|
||||
command is part of. By default, a command is not included in any API version, meaning it has no
|
||||
@ -1104,7 +1104,7 @@ commands:
|
||||
anyTypeField: IDLAnyTypeOwned
|
||||
|
||||
AccessCheckNone:
|
||||
description: A versioned API command with access_check and none
|
||||
description: A Stable API command with access_check and none
|
||||
command_name: AccessCheckNoneCommandName
|
||||
namespace: ignored
|
||||
strict: true
|
||||
@ -1114,7 +1114,7 @@ commands:
|
||||
reply_type: OkReply
|
||||
|
||||
AccessCheckSimpleAccessCheck:
|
||||
description: A versioned API command with access_check and simple check
|
||||
description: A Stable API command with access_check and simple check
|
||||
command_name: AccessCheckSimpleAccessCheckCommandName
|
||||
namespace: ignored
|
||||
strict: true
|
||||
@ -1125,7 +1125,7 @@ commands:
|
||||
reply_type: OkReply
|
||||
|
||||
AccessCheckSimplePrivilege:
|
||||
description: A versioned API command with access_check and privilege
|
||||
description: A Stable API command with access_check and privilege
|
||||
command_name: AccessCheckSimplePrivilegeCommandName
|
||||
namespace: ignored
|
||||
strict: true
|
||||
@ -1139,7 +1139,7 @@ commands:
|
||||
|
||||
|
||||
AccessCheckComplexPrivilege:
|
||||
description: A versioned API command with access_check complex
|
||||
description: A Stable API command with access_check complex
|
||||
command_name: AccessCheckComplexPrivilegeCommandName
|
||||
namespace: ignored
|
||||
strict: true
|
||||
@ -1159,10 +1159,10 @@ commands:
|
||||
- check: is_authorized_to_parse_namespace_element
|
||||
reply_type: OkReply
|
||||
|
||||
# Test that we correctly generate C++ base classes for versioned API commands with different
|
||||
# Test that we correctly generate C++ base classes for Stable API commands with different
|
||||
# key names, command names, and C++ names.
|
||||
APIVersion1CommandIDLName:
|
||||
description: A versioned API command
|
||||
description: A Stable API command
|
||||
command_name: APIVersion1CommandRuntimeName
|
||||
namespace: ignored
|
||||
strict: true
|
||||
@ -1172,7 +1172,7 @@ commands:
|
||||
reply_type: OkReply
|
||||
|
||||
APIVersion1CommandIDLName2:
|
||||
description: A versioned API command
|
||||
description: A Stable API command
|
||||
command_name: APIVersion1CommandRuntimeName2
|
||||
cpp_name: APIVersion1CommandCPPName2
|
||||
namespace: ignored
|
||||
@ -1184,7 +1184,7 @@ commands:
|
||||
|
||||
# Test whether the C++ code for a command with alias name is currently generated.
|
||||
APIVersion1CommandWithAlias:
|
||||
description: A versioned API command with alias
|
||||
description: A Stable API command with alias
|
||||
command_name: NewCommandName
|
||||
command_alias: OldCommandName
|
||||
namespace: ignored
|
||||
|
||||
@ -83,11 +83,11 @@ configs:
|
||||
arg_vartype: String
|
||||
cpp_varname: shellGlobalParams.apiVersion
|
||||
"apiStrict":
|
||||
description: "disable all features not included in the MongoDB Versioned API"
|
||||
description: "disable all features not included in the MongoDB Stable API"
|
||||
arg_vartype: Switch
|
||||
cpp_varname: shellGlobalParams.apiStrict
|
||||
"apiDeprecationErrors":
|
||||
description: "disable all features deprecated in the MongoDB Versioned API"
|
||||
description: "disable all features deprecated in the MongoDB Stable API"
|
||||
arg_vartype: Switch
|
||||
cpp_varname: shellGlobalParams.apiDeprecationErrors
|
||||
"objcheck":
|
||||
|
||||
@ -577,7 +577,7 @@ ConnectionRegistry::ConnectionRegistry() = default;
|
||||
void ConnectionRegistry::registerConnection(DBClientBase& client, StringData uri) {
|
||||
BSONObj info;
|
||||
BSONObj command;
|
||||
// If apiStrict is set override it, whatsmyuri is not in the Versioned API.
|
||||
// If apiStrict is set override it, whatsmyuri is not in the Stable API.
|
||||
if (client.getApiParameters().getStrict()) {
|
||||
command = BSON("whatsmyuri" << 1 << "apiStrict" << false);
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user