diff options
author | Huayu Ouyang <huayu.ouyang@mongodb.com> | 2021-03-22 22:48:03 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-25 17:05:52 +0000 |
commit | 1a2e420059f71f3b486f389fdb1463d927ffac58 (patch) | |
tree | 024451b1e8846be63271cf4aa0464ffab1a31980 /buildscripts/idl/tests/compatibility_test_pass | |
parent | d5ec2876050089857832308a5f72ea23dbb49715 (diff) | |
download | mongo-1a2e420059f71f3b486f389fdb1463d927ffac58.tar.gz |
SERVER-54854 Stop type checking unstable fields
Diffstat (limited to 'buildscripts/idl/tests/compatibility_test_pass')
-rw-r--r-- | buildscripts/idl/tests/compatibility_test_pass/new/compatibility_test_pass_new.idl | 102 | ||||
-rw-r--r-- | buildscripts/idl/tests/compatibility_test_pass/old/compatibility_test_pass_old.idl | 85 |
2 files changed, 187 insertions, 0 deletions
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 d5efb295f0a..018d8ddcd01 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 @@ -363,6 +363,39 @@ structs: anyTypeField: type: bsonSerializationTypeAnyAllowed + NewlyAddedBsonSerializationTypeAnyReply: + description: "This reply contains a newly added field whose type has a bson_serialization_type + that contains 'any' that is explicitly allowed" + fields: + newlyAddedBsonSerializationTypeAnyReplyField: + type: bsonSerializationTypeAnyAllowed + + OldUnstableTypeChangesReply: + description: "This reply contains a field that is unstable in the old version and has type changes" + fields: + oldUnstableTypeChangesReplyField: + unstable: true + type: intStringToIntStringBool + validator: + lt: 0 + + NewlyAddedBsonSerializationTypeAnyStruct: + description: "This struct contains a newly added field whose type has a bson_serialization_type + that contains 'any' that is explicitly allowed" + fields: + newlyAddedBsonSerializationTypeAnyStructField: + type: bsonSerializationTypeAnyAllowed + optional: true + + OldUnstableTypeChangesStruct: + description: "This struct contains a field that is unstable in the old version and has type changes" + fields: + oldUnstableTypeChangesField: + type: intStringBoolToIntString + optional: true + validator: + lt: 0 + BsonSerializationTypeAnyWithVariantReply: description: "This reply contains a new reply field with variant types where one of the bson serialization types is 'any' and is explicitly allowed" @@ -588,6 +621,56 @@ commands: supersetStructParameter: type: CommandParamStructRecursiveTwo + newlyAddedParamBsonAnyAllowList: + description: "command passes when its parameter is newly added and has bson type 'any' + that is explicitly allowed" + command_name: newlyAddedParamBsonAnyAllowList + namespace: ignored + cpp_name: newlyAddedParamBsonAnyAllowList + strict: true + api_version: "1" + reply_type: OkReply + fields: + newlyAddedBsonAnyAllowListParam: + type: bsonSerializationTypeAnyAllowed + optional: true + + oldUnstableParamTypeChanges: + description: "command passes when it has an old unstable param with incompatible type changes" + command_name: oldUnstableParamTypeChanges + namespace: ignored + cpp_name: oldUnstableParamTypeChanges + strict: true + api_version: "1" + reply_type: OkReply + fields: + oldUnstableTypeChangesParam: + type: intStringBoolToIntString + optional: true + validator: + lt: 0 + + newlyAddedTypeFieldBsonAnyAllowList: + description: "command passes when its type field is newly added and has bson type 'any' + that is explicitly allowed" + command_name: newlyAddedTypeFieldBsonAnyAllowList + namespace: type + type: NewlyAddedBsonSerializationTypeAnyStruct + cpp_name: newlyAddedTypeFieldBsonAnyAllowList + strict: true + api_version: "1" + reply_type: OkReply + + oldUnstableTypeChanges: + description: "command passes when it has an old unstable type field with incompatible type changes" + command_name: oldUnstableTypeChanges + namespace: type + type: OldUnstableTypeChangesStruct + cpp_name: oldUnstableParamTypeChanges + strict: true + api_version: "1" + reply_type: OkReply + oldCommandParameterValidator: description: "new command passes when it contains a parameter that does not contain a validator that is present in the old parameter" @@ -948,6 +1031,25 @@ commands: api_version: "1" reply_type: VariantStructRecursiveReply + newlyAddedReplyFieldTypeBsonAnyAllowed: + description: "command passes because it has a newly added reply field type has a bson_serialization_type + that contains 'any' that is explicitly allowed" + command_name: newlyAddedReplyFieldTypeBsonAnyAllowed + namespace: ignored + cpp_name: newlyAddedReplyFieldTypeBsonAnyAllowed + strict: true + api_version: "1" + reply_type: NewlyAddedBsonSerializationTypeAnyReply + + oldUnstableReplyFieldTypeChanges: + description: "command passes when it has an old unstable reply field with incompatible type changes" + command_name: oldUnstableReplyFieldTypeChanges + namespace: ignored + cpp_name: oldUnstableReplyFieldTypeChanges + strict: true + api_version: "1" + reply_type: OldUnstableTypeChangesReply + commandAllowedAnyTypes: description: "new command that has parameter and reply type with explicitly allowed 'any' bson serialization type passes" 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 1d17dd4366a..5c7535c3e23 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 @@ -359,6 +359,28 @@ structs: anyTypeField: type: bsonSerializationTypeAnyAllowed + NewlyAddedBsonSerializationTypeAnyReply: + description: "This reply contains a newly added field whose type has a bson_serialization_type + that contains 'any' that is explicitly allowed" + + OldUnstableTypeChangesReply: + description: "This reply contains a field that is unstable in the old version and has type changes" + fields: + oldUnstableTypeChangesReplyField: + unstable: true + type: intStringToIntStringBool + + NewlyAddedBsonSerializationTypeAnyStruct: + description: "This struct contains a newly added field whose type has a bson_serialization_type + that contains 'any' that is explicitly allowed" + + OldUnstableTypeChangesStruct: + description: "This struct contains a field that is unstable in the old version and has type changes" + fields: + oldUnstableTypeChangesField: + unstable: true + type: intStringBoolToIntString + BsonSerializationTypeAnyWithVariantReply: description: "This reply contains a new reply field with variant types where one of the bson serialization types is 'any' and is explicitly allowed" @@ -583,6 +605,50 @@ commands: supersetStructParameter: type: CommandParamStructRecursiveTwo + newlyAddedParamBsonAnyAllowList: + description: "command passes when its parameter is newly added and has bson type 'any' + that is explicitly allowed" + command_name: newlyAddedParamBsonAnyAllowList + namespace: ignored + cpp_name: newlyAddedParamBsonAnyAllowList + strict: true + api_version: "1" + reply_type: OkReply + + oldUnstableParamTypeChanges: + description: "command passes when it has an old unstable param with incompatible type changes" + command_name: oldUnstableParamTypeChanges + namespace: ignored + cpp_name: oldUnstableParamTypeChanges + strict: true + api_version: "1" + reply_type: OkReply + fields: + oldUnstableTypeChangesParam: + type: intStringBoolToIntString + unstable: true + + newlyAddedTypeFieldBsonAnyAllowList: + description: "command passes when its type field is newly added and has bson type 'any' + that is explicitly allowed" + command_name: newlyAddedTypeFieldBsonAnyAllowList + namespace: type + type: NewlyAddedBsonSerializationTypeAnyStruct + cpp_name: newlyAddedTypeFieldBsonAnyAllowList + strict: true + api_version: "1" + reply_type: OkReply + + oldUnstableTypeChanges: + description: "command passes when it has an old unstable type field with incompatible type changes" + command_name: oldUnstableTypeChanges + namespace: type + type: OldUnstableTypeChangesStruct + cpp_name: oldUnstableParamTypeChanges + strict: true + api_version: "1" + reply_type: OkReply + oldCommandParameterValidator: description: "new command passes when it contains a parameter that does not contain a validator that is present in the old parameter" @@ -948,6 +1014,25 @@ commands: api_version: "1" reply_type: VariantStructRecursiveReply + newlyAddedReplyFieldTypeBsonAnyAllowed: + description: "command passes because it has a newly added reply field type has a bson_serialization_type + that contains 'any' that is explicitly allowed" + command_name: newlyAddedReplyFieldTypeBsonAnyAllowed + namespace: ignored + cpp_name: newlyAddedReplyFieldTypeBsonAnyAllowed + strict: true + api_version: "1" + reply_type: NewlyAddedBsonSerializationTypeAnyReply + + oldUnstableReplyFieldTypeChanges: + description: "command passes when it has an old unstable reply field with incompatible type changes" + command_name: oldUnstableReplyFieldTypeChanges + namespace: ignored + cpp_name: oldUnstableReplyFieldTypeChanges + strict: true + api_version: "1" + reply_type: OldUnstableTypeChangesReply + commandAllowedAnyTypes: description: "new command that has parameter and reply type with explicitly allowed 'any' bson serialization type passes" |