diff options
author | Huayu Ouyang <huayu.ouyang@mongodb.com> | 2022-03-31 21:00:11 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-31 22:37:06 +0000 |
commit | 1abaec7ea9d00e728fb3a391643ba6ff47678f11 (patch) | |
tree | 8d6ebe31fb65ecef999a64cd1210ab2af9b6d864 | |
parent | 70b3eb6d557c6153ae98c37281fdf3dae19e625c (diff) | |
download | mongo-1abaec7ea9d00e728fb3a391643ba6ff47678f11.tar.gz |
SERVER-64821 Change unstable to true for fields that are not meant to be included in the stable API
-rw-r--r-- | buildscripts/idl/idl_check_compatibility.py | 10 | ||||
-rw-r--r-- | src/mongo/db/coll_mod.idl | 2 | ||||
-rw-r--r-- | src/mongo/db/create_indexes.idl | 2 | ||||
-rw-r--r-- | src/mongo/db/ops/write_ops.idl | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/buildscripts/idl/idl_check_compatibility.py b/buildscripts/idl/idl_check_compatibility.py index 8be8092201e..d34dbc83409 100644 --- a/buildscripts/idl/idl_check_compatibility.py +++ b/buildscripts/idl/idl_check_compatibility.py @@ -177,6 +177,13 @@ IGNORE_UNSTABLE_LIST: List[str] = [ # can return one or more cursors. Multiple cursors are covered under the 'cursors' field. 'find-reply-cursor', 'aggregate-reply-cursor', + # The 'recordPreImages' field is only used by Realm and is not documented to users. + 'collMod-param-recordPreImages', + # The 'ignoreUnknownIndexOptions' field is for internal use only and is not documented to users. + 'createIndexes-param-ignoreUnknownIndexOptions', + # The 'runtimeConstants' field is a legacy field for internal use only and is not documented to + # users. + 'delete-param-runtimeConstants', ] SKIPPED_FILES = [ @@ -922,7 +929,8 @@ def check_command_param_or_type_struct_field( is_command_parameter: bool): """Check compatibility between the old and new command parameter or command type struct field.""" # pylint: disable=too-many-arguments - if not old_field.unstable and new_field.unstable: + field_name: str = cmd_name + "-param-" + new_field.name + if not old_field.unstable and new_field.unstable and field_name not in IGNORE_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) # If old field is unstable and new field is stable, the new field should either be optional or diff --git a/src/mongo/db/coll_mod.idl b/src/mongo/db/coll_mod.idl index 1b72151b12f..10f29489aad 100644 --- a/src/mongo/db/coll_mod.idl +++ b/src/mongo/db/coll_mod.idl @@ -157,7 +157,7 @@ structs: document in the oplog" optional: true type: safeBool - unstable: false + unstable: true changeStreamPreAndPostImages: description: "The options for point-in-time pre- and post-images in change streams opened on this collection." type: ChangeStreamPreAndPostImagesOptions diff --git a/src/mongo/db/create_indexes.idl b/src/mongo/db/create_indexes.idl index 902731f9edb..247e0295edb 100644 --- a/src/mongo/db/create_indexes.idl +++ b/src/mongo/db/create_indexes.idl @@ -213,7 +213,7 @@ commands: description: 'Ignore unknown options in index spec' type: safeBool default: false - unstable: false + unstable: true commitQuorum: description: 'Commit Quorum options' type: CommitQuorum diff --git a/src/mongo/db/ops/write_ops.idl b/src/mongo/db/ops/write_ops.idl index 1af55794830..4a5dda8aaf3 100644 --- a/src/mongo/db/ops/write_ops.idl +++ b/src/mongo/db/ops/write_ops.idl @@ -415,7 +415,7 @@ commands: cpp_name: legacyRuntimeConstants type: LegacyRuntimeConstants optional: true - unstable: false + unstable: true findAndModify: description: "Parser for the 'findAndModify' command." |