summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuhong Zhang <yuhong.zhang@mongodb.com>2023-07-21 17:44:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-08-21 15:30:58 +0000
commitce4ec8ed4a2afc48dd2ae50b6c95b786d8dfe494 (patch)
treee97e58e1777d521d1f4bd7c7a6b511211a7af34f
parentda89823f48cac1ebc88767923d1496c6c23e544a (diff)
SERVER-77382 Skip checking the IDL validator fields for time-series timeField and metaField
(cherry picked from commit 8de45f7d9f733219db2f4c2bb6d8683498dcad36)
-rw-r--r--buildscripts/idl/idl_check_compatibility.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/buildscripts/idl/idl_check_compatibility.py b/buildscripts/idl/idl_check_compatibility.py
index 2b40867519f..a023bd6063a 100644
--- a/buildscripts/idl/idl_check_compatibility.py
+++ b/buildscripts/idl/idl_check_compatibility.py
@@ -1077,13 +1077,18 @@ def check_param_or_type_validator(ctxt: IDLCompatibilityContext, old_field: synt
if new_field.validator:
if old_field.validator:
- allow_name: str = cmd_name + "-param-" + old_field.name
- if new_field.validator != old_field.validator and allow_name not in ignore_validator_check_list:
+ old_field_name: str = cmd_name + "-param-" + old_field.name
+ if new_field.validator != old_field.validator and old_field_name not in ignore_validator_check_list:
ctxt.add_command_or_param_type_validators_not_equal_error(
cmd_name, new_field.name, new_idl_file_path, type_name, is_command_parameter)
else:
- ctxt.add_command_or_param_type_contains_validator_error(
- cmd_name, new_field.name, new_idl_file_path, type_name, is_command_parameter)
+ new_field_name: str = cmd_name + "-param-" + new_field.name
+ # In SERVER-77382 we fixed the error handling of creating time-series collections by
+ # adding a new validator to two 'stable' fields, but it didn't break any stable API
+ # guarantees.
+ if new_field_name not in ["create-param-timeField", "create-param-metaField"]:
+ ctxt.add_command_or_param_type_contains_validator_error(
+ cmd_name, new_field.name, new_idl_file_path, type_name, is_command_parameter)
def get_all_struct_fields(struct: syntax.Struct, idl_file: syntax.IDLParsedSpec,