summaryrefslogtreecommitdiff
path: root/buildscripts/idl
diff options
context:
space:
mode:
authorRui Liu <rui.liu@mongodb.com>2022-08-01 10:49:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-01 11:19:08 +0000
commit62d2777a3eb5068deb1424402c1f5d69a86de26d (patch)
tree7483ef98896c100fc81dfc3fdab4980c7071dc48 /buildscripts/idl
parent99286ff7b1f837df8449ef990b881c3ed1e3a64b (diff)
downloadmongo-62d2777a3eb5068deb1424402c1f5d69a86de26d.tar.gz
SERVER-65002 Change 'unstable' boolean to 'stability' enum and allow 'internal' stability
Diffstat (limited to 'buildscripts/idl')
-rw-r--r--buildscripts/idl/idl/ast.py2
-rw-r--r--buildscripts/idl/idl/binder.py4
-rw-r--r--buildscripts/idl/idl/errors.py29
-rw-r--r--buildscripts/idl/idl/generator.py2
-rw-r--r--buildscripts/idl/idl/parser.py29
-rw-r--r--buildscripts/idl/idl/syntax.py1
-rw-r--r--buildscripts/idl/idl_check_compatibility.py162
-rw-r--r--buildscripts/idl/idl_compatibility_errors.py28
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/abort/invalid_command_parameter_type/invalid_command_parameter_type.idl2
-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.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/abort/valid_reply_field_type/valid_reply_field_type.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl299
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/new/error_reply.idl4
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/new/imports.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/newly_added_commands/newly_added_commands.idl4
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl297
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/old/error_reply.idl4
-rw-r--r--buildscripts/idl/tests/compatibility_test_fail/old/imports.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/new/compatibility_test_pass_new.idl294
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/new/error_reply.idl4
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/new/imports.idl2
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/old/compatibility_test_pass_old.idl267
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/old/error_reply.idl4
-rw-r--r--buildscripts/idl/tests/compatibility_test_pass/old/imports.idl2
-rw-r--r--buildscripts/idl/tests/test_compatibility.py32
-rw-r--r--buildscripts/idl/tests/test_parser.py49
27 files changed, 957 insertions, 574 deletions
diff --git a/buildscripts/idl/idl/ast.py b/buildscripts/idl/idl/ast.py
index 840ee8689da..8b4e4de90fc 100644
--- a/buildscripts/idl/idl/ast.py
+++ b/buildscripts/idl/idl/ast.py
@@ -207,7 +207,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 = None # type: Optional[bool]
+ self.stability = None # type: Optional[str]
self.default = None # type: str
self.type = None # type: Type
self.always_serialize = False # type: bool
diff --git a/buildscripts/idl/idl/binder.py b/buildscripts/idl/idl/binder.py
index c9f669c9b47..84966494572 100644
--- a/buildscripts/idl/idl/binder.py
+++ b/buildscripts/idl/idl/binder.py
@@ -1005,7 +1005,9 @@ def _bind_field(ctxt, parsed_spec, field):
ast_field.constructed = field.constructed
ast_field.comparison_order = field.comparison_order
ast_field.non_const_getter = field.non_const_getter
- ast_field.unstable = field.unstable
+ # Ignore the 'unstable' field since it's deprecated by the 'stability' field and only there at parsing level
+ # to provide compatibility support.
+ ast_field.stability = field.stability
ast_field.always_serialize = field.always_serialize
ast_field.cpp_name = field.name
diff --git a/buildscripts/idl/idl/errors.py b/buildscripts/idl/idl/errors.py
index 47cd8ecf3f4..3fcf0828249 100644
--- a/buildscripts/idl/idl/errors.py
+++ b/buildscripts/idl/idl/errors.py
@@ -112,7 +112,7 @@ ERROR_ID_NON_CONST_GETTER_IN_IMMUTABLE_STRUCT = "ID0069"
ERROR_ID_FEATURE_FLAG_DEFAULT_TRUE_MISSING_VERSION = "ID0070"
ERROR_ID_FEATURE_FLAG_DEFAULT_FALSE_HAS_VERSION = "ID0071"
ERROR_ID_INVALID_REPLY_TYPE = "ID0072"
-ERROR_ID_UNSTABLE_NO_API_VERSION = "ID0073"
+ERROR_ID_STABILITY_NO_API_VERSION = "ID0073"
ERROR_ID_MISSING_REPLY_TYPE = "ID0074"
ERROR_ID_USELESS_VARIANT = "ID0076"
ERROR_ID_ILLEGAL_FIELD_ALWAYS_SERIALIZE_NOT_OPTIONAL = "ID0077"
@@ -128,6 +128,8 @@ ERROR_ID_DUPLICATE_ACCESS_CHECK = "ID0087"
ERROR_ID_DUPLICATE_PRIVILEGE = "ID0088"
ERROR_ID_EMPTY_ACCESS_CHECK = "ID0089"
ERROR_ID_MISSING_ACCESS_CHECK = "ID0090"
+ERROR_ID_STABILITY_UNKNOWN_VALUE = "ID0091"
+ERROR_ID_DUPLICATE_UNSTABLE_STABILITY = "ID0092"
class IDLError(Exception):
@@ -882,13 +884,13 @@ class ParserContext(object):
location, ERROR_ID_INVALID_REPLY_TYPE,
("Command '%s' has invalid reply_type '%s'" % (command_name, reply_type_name)))
- def add_unstable_no_api_version(self, location, command_name):
+ def add_stability_no_api_version(self, location, command_name):
# type: (common.SourceLocation, str) -> None
- """Add an error about a command with 'unstable' but no 'api_version'."""
+ """Add an error about a command with 'stability' but no 'api_version'."""
# pylint: disable=invalid-name
self._add_error(
- location, ERROR_ID_UNSTABLE_NO_API_VERSION,
- ("Command '%s' specifies 'unstable' but has no 'api_version'" % (command_name, )))
+ location, ERROR_ID_STABILITY_NO_API_VERSION,
+ ("Command '%s' specifies 'stability' but has no 'api_version'" % (command_name, )))
def add_missing_reply_type(self, location, command_name):
# type: (common.SourceLocation, str) -> None
@@ -967,6 +969,23 @@ class ParserContext(object):
self._add_error(location, ERROR_ID_MISSING_ACCESS_CHECK,
'Command "%s" has api_version != "" but is missing access_check.' % (name))
+ def add_stability_unknown_value(self, location):
+ # type: (common.SourceLocation) -> None
+ """Add an error about a field with unknown value set to 'stability' option."""
+ # pylint: disable=invalid-name
+ self._add_error(
+ location, ERROR_ID_STABILITY_UNKNOWN_VALUE,
+ "Field option 'stability' has unknown value, should be one of 'stable', 'unstable' or 'internal.'"
+ )
+
+ def add_duplicate_unstable_stability(self, location):
+ # type: (common.SourceLocation) -> None
+ """Add an error about a field specifying both 'unstable' and 'stability'."""
+ # pylint: disable=invalid-name
+ self._add_error(location, ERROR_ID_DUPLICATE_UNSTABLE_STABILITY, (
+ "Field specifies both 'unstable' and 'stability' options, should use 'stability: [stable|unstable|internal]' instead and remove the deprecated 'unstable' option."
+ ))
+
def _assert_unique_error_messages():
# type: () -> None
diff --git a/buildscripts/idl/idl/generator.py b/buildscripts/idl/idl/generator.py
index 0adbeaedd28..a4ea20a4a33 100644
--- a/buildscripts/idl/idl/generator.py
+++ b/buildscripts/idl/idl/generator.py
@@ -217,7 +217,7 @@ class _FastFieldUsageChecker(_FieldUsageCheckerBase):
self._writer.write_line('usedFields.set(%s);' % (_gen_field_usage_constant(field)))
self._writer.write_empty_line()
- if field.unstable:
+ if field.stability == 'unstable':
self._writer.write_line(
'ctxt.throwAPIStrictErrorIfApplicable(%s);' % (bson_element_variable))
self._writer.write_empty_line()
diff --git a/buildscripts/idl/idl/parser.py b/buildscripts/idl/idl/parser.py
index 870f6142f68..b4d47c2c0c1 100644
--- a/buildscripts/idl/idl/parser.py
+++ b/buildscripts/idl/idl/parser.py
@@ -349,7 +349,11 @@ def _parse_field(ctxt, name, node):
field.name = name
_generic_parser(
- ctxt, node, "field", field, {
+ ctxt,
+ node,
+ "field",
+ field,
+ {
"description":
_RuleDesc('scalar'),
"cpp_name":
@@ -371,8 +375,11 @@ def _parse_field(ctxt, name, node):
_RuleDesc('mapping', mapping_parser_func=_parse_validator),
"non_const_getter":
_RuleDesc("bool_scalar"),
+ # Allow both 'unstable' and the new alternative 'stability' options to support IDL compatibility tests with old IDLs.
"unstable":
_RuleDesc("bool_scalar"),
+ "stability":
+ _RuleDesc("scalar"),
"always_serialize":
_RuleDesc("bool_scalar"),
})
@@ -418,6 +425,22 @@ def _parse_fields(ctxt, node):
fields.append(field)
field_name_set.add(first_name)
+ for field in fields:
+ if field.unstable is not None and field.stability is not None:
+ ctxt.add_duplicate_unstable_stability(field)
+
+ # Convert the deprecated 'unstable' option to the new 'stability' option to keep support for the IDL compatibility tests.
+ if field.unstable is not None:
+ if field.unstable:
+ field.stability = 'unstable'
+ else:
+ field.stability = 'stable'
+ field.unstable = None
+
+ if field.stability is not None and field.stability not in ("stable", "unstable",
+ "internal"):
+ ctxt.add_stability_unknown_value(field)
+
return fields
@@ -853,8 +876,8 @@ def _parse_command(ctxt, spec, name, node):
if not command.api_version:
for field in command.fields:
- if field.unstable:
- ctxt.add_unstable_no_api_version(field, command.name)
+ if field.stability is not None and field.stability != 'stable':
+ ctxt.add_stability_no_api_version(field, command.name)
spec.symbols.add_command(ctxt, command)
diff --git a/buildscripts/idl/idl/syntax.py b/buildscripts/idl/idl/syntax.py
index 1e24a445df2..83245954cc1 100644
--- a/buildscripts/idl/idl/syntax.py
+++ b/buildscripts/idl/idl/syntax.py
@@ -466,6 +466,7 @@ class Field(common.SourceLocation):
self.validator = None # type: Validator
self.non_const_getter = False # type: bool
self.unstable = None # type: Optional[bool]
+ self.stability = None # type: Optional[str]
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 a436a098ce5..8dda48b6462 100644
--- a/buildscripts/idl/idl_check_compatibility.py
+++ b/buildscripts/idl/idl_check_compatibility.py
@@ -208,6 +208,18 @@ IGNORE_STABLE_TO_UNSTABLE_LIST: List[str] = [
# The 'runtimeConstants' field is a legacy field for internal use only and is not documented to
# users.
'delete-param-runtimeConstants',
+ # The 'isTimeseriesNamespace' field is sent from mongos to shards for internal use.
+ 'collMod-param-isTimeseriesNamespace',
+ 'createIndexes-param-isTimeseriesNamespace',
+ 'dropIndexes-param-isTimeseriesNamespace',
+ 'listIndexes-param-isTimeseriesNamespace',
+ 'insert-param-isTimeseriesNamespace',
+ 'update-param-isTimeseriesNamespace',
+ 'delete-param-isTimeseriesNamespace',
+ 'findAndModify-param-isTimeseriesNamespace',
+ # The 'needsMerge' and 'fromMongos' fields of aggregation are sent from mongos to shards for internal use.
+ 'aggregate-param-needsMerge',
+ 'aggregate-param-fromMongos',
]
# Once a field is part of the stable API, either by direct addition or by changing it from unstable
@@ -321,13 +333,13 @@ class FieldCompatibility:
"""Information about a Field to check compatibility."""
def __init__(self, field_type: Optional[Union[syntax.Enum, syntax.Struct, syntax.Type]],
- idl_file: syntax.IDLParsedSpec, idl_file_path: str, unstable: Optional[bool],
+ idl_file: syntax.IDLParsedSpec, idl_file_path: str, stability: Optional[str],
optional: bool) -> None:
"""Initialize data members and hand special cases, such as optionalBool type."""
self.field_type = field_type
self.idl_file = idl_file
self.idl_file_path = idl_file_path
- self.unstable = unstable
+ self.stability = stability
self.optional = optional
if isinstance(self.field_type, syntax.Type) and self.field_type.name == "optionalBool":
@@ -358,6 +370,11 @@ class ArrayTypeCheckResult(Enum):
FALSE = 2
+def is_unstable(stability: Optional[str]) -> bool:
+ """Check whether the given stability value is considered as unstable."""
+ return stability is not None and stability != 'stable'
+
+
def get_new_commands(
ctxt: IDLCompatibilityContext, new_idl_dir: str, import_directories: List[str]
) -> Tuple[Dict[str, syntax.Command], Dict[str, syntax.IDLParsedSpec], Dict[str, str]]:
@@ -465,7 +482,8 @@ def check_reply_field_type_recursive(ctxt: IDLCompatibilityContext,
# bson_serialization_type. For all other errors, we check that the old field is stable
# before adding an error.
if not isinstance(new_field_type, syntax.Type):
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_reply_field_type_enum_or_struct_error(
cmd_name, field_name, new_field_type.name, old_field_type.name,
new_field.idl_file_path)
@@ -496,12 +514,16 @@ def check_reply_field_type_recursive(ctxt: IDLCompatibilityContext,
new_field.idl_file_path)
# If serializer is changed, it's a potential breaking change.
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST and old_field_type.serializer != new_field_type.serializer:
+ if not is_unstable(
+ old_field.stability
+ ) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST and old_field_type.serializer != new_field_type.serializer:
ctxt.add_reply_field_serializer_not_equal_error(
cmd_name, field_name, new_field_type.name, new_field.idl_file_path)
# If deserializer is changed, it's a potential breaking change.
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST and old_field_type.deserializer != new_field_type.deserializer:
+ if not is_unstable(
+ old_field.stability
+ ) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST and old_field_type.deserializer != new_field_type.deserializer:
ctxt.add_reply_field_deserializer_not_equal_error(
cmd_name, field_name, new_field_type.name, new_field.idl_file_path)
@@ -517,10 +539,10 @@ def check_reply_field_type_recursive(ctxt: IDLCompatibilityContext,
if old_variant_type.name == new_variant_type.name:
# Check that the old and new version of each variant type is also compatible.
old = FieldCompatibility(old_variant_type, old_field.idl_file,
- old_field.idl_file_path, old_field.unstable,
+ old_field.idl_file_path, old_field.stability,
old_field.optional)
new = FieldCompatibility(new_variant_type, new_field.idl_file,
- new_field.idl_file_path, new_field.unstable,
+ new_field.idl_file_path, new_field.stability,
new_field.optional)
check_reply_field_type(ctxt,
FieldCompatibilityPair(old, new, cmd_name, field_name))
@@ -528,7 +550,8 @@ def check_reply_field_type_recursive(ctxt: IDLCompatibilityContext,
else:
# new_variant_type was not found in old_variant_types.
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(old_field.stability
+ ) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_reply_field_variant_type_not_subset_error(
cmd_name, field_name, new_variant_type.name, new_field.idl_file_path)
@@ -536,7 +559,8 @@ def check_reply_field_type_recursive(ctxt: IDLCompatibilityContext,
# Since enums can't be part of variant types, we don't explicitly check for enums.
if isinstance(new_field_type,
syntax.VariantType) and new_field_type.variant_struct_type is not None:
- if old_field_type.variant_struct_type is None and not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if old_field_type.variant_struct_type is None and not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_reply_field_variant_type_not_subset_error(
cmd_name, field_name, new_field_type.variant_struct_type.name,
new_field.idl_file_path)
@@ -546,7 +570,8 @@ def check_reply_field_type_recursive(ctxt: IDLCompatibilityContext,
new_field.idl_file, old_field.idl_file_path,
new_field.idl_file_path)
- elif not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ elif not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
if isinstance(new_field_type, syntax.VariantType):
ctxt.add_new_reply_field_variant_type_error(cmd_name, field_name, old_field_type.name,
new_field.idl_file_path)
@@ -565,7 +590,7 @@ def check_reply_field_type(ctxt: IDLCompatibilityContext, field_pair: FieldCompa
field_name = field_pair.field_name
array_check = check_array_type(ctxt, "reply_field", old_field.field_type, new_field.field_type,
field_pair.cmd_name, 'type', old_field.idl_file_path,
- new_field.idl_file_path, old_field.unstable)
+ new_field.idl_file_path, is_unstable(old_field.stability))
if array_check == ArrayTypeCheckResult.INVALID:
return
@@ -591,9 +616,8 @@ def check_reply_field_type(ctxt: IDLCompatibilityContext, field_pair: FieldCompa
if isinstance(old_field_type, syntax.Type):
check_reply_field_type_recursive(ctxt, field_pair)
- elif isinstance(
- old_field_type, syntax.Enum
- ) and not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ elif isinstance(old_field_type, syntax.Enum) and not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
if isinstance(new_field_type, syntax.Enum):
check_subset(ctxt, cmd_name, field_name, new_field_type.name, new_field_type.values,
old_field_type.values, new_field.idl_file_path)
@@ -606,7 +630,8 @@ def check_reply_field_type(ctxt: IDLCompatibilityContext, field_pair: FieldCompa
check_reply_fields(ctxt, old_field_type, new_field_type, cmd_name, old_field.idl_file,
new_field.idl_file, old_field.idl_file_path, new_field.idl_file_path)
else:
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_reply_field_type_not_struct_error(
cmd_name, field_name, new_field_type.name, old_field_type.name,
new_field.idl_file_path)
@@ -652,8 +677,10 @@ def check_reply_field(ctxt: IDLCompatibilityContext, old_field: syntax.Field,
new_field_optional = new_field.optional or (new_field_type
and new_field_type.name == "optionalBool")
ignore_list_name: str = cmd_name + "-reply-" + new_field.name
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
- if new_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if is_unstable(
+ new_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_reply_field_unstable_error(cmd_name, new_field.name, new_idl_file_path)
if new_field_optional and not old_field_optional:
ctxt.add_new_reply_field_optional_error(cmd_name, new_field.name, new_idl_file_path)
@@ -668,14 +695,15 @@ def check_reply_field(ctxt: IDLCompatibilityContext, old_field: syntax.Field,
new_idl_file_path)
# A reply field may not change from unstable to stable unless explicitly allowed to.
- if old_field.unstable and not new_field.unstable and ignore_list_name not in ALLOWED_STABLE_FIELDS_LIST:
+ if is_unstable(old_field.stability) and not is_unstable(
+ new_field.stability) and ignore_list_name not in ALLOWED_STABLE_FIELDS_LIST:
ctxt.add_unstable_reply_field_changed_to_stable_error(cmd_name, new_field.name,
new_idl_file_path)
old_field_compatibility = FieldCompatibility(old_field_type, old_idl_file, old_idl_file_path,
- old_field.unstable, old_field.optional)
+ old_field.stability, old_field.optional)
new_field_compatibility = FieldCompatibility(new_field_type, new_idl_file, new_idl_file_path,
- new_field.unstable, new_field.optional)
+ new_field.stability, new_field.optional)
field_pair = FieldCompatibilityPair(old_field_compatibility, new_field_compatibility, cmd_name,
old_field.name)
@@ -699,9 +727,9 @@ def check_reply_fields(ctxt: IDLCompatibilityContext, old_reply: syntax.Struct,
and resolved_old_chained_type.name == resolved_new_chained_type.name):
# Check that the old and new version of each chained type is also compatible.
old = FieldCompatibility(resolved_old_chained_type, old_idl_file,
- old_idl_file_path, unstable=False, optional=False)
+ old_idl_file_path, stability='stable', optional=False)
new = FieldCompatibility(resolved_new_chained_type, new_idl_file,
- new_idl_file_path, unstable=False, optional=False)
+ new_idl_file_path, stability='stable', optional=False)
check_reply_field_type(
ctxt, FieldCompatibilityPair(old, new, cmd_name, old_reply.name))
@@ -724,14 +752,14 @@ def check_reply_fields(ctxt: IDLCompatibilityContext, old_reply: syntax.Struct,
break
- if not new_field_exists and not old_field.unstable:
+ if not new_field_exists and not is_unstable(old_field.stability):
ctxt.add_new_reply_field_missing_error(cmd_name, old_field.name, old_idl_file_path)
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 all fields in the new IDL have specified the 'stability' field.
+ if new_field.stability is None:
+ ctxt.add_new_reply_field_requires_stability_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.
@@ -742,7 +770,8 @@ def check_reply_fields(ctxt: IDLCompatibilityContext, old_reply: syntax.Struct,
if newly_added:
allow_name: str = cmd_name + "-reply-" + new_field.name
- if not new_field.unstable and allow_name not in ALLOWED_STABLE_FIELDS_LIST:
+ if not is_unstable(
+ new_field.stability) and allow_name not in ALLOWED_STABLE_FIELDS_LIST:
ctxt.add_new_reply_field_added_as_stable_error(cmd_name, new_field.name,
new_idl_file_path)
@@ -782,7 +811,8 @@ def check_param_or_command_type_recursive(ctxt: IDLCompatibilityContext,
# before adding an error.
if not isinstance(new_type, syntax.Type):
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_command_or_param_type_enum_or_struct_error(
cmd_name, new_type.name, old_type.name, new_field.idl_file_path, param_name,
is_command_parameter)
@@ -815,20 +845,23 @@ def check_param_or_command_type_recursive(ctxt: IDLCompatibilityContext,
cmd_name, new_type.name, new_field.idl_file_path, param_name, is_command_parameter)
# If serializer is changed, it's a potential breaking change.
- if (not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST
+ if (not is_unstable(old_field.stability)
+ and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST
) and old_type.serializer != new_type.serializer:
ctxt.add_command_or_param_serializer_not_equal_error(
cmd_name, new_type.name, new_field.idl_file_path, param_name, is_command_parameter)
# If deserializer is changed, it's a potential breaking change.
- if (not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST
+ if (not is_unstable(old_field.stability)
+ and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST
) and old_type.deserializer != new_type.deserializer:
ctxt.add_command_or_param_deserializer_not_equal_error(
cmd_name, new_type.name, new_field.idl_file_path, param_name, is_command_parameter)
if isinstance(old_type, syntax.VariantType):
if not isinstance(new_type, syntax.VariantType):
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_command_or_param_type_not_variant_type_error(
cmd_name, new_type.name, new_field.idl_file_path, param_name,
is_command_parameter)
@@ -845,17 +878,18 @@ def check_param_or_command_type_recursive(ctxt: IDLCompatibilityContext,
old_variant_type.name == new_variant_type.name:
# Check that the old and new version of each variant type is also compatible.
old = FieldCompatibility(old_variant_type, old_field.idl_file,
- old_field.idl_file_path, old_field.unstable,
+ old_field.idl_file_path, old_field.stability,
old_field.optional)
new = FieldCompatibility(new_variant_type, new_field.idl_file,
- new_field.idl_file_path, new_field.unstable,
+ new_field.idl_file_path, new_field.stability,
new_field.optional)
check_param_or_command_type(
ctxt, FieldCompatibilityPair(old, new, cmd_name, param_name),
is_command_parameter)
break
else:
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(old_field.stability
+ ) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
# old_variant_type was not found in new_variant_types.
ctxt.add_new_command_or_param_variant_type_not_superset_error(
cmd_name, old_variant_type.name, new_field.idl_file_path, param_name,
@@ -871,12 +905,14 @@ def check_param_or_command_type_recursive(ctxt: IDLCompatibilityContext,
new_field.idl_file_path, is_command_parameter)
# If old type has a variant struct type and new type does not have a variant struct type.
- elif not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ elif not is_unstable(old_field.stability
+ ) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_command_or_param_variant_type_not_superset_error(
cmd_name, old_type.variant_struct_type.name, new_field.idl_file_path,
param_name, is_command_parameter)
- elif not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ elif not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
check_superset(ctxt, cmd_name, new_type.name, new_type.bson_serialization_type,
old_type.bson_serialization_type, new_field.idl_file_path, param_name,
is_command_parameter)
@@ -894,7 +930,7 @@ def check_param_or_command_type(ctxt: IDLCompatibilityContext, field_pair: Field
ctxt, "command_parameter" if is_command_parameter else "command_namespace",
old_field.field_type, new_field.field_type, field_pair.cmd_name,
field_name if is_command_parameter else "type", old_field.idl_file_path,
- new_field.idl_file_path, old_field.unstable)
+ new_field.idl_file_path, is_unstable(old_field.stability))
if array_check == ArrayTypeCheckResult.INVALID:
return
@@ -921,9 +957,8 @@ def check_param_or_command_type(ctxt: IDLCompatibilityContext, field_pair: Field
check_param_or_command_type_recursive(ctxt, field_pair, is_command_parameter)
# Only add type errors if the old field is stable.
- elif isinstance(
- old_type, syntax.Enum
- ) and not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ elif isinstance(old_type, syntax.Enum) and not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
if isinstance(new_type, syntax.Enum):
check_superset(ctxt, cmd_name, new_type.name, new_type.values, old_type.values,
new_field.idl_file_path, field_pair.field_name, is_command_parameter)
@@ -938,7 +973,8 @@ def check_param_or_command_type(ctxt: IDLCompatibilityContext, field_pair: Field
ctxt, old_type, new_type, cmd_name, old_field.idl_file, new_field.idl_file,
old_field.idl_file_path, new_field.idl_file_path, is_command_parameter)
else:
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_command_or_param_type_not_struct_error(
cmd_name, new_type.name, old_type.name, new_field.idl_file_path,
field_pair.field_name, is_command_parameter)
@@ -996,9 +1032,9 @@ def check_command_params_or_type_struct_fields(
and resolved_old_chained_type.name == resolved_new_chained_type.name):
# Check that the old and new version of each chained type is also compatible.
old = FieldCompatibility(resolved_old_chained_type, old_idl_file,
- old_idl_file_path, unstable=False, optional=False)
+ old_idl_file_path, stability="stable", optional=False)
new = FieldCompatibility(resolved_new_chained_type, new_idl_file,
- new_idl_file_path, unstable=False, optional=False)
+ new_idl_file_path, stability="stable", optional=False)
check_param_or_command_type(
ctxt, FieldCompatibilityPair(old, new, cmd_name, old_struct.name),
is_command_parameter=False)
@@ -1029,16 +1065,17 @@ def check_command_params_or_type_struct_fields(
break
allow_name: str = cmd_name + "-param-" + old_field.name
- if not new_field_exists and not old_field.unstable and allow_name not in allow_list:
+ if not new_field_exists and not is_unstable(
+ old_field.stability) and allow_name not in allow_list:
ctxt.add_new_param_or_command_type_field_missing_error(
cmd_name, old_field.name, old_idl_file_path, old_struct.name, is_command_parameter)
# 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(
+ # Check that all fields in the new IDL have specified the 'stability' field.
+ if new_field.stability is None:
+ ctxt.add_new_param_or_command_type_field_requires_stability_error(
cmd_name, new_field.name, new_idl_file_path, is_command_parameter)
newly_added = True
@@ -1048,14 +1085,15 @@ def check_command_params_or_type_struct_fields(
if newly_added:
allow_stable_name: str = cmd_name + "-param-" + new_field.name
- if not new_field.unstable and allow_stable_name not in ALLOWED_STABLE_FIELDS_LIST:
+ if not is_unstable(
+ new_field.stability) and allow_stable_name not in ALLOWED_STABLE_FIELDS_LIST:
ctxt.add_new_param_or_type_field_added_as_stable_error(
cmd_name, new_field.name, new_idl_file_path, is_command_parameter)
new_field_type = get_field_type(new_field, new_idl_file, new_idl_file_path)
new_field_optional = new_field.optional or (new_field_type
and new_field_type.name == 'optionalBool')
- if not new_field_optional and not new_field.unstable:
+ if not new_field_optional and not is_unstable(new_field.stability):
ctxt.add_new_param_or_command_type_field_added_required_error(
cmd_name, new_field.name, new_idl_file_path, new_struct.name,
is_command_parameter)
@@ -1083,12 +1121,14 @@ def check_command_param_or_type_struct_field(
"""Check compatibility between the old and new command parameter or command type struct field."""
# pylint: disable=too-many-arguments
ignore_list_name: str = cmd_name + "-param-" + new_field.name
- if not old_field.unstable and new_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(old_field.stability) and is_unstable(
+ new_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
ctxt.add_new_param_or_command_type_field_unstable_error(
cmd_name, old_field.name, old_idl_file_path, type_name, is_command_parameter)
# A command param or type field may not change from unstable to stable unless explicitly allowed to.
- if old_field.unstable and not new_field.unstable and ignore_list_name not in ALLOWED_STABLE_FIELDS_LIST:
+ if is_unstable(old_field.stability) and not is_unstable(
+ new_field.stability) and ignore_list_name not in ALLOWED_STABLE_FIELDS_LIST:
ctxt.add_unstable_param_or_type_field_to_stable_error(
cmd_name, old_field.name, old_idl_file_path, is_command_parameter)
@@ -1100,22 +1140,26 @@ def check_command_param_or_type_struct_field(
and old_field_type.name == "optionalBool")
new_field_optional = new_field.optional or (new_field_type
and new_field_type.name == "optionalBool")
- if old_field.unstable and not new_field.unstable and not new_field_optional and new_field.default is None:
+ if is_unstable(old_field.stability) and not is_unstable(
+ new_field.stability) and not new_field_optional and new_field.default is None:
ctxt.add_new_param_or_command_type_field_stable_required_no_default_error(
cmd_name, old_field.name, old_idl_file_path, type_name, is_command_parameter)
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST and old_field_optional and not new_field_optional:
+ if not is_unstable(
+ old_field.stability
+ ) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST and old_field_optional and not new_field_optional:
ctxt.add_new_param_or_command_type_field_required_error(
cmd_name, old_field.name, old_idl_file_path, type_name, is_command_parameter)
- if not old_field.unstable and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
+ if not is_unstable(
+ old_field.stability) and ignore_list_name not in IGNORE_STABLE_TO_UNSTABLE_LIST:
check_param_or_type_validator(ctxt, old_field, new_field, cmd_name, new_idl_file_path,
type_name, is_command_parameter)
old_field_compatibility = FieldCompatibility(old_field_type, old_idl_file, old_idl_file_path,
- old_field.unstable, old_field.optional)
+ old_field.stability, old_field.optional)
new_field_compatibility = FieldCompatibility(new_field_type, new_idl_file, new_idl_file_path,
- new_field.unstable, new_field.optional)
+ new_field.stability, new_field.optional)
field_pair = FieldCompatibilityPair(old_field_compatibility, new_field_compatibility, cmd_name,
old_field.name)
@@ -1148,9 +1192,9 @@ def check_namespace(ctxt: IDLCompatibilityContext, old_cmd: syntax.Command, new_
old_type = get_field_type(old_cmd, old_idl_file, old_idl_file_path)
if new_namespace == common.COMMAND_NAMESPACE_TYPE:
new_type = get_field_type(new_cmd, new_idl_file, new_idl_file_path)
- old = FieldCompatibility(old_type, old_idl_file, old_idl_file_path, unstable=False,
+ old = FieldCompatibility(old_type, old_idl_file, old_idl_file_path, stability="stable",
optional=False)
- new = FieldCompatibility(new_type, new_idl_file, new_idl_file_path, unstable=False,
+ new = FieldCompatibility(new_type, new_idl_file, new_idl_file_path, stability="stable",
optional=False)
check_param_or_command_type(ctxt,
diff --git a/buildscripts/idl/idl_compatibility_errors.py b/buildscripts/idl/idl_compatibility_errors.py
index 150b3783aec..6b50aabfeb2 100644
--- a/buildscripts/idl/idl_compatibility_errors.py
+++ b/buildscripts/idl/idl_compatibility_errors.py
@@ -118,9 +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"
+ERROR_ID_NEW_REPLY_FIELD_REQUIRES_STABILITY = "ID0077"
+ERROR_ID_NEW_PARAMETER_REQUIRES_STABILITY = "ID0078"
+ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_STABILITY = "ID0079"
ERROR_ID_NEW_REPLY_CHAINED_TYPE_NOT_SUBSET = "ID0080"
ERROR_ID_NEW_COMMAND_PARAMETER_CHAINED_TYPE_NOT_SUPERSET = "ID0081"
ERROR_ID_NEW_COMMAND_CHAINED_TYPE_NOT_SUPERSET = "ID0082"
@@ -1101,29 +1101,29 @@ class IDLCompatibilityContext(object):
("The generic reply field '%s' was removed from the new definition of the "
"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."""
+ def add_new_reply_field_requires_stability_error(self, command_name: str, field_name: str,
+ file: str) -> None:
+ """Add an error that a new reply field requires the 'stability' field."""
self._add_error(
- ERROR_ID_NEW_REPLY_FIELD_REQUIRES_UNSTABLE, command_name,
+ ERROR_ID_NEW_REPLY_FIELD_REQUIRES_STABILITY, command_name,
("The new definition of '%s' has reply field '%s' that requires specifying a value "
- "for the 'unstable' field") % (command_name, field_name), file)
+ "for the 'stability' field") % (command_name, field_name), file)
- def add_new_param_or_command_type_field_requires_unstable_error(
+ def add_new_param_or_command_type_field_requires_stability_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."""
+ """Add an error that a new param or command type field requires the 'stability' field."""
if is_command_parameter:
self._add_error(
- ERROR_ID_NEW_PARAMETER_REQUIRES_UNSTABLE, command_name,
+ ERROR_ID_NEW_PARAMETER_REQUIRES_STABILITY, command_name,
("The new definition of '%s' has parameter '%s' that requires specifying a value "
- "for the 'unstable' field") % (command_name, field_name), file)
+ "for the 'stability' field") % (command_name, field_name), file)
else:
self._add_error(
- ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_UNSTABLE, command_name,
+ ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_STABILITY, command_name,
("The new definition of '%s' has command type field '%s' that requires specifying "
- "a value for the 'unstable' field") % (command_name, field_name), file)
+ "a value for the 'stability' field") % (command_name, field_name), file)
def add_unstable_reply_field_changed_to_stable_error(self, command_name: str, field_name: str,
file: str) -> None:
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 fae1960e79b..43fab71d7f7 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
@@ -44,4 +44,4 @@ commands:
fields:
invalidParameter:
type: None
- unstable: false
+ stability: stable
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 0df2972aed3..c38a2ad5432 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
+ stability: stable
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 f772ac2a480..3777373960b 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
@@ -44,4 +44,4 @@ commands:
fields:
invalidParameter:
type: string
- unstable: false
+ stability: stable
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 22feea211fb..23c609227a6 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,7 +38,7 @@ structs:
fields:
invalidReplyField:
type: string
- unstable: false
+ stability: stable
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 434ac4a2c2f..f286dbc0ddd 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
@@ -148,7 +148,15 @@ structs:
fields:
unstableNewField:
type: string
- unstable: true
+ stability: unstable
+
+ InternalNewFieldReply:
+ description: "This reply contains a field that is stable in the old command but is
+ internal in the new command."
+ fields:
+ internalNewField:
+ type: string
+ stability: internal
StableNewReplyField:
description: "This struct contains a reply field that is unstable in the old command but is
@@ -174,7 +182,7 @@ structs:
optionalNewField:
type: string
optional: true
- unstable: false
+ stability: stable
MissingNewFieldReply:
description: "This reply contains a field that exists in the old command but is
@@ -186,7 +194,7 @@ structs:
fields:
requiredNewField:
type: string
- unstable: false
+ stability: stable
EnumNotSubsetReply:
description: "This reply contains an enum field where the new enum values is not a subset
@@ -194,7 +202,7 @@ structs:
fields:
enumNotSubsetReplyField:
type: NewReplyFieldEnumNotSubset
- unstable: false
+ stability: stable
NotEnumFieldReply:
description: "This reply contains a field that is an enum type in the old command but
@@ -202,7 +210,7 @@ structs:
fields:
notEnumReplyField:
type: string
- unstable: false
+ stability: stable
NotStructFieldReply:
description: "This reply contains a field that is a struct type in the old command but
@@ -210,7 +218,7 @@ structs:
fields:
notStructReplyField:
type: string
- unstable: false
+ stability: stable
EnumOrStructFieldReply:
description: "This reply contains a field that is a non-enum or struct type in the old
@@ -218,7 +226,7 @@ structs:
fields:
EnumOrStructReplyField:
type: NewReplyFieldEnumNotSubset
- unstable: false
+ stability: stable
BsonNotSubsetReply:
description: "This reply contains a field type where the new bson_serialization_type
@@ -226,7 +234,7 @@ structs:
fields:
bsonNotSubsetReplyField:
type: intToIntString
- unstable: false
+ stability: stable
BsonNotSubsetReplyTwo:
description: "This reply contains a field type where the new bson_serialization_type
@@ -234,7 +242,7 @@ structs:
fields:
bsonNotSubsetReplyFieldTwo:
type: intStringToIntStringBool
- unstable: false
+ stability: stable
OldBsonSerializationTypeAnyReply:
description: "This reply contains a field whose old type has a bson_serialization_type
@@ -242,7 +250,7 @@ structs:
fields:
oldBsonSerializationTypeAnyReplyField:
type: oldBsonSerializationTypeAny
- unstable: false
+ stability: stable
NewBsonSerializationTypeAnyReply:
description: "This reply contains a field whose new type has a bson_serialization_type
@@ -250,7 +258,7 @@ structs:
fields:
newBsonSerializationTypeAnyReplyField:
type: newBsonSerializationTypeAny
- unstable: false
+ stability: stable
BsonSerializationTypeAnyReply:
description: "This reply contains a field whose old and new type have a bson_serialization_type
@@ -258,14 +266,14 @@ structs:
fields:
bsonSerializationTypeAnyReplyField:
type: bsonSerializationTypeAny
- unstable: false
+ stability: stable
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
+ stability: stable
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
@@ -274,7 +282,7 @@ structs:
bson_serialization_type that contains 'any' that is not compatible"
fields:
bsonSerializationTypeAnyStructField:
- unstable: false
+ stability: stable
type:
variant: [array<oldBsonSerializationTypeAny>, array<newBsonSerializationTypeAny>]
@@ -284,7 +292,7 @@ structs:
fields:
cppTypeNotEqualReplyField:
type: bsonSerializationTypeAnyCppTypeNotEqual
- unstable: false
+ stability: stable
SerializerNotEqualReply:
description: "This reply contains a field whose old and new type
@@ -293,7 +301,7 @@ structs:
fields:
serializerNotEqualReplyField:
type: bsonSerializationTypeAnySerializerNotEqual
- unstable: false
+ stability: stable
DeserializerNotEqualReply:
description: "This reply contains a field whose old and new type have
@@ -302,14 +310,14 @@ structs:
fields:
deserializerNotEqualReplyField:
type: bsonSerializationTypeAnyDeserializerNotEqual
- unstable: false
+ stability: stable
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
+ stability: stable
type:
variant: [string, bsonSerializationTypeAny]
@@ -320,7 +328,7 @@ structs:
fields:
oldBsonSerializationTypeAnyUnstableReplyField:
type: oldBsonSerializationTypeAny
- unstable: false
+ stability: stable
NewBsonSerializationTypeAnyUnstableReply:
description: "This reply contains a field that is unstable in the old version
@@ -329,7 +337,7 @@ structs:
fields:
newBsonSerializationTypeAnyUnstableReplyField:
type: newBsonSerializationTypeAny
- unstable: false
+ stability: stable
BsonSerializationTypeAnyUnstableReply:
description: "This reply contains a field that is unstable in the old version
@@ -338,7 +346,7 @@ structs:
fields:
bsonSerializationTypeAnyUnstableReplyField:
type: bsonSerializationTypeAny
- unstable: false
+ stability: stable
BsonSerializationTypeWithVariantAnyUnstableReply:
description: "This reply contains a field whose old and new variant types have a bson_serialization_type
@@ -347,7 +355,7 @@ structs:
bsonSerializationTypeWithVariantAnyUnstableReplyField:
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
- unstable: false
+ stability: stable
CppTypeNotEqualUnstableReply:
description: "This reply contains a field whose old and new type have a
@@ -356,7 +364,7 @@ structs:
fields:
cppTypeNotEqualReplyUnstableField:
type: bsonSerializationTypeAnyCppTypeNotEqual
- unstable: false
+ stability: stable
SerializerNotEqualUnstableReply:
description: "This reply contains a field whose old and new type have a
@@ -365,7 +373,7 @@ structs:
fields:
serializerNotEqualReplyUnstableField:
type: bsonSerializationTypeAnySerializerNotEqual
- unstable: false
+ stability: stable
DeserializerNotEqualUnstableReply:
description: "This reply contains a field whose old and new type have a
@@ -374,7 +382,7 @@ structs:
fields:
deserializerNotEqualReplyUnstableField:
type: bsonSerializationTypeAnyDeserializerNotEqual
- unstable: false
+ stability: stable
NewlyAddedBsonSerializationTypeAnyStruct:
description: "This struct contains a newly added field whose type has a bson_serialization_type
@@ -382,7 +390,7 @@ structs:
fields:
newlyAddedBsonSerializationTypeAnyStructField:
optional: true
- unstable: false
+ stability: stable
type:
variant: [string, bsonSerializationTypeAny]
@@ -394,7 +402,7 @@ structs:
oldBsonSerializationTypeAnyUnstableStructField:
optional: true
type: oldBsonSerializationTypeAny
- unstable: false
+ stability: stable
NewBsonSerializationTypeAnyUnstableStruct:
description: "This struct contains a field that is unstable in the old version
@@ -404,7 +412,7 @@ structs:
newBsonSerializationTypeAnyUnstableStructField:
optional: true
type: newBsonSerializationTypeAny
- unstable: false
+ stability: stable
BsonSerializationTypeAnyUnstableStruct:
description: "This struct contains a field that is unstable in the old version
@@ -414,7 +422,7 @@ structs:
bsonSerializationTypeAnyUnstableStructField:
optional: true
type: bsonSerializationTypeAny
- unstable: false
+ stability: stable
BsonSerializationTypeWithVariantAnyUnstableStruct:
description: "This struct contains a field whose old and new variant types have a bson_serialization_type
@@ -422,7 +430,7 @@ structs:
fields:
bsonSerializationTypeWithVariantAnyUnstableStructField:
optional: true
- unstable: false
+ stability: stable
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
@@ -433,7 +441,7 @@ structs:
fields:
cppTypeNotEqualStructUnstableField:
optional: true
- unstable: false
+ stability: stable
type: bsonSerializationTypeAnyCppTypeNotEqual
SerializerNotEqualUnstableStruct:
@@ -444,7 +452,7 @@ structs:
serializerNotEqualStructUnstableField:
optional: true
type: bsonSerializationTypeAnySerializerNotEqual
- unstable: false
+ stability: stable
DeserializerNotEqualUnstableStruct:
description: "This struct contains a field whose old and new type have a
@@ -454,7 +462,7 @@ structs:
deserializerNotEqualStructUnstableField:
optional: true
type: bsonSerializationTypeAnyDeserializerNotEqual
- unstable: false
+ stability: stable
StructFieldTypeRecursiveReplyOne:
description: "This reply contains a field whose new type is a struct that is not
@@ -462,7 +470,7 @@ structs:
fields:
structReplyField:
type: UnstableNewFieldReply
- unstable: false
+ stability: stable
StructFieldTypeRecursiveReplyTwo:
description: "This reply contains a field whose new type is a struct that is not
@@ -470,7 +478,7 @@ structs:
fields:
structReplyField:
type: StructType
- unstable: false
+ stability: stable
StructType:
description: "This struct contains a field whose new type is incompatible with the
@@ -478,14 +486,14 @@ structs:
fields:
fieldOne:
type: BsonNotSubsetReply
- unstable: false
+ stability: stable
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
+ stability: stable
type:
variant: [int, string]
@@ -494,7 +502,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string]
@@ -503,7 +511,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<bool>, array<string>]
@@ -512,7 +520,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string, double]
@@ -521,7 +529,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<bool>, array<string>, array<double>]
@@ -530,7 +538,7 @@ structs:
compatible with the old variant type"
fields:
variantRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, intStringToIntStringBool]
@@ -539,7 +547,7 @@ structs:
compatible with the old variant type"
fields:
variantRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<intStringToIntStringBool>]
@@ -548,7 +556,7 @@ structs:
of the old variant types"
fields:
variantStructNotSubsetReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructType]
@@ -557,7 +565,7 @@ structs:
of the old variant types"
fields:
variantStructNotSubsetReplyField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>, array<StructType>]
@@ -566,7 +574,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, StructFieldTypeRecursiveReplyTwo]
@@ -575,7 +583,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<StructFieldTypeRecursiveReplyTwo>]
@@ -585,7 +593,7 @@ structs:
fields:
stableToUnstableField:
type: string
- unstable: true
+ stability: unstable
CommandParamStructRecursiveTwo:
description: "This command parameter struct type contains a field that
@@ -593,7 +601,7 @@ structs:
fields:
notSupersetField:
type: intStringToInt
- unstable: false
+ stability: stable
NewValidatorStruct:
description: "This struct contains a field where the new version contains a validator while
@@ -601,7 +609,7 @@ structs:
fields:
newValidatorField:
type: int
- unstable: false
+ stability: stable
validator:
lt: 0
@@ -610,7 +618,7 @@ structs:
fields:
validatorsNotEqualField:
type: double
- unstable: false
+ stability: stable
validator:
lt: 0.0
gt: -1.1
@@ -623,7 +631,7 @@ structs:
fields:
addedRequiredTypeField:
type: string
- unstable: false
+ stability: stable
StableRequiredNoDefaultTypeFieldStruct:
description: "This struct contains a field that is stable and required with no default value
@@ -631,14 +639,14 @@ structs:
fields:
stableRequiredNoDefaultTypeField:
type: string
- unstable: false
+ stability: stable
ArrayTypeStruct:
description: "Struct with ArrayType field."
fields:
ArrayCommandParameter:
type: array<string>
- unstable: false
+ stability: stable
StructCommandParameterTypeRecursive:
description: "This param struct type contains a field that is not compatible between the
@@ -646,14 +654,14 @@ structs:
fields:
structCommandParameterTypeRecursiveField:
type: intStringToInt
- unstable: false
+ stability: stable
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
+ stability: stable
type:
variant: [int, bool]
@@ -662,7 +670,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<bool>]
@@ -671,7 +679,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [int, bool]
@@ -680,7 +688,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<bool>]
@@ -690,14 +698,14 @@ structs:
fields:
variantField:
type: int
- unstable: false
+ stability: stable
VariantRecursiveStruct:
description: "This struct contains a field where the new variant types are not
compatible with the old variant types"
fields:
variantRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [int, intStringBoolToIntString]
@@ -706,7 +714,7 @@ structs:
compatible with the old variant types"
fields:
variantRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<intStringBoolToIntString>]
@@ -715,7 +723,7 @@ structs:
while the new one does not"
fields:
variantStructNotSupersetField:
- unstable: false
+ stability: stable
type:
variant: [int, string]
@@ -724,7 +732,7 @@ structs:
while the new one does not"
fields:
variantStructNotSupersetField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>]
@@ -733,7 +741,7 @@ structs:
variant struct are not compatible"
fields:
variantStructRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterTypeRecursive]
@@ -742,12 +750,12 @@ structs:
variant struct are not compatible"
fields:
variantStructRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>, array<StructCommandParameterTypeRecursive>]
MissingUnstableFieldNewFieldStruct:
- description: "This struct contains a field that missing the 'unstable' field in the new
+ description: "This struct contains a field that missing the 'stability' field in the new
command."
fields:
missingUnstableFieldNewField:
@@ -755,7 +763,7 @@ structs:
MissingUnstableFieldAddedNewFieldStruct:
description: "This struct contains an added field in the new command that is missing the
- 'unstable' field."
+ 'stability' field."
fields:
missingUnstableFieldAddedNewField:
type: string
@@ -784,14 +792,14 @@ structs:
fields:
ok:
type: bool
- unstable: false
+ stability: stable
BoolToOptionalBoolStruct:
description: "bool field replaced by optionalBool"
fields:
ok:
type: optionalBool
- unstable: false
+ stability: stable
commands:
invalidAPIVersionNew:
@@ -864,7 +872,7 @@ commands:
fields:
newRequiredParam:
type: string
- unstable: false
+ stability: stable
newStableParameterAdded:
description: "new command fails because it adds a new parameter as a stable field"
@@ -880,7 +888,7 @@ commands:
unstable: false
commandParameterUnstable:
- description: "new unstable command parameter fails because it is stable
+ description: "new stability command parameter fails because it is stable
in the corresponding old command"
command_name: commandParameterUnstable
namespace: ignored
@@ -891,7 +899,21 @@ commands:
fields:
newUnstableParameter:
type: string
- unstable: true
+ stability: unstable
+
+ commandParameterInternal:
+ description: "new internal command parameter fails because it is stable
+ in the corresponding old command"
+ command_name: commandParameterInternal
+ namespace: ignored
+ cpp_name: commandParameterInternal
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+ fields:
+ newInternalParameter:
+ type: string
+ stability: internal
commandParameterStableRequiredNoDefault:
description: "new required stable command parameter with no default value fails
@@ -905,7 +927,7 @@ commands:
fields:
newRequiredStableParam:
type: string
- unstable: false
+ stability: stable
commandParameterRequired:
description: "new required command parameter fails because it is optional
@@ -920,7 +942,7 @@ commands:
newRequiredParam:
type: string
optional: false
- unstable: false
+ stability: stable
oldCommandParameterTypeBsonSerializationAny:
description: "old command fails because it has a parameter type that has a
@@ -934,7 +956,7 @@ commands:
fields:
bsonTypeAnyParam:
type: oldBsonSerializationTypeAny
- unstable: false
+ stability: stable
newCommandParameterTypeBsonSerializationAny:
description: "new command fails because it has a parameter type that has a
@@ -948,7 +970,7 @@ commands:
fields:
bsonTypeAnyParam:
type: newBsonSerializationTypeAny
- unstable: false
+ stability: stable
oldParamTypeBsonAnyAllowList:
description: "old command fails because it has a parameter type that has a
@@ -963,7 +985,7 @@ commands:
fields:
bsonTypeAnyParam:
type: oldBsonSerializationTypeAny
- unstable: false
+ stability: stable
newParamTypeBsonAnyAllowList:
description: "new command fails because it has a parameter type that has a
@@ -978,7 +1000,7 @@ commands:
fields:
bsonTypeAnyParam:
type: newBsonSerializationTypeAny
- unstable: false
+ stability: stable
commandParameterTypeBsonSerializationAnyNotAllowed:
description: "command fails because it has a parameter type that has a
@@ -993,7 +1015,7 @@ commands:
fields:
bsonTypeAnyParam:
type: bsonSerializationTypeAny
- unstable: false
+ stability: stable
commandParameterCppTypeNotEqual:
description: "command fails because it has a parameter type that has a
@@ -1008,7 +1030,7 @@ commands:
fields:
cppTypeNotEqualParam:
type: bsonSerializationTypeAnyCppTypeNotEqual
- unstable: false
+ stability: stable
commandParameterSerializerNotEqual:
description: "command fails because it has a parameter type that has a
@@ -1023,7 +1045,7 @@ commands:
fields:
serializerNotEqualParam:
type: bsonSerializationTypeAnySerializerNotEqual
- unstable: false
+ stability: stable
commandParameterDeserializerNotEqual:
description: "command fails because it has a parameter type that has a
@@ -1038,7 +1060,7 @@ commands:
fields:
deserializerNotEqualParam:
type: bsonSerializationTypeAnyDeserializerNotEqual
- unstable: false
+ stability: stable
oldCommandParamTypeBsonAnyUnstable:
description: "old command fails because it has a parameter type that has a
@@ -1053,7 +1075,7 @@ commands:
bsonTypeAnyUnstableParam:
type: oldBsonSerializationTypeAny
optional: true
- unstable: false
+ stability: stable
newCommandParamTypeBsonAnyUnstable:
description: "new command fails because it has a parameter type that has a
@@ -1068,7 +1090,7 @@ commands:
bsonTypeAnyUnstableParam:
type: newBsonSerializationTypeAny
optional: true
- unstable: false
+ stability: stable
commandParamTypeBsonAnyNotAllowedUnstable:
description: "command fails because it has a parameter type that has a
@@ -1084,7 +1106,7 @@ commands:
bsonTypeAnyUnstableParam:
type: bsonSerializationTypeAny
optional: true
- unstable: false
+ stability: stable
commandParameterCppTypeNotEqualUnstable:
description: "command fails because it has a parameter type that has a
@@ -1100,7 +1122,7 @@ commands:
cppTypeNotEqualParam:
type: bsonSerializationTypeAnyCppTypeNotEqual
optional: true
- unstable: false
+ stability: stable
commandParameterSerializerNotEqualUnstable:
description: "command fails because it has a parameter type that has a
@@ -1116,7 +1138,7 @@ commands:
serializerNotEqualParam:
type: bsonSerializationTypeAnySerializerNotEqual
optional: true
- unstable: false
+ stability: stable
commandParameterDeserializerNotEqualUnstable:
description: "command fails because it has a parameter type that has a
@@ -1132,7 +1154,7 @@ commands:
deserializerNotEqualParam:
type: bsonSerializationTypeAnyDeserializerNotEqual
optional: true
- unstable: false
+ stability: stable
parameterFieldTypeBsonAnyWithVariantUnstable:
description: "command fails when its paramter field variant types have bson_serialization_type
@@ -1147,7 +1169,7 @@ commands:
variantAnyUnstableField:
type: BsonSerializationTypeWithVariantAnyStruct
optional: true
- unstable: false
+ stability: stable
newlyAddedParamBsonAnyNotAllowed:
description: "command fails when its parameter is newly added and has bson type 'any'
@@ -1162,7 +1184,7 @@ commands:
newlyAddedBsonAnyNotAllowedParam:
type: bsonSerializationTypeAny
optional: true
- unstable: false
+ stability: stable
newCommandParameterTypeEnumNotSuperset:
description: "new command fails because its parameter type is an enum that is not
@@ -1176,7 +1198,7 @@ commands:
fields:
enumNotSupersetParam:
type: EnumNotSuperset
- unstable: false
+ stability: stable
newCommandParameterTypeNotEnum:
description: "new command fails because its parameter type is not an enum when the
@@ -1190,7 +1212,7 @@ commands:
fields:
newParamNotEnum:
type: string
- unstable: false
+ stability: stable
newCommandParameterTypeNotStruct:
description: "new command fails because its parameter type is not a struct when the
@@ -1204,7 +1226,7 @@ commands:
fields:
newParamNotStruct:
type: string
- unstable: false
+ stability: stable
newCommandParameterTypeEnumOrStructOne:
description: "new command fails because its parameter type is an enum while the
@@ -1218,7 +1240,7 @@ commands:
fields:
newParamEnum:
type: EnumNotSuperset
- unstable: false
+ stability: stable
newCommandParameterTypeEnumOrStructTwo:
description: "new command fails because its parameter type is a struct while the
@@ -1232,7 +1254,7 @@ commands:
fields:
newParamStruct:
type: StructCommandParameterType
- unstable: false
+ stability: stable
newCommandParameterTypeBsonNotSuperset:
description: "new command fails because its parameter type has a bson_serialization_type
@@ -1247,7 +1269,7 @@ commands:
fields:
newParamBsonNotSuperset:
type: intStringToInt
- unstable: false
+ stability: stable
newCommandParameterTypeStructRecursiveOne:
description: "new command fails because its parameter type is a struct that is
@@ -1261,7 +1283,7 @@ commands:
fields:
stableToUnstableStructParameter:
type: CommandParamStructRecursiveOne
- unstable: false
+ stability: stable
newCommandParameterTypeStructRecursiveTwo:
description: "new command fails because its parameter type is a struct that is
@@ -1275,7 +1297,7 @@ commands:
fields:
notSupersetStructParameter:
type: CommandParamStructRecursiveTwo
- unstable: false
+ stability: stable
newCommandParameterValidator:
description: "new command fails because it contains a parameter that contains a validator
@@ -1289,7 +1311,7 @@ commands:
fields:
newParam:
type: int
- unstable: false
+ stability: stable
validator:
lt: 0
@@ -1305,7 +1327,7 @@ commands:
fields:
newParam:
type: double
- unstable: false
+ stability: stable
validator:
lt: 0.0
gt: -1.1
@@ -1345,6 +1367,16 @@ commands:
api_version: "1"
reply_type: UnstableNewFieldReply
+ newReplyFieldInternal:
+ description: "new command fails because it contains an internal reply field that is stable
+ in the corresponding old command"
+ command_name: newReplyFieldInternal
+ namespace: ignored
+ cpp_name: newReplyFieldInternal
+ strict: true
+ api_version: "1"
+ reply_type: InternalNewFieldReply
+
unstableToStableReplyField:
description: "new command fails because it contains a stable reply field that is unstable
in the corresponding old command"
@@ -1537,7 +1569,7 @@ commands:
fields:
variantAnyField:
type: BsonSerializationTypeWithVariantAnyStruct
- unstable: false
+ stability: stable
parameterFieldTypeBsonAnyWithVariantWithArray:
description: "command fails when its parameter field variant types have bson_serialization_type
@@ -1551,7 +1583,7 @@ commands:
fields:
variantAnyField:
type: BsonSerializationTypeWithVariantAnyStructWithArray
- unstable: false
+ stability: stable
commandTypeBsonAnyWithVariant:
description: "command fails when its variant types have bson_serialization_type
@@ -1941,6 +1973,17 @@ commands:
api_version: "1"
reply_type: OkReply
+ newTypeFieldInternal:
+ description: "new command fails because it contains an internal type field that is stable
+ in the corresponding old command"
+ command_name: newTypeFieldInternal
+ namespace: type
+ type: InternalNewFieldReply
+ cpp_name: newTypeFieldInternal
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+
newTypeFieldRequired:
description: "new command fails because it contains a required reply field that is
optional in the corresponding old command"
@@ -2122,7 +2165,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, bool]
@@ -2137,7 +2180,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<bool>]
@@ -2152,7 +2195,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParamTwo:
- unstable: false
+ stability: stable
type:
variant: [int, string]
@@ -2167,7 +2210,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParamTwo:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>]
@@ -2183,7 +2226,7 @@ commands:
fields:
variantParam:
type: int
- unstable: false
+ stability: stable
newParamVariantRecursive:
description: "new command fails because its param type is a variant type that is not
@@ -2196,7 +2239,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [int, intStringBoolToIntString]
@@ -2211,7 +2254,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<intStringBoolToIntString>]
@@ -2226,7 +2269,7 @@ commands:
reply_type: OkReply
fields:
variantStructNotSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, string]
@@ -2241,7 +2284,7 @@ commands:
reply_type: OkReply
fields:
variantStructNotSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>]
@@ -2257,7 +2300,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterTypeRecursive]
@@ -2273,7 +2316,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>, array<StructCommandParameterTypeRecursive>]
@@ -2503,7 +2546,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
ArrayCommandParameterTypeError:
@@ -2518,7 +2561,7 @@ commands:
fields:
parameterStruct:
type: array<StructType>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
accessCheckTypeChange:
@@ -2794,7 +2837,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
ArrayCommandTypeErrorNoArrayNew:
@@ -2809,7 +2852,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
ArrayCommandParameterNoArrayOld:
@@ -2824,7 +2867,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
ArrayCommandParameterNoArrayNew:
@@ -2839,12 +2882,12 @@ commands:
fields:
parameterStruct:
type: ArrayTypeStruct
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
newReplyFieldMissingUnstableField:
description: "new command fails because it contains a reply field that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: newReplyFieldMissingUnstableField
namespace: ignored
cpp_name: newReplyFieldMissingUnstableField
@@ -2854,7 +2897,7 @@ commands:
newCommandTypeFieldMissingUnstableField:
description: "new command fails because it contains a command type field that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: newCommandTypeFieldMissingUnstableField
namespace: type
cpp_name: newCommandTypeFieldMissingUnstableField
@@ -2865,7 +2908,7 @@ commands:
newParameterMissingUnstableField:
description: "new command fails because it contains a parameter that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: newParameterMissingUnstableField
namespace: ignored
cpp_name: newParameterMissingUnstableField
@@ -2878,7 +2921,7 @@ commands:
addedNewParameterMissingUnstableField:
description: "new command fails because it contains a new parameter that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: addedNewParameterMissingUnstableField
namespace: ignored
cpp_name: addedNewParameterMissingUnstableField
@@ -2892,7 +2935,7 @@ commands:
addedNewReplyFieldMissingUnstableField:
description: "new command fails because it contains a new reply field that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: addedNewReplyFieldMissingUnstableField
namespace: ignored
cpp_name: addedNewReplyFieldMissingUnstableField
@@ -2902,7 +2945,7 @@ commands:
addedNewCommandTypeFieldMissingUnstableField:
description: "new command fails because it contains a new command type field that is missing
- the 'unstable' field"
+ the 'stability' field"
command_name: addedNewCommandTypeFieldMissingUnstableField
namespace: type
type: MissingUnstableFieldAddedNewFieldStruct
@@ -2965,7 +3008,7 @@ commands:
reply_type: OkReply
fields:
NewRemovedChainedTypeParameter:
- unstable: false
+ stability: stable
type: NewRemovedChainedTypeStruct
newReplyAddedChainedType:
@@ -2986,7 +3029,7 @@ commands:
api_version: "1"
fields:
flag1:
- unstable: false
+ stability: stable
type: bool
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 31e9382b5ac..526d61a222a 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/new/error_reply.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/new/error_reply.idl
@@ -40,7 +40,7 @@ structs:
fields:
errorLabels:
type: StructType
- unstable: false
+ stability: stable
StructType:
description: "This struct contains a field that is non-optional in the old
@@ -49,4 +49,4 @@ structs:
structField:
type: string
optional: true
- unstable: false
+ stability: stable
diff --git a/buildscripts/idl/tests/compatibility_test_fail/new/imports.idl b/buildscripts/idl/tests/compatibility_test_fail/new/imports.idl
index a9e8a09438e..0eaa9546da8 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
+ stability: unstable
diff --git a/buildscripts/idl/tests/compatibility_test_fail/newly_added_commands/newly_added_commands.idl b/buildscripts/idl/tests/compatibility_test_fail/newly_added_commands/newly_added_commands.idl
index c07063ec61d..df3da6398c6 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/newly_added_commands/newly_added_commands.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/newly_added_commands/newly_added_commands.idl
@@ -53,7 +53,7 @@ structs:
fields:
newStructFieldTypeContainsAny:
type: bsonSerializationTypeAny
- unstable: false
+ stability: stable
commands:
newCommandParameterNoUnstableField:
@@ -99,7 +99,7 @@ commands:
fields:
flag1:
type: bsonSerializationTypeAny
- unstable: false
+ stability: stable
reply_type: OkReply
newCommandReplyBsonSerializationTypeAny:
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 9901b0d4bb6..4fba33cd45d 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
@@ -142,7 +142,15 @@ structs:
fields:
unstableNewField:
type: string
- unstable: false
+ stability: stable
+
+ InternalNewFieldReply:
+ description: "This reply contains a field that is stable in the old command but is
+ internal in the new command."
+ fields:
+ internalNewField:
+ type: string
+ stability: stable
StableNewReplyField:
description: "This struct contains a reply field that is unstable in the old command but is
@@ -167,7 +175,7 @@ structs:
fields:
optionalNewField:
type: string
- unstable: false
+ stability: stable
RequiredNewField:
description: "This struct contains a field that is optional in the old command but is
@@ -176,7 +184,7 @@ structs:
requiredNewField:
type: string
optional: true
- unstable: false
+ stability: stable
MissingNewFieldReply:
description: "This reply contains a field that exists in the old command but is
@@ -184,7 +192,7 @@ structs:
fields:
missingNewField:
type: string
- unstable: false
+ stability: stable
EnumNotSubsetReply:
description: "This reply contains an enum field where the new enum values is not a subset
@@ -192,7 +200,7 @@ structs:
fields:
enumNotSubsetReplyField:
type: NewReplyFieldEnumNotSubset
- unstable: false
+ stability: stable
NotEnumFieldReply:
description: "This reply contains a field that is an enum type in the old command but
@@ -200,7 +208,7 @@ structs:
fields:
notEnumReplyField:
type: NewReplyFieldEnumNotSubset
- unstable: false
+ stability: stable
NotStructFieldReply:
description: "This reply contains a field that is a struct type in the old command but
@@ -208,7 +216,7 @@ structs:
fields:
notStructReplyField:
type: StructReplyFieldType
- unstable: false
+ stability: stable
StructReplyFieldType:
description: "This is a struct reply field type"
@@ -219,7 +227,7 @@ structs:
fields:
EnumOrStructReplyField:
type: intToIntString
- unstable: false
+ stability: stable
BsonNotSubsetReply:
description: "This reply contains a field type where the new bson_serialization_type
@@ -227,7 +235,7 @@ structs:
fields:
bsonNotSubsetReplyField:
type: intToIntString
- unstable: false
+ stability: stable
BsonNotSubsetReplyTwo:
description: "This reply contains a field type where the new bson_serialization_type
@@ -235,7 +243,7 @@ structs:
fields:
bsonNotSubsetReplyFieldTwo:
type: intStringToIntStringBool
- unstable: false
+ stability: stable
OldBsonSerializationTypeAnyReply:
description: "This reply contains a field whose old type has a bson_serialization_type
@@ -243,7 +251,7 @@ structs:
fields:
oldBsonSerializationTypeAnyReplyField:
type: oldBsonSerializationTypeAny
- unstable: false
+ stability: stable
NewBsonSerializationTypeAnyReply:
description: "This reply contains a field whose new type has a bson_serialization_type
@@ -251,7 +259,7 @@ structs:
fields:
newBsonSerializationTypeAnyReplyField:
type: newBsonSerializationTypeAny
- unstable: false
+ stability: stable
BsonSerializationTypeAnyReply:
description: "This reply contains a field whose old and new type have a
@@ -259,7 +267,7 @@ structs:
fields:
bsonSerializationTypeAnyReplyField:
type: bsonSerializationTypeAny
- unstable: false
+ stability: stable
NewlyAddedBsonSerializationTypeAnyReply:
description: "This reply contains a newly added field whose type has a
@@ -272,7 +280,7 @@ structs:
fields:
oldBsonSerializationTypeAnyUnstableReplyField:
type: oldBsonSerializationTypeAny
- unstable: true
+ stability: unstable
NewBsonSerializationTypeAnyUnstableReply:
description: "This reply contains a field that is unstable in the old version
@@ -281,7 +289,7 @@ structs:
fields:
newBsonSerializationTypeAnyUnstableReplyField:
type: newBsonSerializationTypeAny
- unstable: true
+ stability: unstable
BsonSerializationTypeAnyUnstableReply:
description: "This reply contains a field that is unstable in the old version
@@ -290,7 +298,7 @@ structs:
fields:
bsonSerializationTypeAnyUnstableReplyField:
type: bsonSerializationTypeAny
- unstable: true
+ stability: unstable
BsonSerializationTypeWithVariantAnyUnstableReply:
description: "This reply contains a field whose old and new variant types have a
@@ -300,7 +308,7 @@ structs:
bsonSerializationTypeWithVariantAnyUnstableReplyField:
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
- unstable: true
+ stability: unstable
CppTypeNotEqualUnstableReply:
description: "This reply contains a field whose old and new type have a
@@ -309,7 +317,7 @@ structs:
fields:
cppTypeNotEqualReplyUnstableField:
type: bsonSerializationTypeAnyCppTypeNotEqual
- unstable: true
+ stability: unstable
SerializerNotEqualUnstableReply:
description: "This reply contains a field whose old and new type have a
@@ -318,7 +326,7 @@ structs:
fields:
serializerNotEqualReplyUnstableField:
type: bsonSerializationTypeAnySerializerNotEqual
- unstable: true
+ stability: unstable
DeserializerNotEqualUnstableReply:
description: "This reply contains a field whose old and new type have a
@@ -327,14 +335,14 @@ structs:
fields:
deserializerNotEqualReplyUnstableField:
type: bsonSerializationTypeAnyDeserializerNotEqual
- unstable: true
+ stability: unstable
NewlyAddedBsonSerializationTypeAnyStruct:
description: "This struct contains a newly added field whose type has a
bson_serialization_type that contains 'any' that is not explicitly allowed"
fields:
newlyAddedBsonSerializationTypeAnyStructField:
- unstable: true
+ stability: unstable
type:
variant: [string, bsonSerializationTypeAny]
@@ -344,7 +352,7 @@ structs:
that contains 'any'"
fields:
oldBsonSerializationTypeAnyUnstableStructField:
- unstable: true
+ stability: unstable
type: oldBsonSerializationTypeAny
NewBsonSerializationTypeAnyUnstableStruct:
@@ -353,7 +361,7 @@ structs:
that contains 'any'"
fields:
newBsonSerializationTypeAnyUnstableStructField:
- unstable: true
+ stability: unstable
type: newBsonSerializationTypeAny
BsonSerializationTypeAnyUnstableStruct:
@@ -362,7 +370,7 @@ structs:
that contains 'any' that is not explicitly allowed."
fields:
bsonSerializationTypeAnyUnstableStructField:
- unstable: true
+ stability: unstable
type: bsonSerializationTypeAny
BsonSerializationTypeWithVariantAnyUnstableStruct:
@@ -370,7 +378,7 @@ structs:
that contains 'any' that is not compatible and where the old field is unstable"
fields:
bsonSerializationTypeWithVariantAnyUnstableStructField:
- unstable: true
+ stability: unstable
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
@@ -380,7 +388,7 @@ structs:
not equal and where the old field is unstable"
fields:
cppTypeNotEqualStructUnstableField:
- unstable: true
+ stability: unstable
type: bsonSerializationTypeAnyCppTypeNotEqual
SerializerNotEqualUnstableStruct:
@@ -389,7 +397,7 @@ structs:
not equal and where the old field is unstable"
fields:
serializerNotEqualStructUnstableField:
- unstable: true
+ stability: unstable
type: bsonSerializationTypeAnySerializerNotEqual
DeserializerNotEqualUnstableStruct:
@@ -398,7 +406,7 @@ structs:
not equal and where the old field is unstable"
fields:
deserializerNotEqualStructUnstableField:
- unstable: true
+ stability: unstable
type: bsonSerializationTypeAnyDeserializerNotEqual
BsonSerializationTypeWithVariantAnyStruct:
@@ -406,7 +414,7 @@ structs:
bson_serialization_type that contains 'any' that is not compatible"
fields:
bsonSerializationTypeAnyStructField:
- unstable: false
+ stability: stable
type:
variant: [oldBsonSerializationTypeAny, newBsonSerializationTypeAny]
@@ -415,7 +423,7 @@ structs:
bson_serialization_type that contains 'any' that is not compatible"
fields:
bsonSerializationTypeAnyStructField:
- unstable: false
+ stability: stable
type:
variant: [array<oldBsonSerializationTypeAny>,
array<newBsonSerializationTypeAny>]
@@ -426,7 +434,7 @@ structs:
fields:
cppTypeNotEqualReplyField:
type: bsonSerializationTypeAnyCppTypeNotEqual
- unstable: false
+ stability: stable
SerializerNotEqualReply:
description: "This reply contains a field whose old and new type have a
@@ -435,7 +443,7 @@ structs:
fields:
serializerNotEqualReplyField:
type: bsonSerializationTypeAnySerializerNotEqual
- unstable: false
+ stability: stable
DeserializerNotEqualReply:
description: "This reply contains a field whose old and new type have a
@@ -444,7 +452,7 @@ structs:
fields:
deserializerNotEqualReplyField:
type: bsonSerializationTypeAnyDeserializerNotEqual
- unstable: false
+ stability: stable
StructFieldTypeRecursiveReplyOne:
description: "This reply contains a field whose new type is a struct that is not
@@ -452,7 +460,7 @@ structs:
fields:
structReplyField:
type: UnstableNewFieldReply
- unstable: false
+ stability: stable
StructFieldTypeRecursiveReplyTwo:
description: "This reply contains a field whose new type is a struct that is not
@@ -460,7 +468,7 @@ structs:
fields:
structReplyField:
type: StructType
- unstable: false
+ stability: stable
StructType:
description: "This struct contains a field whose new type is incompatible with the
@@ -468,7 +476,7 @@ structs:
fields:
fieldOne:
type: BsonNotSubsetReply
- unstable: false
+ stability: stable
NewVariantTypeReply:
description: "This reply contains a new field that has a variant type while the old field
@@ -476,7 +484,7 @@ structs:
fields:
newVariantTypeReplyField:
type: int
- unstable: false
+ stability: stable
NewVariantNotSubsetReply:
description: "This reply contains a field whose new variant types are not a subset
@@ -485,14 +493,14 @@ structs:
variantNotSubsetReplyField:
type:
variant: [int, string]
- unstable: false
+ stability: stable
NewVariantNotSubsetReplyWithArray:
description: "This reply contains a field whose new variant types are not a subset
of the old variant types"
fields:
variantNotSubsetReplyField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>]
@@ -501,7 +509,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [int, string]
@@ -510,7 +518,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>]
@@ -519,7 +527,7 @@ structs:
compatible with the old variant type"
fields:
variantRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, intStringToIntStringBool]
@@ -528,7 +536,7 @@ structs:
compatible with the old variant type"
fields:
variantRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<intStringToIntStringBool>]
@@ -537,7 +545,7 @@ structs:
of the old variant types"
fields:
variantStructNotSubsetReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, string]
@@ -546,7 +554,7 @@ structs:
of the old variant types"
fields:
variantStructNotSubsetReplyField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>]
@@ -555,7 +563,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, StructFieldTypeRecursiveReplyTwo]
@@ -564,7 +572,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<StructFieldTypeRecursiveReplyTwo>]
@@ -574,7 +582,7 @@ structs:
fields:
stableToUnstableField:
type: string
- unstable: false
+ stability: stable
CommandParamStructRecursiveTwo:
description: "This command parameter struct type contains a field that
@@ -582,7 +590,7 @@ structs:
fields:
notSupersetField:
type: intStringToInt
- unstable: false
+ stability: stable
NewValidatorStruct:
description: "This struct contains a field where the new version contains a validator while
@@ -590,7 +598,7 @@ structs:
fields:
newValidatorField:
type: int
- unstable: false
+ stability: stable
ValidatorsNotEqualStruct:
description: "This struct contains a field where the new and old validators are not exactly equal"
@@ -603,7 +611,7 @@ structs:
lte: 2.0
gte: -2.97
callback: "callback"
- unstable: false
+ stability: stable
AddedRequiredTypeFieldStruct:
description: "This struct contains a field that is added and required in the new version."
@@ -614,7 +622,7 @@ structs:
fields:
stableRequiredNoDefaultTypeField:
type: string
- unstable: true
+ stability: unstable
StructCommandParameterTypeRecursive:
description: "This param struct type contains a field that is not compatible between the
@@ -622,14 +630,14 @@ structs:
fields:
structCommandParameterTypeRecursiveField:
type: intStringToInt
- unstable: false
+ stability: stable
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
+ stability: stable
type:
variant: [int, bool, string]
@@ -638,7 +646,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<bool>, array<string>]
@@ -647,7 +655,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string, double]
@@ -656,7 +664,7 @@ structs:
of the old variant types"
fields:
variantNotSupersetFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<bool>, array<string>, array<double>]
@@ -665,7 +673,7 @@ structs:
old one is"
fields:
variantField:
- unstable: false
+ stability: stable
type:
variant: [int, bool]
@@ -674,7 +682,7 @@ structs:
compatible with the old variant types"
fields:
variantRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [int, intStringBoolToIntString]
@@ -683,7 +691,7 @@ structs:
compatible with the old variant types"
fields:
variantRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<intStringBoolToIntString>]
@@ -692,7 +700,7 @@ structs:
while the new one does not"
fields:
variantStructNotSupersetField:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterType]
@@ -701,7 +709,7 @@ structs:
while the new one does not"
fields:
variantStructNotSupersetField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>, array<StructCommandParameterType>]
@@ -710,7 +718,7 @@ structs:
variant struct are not compatible"
fields:
variantStructRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterTypeRecursive]
@@ -719,7 +727,7 @@ structs:
variant struct are not compatible"
fields:
variantStructRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>, array<StructCommandParameterTypeRecursive>]
@@ -728,19 +736,19 @@ structs:
fields:
ArrayCommandParameter:
type: array<string>
- unstable: false
+ stability: stable
MissingUnstableFieldNewFieldStruct:
- description: "This struct contains a field that missing the 'unstable' field in the new
+ description: "This struct contains a field that missing the 'stability' field in the new
command."
fields:
missingUnstableFieldNewField:
type: string
- unstable: false
+ stability: stable
MissingUnstableFieldAddedNewFieldStruct:
description: "This struct contains an added field in the new command that is missing the
- 'unstable' field."
+ 'stability' field."
IncompatibleChainedStructReply:
description: "This reply contains an incompatible chained struct"
@@ -765,14 +773,14 @@ structs:
fields:
ok:
type: optionalBool
- unstable: false
+ stability: stable
BoolToOptionalBoolStruct:
description: "bool field replaced by optionalBool"
fields:
ok:
type: bool
- unstable: false
+ stability: stable
commands:
invalidAPIVersionOld:
@@ -825,7 +833,7 @@ commands:
fields:
parameterToRemove:
type: string
- unstable: false
+ stability: stable
addedNewCommandParameterRequired:
description: "new command parameter fails because it is required when
@@ -858,7 +866,21 @@ commands:
fields:
newUnstableParameter:
type: string
- unstable: false
+ stability: stable
+
+ commandParameterInternal:
+ description: "new internal command parameter fails because it is stable
+ in the corresponding old command"
+ command_name: commandParameterInternal
+ namespace: ignored
+ cpp_name: commandParameterInternal
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+ fields:
+ newInternalParameter:
+ type: string
+ stability: stable
commandParameterStableRequiredNoDefault:
description: "new required stable command parameter with no default value fails
@@ -872,7 +894,7 @@ commands:
fields:
newRequiredStableParam:
type: string
- unstable: true
+ stability: unstable
commandParameterRequired:
description: "new required command parameter fails because it is optional
@@ -887,7 +909,7 @@ commands:
newRequiredParam:
type: string
optional: true
- unstable: false
+ stability: stable
oldCommandParameterTypeBsonSerializationAny:
description: "old command fails because it has a parameter type that has a
@@ -901,7 +923,7 @@ commands:
fields:
bsonTypeAnyParam:
type: oldBsonSerializationTypeAny
- unstable: false
+ stability: stable
newCommandParameterTypeBsonSerializationAny:
description: "new command fails because it has a parameter type that has a
@@ -915,7 +937,7 @@ commands:
fields:
bsonTypeAnyParam:
type: newBsonSerializationTypeAny
- unstable: false
+ stability: stable
oldParamTypeBsonAnyAllowList:
description: "old command fails because it has a parameter type that has a
@@ -930,7 +952,7 @@ commands:
fields:
bsonTypeAnyParam:
type: oldBsonSerializationTypeAny
- unstable: false
+ stability: stable
newParamTypeBsonAnyAllowList:
description: "new command fails because it has a parameter type that has a
@@ -945,7 +967,7 @@ commands:
fields:
bsonTypeAnyParam:
type: newBsonSerializationTypeAny
- unstable: false
+ stability: stable
commandParameterTypeBsonSerializationAnyNotAllowed:
description: "command fails because it has a parameter type that has a
@@ -960,7 +982,7 @@ commands:
fields:
bsonTypeAnyParam:
type: bsonSerializationTypeAny
- unstable: false
+ stability: stable
commandParameterCppTypeNotEqual:
description: "command fails because it has a parameter type that has a
@@ -975,7 +997,7 @@ commands:
fields:
cppTypeNotEqualParam:
type: bsonSerializationTypeAnyCppTypeNotEqual
- unstable: false
+ stability: stable
commandParameterSerializerNotEqual:
description: "command fails because it has a parameter type that has a
@@ -990,7 +1012,7 @@ commands:
fields:
serializerNotEqualParam:
type: bsonSerializationTypeAnySerializerNotEqual
- unstable: false
+ stability: stable
commandParameterDeserializerNotEqual:
description: "command fails because it has a parameter type that has a
@@ -1005,7 +1027,7 @@ commands:
fields:
deserializerNotEqualParam:
type: bsonSerializationTypeAnyDeserializerNotEqual
- unstable: false
+ stability: stable
oldCommandParamTypeBsonAnyUnstable:
description: "old command fails because it has a parameter type that has a
@@ -1019,7 +1041,7 @@ commands:
fields:
bsonTypeAnyUnstableParam:
type: oldBsonSerializationTypeAny
- unstable: true
+ stability: unstable
newCommandParamTypeBsonAnyUnstable:
description: "new command fails because it has a parameter type that has a
@@ -1033,7 +1055,7 @@ commands:
fields:
bsonTypeAnyUnstableParam:
type: newBsonSerializationTypeAny
- unstable: true
+ stability: unstable
commandParamTypeBsonAnyNotAllowedUnstable:
description: "command fails because it has a parameter type that has a
@@ -1048,7 +1070,7 @@ commands:
fields:
bsonTypeAnyUnstableParam:
type: bsonSerializationTypeAny
- unstable: true
+ stability: unstable
commandParameterCppTypeNotEqualUnstable:
description: "command fails because it has a parameter type that has a
@@ -1063,7 +1085,7 @@ commands:
fields:
cppTypeNotEqualParam:
type: bsonSerializationTypeAnyCppTypeNotEqual
- unstable: true
+ stability: unstable
commandParameterSerializerNotEqualUnstable:
description: "command fails because it has a parameter type that has a
@@ -1078,7 +1100,7 @@ commands:
fields:
serializerNotEqualParam:
type: bsonSerializationTypeAnySerializerNotEqual
- unstable: true
+ stability: unstable
commandParameterDeserializerNotEqualUnstable:
description: "command fails because it has a parameter type that has a
@@ -1093,7 +1115,7 @@ commands:
fields:
deserializerNotEqualParam:
type: bsonSerializationTypeAnyDeserializerNotEqual
- unstable: true
+ stability: unstable
parameterFieldTypeBsonAnyWithVariantUnstable:
description: "command fails when its paramter field variant types have bson_serialization_type
@@ -1107,7 +1129,7 @@ commands:
fields:
variantAnyUnstableField:
type: BsonSerializationTypeWithVariantAnyStruct
- unstable: true
+ stability: unstable
newlyAddedParamBsonAnyNotAllowed:
description: "command fails when its parameter is newly added and has bson type 'any'
@@ -1131,7 +1153,7 @@ commands:
fields:
enumNotSupersetParam:
type: EnumNotSuperset
- unstable: false
+ stability: stable
newCommandParameterTypeNotEnum:
description: "new command fails because its parameter type is not an enum when the
@@ -1145,7 +1167,7 @@ commands:
fields:
newParamNotEnum:
type: EnumNotSuperset
- unstable: false
+ stability: stable
newCommandParameterTypeNotStruct:
description: "new command fails because its parameter type is not a struct when the
@@ -1159,7 +1181,7 @@ commands:
fields:
newParamNotStruct:
type: StructCommandParameterType
- unstable: false
+ stability: stable
newCommandParameterTypeEnumOrStructOne:
description: "new command fails because its parameter type is an enum while the
@@ -1173,7 +1195,7 @@ commands:
fields:
newParamEnum:
type: string
- unstable: false
+ stability: stable
newCommandParameterTypeEnumOrStructTwo:
description: "new command fails because its parameter type is a struct while the
@@ -1187,7 +1209,7 @@ commands:
fields:
newParamStruct:
type: string
- unstable: false
+ stability: stable
newCommandParameterTypeBsonNotSuperset:
description: "new command fails because its parameter type has a bson_serialization_type
@@ -1202,7 +1224,7 @@ commands:
fields:
newParamBsonNotSuperset:
type: intStringToInt
- unstable: false
+ stability: stable
newCommandParameterTypeStructRecursiveOne:
description: "new command fails because its parameter type is a struct that is
@@ -1216,7 +1238,7 @@ commands:
fields:
stableToUnstableStructParameter:
type: CommandParamStructRecursiveOne
- unstable: false
+ stability: stable
newCommandParameterTypeStructRecursiveTwo:
description: "new command fails because its parameter type is a struct that is
@@ -1230,7 +1252,7 @@ commands:
fields:
notSupersetStructParameter:
type: CommandParamStructRecursiveTwo
- unstable: false
+ stability: stable
newCommandParameterValidator:
description: "new command fails because it contains a parameter that contains a validator
@@ -1244,7 +1266,7 @@ commands:
fields:
newParam:
type: int
- unstable: false
+ stability: stable
commandParameterValidatorsNotEqual:
description: "new command fails because it contains a parameter that contains a validator
@@ -1257,7 +1279,7 @@ commands:
reply_type: OkReply
fields:
newParam:
- unstable: false
+ stability: stable
type: double
validator:
lt: 0.0
@@ -1298,6 +1320,16 @@ commands:
api_version: "1"
reply_type: UnstableNewFieldReply
+ newReplyFieldInternal:
+ description: "new command fails because it contains an internal reply field that is stable
+ in the corresponding old command"
+ command_name: newReplyFieldInternal
+ namespace: ignored
+ cpp_name: newReplyFieldInternal
+ strict: true
+ api_version: "1"
+ reply_type: InternalNewFieldReply
+
unstableToStableReplyField:
description: "new command fails because it contains a stable reply field that is unstable
in the corresponding old command"
@@ -1489,7 +1521,7 @@ commands:
reply_type: OkReply
fields:
variantAnyField:
- unstable: false
+ stability: stable
type: BsonSerializationTypeWithVariantAnyStruct
parameterFieldTypeBsonAnyWithVariantWithArray:
@@ -1503,7 +1535,7 @@ commands:
reply_type: OkReply
fields:
variantAnyField:
- unstable: false
+ stability: stable
type: BsonSerializationTypeWithVariantAnyStructWithArray
commandTypeBsonAnyWithVariant:
@@ -1978,6 +2010,17 @@ commands:
api_version: "1"
reply_type: OkReply
+ newTypeFieldInternal:
+ description: "new command fails because it contains an internal type field that is stable
+ in the corresponding old command"
+ command_name: newTypeFieldInternal
+ namespace: type
+ type: InternalNewFieldReply
+ cpp_name: newTypeFieldInternal
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+
newTypeFieldRequired:
description: "new command fails because it contains a required reply field that is
optional in the corresponding old command"
@@ -2159,7 +2202,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string]
@@ -2174,7 +2217,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<bool>, array<string>]
@@ -2189,7 +2232,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParamTwo:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string, double]
@@ -2204,7 +2247,7 @@ commands:
reply_type: OkReply
fields:
variantNotSupersetParamTwo:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<bool>, array<string>, array<double>]
@@ -2219,7 +2262,7 @@ commands:
reply_type: OkReply
fields:
variantParam:
- unstable: false
+ stability: stable
type:
variant: [int, bool]
@@ -2234,7 +2277,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [int, intStringBoolToIntString]
@@ -2249,7 +2292,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<intStringBoolToIntString>]
@@ -2264,7 +2307,7 @@ commands:
reply_type: OkReply
fields:
variantStructNotSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterType]
@@ -2279,7 +2322,7 @@ commands:
reply_type: OkReply
fields:
variantStructNotSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>, array<StructCommandParameterType>]
@@ -2295,7 +2338,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterTypeRecursive]
@@ -2311,7 +2354,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [array<int>, array<string>, array<StructCommandParameterTypeRecursive>]
@@ -2541,7 +2584,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
ArrayCommandParameterTypeError:
@@ -2556,7 +2599,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
accessCheckTypeChange:
@@ -2742,7 +2785,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
ArrayCommandTypeErrorNoArrayNew:
@@ -2757,7 +2800,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
ArrayCommandParameterNoArrayOld:
@@ -2772,7 +2815,7 @@ commands:
fields:
parameterStruct:
type: ArrayTypeStruct
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
ArrayCommandParameterNoArrayNew:
@@ -2787,12 +2830,12 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
newReplyFieldMissingUnstableField:
description: "new command fails because it contains a reply field that is missing the
- 'stable' field"
+ 'stability' field"
command_name: newReplyFieldMissingUnstableField
namespace: ignored
cpp_name: newReplyFieldMissingUnstableField
@@ -2802,7 +2845,7 @@ commands:
newCommandTypeFieldMissingUnstableField:
description: "new command fails because it contains a command type field that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: newCommandTypeFieldMissingUnstableField
namespace: type
cpp_name: newCommandTypeFieldMissingUnstableField
@@ -2813,7 +2856,7 @@ commands:
newParameterMissingUnstableField:
description: "new command fails because it contains a parameter that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: newParameterMissingUnstableField
namespace: ignored
cpp_name: newParameterMissingUnstableField
@@ -2822,12 +2865,12 @@ commands:
fields:
missingUnstableFieldNewParameter:
type: int
- unstable: false
+ stability: stable
reply_type: OkReply
addedNewParameterMissingUnstableField:
description: "new command fails because it contains a new parameter that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: addedNewParameterMissingUnstableField
namespace: ignored
cpp_name: addedNewParameterMissingUnstableField
@@ -2837,7 +2880,7 @@ commands:
addedNewReplyFieldMissingUnstableField:
description: "new command fails because it contains a new reply field that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: addedNewReplyFieldMissingUnstableField
namespace: ignored
cpp_name: addedNewReplyFieldMissingUnstableField
@@ -2847,7 +2890,7 @@ commands:
addedNewCommandTypeFieldMissingUnstableField:
description: "new command fails because it contains a new command type field that is missing
- the 'unstable' field"
+ the 'stability' field"
command_name: addedNewCommandTypeFieldMissingUnstableField
namespace: type
type: MissingUnstableFieldAddedNewFieldStruct
@@ -2910,7 +2953,7 @@ commands:
reply_type: OkReply
fields:
NewRemovedChainedTypeParameter:
- unstable: false
+ stability: stable
type: NewRemovedChainedTypeStruct
newReplyAddedChainedType:
@@ -2931,7 +2974,7 @@ commands:
api_version: "1"
fields:
flag1:
- unstable: false
+ stability: stable
type: optionalBool
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 08a5a271c98..108e751de88 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/old/error_reply.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/old/error_reply.idl
@@ -41,7 +41,7 @@ structs:
fields:
errorLabels:
type: StructType
- unstable: false
+ stability: stable
StructType:
description: "This struct contains a field that is non-optional in the old
@@ -49,4 +49,4 @@ structs:
fields:
structField:
type: string
- unstable: false
+ stability: stable
diff --git a/buildscripts/idl/tests/compatibility_test_fail/old/imports.idl b/buildscripts/idl/tests/compatibility_test_fail/old/imports.idl
index 127b1b71205..a5b187052d0 100644
--- a/buildscripts/idl/tests/compatibility_test_fail/old/imports.idl
+++ b/buildscripts/idl/tests/compatibility_test_fail/old/imports.idl
@@ -36,4 +36,4 @@ structs:
fields:
unstableNewField:
type: string
- unstable: false
+ stability: stable
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 5302dd01ed0..0bc6a4964aa 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,7 +98,7 @@ structs:
fields:
stableNewField:
type: string
- unstable: false
+ stability: stable
UnstableNewFieldReplyIgnoreList:
description: "This reply contains a field that is stable in the old command and is
@@ -106,7 +106,7 @@ structs:
fields:
unstableNewFieldIgnoreList:
type: string
- unstable: true
+ stability: unstable
NewReplyTypeEnumOrStructIgnoreList:
description: "the type is a non-enum or struct type in the old command, and an enum or struct
@@ -114,7 +114,7 @@ structs:
fields:
newReplyTypeEnumOrStructIgnoreList:
type: StructType
- unstable: true
+ stability: unstable
RequiredNewFieldReply:
description: "This reply contains a field that is optional in the old command but is
@@ -122,7 +122,7 @@ structs:
fields:
requiredNewField:
type: string
- unstable: false
+ stability: stable
OptionalNewField:
description: "This struct contains a field that is required in the old command but is
@@ -131,14 +131,14 @@ structs:
optionalNewField:
type: string
optional: true
- unstable: false
+ stability: stable
AddedNewFieldReply:
description: "This reply contains a field that is added in the new command."
fields:
addedNewField:
type: string
- unstable: false
+ stability: stable
UnstableOldFieldReply:
description: "This reply contains a field that is unstable in the old command and is
@@ -146,7 +146,7 @@ structs:
fields:
unstableOldField:
type: string
- unstable: true
+ stability: unstable
optional: true
UnstableOptionalNewFieldReplyIgnoreList:
@@ -155,7 +155,7 @@ structs:
fields:
unstableOptionalNewFieldIgnoreList:
type: string
- unstable: true
+ stability: unstable
optional: true
EnumSubsetReply:
@@ -164,7 +164,7 @@ structs:
fields:
replyField:
type: NewReplyFieldEnumSubset
- unstable: false
+ stability: stable
BsonSubsetReply:
description: "This reply contains a field type where the new bson_serialization_type
@@ -172,7 +172,7 @@ structs:
fields:
bsonSubsetReplyField:
type: intStringToInt
- unstable: false
+ stability: stable
BsonSubsetReplyTwo:
description: "This reply contains a field type where the new bson_serialization_type
@@ -180,7 +180,7 @@ structs:
fields:
bsonSubsetReplyFieldTwo:
type: intStringBoolToIntString
- unstable: false
+ stability: stable
StructFieldTypeRecursiveReplyIgnoreList:
description: "This reply contains a field whose new type is a struct that is not
@@ -188,7 +188,7 @@ structs:
fields:
structReplyField:
type: UnstableNewFieldReplyIgnoreList
- unstable: true
+ stability: unstable
StructFieldTypeRecursiveReplyOne:
description: "This reply contains a field whose new type is a struct that is
@@ -196,7 +196,7 @@ structs:
fields:
structReplyField:
type: StableNewFieldReply
- unstable: false
+ stability: stable
StructFieldTypeRecursiveReplyTwo:
description: "This reply contains a field whose new type is a struct that is
@@ -204,7 +204,7 @@ structs:
fields:
structReplyField:
type: StructType
- unstable: false
+ stability: stable
StructType:
description: "This struct contains a field whose new type is compatible with the
@@ -212,7 +212,7 @@ structs:
fields:
fieldOne:
type: BsonSubsetReply
- unstable: false
+ stability: stable
OldVariantTypeReply:
description: "This reply contains an old field that has a variant type while the new field
@@ -220,7 +220,7 @@ structs:
fields:
oldVariantTypeReplyField:
type: int
- unstable: false
+ stability: stable
NewVariantNotSubsetReplyIgnoreList:
description: "This reply contains a field whose new variant types are not a subset
@@ -229,14 +229,14 @@ structs:
variantNotSubsetReplyFieldIgnoreList:
type:
variant: [int, string]
- unstable: true
+ stability: unstable
NewVariantSubsetReply:
description: "This reply contains a field whose new variant types are a subset
of the old variant types"
fields:
variantSubsetReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, string, array<string>]
@@ -245,7 +245,7 @@ structs:
of the old variant types"
fields:
variantSubsetReplyFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [int, string, array<string>]
@@ -254,7 +254,7 @@ structs:
with the old variant type"
fields:
variantRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, intStringBoolToIntString,
array<intStringBoolToIntString>, array<string>]
@@ -264,7 +264,7 @@ structs:
struct type while the old one does"
fields:
variantStructReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, string, array<string>]
@@ -273,7 +273,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, StructFieldTypeRecursiveReplyTwo,
array<StructFieldTypeRecursiveReplyTwo>, array<string>]
@@ -283,7 +283,7 @@ structs:
different from the old variant struct type"
fields:
variantStructRecursiveReplyFieldIgnoreList:
- unstable: true
+ stability: unstable
type:
variant: [int, StructFieldTypeRecursiveReplyTwo]
@@ -292,7 +292,7 @@ structs:
type, but the field is in the ignore list"
fields:
nonVariantToVariantReplyFieldIgnoreList:
- unstable: true
+ stability: unstable
type:
variant: [int, StructFieldTypeRecursiveReplyOne]
@@ -302,7 +302,7 @@ structs:
fields:
nonEnumToEnumReplyIgnoreList:
type: EnumSubsetReply
- unstable: true
+ stability: unstable
CommandParamStructRecursiveOne:
description: "This command parameter struct type contains a stable and optional
@@ -311,7 +311,7 @@ structs:
unstableToStableOptionalField:
type: string
optional: true
- unstable: false
+ stability: stable
CommandParamStructRecursiveTwo:
description: "This command parameter struct type contains a field whose new type is
@@ -319,7 +319,7 @@ structs:
fields:
supersetField:
type: intToIntString
- unstable: false
+ stability: stable
OldValidatorStruct:
description: "This struct contains a field where the old version contains a validator while
@@ -327,14 +327,14 @@ structs:
fields:
oldValidatorField:
type: int
- unstable: false
+ stability: stable
ValidatorsEqualStruct:
description: "This struct contains a field where the new and old validator are exactly equal"
fields:
validatorsEqualField:
type: double
- unstable: false
+ stability: stable
validator:
lt: 0.0
gt: -1.1
@@ -352,7 +352,7 @@ structs:
addedOptionalTypeField:
type: string
optional: true
- unstable: false
+ stability: stable
StableOptionalTypeFieldStruct:
description: "This struct contains a field that is stable and optional in the new version
@@ -361,7 +361,7 @@ structs:
stableOptionalTypeField:
type: string
optional: true
- unstable: false
+ stability: stable
StableWithDefaultTypeFieldStruct:
description: "This struct contains a field that is stable and required with a default value
@@ -370,18 +370,29 @@ structs:
stableWithDefaultTypeField:
type: string
default: ""
- unstable: false
+ stability: stable
RemovedUnstableTypeFieldStruct:
description: "This struct contains a field that is unstable in the old version and
is removed in the new version"
+ RemovedInternalTypeFieldStruct:
+ description: "This struct contains a field that is internal in the old version and
+ is removed in the new version"
+
AddedUnstableTypeFieldStruct:
description: "This struct contains a field that is added and unstable in the new version"
fields:
addedUnstableTypeField:
type: string
- unstable: true
+ stability: unstable
+
+ AddedInternalTypeFieldStruct:
+ description: "This struct contains a field that is added and internal in the new version"
+ fields:
+ addedInternalTypeField:
+ type: string
+ stability: internal
KeptUnstableTypeFieldStruct:
description: "This struct contains a field that is unstable in the new version and also
@@ -389,7 +400,15 @@ structs:
fields:
keptUnstableTypeField:
type: string
- unstable: true
+ stability: unstable
+
+ KeptInternalTypeFieldStruct:
+ description: "This struct contains a field that is internal in the new version and also
+ exists in the old version"
+ fields:
+ keptInternalTypeField:
+ type: string
+ stability: internal
StructCommandParameterTypeRecursive:
description: "This param struct type contains a field that is compatible between the
@@ -397,14 +416,14 @@ structs:
fields:
structCommandParameterTypeRecursiveField:
type: intStringToIntStringBool
- unstable: false
+ stability: stable
VariantSupersetStruct:
description: "This struct contains a field where the new variant types are a superset
of the old variant types"
fields:
variantSupersetField:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string, array<string>]
@@ -413,7 +432,7 @@ structs:
of the old variant types"
fields:
variantSupersetFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string, double, array<string>]
@@ -422,7 +441,7 @@ structs:
old one is not"
fields:
variantField:
- unstable: false
+ stability: stable
type:
variant: [int, bool, array<string>]
@@ -431,7 +450,7 @@ structs:
compatible with the old variant types"
fields:
variantRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
@@ -441,7 +460,7 @@ structs:
while the old one does not"
fields:
variantStructSupersetField:
- unstable: false
+ stability: stable
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
@@ -451,7 +470,7 @@ structs:
variant struct are compatible"
fields:
variantStructRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
@@ -461,7 +480,7 @@ structs:
fields:
anyTypeField:
type: bsonSerializationTypeAnyAllowed
- unstable: false
+ stability: stable
NewlyAddedBsonSerializationTypeAnyReply:
description: "This reply contains a newly added field whose type has a bson_serialization_type
@@ -469,13 +488,22 @@ structs:
fields:
newlyAddedBsonSerializationTypeAnyReplyField:
type: bsonSerializationTypeAnyAllowed
- unstable: false
+ stability: stable
OldUnstableTypeChangesReply:
description: "This reply contains a field that is unstable in the old version and has type changes"
fields:
oldUnstableTypeChangesReplyField:
- unstable: true
+ stability: unstable
+ type: intStringToIntStringBool
+ validator:
+ lt: 0
+
+ OldInternalTypeChangesReply:
+ description: "This reply contains a field that is internal in the old version and has type changes"
+ fields:
+ oldInternalTypeChangesReplyField:
+ stability: internal
type: intStringToIntStringBool
validator:
lt: 0
@@ -485,7 +513,7 @@ structs:
but is also in the ignore list"
fields:
newUnstableTypeChangesReplyFieldIgnoreList:
- unstable: true
+ stability: unstable
type: intStringToIntStringBool
validator:
lt: 0
@@ -497,7 +525,7 @@ structs:
newlyAddedBsonSerializationTypeAnyStructField:
type: bsonSerializationTypeAnyAllowed
optional: true
- unstable: false
+ stability: stable
OldUnstableTypeChangesStruct:
description: "This struct contains a field that is unstable in the old version and has type changes"
@@ -505,7 +533,7 @@ structs:
oldUnstableTypeChangesField:
type: intStringBoolToIntString
optional: true
- unstable: false
+ stability: stable
validator:
lt: 0
@@ -515,7 +543,7 @@ structs:
fields:
newUnstableTypeChangesFieldIgnoreList:
type: intStringBoolToIntString
- unstable: true
+ stability: unstable
validator:
lt: 0
@@ -524,7 +552,7 @@ structs:
bson serialization types is 'any' and is explicitly allowed"
fields:
anyTypeField:
- unstable: false
+ stability: stable
type:
variant: [bsonSerializationTypeAnyAllowed, StructFieldTypeRecursiveReplyTwo,
array<bsonSerializationTypeAnyAllowed>,
@@ -535,22 +563,22 @@ structs:
fields:
ArrayCommandParameter:
type: array<string>
- unstable: false
+ stability: stable
MissingUnstableFieldNewFieldStruct:
- description: "This struct contains a field that missing the 'unstable' field in the new
+ description: "This struct contains a field that missing the 'stability' field in the new
command."
fields:
missingUnstableFieldNewField:
type: string
MissingUnstableFieldOldFieldStruct:
- description: "This struct contains a field that missing the 'unstable' field in the old
+ description: "This struct contains a field that missing the 'stability' field in the old
command."
fields:
missingUnstableFieldNewField:
type: string
- unstable: false
+ stability: stable
CompatibleChainedStructReply:
description: "This reply contains an compatible chained struct"
@@ -567,61 +595,61 @@ structs:
fields:
ok1:
type: bool
- unstable: false
+ stability: stable
optional: true
ok2:
type: optionalBool
- unstable: false
+ stability: stable
OptionalBoolEquivalenceStruct:
description: "First two fields get the types swapped."
fields:
ok1:
type: optionalBool
- unstable: false
+ stability: stable
ok2:
type: bool
- unstable: false
+ stability: stable
optional: true
ok3:
type: optionalBool
- unstable: false
+ stability: stable
OptionalBoolToBoolStruct:
description: "optionalBool field replaced by bool"
fields:
ok:
type: bool
- unstable: false
+ stability: stable
BoolToOptionalBoolStruct:
description: "bool field replaced by optionalBool"
fields:
ok:
type: optionalBool
- unstable: false
+ stability: stable
ReplyWithNewArrayTypeField:
description: "new field is of ArrayType"
fields:
ok:
type: bool
- unstable: false
+ stability: stable
newArrayTypeField:
type: array<int>
optional: true
- unstable: false
+ stability: stable
ReplyWithNewNestedArrayTypeField:
description: "new field is a struct with a field of ArrayType"
fields:
ok:
type: bool
- unstable: false
+ stability: stable
newStructWithArrayTypeField:
type: ArrayTypeStruct
optional: true
- unstable: false
+ stability: stable
commands:
testCommand:
@@ -672,7 +700,7 @@ commands:
newParameter:
type: string
optional: true
- unstable: false
+ stability: stable
addedCommandParameterStable:
description: "new command has an optional stable parameter that is unstable
@@ -687,7 +715,7 @@ commands:
newOptionalStableParam:
type: string
optional: true
- unstable: false
+ stability: stable
addedCommandParameterStableWithDefault:
description: "new command has a required stable parameter with a default value
@@ -702,7 +730,7 @@ commands:
newStableParamWithDefault:
type: string
default: ""
- unstable: false
+ stability: stable
commandParameterUnstableIgnoreList:
description: "new unstable command parameter is stable in the corresponding old
@@ -716,7 +744,7 @@ commands:
fields:
newUnstableParameterIgnoreList:
type: string
- unstable: true
+ stability: unstable
removeCommandParameterUnstable:
description: "new command removes parameter that is unstable
@@ -741,7 +769,7 @@ commands:
newOptionalParam:
type: string
optional: true
- unstable: false
+ stability: stable
addedUnstableCommandParameter:
description: "new command has a new unstable parameter that did not
@@ -755,7 +783,7 @@ commands:
fields:
newUnstableParam:
type: string
- unstable: true
+ stability: unstable
keptUnstableCommandParameter:
description: "new command has an unstable parameter that also
@@ -769,7 +797,7 @@ commands:
fields:
unstableParam:
type: string
- unstable: true
+ stability: unstable
newCommandParameterType:
description: "new command passes because its command parameter type is compatible with
@@ -783,7 +811,7 @@ commands:
fields:
compatibleParameter:
type: string
- unstable: false
+ stability: stable
newCommandParameterTypeEnumSuperset:
description: "new command passes because its command parameter type is an enum that is
@@ -797,7 +825,7 @@ commands:
fields:
parameterEnumSuperset:
type: EnumSuperset
- unstable: false
+ stability: stable
newCommandParameterTypeStruct:
description: "new command passes because its command parameter type is a struct and the
@@ -811,7 +839,7 @@ commands:
fields:
parameterStruct:
type: NewCommandParameterStruct
- unstable: false
+ stability: stable
newCommandParameterTypeBsonSuperset:
description: "new command passes because its parameter type has a bson_serialization_type
@@ -826,7 +854,7 @@ commands:
fields:
bsonSupersetParam:
type: intToIntString
- unstable: false
+ stability: stable
newCommandParameterTypeStructRecursiveOne:
description: "new command passes because its parameter type is a struct that is
@@ -840,7 +868,7 @@ commands:
fields:
unstableToStableOptionalStructParameter:
type: CommandParamStructRecursiveOne
- unstable: false
+ stability: stable
newCommandParameterTypeStructRecursiveTwo:
description: "new command passes because its parameter type is a struct that is
@@ -854,7 +882,7 @@ commands:
fields:
supersetStructParameter:
type: CommandParamStructRecursiveTwo
- unstable: false
+ stability: stable
newlyAddedParamBsonAnyAllowList:
description: "command passes when its parameter is newly added and has bson type 'any'
@@ -869,7 +897,7 @@ commands:
newlyAddedBsonAnyAllowListParam:
type: bsonSerializationTypeAnyAllowed
optional: true
- unstable: false
+ stability: stable
oldUnstableParamTypeChanges:
description: "command passes when it has an old unstable param with incompatible type changes"
@@ -883,7 +911,23 @@ commands:
oldUnstableTypeChangesParam:
type: intStringBoolToIntString
optional: true
- unstable: false
+ stability: stable
+ validator:
+ lt: 0
+
+ oldInternalParamTypeChanges:
+ description: "command passes when it has an old internal param with incompatible type changes"
+ command_name: oldInternalParamTypeChanges
+ namespace: ignored
+ cpp_name: oldInternalParamTypeChanges
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+ fields:
+ oldInternalTypeChangesParam:
+ type: intStringBoolToIntString
+ optional: true
+ stability: internal
validator:
lt: 0
@@ -899,7 +943,7 @@ commands:
fields:
newUnstableTypeChangesParamIgnoreList:
type: intStringBoolToIntString
- unstable: true
+ stability: unstable
validator:
lt: 0
@@ -947,7 +991,7 @@ commands:
fields:
newParam:
type: int
- unstable: false
+ stability: stable
commandParameterValidatorsEqual:
description: "new command passes because it contains a parameter that contains a validator
@@ -961,7 +1005,7 @@ commands:
fields:
newParam:
type: double
- unstable: false
+ stability: stable
validator:
lt: 0.0
gt: -1.1
@@ -1267,6 +1311,17 @@ commands:
api_version: "1"
reply_type: OkReply
+ removeTypeFieldInternal:
+ description: "new command removes type field that is internal
+ in the corresponding old command and still passes"
+ command_name: removeTypeFieldInternal
+ namespace: type
+ type: RemovedInternalTypeFieldStruct
+ cpp_name: removeTypeFieldInternal
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+
addedUnstableTypeField:
description: "new command has a new unstable type field that does not
exist in the corresponding old command and still passes"
@@ -1278,6 +1333,17 @@ commands:
api_version: "1"
reply_type: OkReply
+ addedInternalTypeField:
+ description: "new command has a new internal type field that does not
+ exist in the corresponding old command and still passes"
+ command_name: addedInternalTypeField
+ namespace: type
+ type: AddedInternalTypeFieldStruct
+ cpp_name: addedInternalTypeField
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+
keptUnstableTypeField:
description: "new command has an unstable type field that also
exists in the corresponding old command and still passes"
@@ -1289,6 +1355,17 @@ commands:
api_version: "1"
reply_type: OkReply
+ keptInternalTypeField:
+ description: "new command has an internal type field that also
+ exists in the corresponding old command and still passes"
+ command_name: keptInternalTypeField
+ namespace: type
+ type: KeptInternalTypeFieldStruct
+ cpp_name: keptInternalTypeField
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+
oldReplyFieldVariantType:
description: "new command passes when its reply field type is not a variant type while
the old reply field is a variant type"
@@ -1408,6 +1485,15 @@ commands:
api_version: "1"
reply_type: OldUnstableTypeChangesReply
+ oldInternalReplyFieldTypeChanges:
+ description: "command passes when it has an old internal reply field with incompatible type changes"
+ command_name: oldInternalReplyFieldTypeChanges
+ namespace: ignored
+ cpp_name: oldInternalReplyFieldTypeChanges
+ strict: true
+ api_version: "1"
+ reply_type: OldInternalTypeChangesReply
+
newUnstableReplyFieldTypeChangesIgnoreList:
description: "command has an old stable reply field with incompatible type changes but it is also
in the ignore list"
@@ -1431,7 +1517,7 @@ commands:
fields:
anyTypeParam:
type: bsonSerializationTypeAnyAllowed
- unstable: false
+ stability: stable
commandAllowedAnyTypesWithVariant:
description: "command that has reply variant types with
@@ -1454,7 +1540,7 @@ commands:
reply_type: OkReply
fields:
variantSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string, array<string>]
@@ -1469,7 +1555,7 @@ commands:
reply_type: OkReply
fields:
variantSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, bool, double, array<string>]
@@ -1484,7 +1570,7 @@ commands:
reply_type: OkReply
fields:
variantParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, array<string>]
@@ -1499,7 +1585,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
@@ -1515,7 +1601,7 @@ commands:
reply_type: OkReply
fields:
variantStructSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
@@ -1532,7 +1618,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
@@ -1679,7 +1765,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
complexActionTypesSubset:
@@ -1799,7 +1885,7 @@ commands:
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"
+ contains a reply field that is missing the 'stability' field"
command_name: newReplyFieldMissingUnstableField
namespace: ignored
cpp_name: newReplyFieldMissingUnstableField
@@ -1809,7 +1895,7 @@ commands:
oldReplyFieldMissingUnstableField:
description: "old command passes even though it contains a reply field that is missing the
- 'unstable' field"
+ 'stability' field"
command_name: oldReplyFieldMissingUnstableField
namespace: ignored
cpp_name: oldReplyFieldMissingUnstableField
@@ -1819,7 +1905,7 @@ commands:
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"
+ contains a command type field that is missing the 'stability' field"
command_name: newCommandTypeFieldMissingUnstableField
namespace: type
cpp_name: newCommandTypeFieldMissingUnstableField
@@ -1830,7 +1916,7 @@ commands:
oldCommandTypeFieldMissingUnstableField:
description: "old command passes even though it
- contains a command type field that is missing the 'unstable' field"
+ contains a command type field that is missing the 'stability' field"
command_name: oldCommandTypeFieldMissingUnstableField
namespace: type
cpp_name: oldCommandTypeFieldMissingUnstableField
@@ -1841,7 +1927,7 @@ commands:
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"
+ contains a parameter that is missing the 'stability' field"
command_name: newParameterMissingUnstableField
namespace: ignored
cpp_name: newParameterMissingUnstableField
@@ -1854,7 +1940,7 @@ commands:
oldParameterMissingUnstableField:
description: "old command passes even though it
- contains a parameter that is missing the 'unstable' field"
+ contains a parameter that is missing the 'stability' field"
command_name: oldParameterMissingUnstableField
namespace: ignored
cpp_name: oldParameterMissingUnstableField
@@ -1863,7 +1949,7 @@ commands:
fields:
missingUnstableFieldOldParameter:
type: int
- unstable: false
+ stability: stable
reply_type: OkReply
chainedStructCompatible:
@@ -1921,7 +2007,7 @@ commands:
fields:
flag:
type: optionalBool
- unstable: false
+ stability: stable
newReplyOptionalBool:
description: "new command can add reply fields of type optionalBoolean"
@@ -1951,14 +2037,14 @@ commands:
api_version: "1"
fields:
flag1:
- unstable: false
+ stability: stable
type: optionalBool
flag2:
- unstable: false
+ stability: stable
type: bool
optional: true
flag3:
- unstable: false
+ stability: stable
type: optionalBool
reply_type: OkReply
@@ -1990,7 +2076,7 @@ commands:
api_version: "1"
fields:
flag:
- unstable: false
+ stability: stable
type: optionalBool
reply_type: OkReply
@@ -2025,7 +2111,7 @@ commands:
newArrayTypeParameter:
type: array<int>
optional: true
- unstable: false
+ stability: stable
reply_type: ReplyWithNewArrayTypeField
commandWithNewNestedArrayTypeParameterAndNestedArrayTypeReply:
@@ -2040,5 +2126,5 @@ commands:
newNestedArrayTypeParameter:
type: ArrayTypeStruct
optional: true
- unstable: false
+ stability: stable
reply_type: ReplyWithNewNestedArrayTypeField \ No newline at end of file
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 3023ee8f40a..54926022d87 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/new/error_reply.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/new/error_reply.idl
@@ -40,7 +40,7 @@ structs:
fields:
errorLabels:
type: StructType
- unstable: false
+ stability: stable
StructType:
description: "This struct contains a field that is optional in the old
@@ -49,4 +49,4 @@ structs:
structField:
type: string
optional: true
- unstable: false
+ stability: stable
diff --git a/buildscripts/idl/tests/compatibility_test_pass/new/imports.idl b/buildscripts/idl/tests/compatibility_test_pass/new/imports.idl
index 2fbf1045dc7..1f25aefb673 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/new/imports.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/new/imports.idl
@@ -39,7 +39,7 @@ structs:
fields:
stableNewField:
type: string
- unstable: false
+ stability: stable
commands:
importCommand:
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 f442e45a20e..18ff435077e 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
@@ -99,7 +99,7 @@ structs:
fields:
stableNewField:
type: string
- unstable: true
+ stability: unstable
UnstableNewFieldReplyIgnoreList:
description: "This reply contains a field that is stable in the old command and is
@@ -107,7 +107,7 @@ structs:
fields:
unstableNewFieldIgnoreList:
type: string
- unstable: false
+ stability: stable
NewReplyTypeEnumOrStructIgnoreList:
description: "the type is a non-enum or struct type in the old command, and an enum or struct
@@ -115,7 +115,7 @@ structs:
fields:
newReplyTypeEnumOrStructIgnoreList:
type: string
- unstable: false
+ stability: stable
RequiredNewFieldReply:
description: "This reply contains a field that is optional in the old command but is
@@ -124,7 +124,7 @@ structs:
requiredNewField:
type: string
optional: true
- unstable: false
+ stability: stable
OptionalNewField:
description: "This struct contains a field that is required in the old command but is
@@ -132,7 +132,7 @@ structs:
fields:
optionalNewField:
type: string
- unstable: false
+ stability: stable
AddedNewFieldReply:
description: "This reply contains a field that is added in the new command."
@@ -143,14 +143,14 @@ structs:
fields:
unstableOldField:
type: string
- unstable: true
+ stability: unstable
UnstableOptionalNewFieldReplyIgnoreList:
description: "This reply contains a field that is stable in the old command and is
unstable and optional in the new command, but the change is allowed"
fields:
unstableOptionalNewFieldIgnoreList:
- unstable: false
+ stability: stable
type: string
EnumSubsetReply:
@@ -159,7 +159,7 @@ structs:
fields:
replyField:
type: NewReplyFieldEnumSubset
- unstable: false
+ stability: stable
BsonSubsetReply:
description: "This reply contains a field type where the new bson_serialization_type
@@ -167,7 +167,7 @@ structs:
fields:
bsonSubsetReplyField:
type: intStringToInt
- unstable: false
+ stability: stable
BsonSubsetReplyTwo:
description: "This reply contains a field type where the new bson_serialization_type
@@ -175,7 +175,7 @@ structs:
fields:
bsonSubsetReplyFieldTwo:
type: intStringBoolToIntString
- unstable: false
+ stability: stable
StructFieldTypeRecursiveReplyIgnoreList:
description: "This reply contains a field whose new type is a struct that is not
@@ -183,7 +183,7 @@ structs:
fields:
structReplyField:
type: UnstableNewFieldReplyIgnoreList
- unstable: false
+ stability: stable
StructFieldTypeRecursiveReplyOne:
description: "This reply contains a field whose new type is a struct that is
@@ -191,7 +191,7 @@ structs:
fields:
structReplyField:
type: StableNewFieldReply
- unstable: false
+ stability: stable
StructFieldTypeRecursiveReplyTwo:
description: "This reply contains a field whose new type is a struct that is
@@ -199,7 +199,7 @@ structs:
fields:
structReplyField:
type: StructType
- unstable: false
+ stability: stable
StructType:
description: "This struct contains a field whose new type is compatible with the
@@ -207,7 +207,7 @@ structs:
fields:
fieldOne:
type: BsonSubsetReply
- unstable: false
+ stability: stable
StructTypeUnstable:
description: "This struct contains a field whose new type is compatible with the
@@ -215,14 +215,14 @@ structs:
fields:
fieldOne:
type: BsonSubsetReply
- unstable: true
+ stability: unstable
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
+ stability: stable
type:
variant: [int, string, array<string>]
@@ -231,7 +231,7 @@ structs:
of the old variant types"
fields:
variantNotSubsetReplyFieldIgnoreList:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string]
@@ -240,7 +240,7 @@ structs:
of the old variant types"
fields:
variantSubsetReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string, array<string>]
@@ -249,7 +249,7 @@ structs:
of the old variant types"
fields:
variantSubsetReplyFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [int, string, bool, double, array<string>]
@@ -258,7 +258,7 @@ structs:
with the old variant type"
fields:
variantRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, intStringBoolToIntString,
array<intStringBoolToIntString>, array<string>]
@@ -268,7 +268,7 @@ structs:
struct type while the old one does"
fields:
variantStructReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructType, array<StructType>, array<string>]
@@ -277,7 +277,7 @@ structs:
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
- unstable: false
+ stability: stable
type:
variant: [int, StructFieldTypeRecursiveReplyTwo,
array<StructFieldTypeRecursiveReplyTwo>, array<string>]
@@ -287,7 +287,7 @@ structs:
different from the old variant struct type"
fields:
variantStructRecursiveReplyFieldIgnoreList:
- unstable: false
+ stability: stable
type:
variant: [int, StructFieldTypeRecursiveReplyOne]
@@ -296,7 +296,7 @@ structs:
type, but the field is in the ignore list"
fields:
nonVariantToVariantReplyFieldIgnoreList:
- unstable: false
+ stability: stable
type: StructType
NonEnumToEnumReplyIgnoreList:
@@ -305,7 +305,7 @@ structs:
fields:
nonEnumToEnumReplyIgnoreList:
type: StructTypeUnstable
- unstable: false
+ stability: stable
NewCommandParameterStruct:
description: "The new command parameter's type and the
@@ -317,7 +317,7 @@ structs:
fields:
unstableToStableOptionalField:
type: string
- unstable: true
+ stability: unstable
CommandParamStructRecursiveTwo:
description: "This command parameter struct type contains a field whose new type is
@@ -325,7 +325,7 @@ structs:
fields:
supersetField:
type: intToIntString
- unstable: false
+ stability: stable
OldValidatorStruct:
description: "This struct contains a field where the old version contains a validator while
@@ -333,7 +333,7 @@ structs:
fields:
oldValidatorField:
type: int
- unstable: false
+ stability: stable
validator:
lt: 0
@@ -342,7 +342,7 @@ structs:
fields:
validatorsEqualField:
type: double
- unstable: false
+ stability: stable
validator:
lt: 0.0
gt: -1.1
@@ -359,7 +359,7 @@ structs:
fields:
stableOptionalTypeField:
type: string
- unstable: true
+ stability: unstable
StableWithDefaultTypeFieldStruct:
description: "This struct contains a field that is stable and required with a default value
@@ -367,7 +367,7 @@ structs:
fields:
stableWithDefaultTypeField:
type: string
- unstable: true
+ stability: unstable
RemovedUnstableTypeFieldStruct:
description: "This struct contains a field that is unstable in the old version and
@@ -375,18 +375,37 @@ structs:
fields:
removedUnstableTypeField:
type: string
- unstable: true
+ stability: unstable
+
+ RemovedInternalTypeFieldStruct:
+ description: "This struct contains a field that is internal in the old version and
+ is removed in the new version"
+ fields:
+ removedInternalTypeField:
+ type: string
+ stability: internal
AddedUnstableTypeFieldStruct:
description: "This struct contains a field that is added and unstable in the new version"
+ AddedInternalTypeFieldStruct:
+ description: "This struct contains a field that is added and internal in the new version"
+
KeptUnstableTypeFieldStruct:
description: "This struct contains a field that is unstable in the new version and also
exists in the old version"
fields:
keptUnstableTypeField:
type: string
- unstable: true
+ stability: unstable
+
+ KeptInternalTypeFieldStruct:
+ description: "This struct contains a field that is internal in the new version and also
+ exists in the old version"
+ fields:
+ keptInternalTypeField:
+ type: string
+ stability: internal
StructCommandParameterTypeRecursive:
description: "This param struct type contains a field that is compatible between the
@@ -394,14 +413,14 @@ structs:
fields:
structCommandParameterTypeRecursiveField:
type: intStringToIntStringBool
- unstable: false
+ stability: stable
VariantSupersetStruct:
description: "This struct contains a field where the new variant types are a superset
of the old variant types"
fields:
variantSupersetField:
- unstable: false
+ stability: stable
type:
variant: [int, bool, array<string>]
@@ -410,7 +429,7 @@ structs:
of the old variant types"
fields:
variantSupersetFieldTwo:
- unstable: false
+ stability: stable
type:
variant: [int, bool, array<string>]
@@ -420,14 +439,14 @@ structs:
fields:
variantField:
type: int
- unstable: false
+ stability: stable
VariantRecursiveStruct:
description: "This struct contains a field where the new variant types are
compatible with the old variant types"
fields:
variantRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
@@ -437,7 +456,7 @@ structs:
while the old one does not"
fields:
variantStructSupersetField:
- unstable: false
+ stability: stable
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
@@ -447,7 +466,7 @@ structs:
variant struct are compatible"
fields:
variantStructRecursiveField:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
@@ -457,7 +476,7 @@ structs:
fields:
anyTypeField:
type: bsonSerializationTypeAnyAllowed
- unstable: false
+ stability: stable
NewlyAddedBsonSerializationTypeAnyReply:
description: "This reply contains a newly added field whose type has a bson_serialization_type
@@ -467,7 +486,14 @@ structs:
description: "This reply contains a field that is unstable in the old version and has type changes"
fields:
oldUnstableTypeChangesReplyField:
- unstable: true
+ stability: unstable
+ type: intStringToIntStringBool
+
+ OldInternalTypeChangesReply:
+ description: "This reply contains a field that is internal in the old version and has type changes"
+ fields:
+ oldInternalTypeChangesReplyField:
+ stability: internal
type: intStringToIntStringBool
NewUnstableTypeChangesReplyIgnoreList:
@@ -475,7 +501,7 @@ structs:
but is also in the ignore list"
fields:
newUnstableTypeChangesReplyFieldIgnoreList:
- unstable: false
+ stability: stable
type: intStringToIntStringBool
optional: true
@@ -487,7 +513,7 @@ structs:
description: "This struct contains a field that is unstable in the old version and has type changes"
fields:
oldUnstableTypeChangesField:
- unstable: true
+ stability: unstable
type: intStringBoolToIntString
NewUnstableTypeChangesStructIgnoreList:
@@ -496,7 +522,7 @@ structs:
fields:
newUnstableTypeChangesFieldIgnoreList:
type: intStringBoolToIntString
- unstable: false
+ stability: stable
optional: true
BsonSerializationTypeAnyWithVariantReply:
@@ -504,7 +530,7 @@ structs:
bson serialization types is 'any' and is explicitly allowed"
fields:
anyTypeField:
- unstable: false
+ stability: stable
type:
variant: [intStringBoolToIntString,
bsonSerializationTypeAnyAllowed,
@@ -518,18 +544,18 @@ structs:
fields:
ArrayCommandParameter:
type: array<string>
- unstable: false
+ stability: stable
MissingUnstableFieldNewFieldStruct:
- description: "This struct contains a field that missing the 'unstable' field in the new
+ description: "This struct contains a field that missing the 'stability' field in the new
command."
fields:
missingUnstableFieldNewField:
type: string
- unstable: true
+ stability: unstable
MissingUnstableFieldOldFieldStruct:
- description: "This struct contains a field that missing the 'unstable' field in the old
+ description: "This struct contains a field that missing the 'stability' field in the old
command."
fields:
missingUnstableFieldNewField:
@@ -550,7 +576,7 @@ structs:
fields:
ok1:
type: bool
- unstable: false
+ stability: stable
optional: true
OptionalBoolEquivalenceStruct:
@@ -558,42 +584,42 @@ structs:
fields:
ok1:
type: bool
- unstable: false
+ stability: stable
optional: true
ok2:
type: optionalBool
- unstable: false
+ stability: stable
ok3:
type: optionalBool
- unstable: false
+ stability: stable
OptionalBoolToBoolStruct:
description: "optionalBool field replaced by bool"
fields:
ok:
type: optionalBool
- unstable: false
+ stability: stable
BoolToOptionalBoolStruct:
description: "bool field replaced by optionalBool"
fields:
ok:
type: bool
- unstable: false
+ stability: stable
ReplyWithNewArrayTypeField:
description: "new field is of ArrayType"
fields:
ok:
type: bool
- unstable: false
+ stability: stable
ReplyWithNewNestedArrayTypeField:
description: "new field is a struct with a field of ArrayType"
fields:
ok:
type: bool
- unstable: false
+ stability: stable
commands:
testCommand:
@@ -653,7 +679,7 @@ commands:
fields:
newOptionalStableParam:
type: string
- unstable: true
+ stability: unstable
addedCommandParameterStableWithDefault:
description: "new command has a required stable parameter with a default value
@@ -667,7 +693,7 @@ commands:
fields:
newStableParamWithDefault:
type: string
- unstable: true
+ stability: unstable
commandParameterUnstableIgnoreList:
description: "new unstable command parameter is stable in the corresponding old
@@ -681,7 +707,7 @@ commands:
fields:
newUnstableParameterIgnoreList:
type: string
- unstable: false
+ stability: stable
removeCommandParameterUnstable:
description: "new command removes parameter that is unstable
@@ -695,7 +721,7 @@ commands:
fields:
unstableParamToRemove:
type: string
- unstable: true
+ stability: unstable
addedCommandParameterOptional:
description: "new command has an optional parameter that is required
@@ -710,7 +736,7 @@ commands:
newOptionalParam:
type: string
optional: false
- unstable: false
+ stability: stable
addedUnstableCommandParameter:
description: "new command has a new unstable parameter that does not
@@ -734,7 +760,7 @@ commands:
fields:
unstableParam:
type: string
- unstable: true
+ stability: unstable
newCommandParameterType:
description: "new command passes because its command parameter type is compatible with
@@ -748,7 +774,7 @@ commands:
fields:
compatibleParameter:
type: string
- unstable: false
+ stability: stable
newCommandParameterTypeEnumSuperset:
description: "new command passes because its command parameter type is an enum that is
@@ -762,7 +788,7 @@ commands:
fields:
parameterEnumSuperset:
type: EnumSuperset
- unstable: false
+ stability: stable
newCommandParameterTypeStruct:
description: "new command passes because its command parameter type is a struct and the
@@ -776,7 +802,7 @@ commands:
fields:
parameterStruct:
type: NewCommandParameterStruct
- unstable: false
+ stability: stable
newCommandParameterTypeBsonSuperset:
description: "new command passes because its parameter type has a bson_serialization_type
@@ -791,7 +817,7 @@ commands:
fields:
bsonSupersetParam:
type: intToIntString
- unstable: false
+ stability: stable
newCommandParameterTypeStructRecursiveOne:
description: "new command passes because its parameter type is a struct that is
@@ -805,7 +831,7 @@ commands:
fields:
unstableToStableOptionalStructParameter:
type: CommandParamStructRecursiveOne
- unstable: false
+ stability: stable
newCommandParameterTypeStructRecursiveTwo:
description: "new command passes because its parameter type is a struct that is
@@ -819,7 +845,7 @@ commands:
fields:
supersetStructParameter:
type: CommandParamStructRecursiveTwo
- unstable: false
+ stability: stable
newlyAddedParamBsonAnyAllowList:
description: "command passes when its parameter is newly added and has bson type 'any'
@@ -842,7 +868,20 @@ commands:
fields:
oldUnstableTypeChangesParam:
type: intStringBoolToIntString
- unstable: true
+ stability: unstable
+
+ oldInternalParamTypeChanges:
+ description: "command passes when it has an old internal param with incompatible type changes"
+ command_name: oldInternalParamTypeChanges
+ namespace: ignored
+ cpp_name: oldInternalParamTypeChanges
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+ fields:
+ oldInternalTypeChangesParam:
+ type: intStringBoolToIntString
+ stability: internal
newUnstableParamTypeChangesIgnoreList:
description: "command has param with incompatible type changes, but is in the stable-to-unstable
@@ -856,7 +895,7 @@ commands:
fields:
newUnstableTypeChangesParamIgnoreList:
type: intStringBoolToIntString
- unstable: false
+ stability: stable
optional: true
newlyAddedTypeFieldBsonAnyAllowList:
@@ -903,7 +942,7 @@ commands:
fields:
newParam:
type: int
- unstable: false
+ stability: stable
validator:
lt: 0
@@ -919,7 +958,7 @@ commands:
fields:
newParam:
type: double
- unstable: false
+ stability: stable
validator:
lt: 0.0
gt: -1.1
@@ -1228,6 +1267,17 @@ commands:
api_version: "1"
reply_type: OkReply
+ removeTypeFieldInternal:
+ description: "new command removes type field that is internal
+ in the corresponding old command and still passes"
+ command_name: removeTypeFieldInternal
+ namespace: type
+ type: RemovedInternalTypeFieldStruct
+ cpp_name: removeTypeFieldInternal
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+
addedUnstableTypeField:
description: "new command has a new unstable type field that does not
exist in the corresponding old command and still passes"
@@ -1239,6 +1289,17 @@ commands:
api_version: "1"
reply_type: OkReply
+ addedInternalTypeField:
+ description: "new command has a new internal type field that does not
+ exist in the corresponding old command and still passes"
+ command_name: addedInternalTypeField
+ namespace: type
+ type: AddedInternalTypeFieldStruct
+ cpp_name: addedInternalTypeField
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+
keptUnstableTypeField:
description: "new command has an unstable type field that also
exists in the corresponding old command and still passes"
@@ -1250,6 +1311,17 @@ commands:
api_version: "1"
reply_type: OkReply
+ keptInternalTypeField:
+ description: "new command has an internal type field that also
+ exists in the corresponding old command and still passes"
+ command_name: keptInternalTypeField
+ namespace: type
+ type: KeptInternalTypeFieldStruct
+ cpp_name: keptInternalTypeField
+ strict: true
+ api_version: "1"
+ reply_type: OkReply
+
oldReplyFieldVariantType:
description: "new command passes when its reply field type is not a variant type while
the old reply field is a variant type"
@@ -1368,6 +1440,15 @@ commands:
api_version: "1"
reply_type: OldUnstableTypeChangesReply
+ oldInternalReplyFieldTypeChanges:
+ description: "command passes when it has an old internal reply field with incompatible type changes"
+ command_name: oldInternalReplyFieldTypeChanges
+ namespace: ignored
+ cpp_name: oldInternalReplyFieldTypeChanges
+ strict: true
+ api_version: "1"
+ reply_type: OldInternalTypeChangesReply
+
newUnstableReplyFieldTypeChangesIgnoreList:
description: "command has an old stable reply field with incompatible type changes but it is also
in the ignore list"
@@ -1391,7 +1472,7 @@ commands:
fields:
anyTypeParam:
type: bsonSerializationTypeAnyAllowed
- unstable: false
+ stability: stable
commandAllowedAnyTypesWithVariant:
description: "command that has reply variant types with
@@ -1414,7 +1495,7 @@ commands:
reply_type: OkReply
fields:
variantSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, bool, string, array<string>]
@@ -1429,7 +1510,7 @@ commands:
reply_type: OkReply
fields:
variantSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, bool, double, array<string>]
@@ -1444,7 +1525,7 @@ commands:
reply_type: OkReply
fields:
variantParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, array<string>]
@@ -1459,7 +1540,7 @@ commands:
reply_type: OkReply
fields:
variantRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
@@ -1475,7 +1556,7 @@ commands:
reply_type: OkReply
fields:
variantStructSupersetParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
@@ -1492,7 +1573,7 @@ commands:
reply_type: OkReply
fields:
variantStructRecursiveParam:
- unstable: false
+ stability: stable
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
@@ -1639,7 +1720,7 @@ commands:
fields:
parameterStruct:
type: array<ArrayTypeStruct>
- unstable: false
+ stability: stable
reply_type: ArrayTypeStruct
complexActionTypesSubset:
@@ -1763,7 +1844,7 @@ commands:
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"
+ contains a reply field that is missing the 'stability' field"
command_name: newReplyFieldMissingUnstableField
namespace: ignored
cpp_name: newReplyFieldMissingUnstableField
@@ -1773,7 +1854,7 @@ commands:
oldReplyFieldMissingUnstableField:
description: "old command passes even though it
- contains a reply field that is missing the 'unstable' field"
+ contains a reply field that is missing the 'stability' field"
command_name: oldReplyFieldMissingUnstableField
namespace: ignored
cpp_name: oldReplyFieldMissingUnstableField
@@ -1783,7 +1864,7 @@ commands:
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"
+ contains a command type field that is missing the 'stability' field"
command_name: newCommandTypeFieldMissingUnstableField
namespace: type
cpp_name: newCommandTypeFieldMissingUnstableField
@@ -1794,7 +1875,7 @@ commands:
oldCommandTypeFieldMissingUnstableField:
description: "old command passes even though it
- contains a command type field that is missing the 'unstable' field"
+ contains a command type field that is missing the 'stability' field"
command_name: oldCommandTypeFieldMissingUnstableField
namespace: type
cpp_name: oldCommandTypeFieldMissingUnstableField
@@ -1805,7 +1886,7 @@ commands:
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"
+ contains a parameter that is missing the 'stability' field"
command_name: newParameterMissingUnstableField
namespace: ignored
cpp_name: newParameterMissingUnstableField
@@ -1814,12 +1895,12 @@ commands:
fields:
missingUnstableFieldNewParameter:
type: int
- unstable: false
+ stability: stable
reply_type: OkReply
oldParameterMissingUnstableField:
description: "old command passes even though it
- contains a parameter that is missing the 'unstable' field"
+ contains a parameter that is missing the 'stability' field"
command_name: oldParameterMissingUnstableField
namespace: ignored
cpp_name: oldParameterMissingUnstableField
@@ -1911,14 +1992,14 @@ commands:
api_version: "1"
fields:
flag1:
- unstable: false
+ stability: stable
type: bool
optional: true
flag2:
- unstable: false
+ stability: stable
type: optionalBool
flag3:
- unstable: false
+ stability: stable
type: optionalBool
reply_type: OkReply
@@ -1950,7 +2031,7 @@ commands:
api_version: "1"
fields:
flag:
- unstable: false
+ stability: stable
type: bool
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 f99aec3cb26..9e57bd99292 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/old/error_reply.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/old/error_reply.idl
@@ -40,7 +40,7 @@ structs:
fields:
errorLabels:
type: StructType
- unstable: false
+ stability: stable
StructType:
description: "This struct contains a field that is optional in the old
@@ -49,4 +49,4 @@ structs:
structField:
type: string
optional: true
- unstable: false
+ stability: stable
diff --git a/buildscripts/idl/tests/compatibility_test_pass/old/imports.idl b/buildscripts/idl/tests/compatibility_test_pass/old/imports.idl
index 0c3edc28bd5..3fd43a6d24c 100644
--- a/buildscripts/idl/tests/compatibility_test_pass/old/imports.idl
+++ b/buildscripts/idl/tests/compatibility_test_pass/old/imports.idl
@@ -39,7 +39,7 @@ structs:
fields:
stableNewField:
type: string
- unstable: true
+ stability: unstable
commands:
importCommand:
diff --git a/buildscripts/idl/tests/test_compatibility.py b/buildscripts/idl/tests/test_compatibility.py
index b6c64b625ac..4e5b684c656 100644
--- a/buildscripts/idl/tests/test_compatibility.py
+++ b/buildscripts/idl/tests/test_compatibility.py
@@ -95,20 +95,20 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
new_parameter_no_unstable_field_error = error_collection.get_error_by_command_name(
"newCommandParameterNoUnstableField")
self.assertTrue(new_parameter_no_unstable_field_error.error_id ==
- idl_compatibility_errors.ERROR_ID_NEW_PARAMETER_REQUIRES_UNSTABLE)
+ idl_compatibility_errors.ERROR_ID_NEW_PARAMETER_REQUIRES_STABILITY)
self.assertRegex(
str(new_parameter_no_unstable_field_error), "newCommandParameterNoUnstableField")
new_reply_no_unstable_field_error = error_collection.get_error_by_command_name(
"newCommandReplyNoUnstableField")
self.assertTrue(new_reply_no_unstable_field_error.error_id ==
- idl_compatibility_errors.ERROR_ID_NEW_REPLY_FIELD_REQUIRES_UNSTABLE)
+ idl_compatibility_errors.ERROR_ID_NEW_REPLY_FIELD_REQUIRES_STABILITY)
self.assertRegex(str(new_reply_no_unstable_field_error), "newCommandReplyNoUnstableField")
new_command_type_struct_no_unstable_field_error = error_collection.get_error_by_command_name(
"newCommandTypeStructFieldNoUnstableField")
self.assertTrue(new_command_type_struct_no_unstable_field_error.error_id ==
- idl_compatibility_errors.ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_UNSTABLE)
+ idl_compatibility_errors.ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_STABILITY)
self.assertRegex(
str(new_command_type_struct_no_unstable_field_error),
"newCommandTypeStructFieldNoUnstableField")
@@ -203,6 +203,12 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
idl_compatibility_errors.ERROR_ID_COMMAND_PARAMETER_UNSTABLE)
self.assertRegex(str(command_parameter_unstable_error), "commandParameterUnstable")
+ command_parameter_internal_error = error_collection.get_error_by_command_name(
+ "commandParameterInternal")
+ self.assertTrue(command_parameter_internal_error.error_id ==
+ idl_compatibility_errors.ERROR_ID_COMMAND_PARAMETER_UNSTABLE)
+ self.assertRegex(str(command_parameter_internal_error), "commandParameterInternal")
+
command_parameter_stable_required_no_default_error = error_collection.get_error_by_command_name(
"commandParameterStableRequiredNoDefault")
self.assertTrue(
@@ -413,6 +419,12 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
idl_compatibility_errors.ERROR_ID_NEW_REPLY_FIELD_UNSTABLE)
self.assertRegex(str(new_reply_field_unstable_error), "newReplyFieldUnstable")
+ new_reply_field_internal_error = error_collection.get_error_by_command_name(
+ "newReplyFieldInternal")
+ self.assertTrue(new_reply_field_internal_error.error_id ==
+ idl_compatibility_errors.ERROR_ID_NEW_REPLY_FIELD_UNSTABLE)
+ self.assertRegex(str(new_reply_field_internal_error), "newReplyFieldInternal")
+
new_reply_field_optional_error = error_collection.get_error_by_error_id(
idl_compatibility_errors.ERROR_ID_NEW_REPLY_FIELD_OPTIONAL)
self.assertRegex(str(new_reply_field_optional_error), "newReplyFieldOptional")
@@ -1307,14 +1319,14 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
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)
+ idl_compatibility_errors.ERROR_ID_NEW_REPLY_FIELD_REQUIRES_STABILITY)
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)
+ idl_compatibility_errors.ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_STABILITY)
self.assertRegex(
str(new_command_type_field_missing_unstable_field_error),
"newCommandTypeFieldMissingUnstableField")
@@ -1322,14 +1334,14 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
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)
+ idl_compatibility_errors.ERROR_ID_NEW_PARAMETER_REQUIRES_STABILITY)
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)
+ idl_compatibility_errors.ERROR_ID_NEW_REPLY_FIELD_REQUIRES_STABILITY)
self.assertRegex(
str(added_new_reply_field_missing_unstable_field_error),
"addedNewReplyFieldMissingUnstableField")
@@ -1337,7 +1349,7 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
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)
+ idl_compatibility_errors.ERROR_ID_NEW_COMMAND_TYPE_FIELD_REQUIRES_STABILITY)
self.assertRegex(
str(added_new_command_type_field_missing_unstable_field_error),
"addedNewCommandTypeFieldMissingUnstableField")
@@ -1345,7 +1357,7 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
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)
+ idl_compatibility_errors.ERROR_ID_NEW_PARAMETER_REQUIRES_STABILITY)
self.assertRegex(
str(added_new_parameter_missing_unstable_field_error),
"addedNewParameterMissingUnstableField")
@@ -1444,7 +1456,7 @@ class TestIDLCompatibilityChecker(unittest.TestCase):
self.assertRegex(
str(new_command_type_field_added_as_stable_error), "newStableTypeFieldAdded")
- self.assertEqual(error_collection.count(), 204)
+ self.assertEqual(error_collection.count(), 207)
def test_generic_argument_compatibility_pass(self):
"""Tests that compatible old and new generic_argument.idl files should pass."""
diff --git a/buildscripts/idl/tests/test_parser.py b/buildscripts/idl/tests/test_parser.py
index 677f00a799d..122a0e6c64d 100644
--- a/buildscripts/idl/tests/test_parser.py
+++ b/buildscripts/idl/tests/test_parser.py
@@ -504,7 +504,7 @@ class TestParser(testcase.IDLTestcase):
ignore: true
cpp_name: bar
comparison_order: 3
- unstable: true
+ stability: unstable
"""))
# Test false bools
@@ -519,7 +519,7 @@ class TestParser(testcase.IDLTestcase):
type: string
optional: false
ignore: false
- unstable: false
+ stability: stable
"""))
def test_field_negative(self):
@@ -1501,10 +1501,10 @@ class TestParser(testcase.IDLTestcase):
foo: bar
"""), idl.errors.ERROR_ID_MISSING_REQUIRED_FIELD)
- def test_unstable_positive(self):
+ def test_stability_positive(self):
# type: () -> None
- """Positive unstable-field test cases."""
- for unstable in ("true", "false"):
+ """Positive stability-field test cases."""
+ for stability in ("stable", "unstable", "internal"):
self.assert_parse(
textwrap.dedent(f"""
commands:
@@ -1516,13 +1516,13 @@ class TestParser(testcase.IDLTestcase):
fields:
foo:
type: bar
- unstable: {unstable}
+ stability: {stability}
reply_type: foo_reply_struct
"""))
- def test_unstable_negative(self):
+ def test_stability_negative(self):
# type: () -> None
- """Negative unstable-field test cases."""
+ """Negative stability-field test cases."""
self.assert_parse_fail(
textwrap.dedent("""
commands:
@@ -1534,9 +1534,38 @@ class TestParser(testcase.IDLTestcase):
fields:
foo:
type: bar
- unstable: true
+ stability: unstable
reply_type: foo_reply_struct
- """), idl.errors.ERROR_ID_UNSTABLE_NO_API_VERSION)
+ """), idl.errors.ERROR_ID_STABILITY_NO_API_VERSION)
+ self.assert_parse_fail(
+ textwrap.dedent("""
+ commands:
+ foo:
+ description: foo
+ command_name: foo
+ namespace: ignored
+ api_version: "1"
+ fields:
+ foo:
+ type: bar
+ stability: "unknown"
+ reply_type: foo_reply_struct
+ """), idl.errors.ERROR_ID_STABILITY_UNKNOWN_VALUE)
+ self.assert_parse_fail(
+ textwrap.dedent("""
+ commands:
+ foo:
+ description: foo
+ command_name: foo
+ namespace: ignored
+ api_version: "1"
+ fields:
+ foo:
+ type: bar
+ unstable: true
+ stability: "unstable"
+ reply_type: foo_reply_struct
+ """), idl.errors.ERROR_ID_DUPLICATE_UNSTABLE_STABILITY)
def test_scalar_or_mapping_negative(self):
# type: () -> None