summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuayu Ouyang <huayu.ouyang@mongodb.com>2021-11-16 20:20:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-22 22:17:16 +0000
commite818cd876ed3b492517400a3da3f687fbe13d8aa (patch)
tree949699278df951eadbc45da35c2ee7da424e7ff0
parent337e43030afb6de83a2e3ed25575ec8874a70d20 (diff)
downloadmongo-e818cd876ed3b492517400a3da3f687fbe13d8aa.tar.gz
SERVER-60814 Require 'unstable' field to avoid accidental additions to the stable API
-rw-r--r--buildscripts/idl/idl/ast.py2
-rw-r--r--buildscripts/idl/idl/syntax.py2
-rw-r--r--buildscripts/idl/idl_check_compatibility.py15
-rw-r--r--buildscripts/idl/idl_compatibility_errors.py24
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/abort/invalid_command_parameter_type/invalid_command_parameter_type.idl3
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/abort/invalid_reply_field_type/invalid_reply_field_type.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/abort/valid_command_parameter_type/valid_command_parameter_type.idl3
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/abort/valid_reply_field_type/valid_reply_field_type.idl1
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl198
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/new/error_reply.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/new/imports.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl169
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/old/error_reply.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/old/imports.idl3
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/new/compatibility_test_pass_new.idl143
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/new/error_reply.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/new/imports.idl3
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/old/compatibility_test_pass_old.idl129
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/old/error_reply.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/old/imports.idl2
-rw-r--r--buildscripts/idl/tests/test_compatibility.py48
-rw-r--r--src/mongo/db/auth/sasl_commands.idl9
-rw-r--r--src/mongo/db/catalog/clustered_collection_options.idl4
-rw-r--r--src/mongo/db/catalog/collection_options.idl1
-rw-r--r--src/mongo/db/coll_mod.idl18
-rw-r--r--src/mongo/db/commands/authentication_commands.idl4
-rw-r--r--src/mongo/db/commands/create.idl12
-rw-r--r--src/mongo/db/commands/list_databases.idl16
-rw-r--r--src/mongo/db/commands/txn_cmds.idl4
-rw-r--r--src/mongo/db/create_indexes.idl31
-rw-r--r--src/mongo/db/drop.idl4
-rw-r--r--src/mongo/db/drop_indexes.idl4
-rw-r--r--src/mongo/db/explain.idl1
-rw-r--r--src/mongo/db/list_collections.idl27
-rw-r--r--src/mongo/db/list_indexes.idl48
-rw-r--r--src/mongo/db/logical_session_id.idl5
-rw-r--r--src/mongo/db/ops/write_ops.idl51
-rw-r--r--src/mongo/db/pipeline/aggregate_command.idl13
-rw-r--r--src/mongo/db/pipeline/change_stream_pre_and_post_images_options.idl1
-rw-r--r--src/mongo/db/pipeline/exchange_spec.idl7
-rw-r--r--src/mongo/db/pipeline/legacy_runtime_constants.idl4
-rw-r--r--src/mongo/db/query/cursor_response.idl5
-rw-r--r--src/mongo/db/query/find_command.idl14
-rw-r--r--src/mongo/db/query/getmore_command.idl3
-rw-r--r--src/mongo/db/query/kill_cursors.idl5
-rw-r--r--src/mongo/db/repl/hello.idl60
-rw-r--r--src/mongo/db/timeseries/timeseries.idl5
-rw-r--r--src/mongo/idl/basic_types.idl32
-rw-r--r--src/mongo/rpc/topology_version.idl2
49 files changed, 1119 insertions, 28 deletions
diff --git a/buildscripts/idl/idl/ast.py b/buildscripts/idl/idl/ast.py
index 0df99dd093b..1098cb606d6 100644
--- a/buildscripts/idl/idl/ast.py
+++ b/buildscripts/idl/idl/ast.py
@@ -204,7 +204,7 @@ class Field(common.SourceLocation):
self.chained = False # type: bool
self.comparison_order = -1 # type: int
self.non_const_getter = False # type: bool
- self.unstable = False # type: bool
+ self.unstable = None # type: Optional[bool]
self.default = None # type: str
self.type = None # type: Type
self.always_serialize = False # type: bool
diff --git a/buildscripts/idl/idl/syntax.py b/buildscripts/idl/idl/syntax.py
index 8558f725c37..69be6288cbe 100644
--- a/buildscripts/idl/idl/syntax.py
+++ b/buildscripts/idl/idl/syntax.py
@@ -464,7 +464,7 @@ class Field(common.SourceLocation):
self.comparison_order = -1 # type: int
self.validator = None # type: Validator
self.non_const_getter = False # type: bool
- self.unstable = False # type: bool
+ self.unstable = None # type: Optional[bool]
self.always_serialize = False # type: bool
# Internal fields - not generated by parser
diff --git a/buildscripts/idl/idl_check_compatibility.py b/buildscripts/idl/idl_check_compatibility.py
index d6e4f1e4754..b703d9fd0e8 100644
--- a/buildscripts/idl/idl_check_compatibility.py
+++ b/buildscripts/idl/idl_check_compatibility.py
@@ -161,7 +161,7 @@ class FieldCompatibility:
field_type: syntax.Type
idl_file: syntax.IDLParsedSpec
idl_file_path: str
- unstable: bool
+ unstable: Optional[bool]
@dataclass
@@ -494,8 +494,14 @@ def check_reply_fields(ctxt: IDLCompatibilityContext, old_reply: syntax.Struct,
if not new_field_exists and not old_field.unstable:
ctxt.add_new_reply_field_missing_error(cmd_name, old_field.name, old_idl_file_path)
- # Check that newly added fields do not have an unallowed use of 'any' as the bson_serialization_type.
for new_field in new_reply.fields or []:
+ # Check that all fields in the new IDL have specified the 'unstable' field.
+ if new_field.unstable is None:
+ ctxt.add_new_reply_field_requires_unstable_error(cmd_name, new_field.name,
+ new_idl_file_path)
+
+ # Check that newly added fields do not have an unallowed use of 'any' as the
+ # bson_serialization_type.
newly_added = True
for old_field in old_reply.fields or []:
if new_field.name == old_field.name:
@@ -732,6 +738,11 @@ def check_command_params_or_type_struct_fields(
# Check if a new field has been added to the parameters or type struct.
# If so, it must be optional.
for new_field in new_struct.fields or []:
+ # Check that all fields in the new IDL have specified the 'unstable' field.
+ if new_field.unstable is None:
+ ctxt.add_new_param_or_command_type_field_requires_unstable_error(
+ cmd_name, new_field.name, new_idl_file_path, is_command_parameter)
+
newly_added = True
for old_field in old_struct.fields or []:
if new_field.name == old_field.name:
diff --git a/buildscripts/idl/idl_compatibility_errors.py b/buildscripts/idl/idl_compatibility_errors.py
index 5ae62ad9891..13eac6a9318 100644
--- a/buildscripts/idl/idl_compatibility_errors.py
+++ b/buildscripts/idl/idl_compatibility_errors.py
@@ -118,6 +118,9 @@ ERROR_ID_REPLY_FIELD_SERIALIZER_NOT_EQUAL = "ID0073"
ERROR_ID_COMMAND_DESERIALIZER_NOT_EQUAL = "ID0074"
ERROR_ID_COMMAND_PARAMETER_DESERIALIZER_NOT_EQUAL = "ID0075"
ERROR_ID_REPLY_FIELD_DESERIALIZER_NOT_EQUAL = "ID0076"
+ERROR_ID_NEW_REPLY_FIELD_REQUIRES_UNSTABLE = "ID0077"
+ERROR_ID_NEW_PARAMETER_REQUIRES_UNSTABLE = "ID0078"
+ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_UNSTABLE = "ID0079"
class IDLCompatibilityCheckerError(Exception):
@@ -974,6 +977,27 @@ class IDLCompatibilityContext(object):
("The generic reply field '%s' was removed from the new generic_argument.idl file") %
(field_name), file)
+ def add_new_reply_field_requires_unstable_error(self, command_name: str, field_name: str,
+ file: str) -> None:
+ """Add an error that a new reply field requires the 'unstable' field."""
+ self._add_error(ERROR_ID_NEW_REPLY_FIELD_REQUIRES_UNSTABLE, command_name, (
+ "'%s' has new reply field '%s' that requires specifying a value for the 'unstable' field"
+ ) % (command_name, field_name), file)
+
+ def add_new_param_or_command_type_field_requires_unstable_error(
+ self, command_name: str, field_name: str, file: str,
+ is_command_parameter: bool) -> None:
+ # pylint: disable=invalid-name
+ """Add an error that a new param or command type field requires the 'unstable' field."""
+ if is_command_parameter:
+ self._add_error(ERROR_ID_NEW_PARAMETER_REQUIRES_UNSTABLE, command_name, (
+ "'%s' has new parameter '%s' that requires specifying a value for the 'unstable' field"
+ ) % (command_name, field_name), file)
+ else:
+ self._add_error(ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_UNSTABLE, command_name, (
+ "'%s' has new command type field '%s' that requires specifying a value for the 'unstable' field"
+ ) % (command_name, field_name), file)
+
def _assert_unique_error_messages() -> None:
"""Assert that error codes are unique."""
diff --git a/buildscripts/idl/tests/compatibility_test_fail/abort/invalid_command_parameter_type/invalid_command_parameter_type.idl b/buildscripts/idl/tests/compatibility_test_fail/abort/invalid_command_parameter_type/invalid_command_parameter_type.idl
index d3cb049b4a4..fae1960e79b 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/abort/invalid_command_parameter_type/invalid_command_parameter_type.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/abort/invalid_command_parameter_type/invalid_command_parameter_type.idl
@@ -43,4 +43,5 @@ commands:
reply_type: OkReply
fields:
invalidParameter:
- type: None \ No newline at end of file
+ type: None
+ unstable: false
diff --git a/buildscripts/idl/tests/compatibility_test_fail/abort/invalid_reply_field_type/invalid_reply_field_type.idl b/buildscripts/idl/tests/compatibility_test_fail/abort/invalid_reply_field_type/invalid_reply_field_type.idl
index 815168c1d7f..0df2972aed3 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/abort/invalid_reply_field_type/invalid_reply_field_type.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/abort/invalid_reply_field_type/invalid_reply_field_type.idl
@@ -38,7 +38,7 @@ structs:
fields:
invalidReplyField:
type: None
-
+ unstable: false
commands:
replyFieldTypeInvalid:
description: "This command aborts because its reply field type is invalid"
diff --git a/buildscripts/idl/tests/compatibility_test_fail/abort/valid_command_parameter_type/valid_command_parameter_type.idl b/buildscripts/idl/tests/compatibility_test_fail/abort/valid_command_parameter_type/valid_command_parameter_type.idl
index 55dff356232..f772ac2a480 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/abort/valid_command_parameter_type/valid_command_parameter_type.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/abort/valid_command_parameter_type/valid_command_parameter_type.idl
@@ -43,4 +43,5 @@ commands:
reply_type: OkReply
fields:
invalidParameter:
- type: string \ No newline at end of file
+ type: string
+ unstable: false
diff --git a/buildscripts/idl/tests/compatibility_test_fail/abort/valid_reply_field_type/valid_reply_field_type.idl b/buildscripts/idl/tests/compatibility_test_fail/abort/valid_reply_field_type/valid_reply_field_type.idl
index 38f47b41599..22feea211fb 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/abort/valid_reply_field_type/valid_reply_field_type.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/abort/valid_reply_field_type/valid_reply_field_type.idl
@@ -38,6 +38,7 @@ structs:
fields:
invalidReplyField:
type: string
+ unstable: false
commands:
replyFieldTypeInvalid:
diff --git a/buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl b/buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl
index 21aa946f117..9de05532a46 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl
@@ -149,6 +149,7 @@ structs:
optionalNewField:
type: string
optional: true
+ unstable: false
MissingNewFieldReply:
description: "This reply contains a field that exists in the old command but is
@@ -160,6 +161,7 @@ structs:
fields:
requiredNewField:
type: string
+ unstable: false
EnumNotSubsetReply:
description: "This reply contains an enum field where the new enum values is not a subset
@@ -167,6 +169,7 @@ structs:
fields:
enumNotSubsetReplyField:
type: NewReplyFieldEnumNotSubset
+ unstable: false
NotEnumFieldReply:
description: "This reply contains a field that is an enum type in the old command but
@@ -174,6 +177,7 @@ structs:
fields:
notEnumReplyField:
type: string
+ unstable: false
NotStructFieldReply:
description: "This reply contains a field that is a struct type in the old command but
@@ -181,6 +185,7 @@ structs:
fields:
notStructReplyField:
type: string
+ unstable: false
EnumOrStructFieldReply:
description: "This reply contains a field that is a non-enum or struct type in the old
@@ -188,6 +193,7 @@ structs:
fields:
EnumOrStructReplyField:
type: NewReplyFieldEnumNotSubset
+ unstable: false
BsonNotSubsetReply:
description: "This reply contains a field type where the new bson_serialization_type
@@ -195,6 +201,7 @@ structs:
fields:
bsonNotSubsetReplyField:
type: intToIntString
+ unstable: false
BsonNotSubsetReplyTwo:
description: "This reply contains a field type where the new bson_serialization_type
@@ -202,6 +209,7 @@ structs:
fields:
bsonNotSubsetReplyFieldTwo:
type: intStringToIntStringBool
+ unstable: false
OldBsonSerializationTypeAnyReply:
description: "This reply contains a field whose old type has a bson_serialization_type
@@ -209,6 +217,7 @@ structs:
fields:
oldBsonSerializationTypeAnyReplyField:
type: oldBsonSerializationTypeAny
+ unstable: false
NewBsonSerializationTypeAnyReply:
description: "This reply contains a field whose new type has a bson_serialization_type
@@ -216,6 +225,7 @@ structs:
fields:
newBsonSerializationTypeAnyReplyField:
type: newBsonSerializationTypeAny
+ unstable: false
BsonSerializationTypeAnyReply:
description: "This reply contains a field whose old and new type have a bson_serialization_type
@@ -223,12 +233,14 @@ structs:
fields:
bsonSerializationTypeAnyReplyField:
type: bsonSerializationTypeAny
+ unstable: false
BsonSerializationTypeWithVariantAnyStruct:
description: "This struct contains a field whose old and new variant types have a bson_serialization_type
that contains 'any' that is not compatible"
fields:
bsonSerializationTypeAnyStructField:
+ unstable: false
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
@@ -237,6 +249,7 @@ structs:
bson_serialization_type that contains 'any' that is not compatible"
fields:
bsonSerializationTypeAnyStructField:
+ unstable: false
type:
variant: [array<oldBsonSerializationTypeAny>, array<newBsonSerializationTypeAny>]
@@ -246,6 +259,7 @@ structs:
fields:
cppTypeNotEqualReplyField:
type: bsonSerializationTypeAnyCppTypeNotEqual
+ unstable: false
SerializerNotEqualReply:
description: "This reply contains a field whose old and new type
@@ -254,6 +268,7 @@ structs:
fields:
serializerNotEqualReplyField:
type: bsonSerializationTypeAnySerializerNotEqual
+ unstable: false
DeserializerNotEqualReply:
description: "This reply contains a field whose old and new type have
@@ -262,12 +277,14 @@ structs:
fields:
deserializerNotEqualReplyField:
type: bsonSerializationTypeAnyDeserializerNotEqual
+ unstable: false
NewlyAddedBsonSerializationTypeAnyReply:
description: "This reply contains a newly added field whose type has a bson_serialization_type
that contains 'any' that is not explicitly allowed"
fields:
newlyAddedBsonSerializationTypeAnyReplyField:
+ unstable: false
type:
variant: [string, bsonSerializationTypeAny]
@@ -278,6 +295,7 @@ structs:
fields:
oldBsonSerializationTypeAnyUnstableReplyField:
type: oldBsonSerializationTypeAny
+ unstable: false
NewBsonSerializationTypeAnyUnstableReply:
description: "This reply contains a field that is unstable in the old version
@@ -286,6 +304,7 @@ structs:
fields:
newBsonSerializationTypeAnyUnstableReplyField:
type: newBsonSerializationTypeAny
+ unstable: false
BsonSerializationTypeAnyUnstableReply:
description: "This reply contains a field that is unstable in the old version
@@ -294,6 +313,7 @@ structs:
fields:
bsonSerializationTypeAnyUnstableReplyField:
type: bsonSerializationTypeAny
+ unstable: false
BsonSerializationTypeWithVariantAnyUnstableReply:
description: "This reply contains a field whose old and new variant types have a bson_serialization_type
@@ -302,6 +322,7 @@ structs:
bsonSerializationTypeWithVariantAnyUnstableReplyField:
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
+ unstable: false
CppTypeNotEqualUnstableReply:
description: "This reply contains a field whose old and new type have a
@@ -310,6 +331,7 @@ structs:
fields:
cppTypeNotEqualReplyUnstableField:
type: bsonSerializationTypeAnyCppTypeNotEqual
+ unstable: false
SerializerNotEqualUnstableReply:
description: "This reply contains a field whose old and new type have a
@@ -318,6 +340,7 @@ structs:
fields:
serializerNotEqualReplyUnstableField:
type: bsonSerializationTypeAnySerializerNotEqual
+ unstable: false
DeserializerNotEqualUnstableReply:
description: "This reply contains a field whose old and new type have a
@@ -326,6 +349,7 @@ structs:
fields:
deserializerNotEqualReplyUnstableField:
type: bsonSerializationTypeAnyDeserializerNotEqual
+ unstable: false
NewlyAddedBsonSerializationTypeAnyStruct:
description: "This struct contains a newly added field whose type has a bson_serialization_type
@@ -333,6 +357,7 @@ structs:
fields:
newlyAddedBsonSerializationTypeAnyStructField:
optional: true
+ unstable: false
type:
variant: [string, bsonSerializationTypeAny]
@@ -344,6 +369,7 @@ structs:
oldBsonSerializationTypeAnyUnstableStructField:
optional: true
type: oldBsonSerializationTypeAny
+ unstable: false
NewBsonSerializationTypeAnyUnstableStruct:
description: "This struct contains a field that is unstable in the old version
@@ -353,6 +379,7 @@ structs:
newBsonSerializationTypeAnyUnstableStructField:
optional: true
type: newBsonSerializationTypeAny
+ unstable: false
BsonSerializationTypeAnyUnstableStruct:
description: "This struct contains a field that is unstable in the old version
@@ -362,6 +389,7 @@ structs:
bsonSerializationTypeAnyUnstableStructField:
optional: true
type: bsonSerializationTypeAny
+ unstable: false
BsonSerializationTypeWithVariantAnyUnstableStruct:
description: "This struct contains a field whose old and new variant types have a bson_serialization_type
@@ -369,6 +397,7 @@ structs:
fields:
bsonSerializationTypeWithVariantAnyUnstableStructField:
optional: true
+ unstable: false
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
@@ -379,6 +408,7 @@ structs:
fields:
cppTypeNotEqualStructUnstableField:
optional: true
+ unstable: false
type: bsonSerializationTypeAnyCppTypeNotEqual
SerializerNotEqualUnstableStruct:
@@ -389,6 +419,7 @@ structs:
serializerNotEqualStructUnstableField:
optional: true
type: bsonSerializationTypeAnySerializerNotEqual
+ unstable: false
DeserializerNotEqualUnstableStruct:
description: "This struct contains a field whose old and new type have a
@@ -398,6 +429,7 @@ structs:
deserializerNotEqualStructUnstableField:
optional: true
type: bsonSerializationTypeAnyDeserializerNotEqual
+ unstable: false
StructFieldTypeRecursiveReplyOne:
description: "This reply contains a field whose new type is a struct that is not
@@ -405,6 +437,7 @@ structs:
fields:
structReplyField:
type: UnstableNewFieldReply
+ unstable: false
StructFieldTypeRecursiveReplyTwo:
description: "This reply contains a field whose new type is a struct that is not
@@ -412,6 +445,7 @@ structs:
fields:
structReplyField:
type: StructType
+ unstable: false
StructType:
description: "This struct contains a field whose new type is incompatible with the
@@ -419,12 +453,14 @@ structs:
fields:
fieldOne:
type: BsonNotSubsetReply
+ unstable: false
NewVariantTypeReply:
description: "This reply contains a new field that has a variant type while the old field
is not a variant type"
fields:
newVariantTypeReplyField:
+ unstable: false
type:
variant: [int, string]
@@ -433,6 +469,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyField:
+ unstable: false
type:
variant: [int, bool, string]
@@ -441,6 +478,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyField:
+ unstable: false
type:
variant: [array<int>, array<bool>, array<string>]
@@ -449,6 +487,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyFieldTwo:
+ unstable: false
type:
variant: [int, bool, string, double]
@@ -457,6 +496,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyFieldTwo:
+ unstable: false
type:
variant: [array<int>, array<bool>, array<string>, array<double>]
@@ -465,6 +505,7 @@ structs:
compatible with the old variant type"
fields:
variantRecursiveReplyField:
+ unstable: false
type:
variant: [int, intStringToIntStringBool]
@@ -473,6 +514,7 @@ structs:
compatible with the old variant type"
fields:
variantRecursiveReplyField:
+ unstable: false
type:
variant: [array<int>, array<intStringToIntStringBool>]
@@ -481,6 +523,7 @@ structs:
of the old variant types"
fields:
variantStructNotSubsetReplyField:
+ unstable: false
type:
variant: [int, string, StructType]
@@ -489,6 +532,7 @@ structs:
of the old variant types"
fields:
variantStructNotSubsetReplyField:
+ unstable: false
type:
variant: [array<int>, array<string>, array<StructType>]
@@ -497,6 +541,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
+ unstable: false
type:
variant: [int, StructFieldTypeRecursiveReplyTwo]
@@ -505,6 +550,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
+ unstable: false
type:
variant: [array<int>, array<StructFieldTypeRecursiveReplyTwo>]
@@ -522,6 +568,7 @@ structs:
fields:
notSupersetField:
type: intStringToInt
+ unstable: false
NewValidatorStruct:
description: "This struct contains a field where the new version contains a validator while
@@ -529,6 +576,7 @@ structs:
fields:
newValidatorField:
type: int
+ unstable: false
validator:
lt: 0
@@ -537,6 +585,7 @@ structs:
fields:
validatorsNotEqualField:
type: double
+ unstable: false
validator:
lt: 0.0
gt: -1.1
@@ -549,6 +598,7 @@ structs:
fields:
addedRequiredTypeField:
type: string
+ unstable: false
StableRequiredNoDefaultTypeFieldStruct:
description: "This struct contains a field that is stable and required with no default value
@@ -556,12 +606,14 @@ structs:
fields:
stableRequiredNoDefaultTypeField:
type: string
+ unstable: false
ArrayTypeStruct:
description: "Struct with ArrayType field."
fields:
ArrayCommandParameter:
type: array<string>
+ unstable: false
StructCommandParameterTypeRecursive:
description: "This param struct type contains a field that is not compatible between the
@@ -569,12 +621,14 @@ structs:
fields:
structCommandParameterTypeRecursiveField:
type: intStringToInt
+ unstable: false
VariantNotSupersetStruct:
description: "This struct contains a field where the new variant types are not a superset
of the old variant types"
fields:
variantNotSupersetField:
+ unstable: false
type:
variant: [int, bool]
@@ -583,6 +637,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetField:
+ unstable: false
type:
variant: [array<int>, array<bool>]
@@ -591,6 +646,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetFieldTwo:
+ unstable: false
type:
variant: [int, bool]
@@ -599,6 +655,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetFieldTwo:
+ unstable: false
type:
variant: [array<int>, array<bool>]
@@ -608,12 +665,14 @@ structs:
fields:
variantField:
type: int
+ unstable: false
VariantRecursiveStruct:
description: "This struct contains a field where the new variant types are not
compatible with the old variant types"
fields:
variantRecursiveField:
+ unstable: false
type:
variant: [int, intStringBoolToIntString]
@@ -622,6 +681,7 @@ structs:
compatible with the old variant types"
fields:
variantRecursiveField:
+ unstable: false
type:
variant: [array<int>, array<intStringBoolToIntString>]
@@ -630,6 +690,7 @@ structs:
while the new one does not"
fields:
variantStructNotSupersetField:
+ unstable: false
type:
variant: [int, string]
@@ -638,6 +699,7 @@ structs:
while the new one does not"
fields:
variantStructNotSupersetField:
+ unstable: false
type:
variant: [array<int>, array<string>]
@@ -646,6 +708,7 @@ structs:
variant struct are not compatible"
fields:
variantStructRecursiveField:
+ unstable: false
type:
variant: [int, string, StructCommandParameterTypeRecursive]
@@ -654,9 +717,25 @@ structs:
variant struct are not compatible"
fields:
variantStructRecursiveField:
+ unstable: false
type:
variant: [array<int>, array<string>, array<StructCommandParameterTypeRecursive>]
+ MissingUnstableFieldNewFieldStruct:
+ description: "This struct contains a field that missing the 'unstable' field in the new
+ command."
+ fields:
+ missingUnstableFieldNewField:
+ type: string
+
+ MissingUnstableFieldAddedNewFieldStruct:
+ description: "This struct contains an added field in the new command that is missing the
+ 'unstable' field."
+ fields:
+ missingUnstableFieldAddedNewField:
+ type: string
+ optional: true
+
commands:
invalidAPIVersionNew:
description: "new command fails because of invalid API version"
@@ -728,6 +807,7 @@ commands:
fields:
newRequiredParam:
type: string
+ unstable: false
commandParameterUnstable:
description: "new unstable command parameter fails because it is stable
@@ -755,6 +835,7 @@ commands:
fields:
newRequiredStableParam:
type: string
+ unstable: false
commandParameterRequired:
description: "new required command parameter fails because it is optional
@@ -769,6 +850,7 @@ commands:
newRequiredParam:
type: string
optional: false
+ unstable: false
oldCommandParameterTypeBsonSerializationAny:
description: "old command fails because it has a parameter type that has a
@@ -782,6 +864,7 @@ commands:
fields:
bsonTypeAnyParam:
type: oldBsonSerializationTypeAny
+ unstable: false
newCommandParameterTypeBsonSerializationAny:
description: "new command fails because it has a parameter type that has a
@@ -795,6 +878,7 @@ commands:
fields:
bsonTypeAnyParam:
type: newBsonSerializationTypeAny
+ unstable: false
oldParamTypeBsonAnyAllowList:
description: "old command fails because it has a parameter type that has a
@@ -809,6 +893,7 @@ commands:
fields:
bsonTypeAnyParam:
type: oldBsonSerializationTypeAny
+ unstable: false
newParamTypeBsonAnyAllowList:
description: "new command fails because it has a parameter type that has a
@@ -823,6 +908,7 @@ commands:
fields:
bsonTypeAnyParam:
type: newBsonSerializationTypeAny
+ unstable: false
commandParameterTypeBsonSerializationAnyNotAllowed:
description: "command fails because it has a parameter type that has a
@@ -837,6 +923,7 @@ commands:
fields:
bsonTypeAnyParam:
type: bsonSerializationTypeAny
+ unstable: false
commandParameterCppTypeNotEqual:
description: "command fails because it has a parameter type that has a
@@ -851,6 +938,7 @@ commands:
fields:
cppTypeNotEqualParam:
type: bsonSerializationTypeAnyCppTypeNotEqual
+ unstable: false
commandParameterSerializerNotEqual:
description: "command fails because it has a parameter type that has a
@@ -865,6 +953,7 @@ commands:
fields:
serializerNotEqualParam:
type: bsonSerializationTypeAnySerializerNotEqual
+ unstable: false
commandParameterDeserializerNotEqual:
description: "command fails because it has a parameter type that has a
@@ -879,6 +968,7 @@ commands:
fields:
deserializerNotEqualParam:
type: bsonSerializationTypeAnyDeserializerNotEqual
+ unstable: false
oldCommandParamTypeBsonAnyUnstable:
description: "old command fails because it has a parameter type that has a
@@ -893,6 +983,7 @@ commands:
bsonTypeAnyUnstableParam:
type: oldBsonSerializationTypeAny
optional: true
+ unstable: false
newCommandParamTypeBsonAnyUnstable:
description: "new command fails because it has a parameter type that has a
@@ -907,6 +998,7 @@ commands:
bsonTypeAnyUnstableParam:
type: newBsonSerializationTypeAny
optional: true
+ unstable: false
commandParamTypeBsonAnyNotAllowedUnstable:
description: "command fails because it has a parameter type that has a
@@ -922,6 +1014,7 @@ commands:
bsonTypeAnyUnstableParam:
type: bsonSerializationTypeAny
optional: true
+ unstable: false
commandParameterCppTypeNotEqualUnstable:
description: "command fails because it has a parameter type that has a
@@ -937,6 +1030,7 @@ commands:
cppTypeNotEqualParam:
type: bsonSerializationTypeAnyCppTypeNotEqual
optional: true
+ unstable: false
commandParameterSerializerNotEqualUnstable:
description: "command fails because it has a parameter type that has a
@@ -952,6 +1046,7 @@ commands:
serializerNotEqualParam:
type: bsonSerializationTypeAnySerializerNotEqual
optional: true
+ unstable: false
commandParameterDeserializerNotEqualUnstable:
description: "command fails because it has a parameter type that has a
@@ -967,6 +1062,7 @@ commands:
deserializerNotEqualParam:
type: bsonSerializationTypeAnyDeserializerNotEqual
optional: true
+ unstable: false
parameterFieldTypeBsonAnyWithVariantUnstable:
description: "command fails when its paramter field variant types have bson_serialization_type
@@ -981,6 +1077,7 @@ commands:
variantAnyUnstableField:
type: BsonSerializationTypeWithVariantAnyStruct
optional: true
+ unstable: false
newlyAddedParamBsonAnyNotAllowed:
description: "command fails when its parameter is newly added and has bson type 'any'
@@ -995,6 +1092,7 @@ commands:
newlyAddedBsonAnyNotAllowedParam:
type: bsonSerializationTypeAny
optional: true
+ unstable: false
newCommandParameterTypeEnumNotSuperset:
description: "new command fails because its parameter type is an enum that is not
@@ -1008,6 +1106,7 @@ commands:
fields:
enumNotSupersetParam:
type: EnumNotSuperset
+ unstable: false
newCommandParameterTypeNotEnum:
description: "new command fails because its parameter type is not an enum when the
@@ -1021,6 +1120,7 @@ commands:
fields:
newParamNotEnum:
type: string
+ unstable: false
newCommandParameterTypeNotStruct:
description: "new command fails because its parameter type is not a struct when the
@@ -1034,6 +1134,7 @@ commands:
fields:
newParamNotStruct:
type: string
+ unstable: false
newCommandParameterTypeEnumOrStructOne:
description: "new command fails because its parameter type is an enum while the
@@ -1047,6 +1148,7 @@ commands:
fields:
newParamEnum:
type: EnumNotSuperset
+ unstable: false
newCommandParameterTypeEnumOrStructTwo:
description: "new command fails because its parameter type is a struct while the
@@ -1060,6 +1162,7 @@ commands:
fields:
newParamStruct:
type: StructCommandParameterType
+ unstable: false
newCommandParameterTypeBsonNotSuperset:
description: "new command fails because its parameter type has a bson_serialization_type
@@ -1074,6 +1177,7 @@ commands:
fields:
newParamBsonNotSuperset:
type: intStringToInt
+ unstable: false
newCommandParameterTypeStructRecursiveOne:
description: "new command fails because its parameter type is a struct that is
@@ -1087,6 +1191,7 @@ commands:
fields:
stableToUnstableStructParameter:
type: CommandParamStructRecursiveOne
+ unstable: false
newCommandParameterTypeStructRecursiveTwo:
description: "new command fails because its parameter type is a struct that is
@@ -1100,6 +1205,7 @@ commands:
fields:
notSupersetStructParameter:
type: CommandParamStructRecursiveTwo
+ unstable: false
newCommandParameterValidator:
description: "new command fails because it contains a parameter that contains a validator
@@ -1113,6 +1219,7 @@ commands:
fields:
newParam:
type: int
+ unstable: false
validator:
lt: 0
@@ -1128,6 +1235,7 @@ commands:
fields:
newParam:
type: double
+ unstable: false
validator:
lt: 0.0
gt: -1.1
@@ -1340,6 +1448,7 @@ commands:
fields:
variantAnyField:
type: BsonSerializationTypeWithVariantAnyStruct
+ unstable: false
parameterFieldTypeBsonAnyWithVariantWithArray:
description: "command fails when its parameter field variant types have bson_serialization_type
@@ -1353,6 +1462,7 @@ commands:
fields:
variantAnyField:
type: BsonSerializationTypeWithVariantAnyStructWithArray
+ unstable: false
commandTypeBsonAnyWithVariant:
description: "command fails when its variant types have bson_serialization_type
@@ -1888,6 +1998,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParam:
+ unstable: false
type:
variant: [int, bool]
@@ -1902,6 +2013,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParam:
+ unstable: false
type:
variant: [array<int>, array<bool>]
@@ -1916,6 +2028,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParamTwo:
+ unstable: false
type:
variant: [int, string]
@@ -1930,6 +2043,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParamTwo:
+ unstable: false
type:
variant: [array<int>, array<string>]
@@ -1945,6 +2059,7 @@ commands:
fields:
variantParam:
type: int
+ unstable: false
newParamVariantRecursive:
description: "new command fails because its param type is a variant type that is not
@@ -1957,6 +2072,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
+ unstable: false
type:
variant: [int, intStringBoolToIntString]
@@ -1971,6 +2087,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
+ unstable: false
type:
variant: [array<int>, array<intStringBoolToIntString>]
@@ -1985,6 +2102,7 @@ commands:
reply_type: OkReply
fields:
variantStructNotSupersetParam:
+ unstable: false
type:
variant: [int, string]
@@ -1999,6 +2117,7 @@ commands:
reply_type: OkReply
fields:
variantStructNotSupersetParam:
+ unstable: false
type:
variant: [array<int>, array<string>]
@@ -2014,6 +2133,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
+ unstable: false
type:
variant: [int, string, StructCommandParameterTypeRecursive]
@@ -2029,6 +2149,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
+ unstable: false
type:
variant: [array<int>, array<string>, array<StructCommandParameterTypeRecursive>]
@@ -2258,6 +2379,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
ArrayCommandParameterTypeError:
@@ -2272,6 +2394,7 @@ commands:
fields:
parameterStruct:
type: array<StructType>
+ unstable: false
reply_type: ArrayTypeStruct
accessCheckTypeChange:
@@ -2524,6 +2647,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
ArrayCommandTypeErrorNoArrayNew:
@@ -2538,6 +2662,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
ArrayCommandParameterNoArrayOld:
@@ -2552,6 +2677,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
ArrayCommandParameterNoArrayNew:
@@ -2566,4 +2692,74 @@ commands:
fields:
parameterStruct:
type: ArrayTypeStruct
- reply_type: ArrayTypeStruct \ No newline at end of file
+ unstable: false
+ reply_type: ArrayTypeStruct
+
+ newReplyFieldMissingUnstableField:
+ description: "new command fails because it contains a reply field that is missing the
+ 'unstable' field"
+ command_name: newReplyFieldMissingUnstableField
+ namespace: ignored
+ cpp_name: newReplyFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: MissingUnstableFieldNewFieldStruct
+
+ newCommandTypeFieldMissingUnstableField:
+ description: "new command fails because it contains a command type field that is missing the
+ 'unstable' field"
+ command_name: newCommandTypeFieldMissingUnstableField
+ namespace: type
+ cpp_name: newCommandTypeFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ type: MissingUnstableFieldNewFieldStruct
+ reply_type: OkReply
+
+ newParameterMissingUnstableField:
+ description: "new command fails because it contains a parameter that is missing the
+ 'unstable' field"
+ command_name: newParameterMissingUnstableField
+ namespace: ignored
+ cpp_name: newParameterMissingUnstableField
+ strict: true
+ api_version: "1"
+ fields:
+ missingUnstableFieldNewParameter:
+ type: int
+ reply_type: OkReply
+
+ addedNewParameterMissingUnstableField:
+ description: "new command fails because it contains a new parameter that is missing the
+ 'unstable' field"
+ command_name: addedNewParameterMissingUnstableField
+ namespace: ignored
+ cpp_name: addedNewParameterMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+ fields:
+ missingUnstableFieldAddedNewParameter:
+ type: int
+ optional: true
+
+ addedNewReplyFieldMissingUnstableField:
+ description: "new command fails because it contains a new reply field that is missing the
+ 'unstable' field"
+ command_name: addedNewReplyFieldMissingUnstableField
+ namespace: ignored
+ cpp_name: addedNewReplyFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: MissingUnstableFieldAddedNewFieldStruct
+
+ addedNewCommandTypeFieldMissingUnstableField:
+ description: "new command fails because it contains a new command type field that is missing
+ the 'unstable' field"
+ command_name: addedNewCommandTypeFieldMissingUnstableField
+ namespace: type
+ type: MissingUnstableFieldAddedNewFieldStruct
+ cpp_name: addedNewCommandTypeFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
diff --git a/buildscripts/idl/tests/compatibility_test_fail/new/error_reply.idl b/buildscripts/idl/tests/compatibility_test_fail/new/error_reply.idl
index 96c12d5ef8e..31e9382b5ac 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/new/error_reply.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/new/error_reply.idl
@@ -40,6 +40,7 @@ structs:
fields:
errorLabels:
type: StructType
+ unstable: false
StructType:
description: "This struct contains a field that is non-optional in the old
@@ -48,3 +49,4 @@ structs:
structField:
type: string
optional: true
+ unstable: false
diff --git a/buildscripts/idl/tests/compatibility_test_fail/new/imports.idl b/buildscripts/idl/tests/compatibility_test_fail/new/imports.idl
index 493b8f9757a..a9e8a09438e 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/new/imports.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/new/imports.idl
@@ -36,4 +36,4 @@ structs:
fields:
unstableNewField:
type: string
- unstable: true \ No newline at end of file
+ unstable: true
diff --git a/buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl b/buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl
index e378d846b26..6661fe62dbd 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl
@@ -139,6 +139,7 @@ structs:
fields:
unstableNewField:
type: string
+ unstable: false
OptionalNewFieldReply:
description: "This reply contains a field that is required in the old command but is
@@ -146,6 +147,7 @@ structs:
fields:
optionalNewField:
type: string
+ unstable: false
RequiredNewField:
description: "This struct contains a field that is optional in the old command but is
@@ -154,6 +156,7 @@ structs:
requiredNewField:
type: string
optional: true
+ unstable: false
MissingNewFieldReply:
description: "This reply contains a field that exists in the old command but is
@@ -161,6 +164,7 @@ structs:
fields:
missingNewField:
type: string
+ unstable: false
EnumNotSubsetReply:
description: "This reply contains an enum field where the new enum values is not a subset
@@ -168,6 +172,7 @@ structs:
fields:
enumNotSubsetReplyField:
type: NewReplyFieldEnumNotSubset
+ unstable: false
NotEnumFieldReply:
description: "This reply contains a field that is an enum type in the old command but
@@ -175,6 +180,7 @@ structs:
fields:
notEnumReplyField:
type: NewReplyFieldEnumNotSubset
+ unstable: false
NotStructFieldReply:
description: "This reply contains a field that is a struct type in the old command but
@@ -182,6 +188,7 @@ structs:
fields:
notStructReplyField:
type: StructReplyFieldType
+ unstable: false
StructReplyFieldType:
description: "This is a struct reply field type"
@@ -192,6 +199,7 @@ structs:
fields:
EnumOrStructReplyField:
type: intToIntString
+ unstable: false
BsonNotSubsetReply:
description: "This reply contains a field type where the new bson_serialization_type
@@ -199,6 +207,7 @@ structs:
fields:
bsonNotSubsetReplyField:
type: intToIntString
+ unstable: false
BsonNotSubsetReplyTwo:
description: "This reply contains a field type where the new bson_serialization_type
@@ -206,6 +215,7 @@ structs:
fields:
bsonNotSubsetReplyFieldTwo:
type: intStringToIntStringBool
+ unstable: false
OldBsonSerializationTypeAnyReply:
description: "This reply contains a field whose old type has a bson_serialization_type
@@ -213,6 +223,7 @@ structs:
fields:
oldBsonSerializationTypeAnyReplyField:
type: oldBsonSerializationTypeAny
+ unstable: false
NewBsonSerializationTypeAnyReply:
description: "This reply contains a field whose new type has a bson_serialization_type
@@ -220,6 +231,7 @@ structs:
fields:
newBsonSerializationTypeAnyReplyField:
type: newBsonSerializationTypeAny
+ unstable: false
BsonSerializationTypeAnyReply:
description: "This reply contains a field whose old and new type have a
@@ -227,6 +239,7 @@ structs:
fields:
bsonSerializationTypeAnyReplyField:
type: bsonSerializationTypeAny
+ unstable: false
NewlyAddedBsonSerializationTypeAnyReply:
description: "This reply contains a newly added field whose type has a
@@ -373,6 +386,7 @@ structs:
bson_serialization_type that contains 'any' that is not compatible"
fields:
bsonSerializationTypeAnyStructField:
+ unstable: false
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
@@ -381,6 +395,7 @@ structs:
bson_serialization_type that contains 'any' that is not compatible"
fields:
bsonSerializationTypeAnyStructField:
+ unstable: false
type:
variant: [array<oldBsonSerializationTypeAny>,
array<newBsonSerializationTypeAny>]
@@ -391,6 +406,7 @@ structs:
fields:
cppTypeNotEqualReplyField:
type: bsonSerializationTypeAnyCppTypeNotEqual
+ unstable: false
SerializerNotEqualReply:
description: "This reply contains a field whose old and new type have a
@@ -399,6 +415,7 @@ structs:
fields:
serializerNotEqualReplyField:
type: bsonSerializationTypeAnySerializerNotEqual
+ unstable: false
DeserializerNotEqualReply:
description: "This reply contains a field whose old and new type have a
@@ -407,6 +424,7 @@ structs:
fields:
deserializerNotEqualReplyField:
type: bsonSerializationTypeAnyDeserializerNotEqual
+ unstable: false
StructFieldTypeRecursiveReplyOne:
description: "This reply contains a field whose new type is a struct that is not
@@ -414,6 +432,7 @@ structs:
fields:
structReplyField:
type: UnstableNewFieldReply
+ unstable: false
StructFieldTypeRecursiveReplyTwo:
description: "This reply contains a field whose new type is a struct that is not
@@ -421,6 +440,7 @@ structs:
fields:
structReplyField:
type: StructType
+ unstable: false
StructType:
description: "This struct contains a field whose new type is incompatible with the
@@ -428,6 +448,7 @@ structs:
fields:
fieldOne:
type: BsonNotSubsetReply
+ unstable: false
NewVariantTypeReply:
description: "This reply contains a new field that has a variant type while the old field
@@ -435,6 +456,7 @@ structs:
fields:
newVariantTypeReplyField:
type: int
+ unstable: false
NewVariantNotSubsetReply:
description: "This reply contains a field whose new variant types are not a subset
@@ -443,12 +465,14 @@ structs:
variantNotSubsetReplyField:
type:
variant: [int, string]
+ unstable: false
NewVariantNotSubsetReplyWithArray:
description: "This reply contains a field whose new variant types are not a subset
of the old variant types"
fields:
variantNotSubsetReplyField:
+ unstable: false
type:
variant: [array<int>, array<string>]
@@ -457,6 +481,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyFieldTwo:
+ unstable: false
type:
variant: [int, string]
@@ -465,6 +490,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyFieldTwo:
+ unstable: false
type:
variant: [array<int>, array<string>]
@@ -473,6 +499,7 @@ structs:
compatible with the old variant type"
fields:
variantRecursiveReplyField:
+ unstable: false
type:
variant: [int, intStringToIntStringBool]
@@ -481,6 +508,7 @@ structs:
compatible with the old variant type"
fields:
variantRecursiveReplyField:
+ unstable: false
type:
variant: [array<int>, array<intStringToIntStringBool>]
@@ -489,6 +517,7 @@ structs:
of the old variant types"
fields:
variantStructNotSubsetReplyField:
+ unstable: false
type:
variant: [int, string]
@@ -497,6 +526,7 @@ structs:
of the old variant types"
fields:
variantStructNotSubsetReplyField:
+ unstable: false
type:
variant: [array<int>, array<string>]
@@ -505,6 +535,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
+ unstable: false
type:
variant: [int, StructFieldTypeRecursiveReplyTwo]
@@ -513,6 +544,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
+ unstable: false
type:
variant: [array<int>, array<StructFieldTypeRecursiveReplyTwo>]
@@ -522,6 +554,7 @@ structs:
fields:
stableToUnstableField:
type: string
+ unstable: false
CommandParamStructRecursiveTwo:
description: "This command parameter struct type contains a field that
@@ -529,6 +562,7 @@ structs:
fields:
notSupersetField:
type: intStringToInt
+ unstable: false
NewValidatorStruct:
description: "This struct contains a field where the new version contains a validator while
@@ -536,6 +570,7 @@ structs:
fields:
newValidatorField:
type: int
+ unstable: false
ValidatorsNotEqualStruct:
description: "This struct contains a field where the new and old validators are not exactly equal"
@@ -548,6 +583,7 @@ structs:
lte: 2.0
gte: -2.97
callback: "callback"
+ unstable: false
AddedRequiredTypeFieldStruct:
description: "This struct contains a field that is added and required in the new version."
@@ -566,12 +602,14 @@ structs:
fields:
structCommandParameterTypeRecursiveField:
type: intStringToInt
+ unstable: false
VariantNotSupersetStruct:
description: "This struct contains a field where the new variant types are not a superset
of the old variant types"
fields:
variantNotSupersetField:
+ unstable: false
type:
variant: [int, bool, string]
@@ -580,6 +618,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetField:
+ unstable: false
type:
variant: [array<int>, array<bool>, array<string>]
@@ -588,6 +627,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetFieldTwo:
+ unstable: false
type:
variant: [int, bool, string, double]
@@ -596,6 +636,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetFieldTwo:
+ unstable: false
type:
variant: [array<int>, array<bool>, array<string>, array<double>]
@@ -604,6 +645,7 @@ structs:
old one is"
fields:
variantField:
+ unstable: false
type:
variant: [int, bool]
@@ -612,6 +654,7 @@ structs:
compatible with the old variant types"
fields:
variantRecursiveField:
+ unstable: false
type:
variant: [int, intStringBoolToIntString]
@@ -620,6 +663,7 @@ structs:
compatible with the old variant types"
fields:
variantRecursiveField:
+ unstable: false
type:
variant: [array<int>, array<intStringBoolToIntString>]
@@ -628,6 +672,7 @@ structs:
while the new one does not"
fields:
variantStructNotSupersetField:
+ unstable: false
type:
variant: [int, string, StructCommandParameterType]
@@ -636,6 +681,7 @@ structs:
while the new one does not"
fields:
variantStructNotSupersetField:
+ unstable: false
type:
variant: [array<int>, array<string>, array<StructCommandParameterType>]
@@ -644,6 +690,7 @@ structs:
variant struct are not compatible"
fields:
variantStructRecursiveField:
+ unstable: false
type:
variant: [int, string, StructCommandParameterTypeRecursive]
@@ -652,6 +699,7 @@ structs:
variant struct are not compatible"
fields:
variantStructRecursiveField:
+ unstable: false
type:
variant: [array<int>, array<string>, array<StructCommandParameterTypeRecursive>]
@@ -660,6 +708,19 @@ structs:
fields:
ArrayCommandParameter:
type: array<string>
+ unstable: false
+
+ MissingUnstableFieldNewFieldStruct:
+ description: "This struct contains a field that missing the 'unstable' field in the new
+ command."
+ fields:
+ missingUnstableFieldNewField:
+ type: string
+ unstable: false
+
+ MissingUnstableFieldAddedNewFieldStruct:
+ description: "This struct contains an added field in the new command that is missing the
+ 'unstable' field."
commands:
invalidAPIVersionOld:
@@ -712,6 +773,7 @@ commands:
fields:
parameterToRemove:
type: string
+ unstable: false
addedNewCommandParameterRequired:
description: "new command parameter fails because it is required when
@@ -735,6 +797,7 @@ commands:
fields:
newUnstableParameter:
type: string
+ unstable: false
commandParameterStableRequiredNoDefault:
description: "new required stable command parameter with no default value fails
@@ -763,6 +826,7 @@ commands:
newRequiredParam:
type: string
optional: true
+ unstable: false
oldCommandParameterTypeBsonSerializationAny:
description: "old command fails because it has a parameter type that has a
@@ -776,6 +840,7 @@ commands:
fields:
bsonTypeAnyParam:
type: oldBsonSerializationTypeAny
+ unstable: false
newCommandParameterTypeBsonSerializationAny:
description: "new command fails because it has a parameter type that has a
@@ -789,6 +854,7 @@ commands:
fields:
bsonTypeAnyParam:
type: newBsonSerializationTypeAny
+ unstable: false
oldParamTypeBsonAnyAllowList:
description: "old command fails because it has a parameter type that has a
@@ -803,6 +869,7 @@ commands:
fields:
bsonTypeAnyParam:
type: oldBsonSerializationTypeAny
+ unstable: false
newParamTypeBsonAnyAllowList:
description: "new command fails because it has a parameter type that has a
@@ -817,6 +884,7 @@ commands:
fields:
bsonTypeAnyParam:
type: newBsonSerializationTypeAny
+ unstable: false
commandParameterTypeBsonSerializationAnyNotAllowed:
description: "command fails because it has a parameter type that has a
@@ -831,6 +899,7 @@ commands:
fields:
bsonTypeAnyParam:
type: bsonSerializationTypeAny
+ unstable: false
commandParameterCppTypeNotEqual:
description: "command fails because it has a parameter type that has a
@@ -845,6 +914,7 @@ commands:
fields:
cppTypeNotEqualParam:
type: bsonSerializationTypeAnyCppTypeNotEqual
+ unstable: false
commandParameterSerializerNotEqual:
description: "command fails because it has a parameter type that has a
@@ -859,6 +929,7 @@ commands:
fields:
serializerNotEqualParam:
type: bsonSerializationTypeAnySerializerNotEqual
+ unstable: false
commandParameterDeserializerNotEqual:
description: "command fails because it has a parameter type that has a
@@ -873,6 +944,7 @@ commands:
fields:
deserializerNotEqualParam:
type: bsonSerializationTypeAnyDeserializerNotEqual
+ unstable: false
oldCommandParamTypeBsonAnyUnstable:
description: "old command fails because it has a parameter type that has a
@@ -998,6 +1070,7 @@ commands:
fields:
enumNotSupersetParam:
type: EnumNotSuperset
+ unstable: false
newCommandParameterTypeNotEnum:
description: "new command fails because its parameter type is not an enum when the
@@ -1011,6 +1084,7 @@ commands:
fields:
newParamNotEnum:
type: EnumNotSuperset
+ unstable: false
newCommandParameterTypeNotStruct:
description: "new command fails because its parameter type is not a struct when the
@@ -1024,6 +1098,7 @@ commands:
fields:
newParamNotStruct:
type: StructCommandParameterType
+ unstable: false
newCommandParameterTypeEnumOrStructOne:
description: "new command fails because its parameter type is an enum while the
@@ -1037,6 +1112,7 @@ commands:
fields:
newParamEnum:
type: string
+ unstable: false
newCommandParameterTypeEnumOrStructTwo:
description: "new command fails because its parameter type is a struct while the
@@ -1050,6 +1126,7 @@ commands:
fields:
newParamStruct:
type: string
+ unstable: false
newCommandParameterTypeBsonNotSuperset:
description: "new command fails because its parameter type has a bson_serialization_type
@@ -1064,6 +1141,7 @@ commands:
fields:
newParamBsonNotSuperset:
type: intStringToInt
+ unstable: false
newCommandParameterTypeStructRecursiveOne:
description: "new command fails because its parameter type is a struct that is
@@ -1077,6 +1155,7 @@ commands:
fields:
stableToUnstableStructParameter:
type: CommandParamStructRecursiveOne
+ unstable: false
newCommandParameterTypeStructRecursiveTwo:
description: "new command fails because its parameter type is a struct that is
@@ -1090,6 +1169,7 @@ commands:
fields:
notSupersetStructParameter:
type: CommandParamStructRecursiveTwo
+ unstable: false
newCommandParameterValidator:
description: "new command fails because it contains a parameter that contains a validator
@@ -1103,6 +1183,7 @@ commands:
fields:
newParam:
type: int
+ unstable: false
commandParameterValidatorsNotEqual:
description: "new command fails because it contains a parameter that contains a validator
@@ -1115,6 +1196,7 @@ commands:
reply_type: OkReply
fields:
newParam:
+ unstable: false
type: double
validator:
lt: 0.0
@@ -1327,6 +1409,7 @@ commands:
reply_type: OkReply
fields:
variantAnyField:
+ unstable: false
type: BsonSerializationTypeWithVariantAnyStruct
parameterFieldTypeBsonAnyWithVariantWithArray:
@@ -1340,6 +1423,7 @@ commands:
reply_type: OkReply
fields:
variantAnyField:
+ unstable: false
type: BsonSerializationTypeWithVariantAnyStructWithArray
commandTypeBsonAnyWithVariant:
@@ -1960,6 +2044,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParam:
+ unstable: false
type:
variant: [int, bool, string]
@@ -1974,6 +2059,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParam:
+ unstable: false
type:
variant: [array<int>, array<bool>, array<string>]
@@ -1988,6 +2074,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParamTwo:
+ unstable: false
type:
variant: [int, bool, string, double]
@@ -2002,6 +2089,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParamTwo:
+ unstable: false
type:
variant: [array<int>, array<bool>, array<string>, array<double>]
@@ -2016,6 +2104,7 @@ commands:
reply_type: OkReply
fields:
variantParam:
+ unstable: false
type:
variant: [int, bool]
@@ -2030,6 +2119,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
+ unstable: false
type:
variant: [int, intStringBoolToIntString]
@@ -2044,6 +2134,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
+ unstable: false
type:
variant: [array<int>, array<intStringBoolToIntString>]
@@ -2058,6 +2149,7 @@ commands:
reply_type: OkReply
fields:
variantStructNotSupersetParam:
+ unstable: false
type:
variant: [int, string, StructCommandParameterType]
@@ -2072,6 +2164,7 @@ commands:
reply_type: OkReply
fields:
variantStructNotSupersetParam:
+ unstable: false
type:
variant: [array<int>, array<string>, array<StructCommandParameterType>]
@@ -2087,6 +2180,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
+ unstable: false
type:
variant: [int, string, StructCommandParameterTypeRecursive]
@@ -2102,6 +2196,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
+ unstable: false
type:
variant: [array<int>, array<string>, array<StructCommandParameterTypeRecursive>]
@@ -2331,6 +2426,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
ArrayCommandParameterTypeError:
@@ -2345,6 +2441,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
accessCheckTypeChange:
@@ -2511,6 +2608,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
ArrayCommandTypeErrorNoArrayNew:
@@ -2525,6 +2623,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
ArrayCommandParameterNoArrayOld:
@@ -2539,6 +2638,7 @@ commands:
fields:
parameterStruct:
type: ArrayTypeStruct
+ unstable: false
reply_type: ArrayTypeStruct
ArrayCommandParameterNoArrayNew:
@@ -2553,4 +2653,71 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- reply_type: ArrayTypeStruct \ No newline at end of file
+ unstable: false
+ reply_type: ArrayTypeStruct
+
+ newReplyFieldMissingUnstableField:
+ description: "new command fails because it contains a reply field that is missing the
+ 'stable' field"
+ command_name: newReplyFieldMissingUnstableField
+ namespace: ignored
+ cpp_name: newReplyFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: MissingUnstableFieldNewFieldStruct
+
+ newCommandTypeFieldMissingUnstableField:
+ description: "new command fails because it contains a command type field that is missing the
+ 'unstable' field"
+ command_name: newCommandTypeFieldMissingUnstableField
+ namespace: type
+ cpp_name: newCommandTypeFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ type: MissingUnstableFieldNewFieldStruct
+ reply_type: OkReply
+
+ newParameterMissingUnstableField:
+ description: "new command fails because it contains a parameter that is missing the
+ 'unstable' field"
+ command_name: newParameterMissingUnstableField
+ namespace: ignored
+ cpp_name: newParameterMissingUnstableField
+ strict: true
+ api_version: "1"
+ fields:
+ missingUnstableFieldNewParameter:
+ type: int
+ unstable: false
+ reply_type: OkReply
+
+ addedNewParameterMissingUnstableField:
+ description: "new command fails because it contains a new parameter that is missing the
+ 'unstable' field"
+ command_name: addedNewParameterMissingUnstableField
+ namespace: ignored
+ cpp_name: addedNewParameterMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+
+ addedNewReplyFieldMissingUnstableField:
+ description: "new command fails because it contains a new reply field that is missing the
+ 'unstable' field"
+ command_name: addedNewReplyFieldMissingUnstableField
+ namespace: ignored
+ cpp_name: addedNewReplyFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: MissingUnstableFieldAddedNewFieldStruct
+
+ addedNewCommandTypeFieldMissingUnstableField:
+ description: "new command fails because it contains a new command type field that is missing
+ the 'unstable' field"
+ command_name: addedNewCommandTypeFieldMissingUnstableField
+ namespace: type
+ type: MissingUnstableFieldAddedNewFieldStruct
+ cpp_name: addedNewCommandTypeFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
diff --git a/buildscripts/idl/tests/compatibility_test_fail/old/error_reply.idl b/buildscripts/idl/tests/compatibility_test_fail/old/error_reply.idl
index 29a757f63b4..08a5a271c98 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/old/error_reply.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/old/error_reply.idl
@@ -41,6 +41,7 @@ structs:
fields:
errorLabels:
type: StructType
+ unstable: false
StructType:
description: "This struct contains a field that is non-optional in the old
@@ -48,3 +49,4 @@ structs:
fields:
structField:
type: string
+ unstable: false
diff --git a/buildscripts/idl/tests/compatibility_test_fail/old/imports.idl b/buildscripts/idl/tests/compatibility_test_fail/old/imports.idl
index c663eb8b4b4..127b1b71205 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/old/imports.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/old/imports.idl
@@ -35,4 +35,5 @@ structs:
unstable in the new command."
fields:
unstableNewField:
- type: string \ No newline at end of file
+ type: string
+ unstable: false
diff --git a/buildscripts/idl/tests/compatibility_test_pass/new/compatibility_test_pass_new.idl b/buildscripts/idl/tests/compatibility_test_pass/new/compatibility_test_pass_new.idl
index 018d8ddcd01..8eb92f68208 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/new/compatibility_test_pass_new.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/new/compatibility_test_pass_new.idl
@@ -98,6 +98,7 @@ structs:
fields:
stableNewField:
type: string
+ unstable: false
RequiredNewFieldReply:
description: "This reply contains a field that is optional in the old command but is
@@ -105,6 +106,7 @@ structs:
fields:
requiredNewField:
type: string
+ unstable: false
OptionalNewField:
description: "This struct contains a field that is required in the old command but is
@@ -113,12 +115,14 @@ structs:
optionalNewField:
type: string
optional: true
+ unstable: false
AddedNewFieldReply:
description: "This reply contains a field that is added in the new command."
fields:
addedNewField:
type: string
+ unstable: false
UnstableOldFieldReply:
description: "This reply contains a field that is unstable in the old command and is
@@ -135,6 +139,7 @@ structs:
fields:
replyField:
type: NewReplyFieldEnumSubset
+ unstable: false
BsonSubsetReply:
description: "This reply contains a field type where the new bson_serialization_type
@@ -142,6 +147,7 @@ structs:
fields:
bsonSubsetReplyField:
type: intStringToInt
+ unstable: false
BsonSubsetReplyTwo:
description: "This reply contains a field type where the new bson_serialization_type
@@ -149,6 +155,7 @@ structs:
fields:
bsonSubsetReplyFieldTwo:
type: intStringBoolToIntString
+ unstable: false
StructFieldTypeRecursiveReplyOne:
description: "This reply contains a field whose new type is a struct that is
@@ -156,6 +163,7 @@ structs:
fields:
structReplyField:
type: StableNewFieldReply
+ unstable: false
StructFieldTypeRecursiveReplyTwo:
description: "This reply contains a field whose new type is a struct that is
@@ -163,6 +171,7 @@ structs:
fields:
structReplyField:
type: StructType
+ unstable: false
StructType:
description: "This struct contains a field whose new type is compatible with the
@@ -170,6 +179,7 @@ structs:
fields:
fieldOne:
type: BsonSubsetReply
+ unstable: false
OldVariantTypeReply:
description: "This reply contains an old field that has a variant type while the new field
@@ -177,12 +187,14 @@ structs:
fields:
oldVariantTypeReplyField:
type: int
+ unstable: false
NewVariantSubsetReply:
description: "This reply contains a field whose new variant types are a subset
of the old variant types"
fields:
variantSubsetReplyField:
+ unstable: false
type:
variant: [int, string, array<string>]
@@ -191,6 +203,7 @@ structs:
of the old variant types"
fields:
variantSubsetReplyFieldTwo:
+ unstable: false
type:
variant: [int, string, array<string>]
@@ -199,6 +212,7 @@ structs:
with the old variant type"
fields:
variantRecursiveReplyField:
+ unstable: false
type:
variant: [int, intStringBoolToIntString,
array<intStringBoolToIntString>, array<string>]
@@ -208,6 +222,7 @@ structs:
struct type while the old one does"
fields:
variantStructReplyField:
+ unstable: false
type:
variant: [int, string, array<string>]
@@ -216,6 +231,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
+ unstable: false
type:
variant: [int, StructFieldTypeRecursiveReplyTwo,
array<StructFieldTypeRecursiveReplyTwo>, array<string>]
@@ -227,6 +243,7 @@ structs:
unstableToStableOptionalField:
type: string
optional: true
+ unstable: false
CommandParamStructRecursiveTwo:
description: "This command parameter struct type contains a field whose new type is
@@ -234,6 +251,7 @@ structs:
fields:
supersetField:
type: intToIntString
+ unstable: false
OldValidatorStruct:
description: "This struct contains a field where the old version contains a validator while
@@ -241,12 +259,14 @@ structs:
fields:
oldValidatorField:
type: int
+ unstable: false
ValidatorsEqualStruct:
description: "This struct contains a field where the new and old validator are exactly equal"
fields:
validatorsEqualField:
type: double
+ unstable: false
validator:
lt: 0.0
gt: -1.1
@@ -264,6 +284,7 @@ structs:
addedOptionalTypeField:
type: string
optional: true
+ unstable: false
StableOptionalTypeFieldStruct:
description: "This struct contains a field that is stable and optional in the new version
@@ -272,6 +293,7 @@ structs:
stableOptionalTypeField:
type: string
optional: true
+ unstable: false
StableWithDefaultTypeFieldStruct:
description: "This struct contains a field that is stable and required with a default value
@@ -280,6 +302,7 @@ structs:
stableWithDefaultTypeField:
type: string
default: ""
+ unstable: false
RemovedUnstableTypeFieldStruct:
description: "This struct contains a field that is unstable in the old version and
@@ -299,18 +322,21 @@ structs:
keptUnstableTypeField:
type: string
unstable: true
+
StructCommandParameterTypeRecursive:
description: "This param struct type contains a field that is compatible between the
old and new versions"
fields:
structCommandParameterTypeRecursiveField:
type: intStringToIntStringBool
+ unstable: false
VariantSupersetStruct:
description: "This struct contains a field where the new variant types are a superset
of the old variant types"
fields:
variantSupersetField:
+ unstable: false
type:
variant: [int, bool, string, array<string>]
@@ -319,6 +345,7 @@ structs:
of the old variant types"
fields:
variantSupersetFieldTwo:
+ unstable: false
type:
variant: [int, bool, string, double, array<string>]
@@ -327,6 +354,7 @@ structs:
old one is not"
fields:
variantField:
+ unstable: false
type:
variant: [int, bool, array<string>]
@@ -335,6 +363,7 @@ structs:
compatible with the old variant types"
fields:
variantRecursiveField:
+ unstable: false
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
@@ -344,6 +373,7 @@ structs:
while the old one does not"
fields:
variantStructSupersetField:
+ unstable: false
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
@@ -353,6 +383,7 @@ structs:
variant struct are compatible"
fields:
variantStructRecursiveField:
+ unstable: false
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
@@ -362,6 +393,7 @@ structs:
fields:
anyTypeField:
type: bsonSerializationTypeAnyAllowed
+ unstable: false
NewlyAddedBsonSerializationTypeAnyReply:
description: "This reply contains a newly added field whose type has a bson_serialization_type
@@ -369,6 +401,7 @@ structs:
fields:
newlyAddedBsonSerializationTypeAnyReplyField:
type: bsonSerializationTypeAnyAllowed
+ unstable: false
OldUnstableTypeChangesReply:
description: "This reply contains a field that is unstable in the old version and has type changes"
@@ -386,6 +419,7 @@ structs:
newlyAddedBsonSerializationTypeAnyStructField:
type: bsonSerializationTypeAnyAllowed
optional: true
+ unstable: false
OldUnstableTypeChangesStruct:
description: "This struct contains a field that is unstable in the old version and has type changes"
@@ -393,6 +427,7 @@ structs:
oldUnstableTypeChangesField:
type: intStringBoolToIntString
optional: true
+ unstable: false
validator:
lt: 0
@@ -401,6 +436,7 @@ structs:
bson serialization types is 'any' and is explicitly allowed"
fields:
anyTypeField:
+ unstable: false
type:
variant: [bsonSerializationTypeAnyAllowed, StructFieldTypeRecursiveReplyTwo,
array<bsonSerializationTypeAnyAllowed>,
@@ -411,6 +447,22 @@ structs:
fields:
ArrayCommandParameter:
type: array<string>
+ unstable: false
+
+ MissingUnstableFieldNewFieldStruct:
+ description: "This struct contains a field that missing the 'unstable' field in the new
+ command."
+ fields:
+ missingUnstableFieldNewField:
+ type: string
+
+ MissingUnstableFieldOldFieldStruct:
+ description: "This struct contains a field that missing the 'unstable' field in the old
+ command."
+ fields:
+ missingUnstableFieldNewField:
+ type: string
+ unstable: false
commands:
testCommand:
@@ -461,6 +513,7 @@ commands:
newParameter:
type: string
optional: true
+ unstable: false
addedCommandParameterStable:
description: "new command has an optional stable parameter that is unstable
@@ -475,6 +528,7 @@ commands:
newOptionalStableParam:
type: string
optional: true
+ unstable: false
addedCommandParameterStableWithDefault:
description: "new command has a required stable parameter with a default value
@@ -489,6 +543,7 @@ commands:
newStableParamWithDefault:
type: string
default: ""
+ unstable: false
removeCommandParameterUnstable:
description: "new command removes parameter that is unstable
@@ -513,6 +568,7 @@ commands:
newOptionalParam:
type: string
optional: true
+ unstable: false
addedUnstableCommandParameter:
description: "new command has a new unstable parameter that did not
@@ -554,6 +610,7 @@ commands:
fields:
compatibleParameter:
type: string
+ unstable: false
newCommandParameterTypeEnumSuperset:
description: "new command passes because its command parameter type is an enum that is
@@ -567,6 +624,7 @@ commands:
fields:
parameterEnumSuperset:
type: EnumSuperset
+ unstable: false
newCommandParameterTypeStruct:
description: "new command passes because its command parameter type is a struct and the
@@ -580,6 +638,7 @@ commands:
fields:
parameterStruct:
type: NewCommandParameterStruct
+ unstable: false
newCommandParameterTypeBsonSuperset:
description: "new command passes because its parameter type has a bson_serialization_type
@@ -594,6 +653,7 @@ commands:
fields:
bsonSupersetParam:
type: intToIntString
+ unstable: false
newCommandParameterTypeStructRecursiveOne:
description: "new command passes because its parameter type is a struct that is
@@ -607,6 +667,7 @@ commands:
fields:
unstableToStableOptionalStructParameter:
type: CommandParamStructRecursiveOne
+ unstable: false
newCommandParameterTypeStructRecursiveTwo:
description: "new command passes because its parameter type is a struct that is
@@ -620,6 +681,7 @@ commands:
fields:
supersetStructParameter:
type: CommandParamStructRecursiveTwo
+ unstable: false
newlyAddedParamBsonAnyAllowList:
description: "command passes when its parameter is newly added and has bson type 'any'
@@ -634,6 +696,7 @@ commands:
newlyAddedBsonAnyAllowListParam:
type: bsonSerializationTypeAnyAllowed
optional: true
+ unstable: false
oldUnstableParamTypeChanges:
description: "command passes when it has an old unstable param with incompatible type changes"
@@ -647,6 +710,7 @@ commands:
oldUnstableTypeChangesParam:
type: intStringBoolToIntString
optional: true
+ unstable: false
validator:
lt: 0
@@ -683,6 +747,7 @@ commands:
fields:
newParam:
type: int
+ unstable: false
commandParameterValidatorsEqual:
description: "new command passes because it contains a parameter that contains a validator
@@ -696,6 +761,7 @@ commands:
fields:
newParam:
type: double
+ unstable: false
validator:
lt: 0.0
gt: -1.1
@@ -1063,6 +1129,7 @@ commands:
fields:
anyTypeParam:
type: bsonSerializationTypeAnyAllowed
+ unstable: false
commandAllowedAnyTypesWithVariant:
description: "command that has reply variant types with
@@ -1085,6 +1152,7 @@ commands:
reply_type: OkReply
fields:
variantSupersetParam:
+ unstable: false
type:
variant: [int, bool, string, array<string>]
@@ -1099,6 +1167,7 @@ commands:
reply_type: OkReply
fields:
variantSupersetParam:
+ unstable: false
type:
variant: [int, string, bool, double, array<string>]
@@ -1113,6 +1182,7 @@ commands:
reply_type: OkReply
fields:
variantParam:
+ unstable: false
type:
variant: [int, string, array<string>]
@@ -1127,6 +1197,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
+ unstable: false
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
@@ -1142,6 +1213,7 @@ commands:
reply_type: OkReply
fields:
variantStructSupersetParam:
+ unstable: false
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
@@ -1158,6 +1230,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
+ unstable: false
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
@@ -1304,6 +1377,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
complexActionTypesSubset:
@@ -1380,3 +1454,72 @@ commands:
reply_type: OkReply
access_check:
none: true
+
+ newReplyFieldMissingUnstableField:
+ description: "new command passes because it does not have an api_version even though it
+ contains a reply field that is missing the 'unstable' field"
+ command_name: newReplyFieldMissingUnstableField
+ namespace: ignored
+ cpp_name: newReplyFieldMissingUnstableField
+ strict: true
+ api_version: ""
+ reply_type: MissingUnstableFieldNewFieldStruct
+
+ oldReplyFieldMissingUnstableField:
+ description: "old command passes even though it contains a reply field that is missing the
+ 'unstable' field"
+ command_name: oldReplyFieldMissingUnstableField
+ namespace: ignored
+ cpp_name: oldReplyFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: MissingUnstableFieldOldFieldStruct
+
+ newCommandTypeFieldMissingUnstableField:
+ description: "new command passes because it does not have an api_version even though it
+ contains a command type field that is missing the 'unstable' field"
+ command_name: newCommandTypeFieldMissingUnstableField
+ namespace: type
+ cpp_name: newCommandTypeFieldMissingUnstableField
+ strict: true
+ api_version: ""
+ type: MissingUnstableFieldNewFieldStruct
+ reply_type: OkReply
+
+ oldCommandTypeFieldMissingUnstableField:
+ description: "old command passes even though it
+ contains a command type field that is missing the 'unstable' field"
+ command_name: oldCommandTypeFieldMissingUnstableField
+ namespace: type
+ cpp_name: oldCommandTypeFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ type: MissingUnstableFieldOldFieldStruct
+ reply_type: OkReply
+
+ newParameterMissingUnstableField:
+ description: "new command passes because it does not have an api_version even though it
+ contains a parameter that is missing the 'unstable' field"
+ command_name: newParameterMissingUnstableField
+ namespace: ignored
+ cpp_name: newParameterMissingUnstableField
+ strict: true
+ api_version: ""
+ fields:
+ missingUnstableFieldNewParameter:
+ type: int
+ reply_type: OkReply
+
+ oldParameterMissingUnstableField:
+ description: "old command passes even though it
+ contains a parameter that is missing the 'unstable' field"
+ command_name: oldParameterMissingUnstableField
+ namespace: ignored
+ cpp_name: oldParameterMissingUnstableField
+ strict: true
+ api_version: "1"
+ fields:
+ missingUnstableFieldOldParameter:
+ type: int
+ unstable: false
+ reply_type: OkReply
diff --git a/buildscripts/idl/tests/compatibility_test_pass/new/error_reply.idl b/buildscripts/idl/tests/compatibility_test_pass/new/error_reply.idl
index f3ce17e3d44..3023ee8f40a 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/new/error_reply.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/new/error_reply.idl
@@ -40,6 +40,7 @@ structs:
fields:
errorLabels:
type: StructType
+ unstable: false
StructType:
description: "This struct contains a field that is optional in the old
@@ -48,3 +49,4 @@ structs:
structField:
type: string
optional: true
+ unstable: false
diff --git a/buildscripts/idl/tests/compatibility_test_pass/new/imports.idl b/buildscripts/idl/tests/compatibility_test_pass/new/imports.idl
index fb80d2258f6..2fbf1045dc7 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/new/imports.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/new/imports.idl
@@ -39,6 +39,7 @@ structs:
fields:
stableNewField:
type: string
+ unstable: false
commands:
importCommand:
@@ -48,4 +49,4 @@ commands:
cpp_name: importCommand
strict: true
api_version: "1"
- reply_type: OkReply \ No newline at end of file
+ reply_type: OkReply
diff --git a/buildscripts/idl/tests/compatibility_test_pass/old/compatibility_test_pass_old.idl b/buildscripts/idl/tests/compatibility_test_pass/old/compatibility_test_pass_old.idl
index 5c7535c3e23..e866dbc24e0 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/old/compatibility_test_pass_old.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/old/compatibility_test_pass_old.idl
@@ -108,6 +108,7 @@ structs:
requiredNewField:
type: string
optional: true
+ unstable: false
OptionalNewField:
description: "This struct contains a field that is required in the old command but is
@@ -115,6 +116,7 @@ structs:
fields:
optionalNewField:
type: string
+ unstable: false
AddedNewFieldReply:
description: "This reply contains a field that is added in the new command."
@@ -133,6 +135,7 @@ structs:
fields:
replyField:
type: NewReplyFieldEnumSubset
+ unstable: false
BsonSubsetReply:
description: "This reply contains a field type where the new bson_serialization_type
@@ -140,6 +143,7 @@ structs:
fields:
bsonSubsetReplyField:
type: intStringToInt
+ unstable: false
BsonSubsetReplyTwo:
description: "This reply contains a field type where the new bson_serialization_type
@@ -147,6 +151,7 @@ structs:
fields:
bsonSubsetReplyFieldTwo:
type: intStringBoolToIntString
+ unstable: false
StructFieldTypeRecursiveReplyOne:
description: "This reply contains a field whose new type is a struct that is
@@ -154,6 +159,7 @@ structs:
fields:
structReplyField:
type: StableNewFieldReply
+ unstable: false
StructFieldTypeRecursiveReplyTwo:
description: "This reply contains a field whose new type is a struct that is
@@ -161,6 +167,7 @@ structs:
fields:
structReplyField:
type: StructType
+ unstable: false
StructType:
description: "This struct contains a field whose new type is compatible with the
@@ -168,12 +175,14 @@ structs:
fields:
fieldOne:
type: BsonSubsetReply
+ unstable: false
OldVariantTypeReply:
description: "This reply contains an old field that has a variant type while the new field
is not a variant type"
fields:
oldVariantTypeReplyField:
+ unstable: false
type:
variant: [int, string, array<string>]
@@ -182,6 +191,7 @@ structs:
of the old variant types"
fields:
variantSubsetReplyField:
+ unstable: false
type:
variant: [int, bool, string, array<string>]
@@ -190,6 +200,7 @@ structs:
of the old variant types"
fields:
variantSubsetReplyFieldTwo:
+ unstable: false
type:
variant: [int, string, bool, double, array<string>]
@@ -198,6 +209,7 @@ structs:
with the old variant type"
fields:
variantRecursiveReplyField:
+ unstable: false
type:
variant: [int, intStringBoolToIntString,
array<intStringBoolToIntString>, array<string>]
@@ -207,6 +219,7 @@ structs:
struct type while the old one does"
fields:
variantStructReplyField:
+ unstable: false
type:
variant: [int, string, StructType, array<StructType>, array<string>]
@@ -215,6 +228,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
+ unstable: false
type:
variant: [int, StructFieldTypeRecursiveReplyTwo,
array<StructFieldTypeRecursiveReplyTwo>, array<string>]
@@ -237,6 +251,7 @@ structs:
fields:
supersetField:
type: intToIntString
+ unstable: false
OldValidatorStruct:
description: "This struct contains a field where the old version contains a validator while
@@ -244,6 +259,7 @@ structs:
fields:
oldValidatorField:
type: int
+ unstable: false
validator:
lt: 0
@@ -252,6 +268,7 @@ structs:
fields:
validatorsEqualField:
type: double
+ unstable: false
validator:
lt: 0.0
gt: -1.1
@@ -296,18 +313,21 @@ structs:
keptUnstableTypeField:
type: string
unstable: true
+
StructCommandParameterTypeRecursive:
description: "This param struct type contains a field that is compatible between the
old and new versions"
fields:
structCommandParameterTypeRecursiveField:
type: intStringToIntStringBool
+ unstable: false
VariantSupersetStruct:
description: "This struct contains a field where the new variant types are a superset
of the old variant types"
fields:
variantSupersetField:
+ unstable: false
type:
variant: [int, bool, array<string>]
@@ -316,6 +336,7 @@ structs:
of the old variant types"
fields:
variantSupersetFieldTwo:
+ unstable: false
type:
variant: [int, bool, array<string>]
@@ -325,12 +346,14 @@ structs:
fields:
variantField:
type: int
+ unstable: false
VariantRecursiveStruct:
description: "This struct contains a field where the new variant types are
compatible with the old variant types"
fields:
variantRecursiveField:
+ unstable: false
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
@@ -340,6 +363,7 @@ structs:
while the old one does not"
fields:
variantStructSupersetField:
+ unstable: false
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
@@ -349,6 +373,7 @@ structs:
variant struct are compatible"
fields:
variantStructRecursiveField:
+ unstable: false
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
@@ -358,6 +383,7 @@ structs:
fields:
anyTypeField:
type: bsonSerializationTypeAnyAllowed
+ unstable: false
NewlyAddedBsonSerializationTypeAnyReply:
description: "This reply contains a newly added field whose type has a bson_serialization_type
@@ -386,6 +412,7 @@ structs:
bson serialization types is 'any' and is explicitly allowed"
fields:
anyTypeField:
+ unstable: false
type:
variant: [intStringBoolToIntString,
bsonSerializationTypeAnyAllowed,
@@ -399,6 +426,22 @@ structs:
fields:
ArrayCommandParameter:
type: array<string>
+ unstable: false
+
+ MissingUnstableFieldNewFieldStruct:
+ description: "This struct contains a field that missing the 'unstable' field in the new
+ command."
+ fields:
+ missingUnstableFieldNewField:
+ type: string
+ unstable: true
+
+ MissingUnstableFieldOldFieldStruct:
+ description: "This struct contains a field that missing the 'unstable' field in the old
+ command."
+ fields:
+ missingUnstableFieldNewField:
+ type: string
commands:
testCommand:
@@ -501,6 +544,7 @@ commands:
newOptionalParam:
type: string
optional: false
+ unstable: false
addedUnstableCommandParameter:
description: "new command has a new unstable parameter that does not
@@ -538,6 +582,7 @@ commands:
fields:
compatibleParameter:
type: string
+ unstable: false
newCommandParameterTypeEnumSuperset:
description: "new command passes because its command parameter type is an enum that is
@@ -551,6 +596,7 @@ commands:
fields:
parameterEnumSuperset:
type: EnumSuperset
+ unstable: false
newCommandParameterTypeStruct:
description: "new command passes because its command parameter type is a struct and the
@@ -564,6 +610,7 @@ commands:
fields:
parameterStruct:
type: NewCommandParameterStruct
+ unstable: false
newCommandParameterTypeBsonSuperset:
description: "new command passes because its parameter type has a bson_serialization_type
@@ -578,6 +625,7 @@ commands:
fields:
bsonSupersetParam:
type: intToIntString
+ unstable: false
newCommandParameterTypeStructRecursiveOne:
description: "new command passes because its parameter type is a struct that is
@@ -591,6 +639,7 @@ commands:
fields:
unstableToStableOptionalStructParameter:
type: CommandParamStructRecursiveOne
+ unstable: false
newCommandParameterTypeStructRecursiveTwo:
description: "new command passes because its parameter type is a struct that is
@@ -604,6 +653,7 @@ commands:
fields:
supersetStructParameter:
type: CommandParamStructRecursiveTwo
+ unstable: false
newlyAddedParamBsonAnyAllowList:
description: "command passes when its parameter is newly added and has bson type 'any'
@@ -661,6 +711,7 @@ commands:
fields:
newParam:
type: int
+ unstable: false
validator:
lt: 0
@@ -676,6 +727,7 @@ commands:
fields:
newParam:
type: double
+ unstable: false
validator:
lt: 0.0
gt: -1.1
@@ -1046,6 +1098,7 @@ commands:
fields:
anyTypeParam:
type: bsonSerializationTypeAnyAllowed
+ unstable: false
commandAllowedAnyTypesWithVariant:
description: "command that has reply variant types with
@@ -1068,6 +1121,7 @@ commands:
reply_type: OkReply
fields:
variantSupersetParam:
+ unstable: false
type:
variant: [int, bool, string, array<string>]
@@ -1082,6 +1136,7 @@ commands:
reply_type: OkReply
fields:
variantSupersetParam:
+ unstable: false
type:
variant: [int, string, bool, double, array<string>]
@@ -1096,6 +1151,7 @@ commands:
reply_type: OkReply
fields:
variantParam:
+ unstable: false
type:
variant: [int, string, array<string>]
@@ -1110,6 +1166,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
+ unstable: false
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
@@ -1125,6 +1182,7 @@ commands:
reply_type: OkReply
fields:
variantStructSupersetParam:
+ unstable: false
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
@@ -1141,6 +1199,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
+ unstable: false
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
@@ -1287,6 +1346,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
+ unstable: false
reply_type: ArrayTypeStruct
complexActionTypesSubset:
@@ -1366,3 +1426,72 @@ commands:
strict: true
api_version: ""
reply_type: OkReply
+
+ newReplyFieldMissingUnstableField:
+ description: "new command passes because it does not have an api_version even though it
+ contains a reply field that is missing the 'unstable' field"
+ command_name: newReplyFieldMissingUnstableField
+ namespace: ignored
+ cpp_name: newReplyFieldMissingUnstableField
+ strict: true
+ api_version: ""
+ reply_type: MissingUnstableFieldNewFieldStruct
+
+ oldReplyFieldMissingUnstableField:
+ description: "old command passes even though it
+ contains a reply field that is missing the 'unstable' field"
+ command_name: oldReplyFieldMissingUnstableField
+ namespace: ignored
+ cpp_name: oldReplyFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ reply_type: MissingUnstableFieldOldFieldStruct
+
+ newCommandTypeFieldMissingUnstableField:
+ description: "new command passes because it does not have an api_version even though it
+ contains a command type field that is missing the 'unstable' field"
+ command_name: newCommandTypeFieldMissingUnstableField
+ namespace: type
+ cpp_name: newCommandTypeFieldMissingUnstableField
+ strict: true
+ api_version: ""
+ type: MissingUnstableFieldNewFieldStruct
+ reply_type: OkReply
+
+ oldCommandTypeFieldMissingUnstableField:
+ description: "old command passes even though it
+ contains a command type field that is missing the 'unstable' field"
+ command_name: oldCommandTypeFieldMissingUnstableField
+ namespace: type
+ cpp_name: oldCommandTypeFieldMissingUnstableField
+ strict: true
+ api_version: "1"
+ type: MissingUnstableFieldOldFieldStruct
+ reply_type: OkReply
+
+ newParameterMissingUnstableField:
+ description: "new command passes because it does not have an api_version even though it
+ contains a parameter that is missing the 'unstable' field"
+ command_name: newParameterMissingUnstableField
+ namespace: ignored
+ cpp_name: newParameterMissingUnstableField
+ strict: true
+ api_version: ""
+ fields:
+ missingUnstableFieldNewParameter:
+ type: int
+ unstable: false
+ reply_type: OkReply
+
+ oldParameterMissingUnstableField:
+ description: "old command passes even though it
+ contains a parameter that is missing the 'unstable' field"
+ command_name: oldParameterMissingUnstableField
+ namespace: ignored
+ cpp_name: oldParameterMissingUnstableField
+ strict: true
+ api_version: "1"
+ fields:
+ missingUnstableFieldOldParameter:
+ type: int
+ reply_type: OkReply
diff --git a/buildscripts/idl/tests/compatibility_test_pass/old/error_reply.idl b/buildscripts/idl/tests/compatibility_test_pass/old/error_reply.idl
index dd39271420f..f99aec3cb26 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/old/error_reply.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/old/error_reply.idl
@@ -40,6 +40,7 @@ structs:
fields:
errorLabels:
type: StructType
+ unstable: false
StructType:
description: "This struct contains a field that is optional in the old
@@ -48,3 +49,4 @@ structs:
structField:
type: string
optional: true
+ unstable: false
diff --git a/buildscripts/idl/tests/compatibility_test_pass/old/imports.idl b/buildscripts/idl/tests/compatibility_test_pass/old/imports.idl
index bc6c8a69d30..0c3edc28bd5 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/old/imports.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/old/imports.idl
@@ -49,4 +49,4 @@ commands:
cpp_name: importCommand
strict: true
api_version: "1"
- reply_type: OkReply \ No newline at end of file
+ reply_type: OkReply
diff --git a/buildscripts/idl/tests/test_compatibility.py b/buildscripts/idl/tests/test_compatibility.py
index 26a696f16fe..b8265e75284 100644
--- a/buildscripts/idl/tests/test_compatibility.py
+++ b/buildscripts/idl/tests/test_compatibility.py
@@ -92,7 +92,7 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
path.join(dir_path, "compatibility_test_fail/new"), ["src"], ["src"])
self.assertTrue(error_collection.has_errors())
- self.assertEqual(error_collection.count(), 170)
+ self.assertEqual(error_collection.count(), 176)
invalid_api_version_new_error = error_collection.get_error_by_command_name(
"invalidAPIVersionNew")
@@ -1248,6 +1248,52 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
idl_compatibility_errors.ERROR_ID_TYPE_NOT_ARRAY)
self.assertRegex(str(missing_array_command_parameter_new_error), "array<ArrayTypeStruct>")
+ new_reply_field_missing_unstable_field_error = error_collection.get_error_by_command_name(
+ "newReplyFieldMissingUnstableField")
+ self.assertTrue(new_reply_field_missing_unstable_field_error.error_id ==
+ idl_compatibility_errors.ERROR_ID_NEW_REPLY_FIELD_REQUIRES_UNSTABLE)
+ self.assertRegex(
+ str(new_reply_field_missing_unstable_field_error), "newReplyFieldMissingUnstableField")
+
+ new_command_type_field_missing_unstable_field_error = error_collection.get_error_by_command_name(
+ "newCommandTypeFieldMissingUnstableField")
+ self.assertTrue(new_command_type_field_missing_unstable_field_error.error_id ==
+ idl_compatibility_errors.ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_UNSTABLE)
+ self.assertRegex(
+ str(new_command_type_field_missing_unstable_field_error),
+ "newCommandTypeFieldMissingUnstableField")
+
+ new_parameter_missing_unstable_field_error = error_collection.get_error_by_command_name(
+ "newParameterMissingUnstableField")
+ self.assertTrue(new_parameter_missing_unstable_field_error.error_id ==
+ idl_compatibility_errors.ERROR_ID_NEW_PARAMETER_REQUIRES_UNSTABLE)
+ self.assertRegex(
+ str(new_parameter_missing_unstable_field_error), "newParameterMissingUnstableField")
+
+ added_new_reply_field_missing_unstable_field_error = error_collection.get_error_by_command_name(
+ "addedNewReplyFieldMissingUnstableField")
+ self.assertTrue(added_new_reply_field_missing_unstable_field_error.error_id ==
+ idl_compatibility_errors.ERROR_ID_NEW_REPLY_FIELD_REQUIRES_UNSTABLE)
+ self.assertRegex(
+ str(added_new_reply_field_missing_unstable_field_error),
+ "addedNewReplyFieldMissingUnstableField")
+
+ added_new_command_type_field_missing_unstable_field_error = error_collection.get_error_by_command_name(
+ "addedNewCommandTypeFieldMissingUnstableField")
+ self.assertTrue(added_new_command_type_field_missing_unstable_field_error.error_id ==
+ idl_compatibility_errors.ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_UNSTABLE)
+ self.assertRegex(
+ str(added_new_command_type_field_missing_unstable_field_error),
+ "addedNewCommandTypeFieldMissingUnstableField")
+
+ added_new_parameter_missing_unstable_field_error = error_collection.get_error_by_command_name(
+ "addedNewParameterMissingUnstableField")
+ self.assertTrue(added_new_parameter_missing_unstable_field_error.error_id ==
+ idl_compatibility_errors.ERROR_ID_NEW_PARAMETER_REQUIRES_UNSTABLE)
+ self.assertRegex(
+ str(added_new_parameter_missing_unstable_field_error),
+ "addedNewParameterMissingUnstableField")
+
def test_generic_argument_compatibility_pass(self):
"""Tests that compatible old and new generic_argument.idl files should pass."""
dir_path = path.dirname(path.realpath(__file__))
diff --git a/src/mongo/db/auth/sasl_commands.idl b/src/mongo/db/auth/sasl_commands.idl
index 4c2bd66e02a..3066f3a287d 100644
--- a/src/mongo/db/auth/sasl_commands.idl
+++ b/src/mongo/db/auth/sasl_commands.idl
@@ -50,12 +50,15 @@ structs:
# In practice, this field is always populated as 1.
description: "Unique identifier for this SASL authentication session"
type: int
+ unstable: false
done:
description: "Whether or not the authentication has completed"
type: bool
+ unstable: false
payload:
description: "SASL payload"
type: SaslPayload
+ unstable: false
commands:
saslStart:
@@ -72,18 +75,22 @@ commands:
mechanism:
description: "SASL mechanism used for authentication"
type: string
+ unstable: false
autoAuthorize:
# This field is ignored and assumed to always be true.
description: "Automatically authorized user once authenticated"
type: safeBool
default: true
+ unstable: false
options:
description: "SASL mechanism specific options"
type: object_owned
optional: true
+ unstable: false
payload:
description: "Initial client message for SASL exchange"
type: SaslPayload
+ unstable: false
saslContinue:
description: "Continue a SASL based authentication session"
@@ -100,6 +107,8 @@ commands:
# This field is expected to be 1, any other value generates an error.
description: "Unique identifier for this SASL authentication session"
type: int
+ unstable: false
payload:
description: "SASL payload"
type: SaslPayload
+ unstable: false
diff --git a/src/mongo/db/catalog/clustered_collection_options.idl b/src/mongo/db/catalog/clustered_collection_options.idl
index 5a69785e0e6..a900e157898 100644
--- a/src/mongo/db/catalog/clustered_collection_options.idl
+++ b/src/mongo/db/catalog/clustered_collection_options.idl
@@ -41,15 +41,19 @@ structs:
description: 'Index spec version'
type: safeInt
default: 2
+ unstable: false
key:
description: 'Key to index on'
type: object_owned
+ unstable: false
name:
description: 'Descriptive name for the index'
type: string
optional: true
+ unstable: false
unique:
type: safeBool
+ unstable: false
ClusteredCollectionInfo:
description: "Information on how a collection is clustered. For internal use only"
diff --git a/src/mongo/db/catalog/collection_options.idl b/src/mongo/db/catalog/collection_options.idl
index c5212a963db..9e9ad5762a6 100644
--- a/src/mongo/db/catalog/collection_options.idl
+++ b/src/mongo/db/catalog/collection_options.idl
@@ -59,5 +59,6 @@ structs:
description: "The index options for the specified storage engines."
type: object_owned
optional: true
+ unstable: false
validator:
callback: collection_options_validation::validateStorageEngineOptions
diff --git a/src/mongo/db/coll_mod.idl b/src/mongo/db/coll_mod.idl
index 891e37dcf2a..49fdfd6471d 100644
--- a/src/mongo/db/coll_mod.idl
+++ b/src/mongo/db/coll_mod.idl
@@ -46,15 +46,19 @@ structs:
name:
optional: true
type: string
+ unstable: false
keyPattern:
optional: true
type: object
+ unstable: false
expireAfterSeconds:
optional: true
type: safeInt
+ unstable: false
hidden:
optional: true
type: safeBool
+ unstable: false
unique:
optional: true
type: safeBool
@@ -67,15 +71,19 @@ structs:
expireAfterSeconds_old:
optional: true
type: safeInt
+ unstable: false
expireAfterSeconds_new:
optional: true
type: safeInt
+ unstable: false
hidden_old:
optional: true
type: safeBool
+ unstable: false
hidden_new:
optional: true
type: safeBool
+ unstable: false
unique_new:
optional: true
type: safeBool
@@ -103,27 +111,32 @@ commands:
description: "Index to be modified."
optional: true
type: CollModIndex
+ unstable: false
validator:
description: "Specify validation rules or expressions for the collection."
type: object
optional: true
+ unstable: false
validationLevel:
description: "Determines how strictly to apply the validation rules to existing
documents during an update.
Can be one of following values: 'off', 'strict' or 'moderate'."
type: ValidationLevel
optional: true
+ unstable: false
validationAction:
description: "Determines whether to error on invalid documents or just warn about
the violations but allow invalid documents to be inserted.
Can be either 'warn' or 'error'."
type: ValidationAction
optional: true
+ unstable: false
viewOn:
description: "The name of the source collection or view that
'namespace' is based off of."
type: string
optional: true
+ unstable: false
validator:
callback: create_command_validation::validateViewOnNotEmpty
pipeline:
@@ -132,11 +145,13 @@ commands:
view."
type: array<object>
optional: true
+ unstable: false
recordPreImages:
description: "Sets whether updates/deletes should store the pre-image of the
document in the oplog"
optional: true
type: safeBool
+ unstable: false
changeStreamPreAndPostImages:
description: "The options for point-in-time pre- and post-images in change streams opened on this collection."
type: ChangeStreamPreAndPostImagesOptions
@@ -146,18 +161,21 @@ commands:
description: "The number of seconds after which old data should be deleted. This can
be disabled by passing in 'off' as a value"
optional: true
+ unstable: false
type:
variant: [string, safeInt64]
timeseries:
description: "Adjusts parameters for timeseries collections"
optional: true
type: CollModTimeseries
+ unstable: false
isTimeseriesNamespace:
description: "This flag is set to true when the command was originally sent to
mongos on the time-series view, but got rewritten to target
time-series buckets namespace before being sent to shards."
optional: true
type: bool
+ unstable: false
dryRun:
description: "Runs the requested modification without modifying any database state.
This can be used to determine in advance if a particular collMod
diff --git a/src/mongo/db/commands/authentication_commands.idl b/src/mongo/db/commands/authentication_commands.idl
index 59a1bfb5f41..1ed2b76e540 100644
--- a/src/mongo/db/commands/authentication_commands.idl
+++ b/src/mongo/db/commands/authentication_commands.idl
@@ -40,9 +40,11 @@ structs:
dbname:
description: "Name of the database the user is authenticating to"
type: "string"
+ unstable: false
user:
description: "Username"
type: "string"
+ unstable: false
commands:
authenticate:
@@ -59,10 +61,12 @@ commands:
mechanism:
description: "Mechanism used for authentication. Should be 'MONGODB-X509'."
type: string
+ unstable: false
user:
description: "The user attempting to authenticate"
type: string
optional: true
+ unstable: false
logout:
description: "Deauthenticate from the current database"
diff --git a/src/mongo/db/commands/create.idl b/src/mongo/db/commands/create.idl
index fde1136bf28..a824d3ae167 100644
--- a/src/mongo/db/commands/create.idl
+++ b/src/mongo/db/commands/create.idl
@@ -48,6 +48,7 @@ structs:
description: 'Warnings or other additional information'
type: string
optional: true
+ unstable: false
commands:
create:
@@ -84,6 +85,7 @@ commands:
must also set a maximum size in the 'size' field."
type: safeBool
default: false
+ unstable: false
autoIndexId:
description: "Specify false to disable the automatic creation of an index on the
_id field."
@@ -94,6 +96,7 @@ commands:
description: "Specify the default _id index specification."
type: object
optional: true
+ unstable: false
size:
description: "Specify a maximum size in bytes for the capped collection."
type: safeInt64
@@ -120,18 +123,21 @@ commands:
description: "Specify validation rules or expressions for the collection."
type: object
optional: true
+ unstable: false
validationLevel:
description: "Determines how strictly to apply the validation rules to existing
documents during an update.
Can be one of following values: 'off', 'strict' or 'moderate'."
type: ValidationLevel
optional: true
+ unstable: false
validationAction:
description: "Determines whether to error on invalid documents or just warn about
the violations but allow invalid documents to be inserted.
Can be either 'warn' or 'error'."
type: ValidationAction
optional: true
+ unstable: false
indexOptionDefaults:
description: "Allows users to specify a default configuration for indexes when
creating a collection."
@@ -143,6 +149,7 @@ commands:
view."
type: string
optional: true
+ unstable: false
validator:
callback: create_command_validation::validateViewOnNotEmpty
pipeline:
@@ -151,10 +158,12 @@ commands:
view."
type: array<object>
optional: true
+ unstable: false
collation:
description: "Specifies the default collation for the collection or the view."
type: Collation
optional: true
+ unstable: false
recordPreImages:
description: "Sets whether updates/deletes should store the pre-image of the
document in the oplog"
@@ -170,6 +179,7 @@ commands:
description: "The options to create the time-series collection with."
type: TimeseriesOptions
optional: true
+ unstable: false
clusteredIndex:
description: "Specifies whether this collection should have a clusteredIndex.
Boolean is accepted as the legacy clustered index format for specific internal
@@ -178,10 +188,12 @@ commands:
type:
variant: [safeBool, ClusteredIndexSpec]
optional: true
+ unstable: false
expireAfterSeconds:
description: "The number of seconds after which old data should be deleted."
type: safeInt64
optional: true
+ unstable: false
temp:
description: "DEPRECATED"
type: safeBool
diff --git a/src/mongo/db/commands/list_databases.idl b/src/mongo/db/commands/list_databases.idl
index 3ae7eb47d4d..899ab5a011a 100644
--- a/src/mongo/db/commands/list_databases.idl
+++ b/src/mongo/db/commands/list_databases.idl
@@ -38,27 +38,36 @@ structs:
ListDatabasesReplyItem:
description: "Individual result"
fields:
- name: string
+ name:
+ type: string
+ unstable: false
sizeOnDisk:
type: long
optional: true
+ unstable: false
empty:
type: bool
optional: true
+ unstable: false
shards:
type: object_owned
optional: true
+ unstable: false
ListDatabasesReply:
description: "The listDatabases command's reply."
fields:
- databases: array<ListDatabasesReplyItem>
+ databases:
+ type: array<ListDatabasesReplyItem>
+ unstable: false
totalSize:
type: long
optional: true
+ unstable: false
totalSizeMb:
type: long
optional: true
+ unstable: false
commands:
listDatabases:
@@ -79,12 +88,15 @@ commands:
description: "Return just the database name without metadata"
type: safeBool
default: false
+ unstable: false
authorizedDatabases:
description: "Only return those databases for which the user is authorized"
type: bool
optional: true
+ unstable: false
filter:
description: "Filter description to limit results"
type: object
optional: true
+ unstable: false
reply_type: ListDatabasesReply
diff --git a/src/mongo/db/commands/txn_cmds.idl b/src/mongo/db/commands/txn_cmds.idl
index a8ffa5c8b65..61cc3afa783 100644
--- a/src/mongo/db/commands/txn_cmds.idl
+++ b/src/mongo/db/commands/txn_cmds.idl
@@ -51,6 +51,7 @@ structs:
description: "The id of the shard that can make progress committing the transaction"
type: shard_id
optional: true
+ unstable: false
CommitTransactionOplogObject:
description: A document representing the 'o' field of a 'commitTransaction' oplog entry.
@@ -93,11 +94,13 @@ commands:
transactions and illegal for non-prepared ones."
optional: true
type: timestamp
+ unstable: false
recoveryToken:
description: "A mongos that doesn't know about this transaction can attempt to make
progress on commit by processing using the info in the recoveryToken."
optional: true
type: TxnRecoveryToken
+ unstable: false
reply_type: OkReply
abortTransaction:
@@ -115,4 +118,5 @@ commands:
progress on abort by processing using the info in the recoveryToken."
optional: true
type: TxnRecoveryToken
+ unstable: false
reply_type: OkReply
diff --git a/src/mongo/db/create_indexes.idl b/src/mongo/db/create_indexes.idl
index 717da172d55..06a79597970 100644
--- a/src/mongo/db/create_indexes.idl
+++ b/src/mongo/db/create_indexes.idl
@@ -43,24 +43,29 @@ structs:
description: 'Index count before create'
type: int
optional: true
+ unstable: false
numIndexesAfter:
description: 'Index count after create'
type: int
optional: true
+ unstable: false
createdCollectionAutomatically:
description: >-
Whether or not this createIndexes command resulted
in a newly created collection.
type: bool
optional: true
+ unstable: false
commitQuorum:
description: 'Commit Quorum options used'
type: CommitQuorum
optional: true
+ unstable: false
note:
description: 'Optional warning/error related to createIndex'
type: string
optional: true
+ unstable: false
# A built index appears with these fields, which must be the same as ListIndexesReplyItem's
# fields in list_indexes.idl.
@@ -72,16 +77,20 @@ structs:
description: 'Index spec version'
type: safeInt
optional: true
+ unstable: false
key:
description: 'Key to index on'
type: object_owned
+ unstable: false
name:
description: 'Descriptive name for the index'
type: string
+ unstable: false
ns:
# MongoDB 4.2 and older generate this field, see SERVER-41696.
type: string
ignore: true
+ unstable: false
background:
type: safeBool
optional: true
@@ -89,12 +98,15 @@ structs:
unique:
type: safeBool
optional: true
+ unstable: false
hidden:
type: safeBool
optional: true
+ unstable: false
partialFilterExpression:
type: object_owned
optional: true
+ unstable: false
sparse:
type: safeBool
optional: true
@@ -102,6 +114,7 @@ structs:
expireAfterSeconds:
type: safeInt
optional: true
+ unstable: false
storageEngine:
type: object_owned
optional: true
@@ -110,27 +123,35 @@ structs:
type:
variant: [string, object_owned]
optional: true
+ unstable: false
default_language:
type: string
optional: true
+ unstable: false
language_override:
type: string
optional: true
+ unstable: false
textIndexVersion:
type: safeInt
optional: true
+ unstable: false
2dsphereIndexVersion:
type: safeInt
optional: true
+ unstable: false
bits:
type: safeInt
optional: true
+ unstable: false
min:
type: safeDouble
optional: true
+ unstable: false
max:
type: safeDouble
optional: true
+ unstable: false
bucketSize:
type: safeDouble
optional: true
@@ -138,15 +159,19 @@ structs:
collation:
type: object_owned
optional: true
+ unstable: false
wildcardProjection:
type: object_owned
optional: true
+ unstable: false
coarsestIndexedLevel:
type: safeInt
optional: true
+ unstable: false
finestIndexedLevel:
type: safeInt
optional: true
+ unstable: false
dropDups:
type: safeBool
optional: true
@@ -154,6 +179,7 @@ structs:
clustered:
type: safeBool
optional: true
+ unstable: false
commands:
createIndexes:
description: "Command for creating indexes on a collection"
@@ -173,21 +199,26 @@ commands:
description: 'Index schema version'
type: safeInt
default: 2
+ unstable: false
indexes:
description: 'Indexes to be created'
# array<NewIndexSpec> but respect ignoreUnknownIndexOptions
type: array<object>
+ unstable: false
ignoreUnknownIndexOptions:
description: 'Ignore unknown options in index spec'
type: safeBool
default: false
+ unstable: false
commitQuorum:
description: 'Commit Quorum options'
type: CommitQuorum
optional: true
+ unstable: false
isTimeseriesNamespace:
description: "This flag is set to true when the command was originally sent to
mongos on the time-series view, but got rewritten to target
time-series buckets namespace before being sent to shards."
type: bool
optional: true
+ unstable: false
diff --git a/src/mongo/db/drop.idl b/src/mongo/db/drop.idl
index 25c4e731cf3..883e637e775 100644
--- a/src/mongo/db/drop.idl
+++ b/src/mongo/db/drop.idl
@@ -42,16 +42,20 @@ structs:
nIndexesWas:
type: int
optional: true
+ unstable: false
ns:
type: namespacestring
optional: true
+ unstable: false
info:
type: string
optional: true
+ unstable: false
# Include "ok" so mongos can use this struct to parse shard replies.
ok:
type: safeDouble
optional: true
+ unstable: false
commands:
drop:
diff --git a/src/mongo/db/drop_indexes.idl b/src/mongo/db/drop_indexes.idl
index cb4ea9eddb2..ae4c9fe8fd1 100644
--- a/src/mongo/db/drop_indexes.idl
+++ b/src/mongo/db/drop_indexes.idl
@@ -43,10 +43,12 @@ structs:
(mongod only)
type: int
optional: true
+ unstable: false
msg:
description: Optional message (mongod only)
type: string
optional: true
+ unstable: false
commands:
dropIndexes:
@@ -71,10 +73,12 @@ commands:
- string
- array<string>
- object
+ unstable: false
isTimeseriesNamespace:
description: "This flag is set to true when the command was originally sent to
mongos on the time-series view, but got rewritten to target
time-series buckets namespace before being sent to shards."
type: bool
optional: true
+ unstable: false
reply_type: DropIndexesReply
diff --git a/src/mongo/db/explain.idl b/src/mongo/db/explain.idl
index 326854b99cc..6b283135153 100644
--- a/src/mongo/db/explain.idl
+++ b/src/mongo/db/explain.idl
@@ -49,5 +49,6 @@ commands:
description: "The verbosity for explain command."
type: Verbosity
default : kExecAllPlans
+ unstable: false
# Dummy reply type as we won't use it to parse explain reply.
reply_type: OkReply
diff --git a/src/mongo/db/list_collections.idl b/src/mongo/db/list_collections.idl
index 1a2af5a0bff..2cf4be73b2c 100644
--- a/src/mongo/db/list_collections.idl
+++ b/src/mongo/db/list_collections.idl
@@ -44,10 +44,12 @@ structs:
type: bool
description: "If true, the data store is read only."
optional: true
+ unstable: false
uuid:
type: uuid
description: "Unique, immutable collection ID."
optional: true
+ unstable: false
ListCollectionsReplyItem:
description: "Individual result"
@@ -55,33 +57,46 @@ structs:
name:
type: string
description: "Name of the collection."
+ unstable: false
type:
type: string
description: "Type of data store."
+ unstable: false
options:
type: object_owned
description: "Collection options."
optional: true
+ unstable: false
info:
type: ListCollectionsReplyInfo
description: "Information about the collection."
optional: true
+ unstable: false
idIndex:
type: object_owned
description: "Provides information on the _id index for the collection."
optional: true
+ unstable: false
ListCollectionsReplyCursor:
description: "Cursor object"
fields:
- id: long
- ns: namespacestring
- firstBatch: array<ListCollectionsReplyItem>
+ id:
+ type: long
+ unstable: false
+ ns:
+ type: namespacestring
+ unstable: false
+ firstBatch:
+ type: array<ListCollectionsReplyItem>
+ unstable: false
ListCollectionsReply:
description: "The listCollection command's reply."
fields:
- cursor: ListCollectionsReplyCursor
+ cursor:
+ type: ListCollectionsReplyCursor
+ unstable: false
commands:
listCollections:
@@ -104,15 +119,19 @@ commands:
cursor:
type: SimpleCursorOptions
optional: true
+ unstable: false
filter:
type: object
optional: true
+ unstable: false
nameOnly:
type: bool
default: false
+ unstable: false
authorizedCollections:
type: bool
default: false
+ unstable: false
includePendingDrops:
type: safeBool
unstable: true
diff --git a/src/mongo/db/list_indexes.idl b/src/mongo/db/list_indexes.idl
index de56e053b05..dde5cea8ee8 100644
--- a/src/mongo/db/list_indexes.idl
+++ b/src/mongo/db/list_indexes.idl
@@ -49,86 +49,113 @@ structs:
v:
type: safeInt
optional: true
+ unstable: false
key:
type: object_owned
optional: true
+ unstable: false
name:
type: string
optional: true
+ unstable: false
ns:
# MongoDB 4.2 and older generate this field, see SERVER-41696.
type: string
ignore: true
+ unstable: false
background:
type: safeBool
optional: true
+ unstable: false
unique:
type: safeBool
optional: true
+ unstable: false
hidden:
type: safeBool
optional: true
+ unstable: false
partialFilterExpression:
type: object_owned
optional: true
+ unstable: false
sparse:
type: safeBool
optional: true
+ unstable: false
expireAfterSeconds:
type: safeInt
optional: true
+ unstable: false
storageEngine:
type: object_owned
optional: true
+ unstable: false
weights:
type:
variant: [string, object_owned]
optional: true
+ unstable: false
default_language:
type: string
optional: true
+ unstable: false
language_override:
type: string
optional: true
+ unstable: false
textIndexVersion:
type: safeInt
optional: true
+ unstable: false
2dsphereIndexVersion:
type: safeInt
optional: true
+ unstable: false
bits:
type: safeInt
optional: true
+ unstable: false
min:
type: safeDouble
optional: true
+ unstable: false
max:
type: safeDouble
optional: true
+ unstable: false
bucketSize:
type: safeDouble
optional: true
+ unstable: false
collation:
type: object_owned
optional: true
+ unstable: false
wildcardProjection:
type: object_owned
optional: true
+ unstable: false
coarsestIndexedLevel:
type: safeInt
optional: true
+ unstable: false
finestIndexedLevel:
type: safeInt
optional: true
+ unstable: false
dropDups:
type: safeBool
optional: true
+ unstable: false
originalSpec:
type: object_owned
optional: true
+ unstable: false
clustered:
type: safeBool
optional: true
+ unstable: false
#
# An index build in progress appears with these two fields. They're required, but marked
# optional to permit the built index format using the fields above instead.
@@ -136,26 +163,37 @@ structs:
buildUUID:
type: uuid
optional: true
+ unstable: false
spec:
type: NewIndexSpec
optional: true
+ unstable: false
ListIndexesReplyCursor:
description: "Cursor object"
fields:
- id: long
- ns: namespacestring
- firstBatch: array<ListIndexesReplyItem>
+ id:
+ type: long
+ unstable: false
+ ns:
+ type: namespacestring
+ unstable: false
+ firstBatch:
+ type: array<ListIndexesReplyItem>
+ unstable: false
ListIndexesReply:
description: "The listIndexes command's reply."
fields:
- cursor: ListIndexesReplyCursor
+ cursor:
+ type: ListIndexesReplyCursor
+ unstable: false
# Included so mongos can parse shards' listIndexes replies.
ok:
type: safeDouble
validator: { gte: 0.0, lte: 1.0 }
optional: true
+ unstable: false
commands:
listIndexes:
@@ -178,6 +216,7 @@ commands:
cursor:
type: SimpleCursorOptions
optional: true
+ unstable: false
includeBuildUUIDs:
type: safeBool
optional: true
@@ -188,4 +227,5 @@ commands:
time-series buckets namespace before being sent to shards."
type: bool
optional: true
+ unstable: false
reply_type: ListIndexesReply
diff --git a/src/mongo/db/logical_session_id.idl b/src/mongo/db/logical_session_id.idl
index a383c62c6c2..21e14630fbc 100644
--- a/src/mongo/db/logical_session_id.idl
+++ b/src/mongo/db/logical_session_id.idl
@@ -117,10 +117,13 @@ structs:
chained_structs:
InternalSessionFields: InternalSessionFields
fields:
- id: uuid
+ id:
+ type: uuid
+ unstable: false
uid:
type: sha256Block
optional: true
+ unstable: false
OperationSessionInfo:
description: "Parser for serializing sessionId/txnNumber combination"
diff --git a/src/mongo/db/ops/write_ops.idl b/src/mongo/db/ops/write_ops.idl
index 415b50f9ea1..6cb5ec5a196 100644
--- a/src/mongo/db/ops/write_ops.idl
+++ b/src/mongo/db/ops/write_ops.idl
@@ -100,9 +100,11 @@ structs:
index:
description: "Index of the document."
type: int
+ unstable: false
_id:
description: "ID of the document."
type: IDLAnyTypeOwned
+ unstable: false
UpdateCommandReply:
description: "Contains information related to update command reply."
@@ -112,10 +114,12 @@ structs:
description: "An array contains information about upserted documents."
type: array<Upserted>
optional: true
+ unstable: false
nModified:
description: "Number of updated documents."
type: int
default: 0
+ unstable: false
chained_structs:
WriteCommandReplyBase: writeCommandReplyBase
@@ -135,6 +139,7 @@ structs:
write documents that do not meet the validation requirements."
type: safeBool
default: false
+ unstable: false
ordered:
description: "If true, then when an write statement fails, the command returns
without executing the remaining statements. If false, then statements
@@ -142,6 +147,7 @@ structs:
continue with the remaining statements, if any."
type: bool
default: true
+ unstable: false
stmtId:
description: "A statement number relative to the transaction. If this field
is set, the statement ids of the contained operation will be
@@ -149,6 +155,7 @@ structs:
given. This field is mutually exclusive with 'stmtIds'."
type: int
optional: true
+ unstable: false
stmtIds:
description: "An array of statement numbers relative to the transaction. If this
@@ -160,11 +167,13 @@ structs:
with 'stmtId'."
type: array<int>
optional: true
+ unstable: false
isTimeseriesNamespace:
description: "This flag is set to true when the write command was originally sent
to the time-series view, but got rewritten to target time-series
buckets namespace."
type: optionalBool
+ unstable: false
UpdateOpEntry:
description: "Parser for the entries in the 'updates' array of an update command."
@@ -174,42 +183,51 @@ structs:
description: "The query that matches documents to update. Uses the same query
selectors as used in the 'find' operation."
type: object
+ unstable: false
u:
description: "Set of modifications to apply."
type: update_modification
+ unstable: false
c:
description: "Specifies constant values that can be referred to in the pipeline
performing a custom update."
type: object
optional: true
+ unstable: false
arrayFilters:
description: "Specifies which array elements an update modifier should apply to."
type: array<object>
optional: true
+ unstable: false
hint:
description: "Specifies the hint to use for the operation."
type: indexHint
default: mongo::BSONObj()
+ unstable: false
multi:
description: "If true, updates all documents that meet the query criteria. If false,
limits the update to one document which meets the query criteria."
type: bool
default: false
+ unstable: false
upsert:
description: "If true, perform an insert if no documents match the query. If both
upsert and multi are true and no documents match the query, the update
operation inserts only a single document."
type: bool
default: false
+ unstable: false
upsertSupplied:
description: "Only applicable when upsert is true. If set, and if no documents match
the query, the update subsystem will insert the document supplied as
'c.new' rather than generating a new document from the update spec."
type: optionalBool
+ unstable: false
collation:
description: "Specifies the collation to use for the operation."
type: object
optional: true
+ unstable: false
DeleteOpEntry:
description: "Parser for the entries in the 'deletes' array of a delete command."
@@ -219,19 +237,23 @@ structs:
description: "The query that matches documents to delete. Uses the same query
selectors as used in the 'find' operation."
type: object
+ unstable: false
limit:
description: "The number of matching documents to delete. Value of 0 deletes all
matching documents and 1 deletes a single document."
type: multi_delete_bool
cpp_name: multi
+ unstable: false
hint:
description: "Specifies the hint to use for the operation."
type: indexHint
default: mongo::BSONObj()
+ unstable: false
collation:
description: "Specifies the collation to use for the operation."
type: object
optional: true
+ unstable: false
FindAndModifyLastError:
description: "Contains execution details for the findAndModify command"
@@ -239,16 +261,19 @@ structs:
n:
type: int
cpp_name: numDocs
+ unstable: false
description: "The number of documents that were inserted/deleted or matched the
update predicate."
updatedExisting:
type: bool
description: "Whether an existing document was updated."
optional: true
+ unstable: false
upserted:
type: IDLAnyTypeOwned
description: "The _id of the inserted document."
optional: true
+ unstable: false
FindAndModifyCommandReply:
description: "Parser for the response from a `findAndModify` command"
@@ -256,12 +281,14 @@ structs:
fields:
lastErrorObject:
type: FindAndModifyLastError
+ unstable: false
value:
type: object_owned
optional: true
always_serialize: true
description: "The document after the write, if the 'new' field of the request is
true. Otherwise, the document before the write."
+ unstable: false
commands:
@@ -285,6 +312,7 @@ commands:
description: "An array of one or more documents to insert."
type: array<object>
supports_doc_sequence: true
+ unstable: false
update:
description: "Parser for the 'update' command."
@@ -306,17 +334,20 @@ commands:
description: "An array of one or more update statements to perform."
type: array<UpdateOpEntry>
supports_doc_sequence: true
+ unstable: false
let:
description: "A set of user-specified constants used by pipeline-style update
operations and $expr."
type: object
optional: true
+ unstable: false
runtimeConstants:
description: "A legacy way to specify constant variables available during execution.
'let' is now preferred."
cpp_name: legacyRuntimeConstants
type: LegacyRuntimeConstants
optional: true
+ unstable: false
delete:
description: "Parser for the 'delete' command."
@@ -338,16 +369,19 @@ commands:
description: "An array of one or more delete statements to perform."
type: array<DeleteOpEntry>
supports_doc_sequence: true
+ unstable: false
let:
description: "A set of user-specified constants used by $expr."
type: object
optional: true
+ unstable: false
runtimeConstants:
description: "A legacy way to specify constant variables available during execution.
'let' is now preferred."
cpp_name: legacyRuntimeConstants
type: LegacyRuntimeConstants
optional: true
+ unstable: false
findAndModify:
description: "Parser for the 'findAndModify' command."
@@ -369,75 +403,92 @@ commands:
selectors as used in the 'find' operation."
type: object_owned
default: mongo::BSONObj()
+ unstable: false
fields:
description: "A subset of fields to return."
type: object_owned
optional: true
+ unstable: false
sort:
description: "Determines which document the operation modifies if the query selects
multiple documents."
type: object_owned
optional: true
+ unstable: false
batchSize:
description: "Determines the batch size."
type: int
optional: true
+ unstable: false
singleBatch:
description: "Determines if the batch is single."
type: bool
optional: true
+ unstable: false
hint:
description: "Specifies the hint to use for the operation."
type: indexHint
default: mongo::BSONObj()
+ unstable: false
collation:
description: "Specifies the collation to use for the operation."
type: object
optional: true
+ unstable: false
arrayFilters:
description: "Specifies which array elements an update modifier should apply to."
type: array<object>
optional: true
+ unstable: false
remove:
description: "Removes the document specified in the query field."
# We use 'safeBool' here since the field also allows numeric values.
type: safeBool
optional: true
+ unstable: false
update:
description: "Modification to apply."
type: update_modification
optional: true
+ unstable: false
upsert:
description: "If true, perform an insert if no documents match the query. If both
upsert and multi are true and no documents match the query, the update
operation inserts only a single document."
type: safeBool
optional: true
+ unstable: false
new:
description: "When true, returns the modified document rather than the original."
type: safeBool
optional: true
+ unstable: false
stmtId:
description: "The statement number for this findAndModify operation."
type: int
optional: true
+ unstable: false
bypassDocumentValidation:
description: "Enables the operation to bypass document validation. This lets you
write documents that do not meet the validation requirements."
type: safeBool
optional: true
+ unstable: false
let:
description: "A set of user-specified constants used by pipeline-style update
operations and $expr."
type: object
optional: true
+ unstable: false
runtimeConstants:
description: "A collection of values that do not change once computed. These are
used by pipeline-style update operations."
cpp_name: legacyRuntimeConstants
type: LegacyRuntimeConstants
optional: true
+ unstable: false
writeConcern:
description: "Describes the write concern."
type: object
optional: true
+ unstable: false
diff --git a/src/mongo/db/pipeline/aggregate_command.idl b/src/mongo/db/pipeline/aggregate_command.idl
index 41cad7e5d17..d4910565117 100644
--- a/src/mongo/db/pipeline/aggregate_command.idl
+++ b/src/mongo/db/pipeline/aggregate_command.idl
@@ -135,6 +135,7 @@ commands:
pipeline:
description: "An unparsed version of the pipeline."
type: pipeline
+ unstable: false
explain:
description: "Specifies to return the information on the processing of the pipeline."
type: explainVerbosity
@@ -143,45 +144,56 @@ commands:
allowDiskUse:
description: "Enables writing to temporary files."
type: optionalBool
+ unstable: false
cursor:
description: "To indicate a cursor with a non-default batch size."
type: aggregateCursor
default: SimpleCursorOptions()
+ unstable: false
maxTimeMS:
description: "Specifies a time limit in milliseconds for processing operations on a cursor. If you do not specify a value for maxTimeMS, operations will not time out."
type: safeInt64
validator: { gte: 0 }
optional: true
+ unstable: false
bypassDocumentValidation:
description: "True if this should bypass the document validation."
type: safeBool
optional: true
+ unstable: false
readConcern:
description: "Specifies the read concern."
type: object_owned
optional: true
+ unstable: false
collation:
description: "Specifies the collation to use for the operation."
type: object_owned
optional: true
+ unstable: false
hint:
description: "The index name to use or the index specification document."
type: indexHint
optional: true
+ unstable: false
writeConcern:
description: "A document that expresses the write concern to use with the $out or $merge stage."
type: WriteConcern
optional: true
+ unstable: false
let:
description: "A document containing user-specified let parameter constants; i.e. values that do not change once computed."
type: object_owned
optional: true
+ unstable: false
needsMerge:
description: "True if this request represents the shards part of a split pipeline, and should produce mergeable output."
type: optionalBool
+ unstable: false
fromMongos:
description: "True if this request originated from a mongoS."
type: optionalBool
+ unstable: false
$queryOptions:
description: "The unwrapped readPreference object, if one was given to us by the mongos command processor. This object will be empty when no readPreference is specified or if the request does not originate from mongos."
cpp_name: unwrappedReadPref
@@ -197,6 +209,7 @@ commands:
description: "An optional exchange specification for this request. If set it means that the request represents a producer running as a part of the exchange machinery. This is an internal option; we do not expect it to be set on requests from users or drivers."
type: ExchangeSpec
optional: true
+ unstable: false
runtimeConstants:
description: "A legacy way to specify constant variables available during execution. 'let' is now preferred."
type: LegacyRuntimeConstants
diff --git a/src/mongo/db/pipeline/change_stream_pre_and_post_images_options.idl b/src/mongo/db/pipeline/change_stream_pre_and_post_images_options.idl
index 60636347d5c..657242697c9 100644
--- a/src/mongo/db/pipeline/change_stream_pre_and_post_images_options.idl
+++ b/src/mongo/db/pipeline/change_stream_pre_and_post_images_options.idl
@@ -44,3 +44,4 @@ structs:
description: 'Determines whether point-in-time pre- and post-images are available for change streams.'
type: bool
optional: false
+ unstable: false
diff --git a/src/mongo/db/pipeline/exchange_spec.idl b/src/mongo/db/pipeline/exchange_spec.idl
index ae266b51777..5f07f822693 100644
--- a/src/mongo/db/pipeline/exchange_spec.idl
+++ b/src/mongo/db/pipeline/exchange_spec.idl
@@ -50,20 +50,25 @@ structs:
policy:
type: ExchangePolicy
description: A string indicating a policy of how documents are distributed to consumers.
+ unstable: false
consumers:
type: int
description: Number of consumers.
+ unstable: false
orderPreserving:
type: bool
default: false
description: A flag indicating documents are merged while preserving the order.
+ unstable: false
bufferSize:
type: int
default: 16777216
description: The size of exchange buffers.
+ unstable: false
key:
type: object
default: "BSONObj()"
+ unstable: false
description: A key used for document distribution to consumers. The same description as
sorting/sharding. If the document entering the exchange does not have every
field listed here, or if any prefix of any path is multikey (i.e. an array is
@@ -73,8 +78,10 @@ structs:
type: array<object>
optional: true
description: Range/hash split points.
+ unstable: false
consumerIds:
type: array<int>
optional: true
description: Mapping from a range index to a consumer id.
+ unstable: false
diff --git a/src/mongo/db/pipeline/legacy_runtime_constants.idl b/src/mongo/db/pipeline/legacy_runtime_constants.idl
index d596bc3742f..64f14ef05ce 100644
--- a/src/mongo/db/pipeline/legacy_runtime_constants.idl
+++ b/src/mongo/db/pipeline/legacy_runtime_constants.idl
@@ -44,18 +44,22 @@ structs:
cpp_name: localNow
type: date
description: A value of the $$NOW variable.
+ unstable: false
clusterTime:
cpp_name: clusterTime
type: timestamp
description: A value of the $$CLUSTER_TIME variable.
+ unstable: false
jsScope:
cpp_name: jsScope
type: object
optional: true
description: Optional scope variables accessible from internal javacsript expressions.
+ unstable: false
isMapReduce:
cpp_name: isMapReduce
type: bool
optional: true
+ unstable: false
description: When specified, signals that the aggregation pipeline originated from a
mapReduce command.
diff --git a/src/mongo/db/query/cursor_response.idl b/src/mongo/db/query/cursor_response.idl
index 639a3cf3fe4..fef849e3c00 100644
--- a/src/mongo/db/query/cursor_response.idl
+++ b/src/mongo/db/query/cursor_response.idl
@@ -72,6 +72,7 @@ structs:
firstBatch:
description: "The first batch of the cursor."
type: array<object>
+ unstable: false
CursorInitialReply:
description: "A struct representing a initial cursor reply."
@@ -79,10 +80,12 @@ structs:
cursor:
description: "A response cursor object."
type: InitialResponseCursor
+ unstable: false
vars:
description: "An optional field containing additional response information for the query."
type: object
optional: true
+ unstable: false
GetMoreResponseCursor:
description: "A struct representing a subsequent response cursor."
@@ -93,6 +96,7 @@ structs:
nextBatch:
description: "The subsequent batch of the cursor."
type: array<object>
+ unstable: false
CursorGetMoreReply:
description: "A struct representing a getMore cursor reply."
@@ -100,3 +104,4 @@ structs:
cursor:
description: "A response cursor object."
type: GetMoreResponseCursor
+ unstable: false
diff --git a/src/mongo/db/query/find_command.idl b/src/mongo/db/query/find_command.idl
index 5b9f956144a..2760dcb9c2b 100644
--- a/src/mongo/db/query/find_command.idl
+++ b/src/mongo/db/query/find_command.idl
@@ -89,36 +89,44 @@ commands:
description: "The query predicate. If unspecified, then all documents in the collection
will match the predicate."
type: object_owned_nonempty_serialize
+ unstable: false
projection:
description: "The projection specification to determine which fields to include in the
returned documents."
type: object_owned_nonempty_serialize
+ unstable: false
sort:
description: "The sort specification for the ordering of the results."
type: object_owned_nonempty_serialize
+ unstable: false
hint:
description: "Specify either the index name as a string or the index key pattern. If
specified, then the query system will only consider plans using the hinted index."
type: indexHint
default: mongo::BSONObj()
+ unstable: false
collation:
description: "Specifies the collation to use for the operation."
type: object_owned_nonempty_serialize
+ unstable: false
skip:
description: "Number of documents to skip."
type: safeInt64
optional: true
validator: { gte: 0 }
+ unstable: false
limit:
description: "The maximum number of documents to return."
type: safeInt64
optional: true
validator: { gte: 0 }
+ unstable: false
batchSize:
description: "The number of documents to return in the first batch."
type: safeInt64
optional: true
validator: { gte: 0 }
+ unstable: false
ntoreturn:
description: "Deprecated. Should use batchSize."
type: safeInt64
@@ -128,10 +136,12 @@ commands:
singleBatch:
description: "Determines whether to close the cursor after the first batch."
type: optionalBool
+ unstable: false
allowDiskUse:
description: "Use allowDiskUse to allow MongoDB to use temporary files on disk to store
data exceeding the 100 megabyte memory limit while processing a blocking sort operation."
type: optionalBool
+ unstable: false
min:
description: "The inclusive lower bound for a specific index."
type: object_owned_nonempty_serialize
@@ -176,10 +186,12 @@ commands:
getMore commands) to return partial results, rather than an error, if one or more queried
shards are unavailable."
type: optionalBool
+ unstable: false
let:
description: "Allows user defined variables to be used inside $expr."
type: object_owned
optional: true
+ unstable: false
options:
description: "Deprecated."
type: object_owned
@@ -215,10 +227,12 @@ commands:
type: maxTimeMS
optional: true
validator: { gte: 0 }
+ unstable: false
readConcern:
description: "Specifies the read concern."
type: object_owned
optional: true
+ unstable: false
runtimeConstants:
description: "A collection of values that do not change once computed."
cpp_name: legacyRuntimeConstants
diff --git a/src/mongo/db/query/getmore_command.idl b/src/mongo/db/query/getmore_command.idl
index abade014f94..8c747abe221 100644
--- a/src/mongo/db/query/getmore_command.idl
+++ b/src/mongo/db/query/getmore_command.idl
@@ -52,6 +52,7 @@ commands:
collection:
type: string
validator: { callback: "query_request_helper::validateGetMoreCollectionName" }
+ unstable: false
batchSize:
description: >
The batch size is optional. If not provided, we will put as many documents into the batch
@@ -59,12 +60,14 @@ commands:
type: safeInt64
optional: true
validator: {gte: 0}
+ unstable: false
maxTimeMS:
description: >
The await data timeout: the number of milliseconds for which a getMore on a tailable,
awaitData query should block.
type: safeInt64
optional: true
+ unstable: false
term:
description: >
Only internal queries from replication will typically have a term.
diff --git a/src/mongo/db/query/kill_cursors.idl b/src/mongo/db/query/kill_cursors.idl
index f9baa16bc63..5d804a1ef2c 100644
--- a/src/mongo/db/query/kill_cursors.idl
+++ b/src/mongo/db/query/kill_cursors.idl
@@ -51,16 +51,20 @@ structs:
cursorsKilled:
description: 'Cursors successfully killed'
type: array<cursorId>
+ unstable: false
cursorsNotFound:
description: 'Cursors not found'
type: array<cursorId>
+ unstable: false
cursorsAlive:
description: 'Cursors still alive'
type: array<cursorId>
+ unstable: false
cursorsUnknown:
# This is a legacy field and always returns an empty array.
description: 'Unknown cursors'
type: array<cursorId>
+ unstable: false
commands:
killCursors:
@@ -89,3 +93,4 @@ commands:
type: array<cursorId>
cpp_name: cursorIds
optional: false
+ unstable: false
diff --git a/src/mongo/db/repl/hello.idl b/src/mongo/db/repl/hello.idl
index 90e7c329bc5..50ba56c0cd4 100644
--- a/src/mongo/db/repl/hello.idl
+++ b/src/mongo/db/repl/hello.idl
@@ -46,8 +46,10 @@ structs:
# Currently ignored
type: safeInt
default: 0
+ unstable: false
maxWireVersion:
type: safeInt
+ unstable: false
HelloLastWrite:
description: "Most recent op/write times for this node"
@@ -56,15 +58,19 @@ structs:
opTime:
type: optime
optional: true
+ unstable: false
lastWriteDate:
type: date
optional: true
+ unstable: false
majorityOpTime:
type: optime
optional: true
+ unstable: false
majorityWriteDate:
type: date
optional: true
+ unstable: false
HelloCommandReply:
description: "Reply to 'hello' command"
@@ -73,138 +79,180 @@ structs:
helloOk:
type: bool
default: true
+ unstable: false
clientSupportsHello:
type: bool
optional: true
+ unstable: false
configsvr:
type: safeInt
optional: true
+ unstable: false
maxBsonObjectSize:
type: safeInt64
optional: true
+ unstable: false
maxMessageSizeBytes:
type: safeInt64
optional: true
+ unstable: false
maxWriteBatchSize:
type: safeInt64
optional: true
+ unstable: false
localTime:
type: date
optional: true
+ unstable: false
logicalSessionTimeoutMinutes:
type: safeInt
optional: true
+ unstable: false
connectionId:
type: safeInt64
optional: true
+ unstable: false
minWireVersion:
type: safeInt
optional: true
+ unstable: false
maxWireVersion:
type: safeInt
optional: true
+ unstable: false
readOnly:
type: bool
optional: true
+ unstable: false
compression:
type: array<string>
optional: true
+ unstable: false
automationServiceDescriptor:
type: string
optional: true
+ unstable: false
saslSupportedMechs:
type: array<string>
optional: true
+ unstable: false
speculativeAuthenticate:
type: object
optional: true
+ unstable: false
msg:
type: string
optional: true
+ unstable: false
serviceId:
type: objectid
optional: true
+ unstable: false
##
## ReplicationInfo
##
topologyVersion:
type: TopologyVersion
+ unstable: false
ismaster:
# Replies will contain 'ismaster' OR 'isWritablePrimary', not both
type: bool
optional: true
+ unstable: false
isWritablePrimary:
type: bool
optional: true
+ unstable: false
##
## Using ReplSets
##
hosts:
type: array<string>
optional: true
+ unstable: false
passives:
type: array<string>
optional: true
+ unstable: false
arbiters:
type: array<string>
optional: true
+ unstable: false
setName:
type: string
optional: true
+ unstable: false
primary:
type: string
optional: true
+ unstable: false
secondary:
type: bool
optional: true
+ unstable: false
info:
type: string
optional: true
+ unstable: false
isreplicaset:
type: bool
optional: true
+ unstable: false
setVersion:
type: safeInt
optional: true
+ unstable: false
arbiterOnly:
type: bool
optional: true
+ unstable: false
passive:
type: bool
optional: true
+ unstable: false
hidden:
type: bool
optional: true
+ unstable: false
buildIndexes:
type: bool
optional: true
+ unstable: false
slaveDelay:
# Reply will contain either slaveDelay or secondaryDelaySecs, but not both.
type: safeInt64
optional: true
+ unstable: false
secondaryDelaySecs:
type: safeInt64
optional: true
+ unstable: false
tags:
type: object
optional: true
+ unstable: false
me:
type: string
optional: true
+ unstable: false
electionId:
type: objectid
optional: true
+ unstable: false
lastWrite:
type: HelloLastWrite
optional: true
+ unstable: false
isImplicitDefaultMajorityWC:
# Only populated on shard server.
type: bool
optional: true
+ unstable: false
cwwc:
# Only populated on shard server.
type: WriteConcern
optional: true
+ unstable: false
commands:
hello:
@@ -223,38 +271,50 @@ commands:
forShell:
type: safeBool
default: false
+ unstable: false
hostInfo:
type: string
default: false
+ unstable: false
hangUpOnStepDown:
type: safeBool
default: true
+ unstable: false
internalClient:
type: HelloInternalClientField
optional: true
+ unstable: false
client:
type: ClientMetadata
optional: true
+ unstable: false
topologyVersion:
type: TopologyVersion
optional: true
+ unstable: false
maxAwaitTimeMS:
type: safeInt64
optional: true
validator: { gte: 0 }
+ unstable: false
helloOk:
type: safeBool
optional: true
+ unstable: false
compression:
type: array<string>
optional: true
+ unstable: false
saslSupportedMechs:
type:
variant: [string, object_owned]
optional: true
+ unstable: false
speculativeAuthenticate:
type: object
optional: true
+ unstable: false
loadBalanced:
type: bool
optional: true
+ unstable: false
diff --git a/src/mongo/db/timeseries/timeseries.idl b/src/mongo/db/timeseries/timeseries.idl
index b9d71cec7a1..72d3c7720ee 100644
--- a/src/mongo/db/timeseries/timeseries.idl
+++ b/src/mongo/db/timeseries/timeseries.idl
@@ -82,21 +82,25 @@ structs:
documents must have this field, and the field must be of the BSON UTC
datetime type (0x9)"
type: string
+ unstable: false
metaField:
description: "The name of the top-level field describing the series. This field is
used to group related data and may be of any BSON type. This may not
be \"_id\" or the same as 'timeField'."
type: string
optional: true
+ unstable: false
granularity:
description: "Describes the expected interval between subsequent measurements"
type: BucketGranularity
default: Seconds
+ unstable: false
bucketMaxSpanSeconds:
description: "The maximum range of time values for a bucket, in seconds"
type: safeInt
optional: true
validator: { gte: 1 }
+ unstable: false
CollModTimeseries:
description: "A type representing the adjustable options on timeseries collections"
@@ -105,3 +109,4 @@ structs:
granularity:
optional: true
type: BucketGranularity
+ unstable: false
diff --git a/src/mongo/idl/basic_types.idl b/src/mongo/idl/basic_types.idl
index 4a5349ca353..bcad7f9a0e5 100644
--- a/src/mongo/idl/basic_types.idl
+++ b/src/mongo/idl/basic_types.idl
@@ -311,12 +311,20 @@ structs:
ok:
type: safeDouble
validator: { gte: 0.0, lte: 0.0 }
- code: int
- codeName: string
- errmsg: string
+ unstable: false
+ code:
+ type: int
+ unstable: false
+ codeName:
+ type: string
+ unstable: false
+ errmsg:
+ type: string
+ unstable: false
errorLabels:
type: array<string>
optional: true
+ unstable: false
SimpleCursorOptions:
description: "Parser for cursor options, for commands with minimal cursor support"
@@ -326,6 +334,7 @@ structs:
type: safeInt64
optional: true
validator: { gte: 0 }
+ unstable: false
WriteConcernIdl:
description: "WriteConcern object parser"
strict: true
@@ -333,31 +342,39 @@ structs:
w:
type: writeConcernW
cpp_name: writeConcernW
+ unstable: false
j:
type: safeBool
optional: true
+ unstable: false
wtimeout:
type: safeInt64
default: 0
+ unstable: false
fsync:
type: safeBool
optional: true
+ unstable: false
# Fields with names wElectionId, wOpTime, and getLastError are accepted in the WriteConcern document for
# backwards-compatibility reasons, but their values are entirely ignored.
wElectionId:
type: any
ignore: true
+ unstable: false
wOpTime:
type: any
ignore: true
+ unstable: false
getLastError:
type: any
ignore: true
+ unstable: false
provenance:
description: "The source for this provenance"
cpp_name: source
type: ReadWriteConcernProvenanceSource
optional: true
+ unstable: false
Collation:
description: "Specifies the default collation for the collection or the view."
@@ -366,40 +383,49 @@ structs:
fields:
locale:
type: string
+ unstable: false
# Turns case sensitivity on at strength 1 or 2.
caseLevel:
type: bool
default: false
+ unstable: false
caseFirst:
type: CollationCaseFirst
default: kOff
+ unstable: false
# For backwards-compatibility, we must accept longs, ints, and doubles, so we cannot
# use the int-typed CollationStrength enum directly.
strength:
type: safeInt
default: static_cast<int>(CollationStrength::kTertiary)
validator: { gte: 0, lte: 5 }
+ unstable: false
# Order numbers based on numerical order and not lexicographic order.
numericOrdering:
type: bool
default: false
+ unstable: false
alternate:
type: CollationAlternate
default: kNonIgnorable
+ unstable: false
maxVariable:
type: CollationMaxVariable
default: kPunct
+ unstable: false
# Any language that uses multiple combining characters such as Arabic, ancient Greek,
# Hebrew, Hindi, Thai or Vietnamese either requires Normalization Checking to be on, or
# the text to go through a normalization process before collation.
normalization:
type: bool
default: false
+ unstable: false
# Causes accent differences to be considered in reverse order, as it is done in the
# French language. Note: the optionalBool parser rejects null/undefined inputs, which
# preserves an invariant in updateCollationSpecFromICUCollator.
backwards:
type: optionalBool
+ unstable: false
# Indicates the version of the collator. It is used to ensure that we do not mix
# versions by, for example, constructing an index with one version of ICU and then
# attempting to use this index with a server that is built against a newer ICU version.
diff --git a/src/mongo/rpc/topology_version.idl b/src/mongo/rpc/topology_version.idl
index 0bc48de7c08..b0ac2301f0a 100644
--- a/src/mongo/rpc/topology_version.idl
+++ b/src/mongo/rpc/topology_version.idl
@@ -43,8 +43,10 @@ structs:
description: "An id maintained in memory by the server. It is reinitialized by the
server using the standard ObjectId logic each time this server process
starts."
+ unstable: false
counter:
type: long
description: "State change counter, maintained in memory by the server. It begins
at 0 when the server starts, and it is incremented whenever there is a
significant topology change."
+ unstable: false