diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2021-12-21 14:20:50 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-21 22:27:58 +0000 |
commit | a0ca5d4dd4e45bb6c5a1cae17c9ced8c6990c5f1 (patch) | |
tree | 362a007bc58ffc44b24ec64f5c926f2f36797bbc | |
parent | ff375f0ae47b960f46a8606d0f5fd6558230709b (diff) | |
download | mongo-a0ca5d4dd4e45bb6c5a1cae17c9ced8c6990c5f1.tar.gz |
SERVER-62187 Add a way to ignore API changes for released fields in
earlier versions that are behind a disabled feature flag
-rw-r--r-- | buildscripts/idl/idl_check_compatibility.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/buildscripts/idl/idl_check_compatibility.py b/buildscripts/idl/idl_check_compatibility.py index d62fa30c3d4..7cd8a7c1324 100644 --- a/buildscripts/idl/idl_check_compatibility.py +++ b/buildscripts/idl/idl_check_compatibility.py @@ -160,6 +160,14 @@ ALLOW_ANY_TYPE_LIST: List[str] = [ 'getMore-reply-invalidated', ] +# Do not add user visible fields already released in earlier versions. +IGNORE_UNSTABLE_LIST: List[str] = [ + # The 'originalSpec' field was introduced in v5.1 behind a disabled feature flag and is not user + # visible. This is part of the listIndexes output when executed against system.bucket.* + # collections, which users should avoid doing. + 'listIndexes-reply-originalSpec', +] + SKIPPED_FILES = ["unittest.idl"] @@ -474,7 +482,8 @@ def check_reply_field(ctxt: IDLCompatibilityContext, old_field: syntax.Field, """Check compatibility between old and new reply field.""" # pylint: disable=too-many-arguments if not old_field.unstable: - if new_field.unstable: + field_name: str = cmd_name + "-reply-" + new_field.name + if new_field.unstable and field_name not in IGNORE_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) |