diff options
author | Erin McNulty <erin.mcnulty@mongodb.com> | 2022-08-24 20:37:28 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-24 21:38:34 +0000 |
commit | 160e9ba26f68522796da0e7222901ae63e45e1c9 (patch) | |
tree | 6e82f348b49b67f2cf2d2828c61ffad4439f652f /buildscripts | |
parent | 1744ab66eafba2dcc6dd96d7fa0d0d77eeae35d8 (diff) | |
download | mongo-160e9ba26f68522796da0e7222901ae63e45e1c9.tar.gz |
SERVER-68558: Mark command reply types with is_command_reply field
Diffstat (limited to 'buildscripts')
7 files changed, 194 insertions, 7 deletions
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 c38a2ad5432..6a69eeb14dd 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 @@ -35,6 +35,7 @@ imports: structs: InvalidFieldTypeReply: description: "This reply contains a field where the type is invalid" + is_command_reply: true fields: invalidReplyField: type: None @@ -47,4 +48,4 @@ commands: cpp_name: replyFieldTypeInvalid strict: true api_version: "1" - reply_type: InvalidFieldTypeReply
\ No newline at end of file + reply_type: InvalidFieldTypeReply 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 23c609227a6..cb5db11fa01 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 @@ -35,6 +35,7 @@ imports: structs: InvalidFieldTypeReply: description: "This reply contains a field where the type is valid" + is_command_reply: true fields: invalidReplyField: type: string @@ -48,4 +49,4 @@ commands: cpp_name: replyFieldTypeInvalid strict: true api_version: "1" - reply_type: InvalidFieldTypeReply
\ No newline at end of file + reply_type: InvalidFieldTypeReply 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 f286dbc0ddd..b41036e54ec 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 @@ -145,6 +145,7 @@ structs: UnstableNewFieldReply: description: "This reply contains a field that is stable in the old command but is unstable in the new command." + is_command_reply: true fields: unstableNewField: type: string @@ -153,6 +154,7 @@ structs: InternalNewFieldReply: description: "This reply contains a field that is stable in the old command but is internal in the new command." + is_command_reply: true fields: internalNewField: type: string @@ -161,6 +163,7 @@ structs: StableNewReplyField: description: "This struct contains a reply field that is unstable in the old command but is stable in the new command." + is_command_reply: true fields: stableNewReplyField: type: string @@ -178,6 +181,7 @@ structs: OptionalNewFieldReply: description: "This reply contains a field that is required in the old command but is optional in the new command." + is_command_reply: true fields: optionalNewField: type: string @@ -187,7 +191,8 @@ structs: MissingNewFieldReply: description: "This reply contains a field that exists in the old command but is missing in the new command." - + is_command_reply: true + RequiredNewField: description: "This struct contains a field that is optional in the old command but is required in the new command." @@ -199,6 +204,7 @@ structs: EnumNotSubsetReply: description: "This reply contains an enum field where the new enum values is not a subset of the old reply type's enum values" + is_command_reply: true fields: enumNotSubsetReplyField: type: NewReplyFieldEnumNotSubset @@ -207,6 +213,7 @@ structs: NotEnumFieldReply: description: "This reply contains a field that is an enum type in the old command but is not an enum type in the new command" + is_command_reply: true fields: notEnumReplyField: type: string @@ -215,6 +222,7 @@ structs: NotStructFieldReply: description: "This reply contains a field that is a struct type in the old command but is not a struct type in the new command" + is_command_reply: true fields: notStructReplyField: type: string @@ -223,6 +231,7 @@ structs: EnumOrStructFieldReply: description: "This reply contains a field that is a non-enum or struct type in the old command but is an enum or struct in the new command" + is_command_reply: true fields: EnumOrStructReplyField: type: NewReplyFieldEnumNotSubset @@ -231,6 +240,7 @@ structs: BsonNotSubsetReply: description: "This reply contains a field type where the new bson_serialization_type is not a subset of the old bson_serialization_type" + is_command_reply: true fields: bsonNotSubsetReplyField: type: intToIntString @@ -239,6 +249,7 @@ structs: BsonNotSubsetReplyTwo: description: "This reply contains a field type where the new bson_serialization_type is not a subset of the old bson_serialization_type" + is_command_reply: true fields: bsonNotSubsetReplyFieldTwo: type: intStringToIntStringBool @@ -247,6 +258,7 @@ structs: OldBsonSerializationTypeAnyReply: description: "This reply contains a field whose old type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: oldBsonSerializationTypeAnyReplyField: type: oldBsonSerializationTypeAny @@ -255,6 +267,7 @@ structs: NewBsonSerializationTypeAnyReply: description: "This reply contains a field whose new type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: newBsonSerializationTypeAnyReplyField: type: newBsonSerializationTypeAny @@ -263,6 +276,7 @@ structs: BsonSerializationTypeAnyReply: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' that is not explicitly allowed." + is_command_reply: true fields: bsonSerializationTypeAnyReplyField: type: bsonSerializationTypeAny @@ -289,6 +303,7 @@ structs: CppTypeNotEqualReply: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the cpp_types are not equal" + is_command_reply: true fields: cppTypeNotEqualReplyField: type: bsonSerializationTypeAnyCppTypeNotEqual @@ -298,6 +313,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the serializers are not equal" + is_command_reply: true fields: serializerNotEqualReplyField: type: bsonSerializationTypeAnySerializerNotEqual @@ -307,6 +323,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the deserializers are not equal" + is_command_reply: true fields: deserializerNotEqualReplyField: type: bsonSerializationTypeAnyDeserializerNotEqual @@ -315,6 +332,7 @@ structs: NewlyAddedBsonSerializationTypeAnyReply: description: "This reply contains a newly added field whose type has a bson_serialization_type that contains 'any' that is not explicitly allowed" + is_command_reply: true fields: newlyAddedBsonSerializationTypeAnyReplyField: stability: stable @@ -325,6 +343,7 @@ structs: description: "This reply contains a field that is unstable in the old version and whose old type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: oldBsonSerializationTypeAnyUnstableReplyField: type: oldBsonSerializationTypeAny @@ -334,6 +353,7 @@ structs: description: "This reply contains a field that is unstable in the old version and whose new type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: newBsonSerializationTypeAnyUnstableReplyField: type: newBsonSerializationTypeAny @@ -343,6 +363,7 @@ structs: description: "This reply contains a field that is unstable in the old version and whose old and new type have a bson_serialization_type that contains 'any' that is not explicitly allowed." + is_command_reply: true fields: bsonSerializationTypeAnyUnstableReplyField: type: bsonSerializationTypeAny @@ -351,6 +372,7 @@ structs: BsonSerializationTypeWithVariantAnyUnstableReply: description: "This reply contains a field whose old and new variant types have a bson_serialization_type that contains 'any' that is not compatible and where the old field is unstable" + is_command_reply: true fields: bsonSerializationTypeWithVariantAnyUnstableReplyField: type: @@ -361,6 +383,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the cpp_types are not equal and where the old field is unstable" + is_command_reply: true fields: cppTypeNotEqualReplyUnstableField: type: bsonSerializationTypeAnyCppTypeNotEqual @@ -370,6 +393,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the serializers are not equal and where the old field is unstable" + is_command_reply: true fields: serializerNotEqualReplyUnstableField: type: bsonSerializationTypeAnySerializerNotEqual @@ -379,6 +403,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the deserializers are not equal and where the old field is unstable" + is_command_reply: true fields: deserializerNotEqualReplyUnstableField: type: bsonSerializationTypeAnyDeserializerNotEqual @@ -467,6 +492,7 @@ structs: StructFieldTypeRecursiveReplyOne: description: "This reply contains a field whose new type is a struct that is not compatible with the old field type" + is_command_reply: true fields: structReplyField: type: UnstableNewFieldReply @@ -475,6 +501,7 @@ structs: StructFieldTypeRecursiveReplyTwo: description: "This reply contains a field whose new type is a struct that is not compatible with the old field type" + is_command_reply: true fields: structReplyField: type: StructType @@ -483,6 +510,7 @@ structs: StructType: description: "This struct contains a field whose new type is incompatible with the old field type" + is_command_reply: true fields: fieldOne: type: BsonNotSubsetReply @@ -491,6 +519,7 @@ structs: NewVariantTypeReply: description: "This reply contains a new field that has a variant type while the old field is not a variant type" + is_command_reply: true fields: newVariantTypeReplyField: stability: stable @@ -500,6 +529,7 @@ structs: NewVariantNotSubsetReply: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyField: stability: stable @@ -509,6 +539,7 @@ structs: NewVariantNotSubsetReplyWithArray: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyField: stability: stable @@ -518,6 +549,7 @@ structs: NewVariantNotSubsetReplyTwo: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyFieldTwo: stability: stable @@ -527,6 +559,7 @@ structs: NewVariantNotSubsetReplyTwoWithArray: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyFieldTwo: stability: stable @@ -536,6 +569,7 @@ structs: VariantRecursiveReply: description: "This reply contains a field that has a new variant type that is not compatible with the old variant type" + is_command_reply: true fields: variantRecursiveReplyField: stability: stable @@ -545,6 +579,7 @@ structs: VariantRecursiveReplyWithArray: description: "This reply contains a field that has a new variant type that is not compatible with the old variant type" + is_command_reply: true fields: variantRecursiveReplyField: stability: stable @@ -554,6 +589,7 @@ structs: NewVariantStructNotSubsetReply: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantStructNotSubsetReplyField: stability: stable @@ -563,6 +599,7 @@ structs: NewVariantStructNotSubsetReplyWithArray: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantStructNotSubsetReplyField: stability: stable @@ -572,6 +609,7 @@ structs: VariantStructRecursiveReply: description: "This reply contains a field that has a new variant struct type that is not compatible with the old variant struct type" + is_command_reply: true fields: variantStructRecursiveReplyField: stability: stable @@ -581,6 +619,7 @@ structs: VariantStructRecursiveReplyWithArray: description: "This reply contains a field that has a new variant struct type that is not compatible with the old variant struct type" + is_command_reply: true fields: variantStructRecursiveReplyField: stability: stable @@ -606,6 +645,7 @@ structs: NewValidatorStruct: description: "This struct contains a field where the new version contains a validator while the old version does not" + is_command_reply: true fields: newValidatorField: type: int @@ -615,6 +655,7 @@ structs: ValidatorsNotEqualStruct: description: "This struct contains a field where the new and old validators are not exactly equal" + is_command_reply: true fields: validatorsNotEqualField: type: double @@ -643,6 +684,7 @@ structs: ArrayTypeStruct: description: "Struct with ArrayType field." + is_command_reply: true fields: ArrayCommandParameter: type: array<string> @@ -757,6 +799,7 @@ structs: MissingUnstableFieldNewFieldStruct: description: "This struct contains a field that missing the 'stability' field in the new command." + is_command_reply: true fields: missingUnstableFieldNewField: type: string @@ -771,6 +814,7 @@ structs: IncompatibleChainedStructReply: description: "This reply contains an incompatible chained struct" + is_command_reply: true chained_structs: NewVariantNotSubsetReply: NewVariantNotSubsetReply @@ -781,6 +825,7 @@ structs: NewAddedChainedTypeReply: description: "This reply contains an added chained type in the new version" + is_command_reply: true chained_types: intToIntString: intToIntString @@ -789,6 +834,7 @@ structs: OptionalBoolToBoolStruct: description: "optionalBool field replaced by bool" + is_command_reply: true fields: ok: type: bool 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 df3da6398c6..f56e7505cec 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 @@ -44,12 +44,14 @@ types: structs: NewStructFieldNoUnstableField: description: "new struct field has no unstable field specified" + is_command_reply: true fields: newStructFieldNoUnstableField: type: bool NewStructFieldTypeContainsAny: description: "new struct field type has bson_serialization_type with 'any'" + is_command_reply: true fields: newStructFieldTypeContainsAny: type: bsonSerializationTypeAny 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 4fba33cd45d..3ed5aaffe30 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 @@ -135,10 +135,12 @@ structs: NewlyAddedStableField: description: "This struct contains a field that is added as stable in the new command" + is_command_reply: true UnstableNewFieldReply: description: "This reply contains a field that is stable in the old command but is unstable in the new command." + is_command_reply: true fields: unstableNewField: type: string @@ -147,6 +149,7 @@ structs: InternalNewFieldReply: description: "This reply contains a field that is stable in the old command but is internal in the new command." + is_command_reply: true fields: internalNewField: type: string @@ -155,6 +158,7 @@ structs: StableNewReplyField: description: "This struct contains a reply field that is unstable in the old command but is stable in the new command." + is_command_reply: true fields: stableNewReplyField: type: string @@ -172,6 +176,7 @@ structs: OptionalNewFieldReply: description: "This reply contains a field that is required in the old command but is optional in the new command." + is_command_reply: true fields: optionalNewField: type: string @@ -189,6 +194,7 @@ structs: MissingNewFieldReply: description: "This reply contains a field that exists in the old command but is missing in the new command." + is_command_reply: true fields: missingNewField: type: string @@ -197,6 +203,7 @@ structs: EnumNotSubsetReply: description: "This reply contains an enum field where the new enum values is not a subset of the old reply type's enum values" + is_command_reply: true fields: enumNotSubsetReplyField: type: NewReplyFieldEnumNotSubset @@ -205,6 +212,7 @@ structs: NotEnumFieldReply: description: "This reply contains a field that is an enum type in the old command but is not an enum type in the new command" + is_command_reply: true fields: notEnumReplyField: type: NewReplyFieldEnumNotSubset @@ -213,6 +221,7 @@ structs: NotStructFieldReply: description: "This reply contains a field that is a struct type in the old command but is not a struct type in the new command" + is_command_reply: true fields: notStructReplyField: type: StructReplyFieldType @@ -224,6 +233,7 @@ structs: EnumOrStructFieldReply: description: "This reply contains a field that is a non-enum or struct type in the old command but is an enum or struct in the new command" + is_command_reply: true fields: EnumOrStructReplyField: type: intToIntString @@ -232,6 +242,7 @@ structs: BsonNotSubsetReply: description: "This reply contains a field type where the new bson_serialization_type is not a subset of the old bson_serialization_type" + is_command_reply: true fields: bsonNotSubsetReplyField: type: intToIntString @@ -240,6 +251,7 @@ structs: BsonNotSubsetReplyTwo: description: "This reply contains a field type where the new bson_serialization_type is not a subset of the old bson_serialization_type" + is_command_reply: true fields: bsonNotSubsetReplyFieldTwo: type: intStringToIntStringBool @@ -248,6 +260,7 @@ structs: OldBsonSerializationTypeAnyReply: description: "This reply contains a field whose old type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: oldBsonSerializationTypeAnyReplyField: type: oldBsonSerializationTypeAny @@ -256,6 +269,7 @@ structs: NewBsonSerializationTypeAnyReply: description: "This reply contains a field whose new type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: newBsonSerializationTypeAnyReplyField: type: newBsonSerializationTypeAny @@ -264,6 +278,7 @@ structs: BsonSerializationTypeAnyReply: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' that is not explicitly allowed" + is_command_reply: true fields: bsonSerializationTypeAnyReplyField: type: bsonSerializationTypeAny @@ -272,11 +287,13 @@ structs: NewlyAddedBsonSerializationTypeAnyReply: description: "This reply contains a newly added field whose type has a bson_serialization_type that contains 'any' that is not explicitly allowed" + is_command_reply: true OldBsonSerializationTypeAnyUnstableReply: description: "This reply contains a field that is unstable in the old version and whose old type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: oldBsonSerializationTypeAnyUnstableReplyField: type: oldBsonSerializationTypeAny @@ -286,6 +303,7 @@ structs: description: "This reply contains a field that is unstable in the old version and whose new type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: newBsonSerializationTypeAnyUnstableReplyField: type: newBsonSerializationTypeAny @@ -295,6 +313,7 @@ structs: description: "This reply contains a field that is unstable in the old version and whose old and new type have a bson_serialization_type that contains 'any' that is not explicitly allowed." + is_command_reply: true fields: bsonSerializationTypeAnyUnstableReplyField: type: bsonSerializationTypeAny @@ -304,6 +323,7 @@ structs: description: "This reply contains a field whose old and new variant types have a bson_serialization_type that contains 'any' that is not compatible and where the old field is unstable" + is_command_reply: true fields: bsonSerializationTypeWithVariantAnyUnstableReplyField: type: @@ -314,6 +334,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the cpp_types are not equal and where the old field is unstable" + is_command_reply: true fields: cppTypeNotEqualReplyUnstableField: type: bsonSerializationTypeAnyCppTypeNotEqual @@ -323,6 +344,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the serializers are not equal and where the old field is unstable" + is_command_reply: true fields: serializerNotEqualReplyUnstableField: type: bsonSerializationTypeAnySerializerNotEqual @@ -332,6 +354,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the deserializers are not equal and where the old field is unstable" + is_command_reply: true fields: deserializerNotEqualReplyUnstableField: type: bsonSerializationTypeAnyDeserializerNotEqual @@ -350,6 +373,7 @@ structs: description: "This struct contains a field that is unstable in the old version and whose old type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: oldBsonSerializationTypeAnyUnstableStructField: stability: unstable @@ -359,6 +383,7 @@ structs: description: "This struct contains a field that is unstable in the old version and whose new type has a bson_serialization_type that contains 'any'" + is_command_reply: true fields: newBsonSerializationTypeAnyUnstableStructField: stability: unstable @@ -368,6 +393,7 @@ structs: description: "This struct contains a field that is unstable in the old version and whose old and new type have a bson_serialization_type that contains 'any' that is not explicitly allowed." + is_command_reply: true fields: bsonSerializationTypeAnyUnstableStructField: stability: unstable @@ -376,6 +402,7 @@ structs: BsonSerializationTypeWithVariantAnyUnstableStruct: description: "This struct contains a field whose old and new variant types have a bson_serialization_type that contains 'any' that is not compatible and where the old field is unstable" + is_command_reply: true fields: bsonSerializationTypeWithVariantAnyUnstableStructField: stability: unstable @@ -386,6 +413,7 @@ structs: description: "This struct contains a field whose old and new type have a bson_serialization_type that contains 'any' and the cpp_types are not equal and where the old field is unstable" + is_command_reply: true fields: cppTypeNotEqualStructUnstableField: stability: unstable @@ -395,6 +423,7 @@ structs: description: "This struct contains a field whose old and new type have a bson_serialization_type that contains 'any' and the serializers are not equal and where the old field is unstable" + is_command_reply: true fields: serializerNotEqualStructUnstableField: stability: unstable @@ -404,6 +433,7 @@ structs: description: "This struct contains a field whose old and new type have a bson_serialization_type that contains 'any' and the deserializers are not equal and where the old field is unstable" + is_command_reply: true fields: deserializerNotEqualStructUnstableField: stability: unstable @@ -412,6 +442,7 @@ structs: 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" + is_command_reply: true fields: bsonSerializationTypeAnyStructField: stability: stable @@ -421,6 +452,7 @@ structs: BsonSerializationTypeWithVariantAnyStructWithArray: description: "This struct contains a field whose old and new variant types have a array of bson_serialization_type that contains 'any' that is not compatible" + is_command_reply: true fields: bsonSerializationTypeAnyStructField: stability: stable @@ -431,6 +463,7 @@ structs: CppTypeNotEqualReply: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the cpp_types are not equal" + is_command_reply: true fields: cppTypeNotEqualReplyField: type: bsonSerializationTypeAnyCppTypeNotEqual @@ -440,6 +473,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the serializers are not equal" + is_command_reply: true fields: serializerNotEqualReplyField: type: bsonSerializationTypeAnySerializerNotEqual @@ -449,6 +483,7 @@ structs: description: "This reply contains a field whose old and new type have a bson_serialization_type that contains 'any' and the deserializers are not equal" + is_command_reply: true fields: deserializerNotEqualReplyField: type: bsonSerializationTypeAnyDeserializerNotEqual @@ -457,6 +492,7 @@ structs: StructFieldTypeRecursiveReplyOne: description: "This reply contains a field whose new type is a struct that is not compatible with the old field type" + is_command_reply: true fields: structReplyField: type: UnstableNewFieldReply @@ -465,6 +501,7 @@ structs: StructFieldTypeRecursiveReplyTwo: description: "This reply contains a field whose new type is a struct that is not compatible with the old field type" + is_command_reply: true fields: structReplyField: type: StructType @@ -481,6 +518,7 @@ structs: NewVariantTypeReply: description: "This reply contains a new field that has a variant type while the old field is not a variant type" + is_command_reply: true fields: newVariantTypeReplyField: type: int @@ -489,6 +527,7 @@ structs: NewVariantNotSubsetReply: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyField: type: @@ -498,6 +537,7 @@ structs: NewVariantNotSubsetReplyWithArray: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyField: stability: stable @@ -507,6 +547,7 @@ structs: NewVariantNotSubsetReplyTwo: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyFieldTwo: stability: stable @@ -516,6 +557,7 @@ structs: NewVariantNotSubsetReplyTwoWithArray: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyFieldTwo: stability: stable @@ -525,6 +567,7 @@ structs: VariantRecursiveReply: description: "This reply contains a field that has a new variant type that is not compatible with the old variant type" + is_command_reply: true fields: variantRecursiveReplyField: stability: stable @@ -534,6 +577,7 @@ structs: VariantRecursiveReplyWithArray: description: "This reply contains a field that has a new variant type that is not compatible with the old variant type" + is_command_reply: true fields: variantRecursiveReplyField: stability: stable @@ -543,6 +587,7 @@ structs: NewVariantStructNotSubsetReply: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantStructNotSubsetReplyField: stability: stable @@ -552,6 +597,7 @@ structs: NewVariantStructNotSubsetReplyWithArray: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantStructNotSubsetReplyField: stability: stable @@ -561,6 +607,7 @@ structs: VariantStructRecursiveReply: description: "This reply contains a field that has a new variant struct type that is not compatible with the old variant struct type" + is_command_reply: true fields: variantStructRecursiveReplyField: stability: stable @@ -570,6 +617,7 @@ structs: VariantStructRecursiveReplyWithArray: description: "This reply contains a field that has a new variant struct type that is not compatible with the old variant struct type" + is_command_reply: true fields: variantStructRecursiveReplyField: stability: stable @@ -595,6 +643,7 @@ structs: NewValidatorStruct: description: "This struct contains a field where the new version contains a validator while the old version does not" + is_command_reply: true fields: newValidatorField: type: int @@ -602,6 +651,7 @@ structs: ValidatorsNotEqualStruct: description: "This struct contains a field where the new and old validators are not exactly equal" + is_command_reply: true fields: validatorsNotEqualField: type: double @@ -733,6 +783,7 @@ structs: ArrayTypeStruct: description: "Struct with ArrayType field." + is_command_reply: true fields: ArrayCommandParameter: type: array<string> @@ -741,6 +792,7 @@ structs: MissingUnstableFieldNewFieldStruct: description: "This struct contains a field that missing the 'stability' field in the new command." + is_command_reply: true fields: missingUnstableFieldNewField: type: string @@ -749,9 +801,11 @@ structs: MissingUnstableFieldAddedNewFieldStruct: description: "This struct contains an added field in the new command that is missing the 'stability' field." + is_command_reply: true IncompatibleChainedStructReply: description: "This reply contains an incompatible chained struct" + is_command_reply: true chained_structs: NewVariantNotSubsetReply: NewVariantNotSubsetReply @@ -762,7 +816,8 @@ structs: NewAddedChainedTypeReply: description: "This reply contains an added chained type in the new version" - + is_command_reply: true + NewRemovedChainedTypeStruct: description: "This reply contains an added chained type in the new version" chained_types: @@ -777,6 +832,7 @@ structs: BoolToOptionalBoolStruct: description: "bool field replaced by optionalBool" + is_command_reply: true fields: ok: type: bool 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 0bc6a4964aa..b6cf9b8aafc 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 @@ -95,6 +95,7 @@ structs: StableNewFieldReply: description: "This reply contains a field that is unstable in the old command but is stable in the new command." + is_command_reply: true fields: stableNewField: type: string @@ -103,6 +104,7 @@ structs: UnstableNewFieldReplyIgnoreList: description: "This reply contains a field that is stable in the old command and is unstable in the new command, but the change is explicitly allowed." + is_command_reply: true fields: unstableNewFieldIgnoreList: type: string @@ -111,6 +113,7 @@ structs: NewReplyTypeEnumOrStructIgnoreList: description: "the type is a non-enum or struct type in the old command, and an enum or struct in the new command, but the change is explicitly allowed" + is_command_reply: true fields: newReplyTypeEnumOrStructIgnoreList: type: StructType @@ -119,6 +122,7 @@ structs: RequiredNewFieldReply: description: "This reply contains a field that is optional in the old command but is required in the new command." + is_command_reply: true fields: requiredNewField: type: string @@ -135,6 +139,7 @@ structs: AddedNewFieldReply: description: "This reply contains a field that is added in the new command." + is_command_reply: true fields: addedNewField: type: string @@ -143,6 +148,7 @@ structs: UnstableOldFieldReply: description: "This reply contains a field that is unstable in the old command and is unstable and optional in the new command." + is_command_reply: true fields: unstableOldField: type: string @@ -152,6 +158,7 @@ structs: 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" + is_command_reply: true fields: unstableOptionalNewFieldIgnoreList: type: string @@ -161,6 +168,7 @@ structs: EnumSubsetReply: description: "This reply contains an enum field where the new enum values is a subset of the old reply type's enum values" + is_command_reply: true fields: replyField: type: NewReplyFieldEnumSubset @@ -169,6 +177,7 @@ structs: BsonSubsetReply: description: "This reply contains a field type where the new bson_serialization_type is a subset of the old bson_serialization_type" + is_command_reply: true fields: bsonSubsetReplyField: type: intStringToInt @@ -177,6 +186,7 @@ structs: BsonSubsetReplyTwo: description: "This reply contains a field type where the new bson_serialization_type is a subset of the old bson_serialization_type" + is_command_reply: true fields: bsonSubsetReplyFieldTwo: type: intStringBoolToIntString @@ -185,6 +195,7 @@ structs: StructFieldTypeRecursiveReplyIgnoreList: description: "This reply contains a field whose new type is a struct that is not compatible with the old field type, but this is explicitly allowed" + is_command_reply: true fields: structReplyField: type: UnstableNewFieldReplyIgnoreList @@ -193,6 +204,7 @@ structs: StructFieldTypeRecursiveReplyOne: description: "This reply contains a field whose new type is a struct that is compatible with the old field type" + is_command_reply: true fields: structReplyField: type: StableNewFieldReply @@ -201,6 +213,7 @@ structs: StructFieldTypeRecursiveReplyTwo: description: "This reply contains a field whose new type is a struct that is compatible with the old field type" + is_command_reply: true fields: structReplyField: type: StructType @@ -217,6 +230,7 @@ structs: OldVariantTypeReply: description: "This reply contains an old field that has a variant type while the new field is not a variant type" + is_command_reply: true fields: oldVariantTypeReplyField: type: int @@ -225,6 +239,7 @@ structs: NewVariantNotSubsetReplyIgnoreList: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyFieldIgnoreList: type: @@ -234,6 +249,7 @@ structs: NewVariantSubsetReply: description: "This reply contains a field whose new variant types are a subset of the old variant types" + is_command_reply: true fields: variantSubsetReplyField: stability: stable @@ -243,6 +259,7 @@ structs: NewVariantSubsetReplyTwo: description: "This reply contains a field whose new variant types are a subset of the old variant types" + is_command_reply: true fields: variantSubsetReplyFieldTwo: stability: stable @@ -252,6 +269,7 @@ structs: VariantRecursiveReply: description: "This reply contains a field that has a new variant type that is compatible with the old variant type" + is_command_reply: true fields: variantRecursiveReplyField: stability: stable @@ -262,6 +280,7 @@ structs: OldVariantStructReply: description: "This reply contains a field whose new variant type does not have a variant struct type while the old one does" + is_command_reply: true fields: variantStructReplyField: stability: stable @@ -271,6 +290,7 @@ structs: VariantStructRecursiveReply: description: "This reply contains a field that has a new variant struct type that is compatible with the old variant struct type" + is_command_reply: true fields: variantStructRecursiveReplyField: stability: stable @@ -281,6 +301,7 @@ structs: VariantDifferentStructReplyIgnoreList: description: "This reply contains a field that has a new variant struct type that is different from the old variant struct type" + is_command_reply: true fields: variantStructRecursiveReplyFieldIgnoreList: stability: unstable @@ -290,6 +311,7 @@ structs: NonVariantToVariantReplyIgnoreList: description: "This reply contains a field that changes from a non-variant type to a variant type, but the field is in the ignore list" + is_command_reply: true fields: nonVariantToVariantReplyFieldIgnoreList: stability: unstable @@ -299,6 +321,7 @@ structs: NonEnumToEnumReplyIgnoreList: description: "This reply contains a field that changes from a non-enum type to an enum type, but the field is in the ignore list" + is_command_reply: true fields: nonEnumToEnumReplyIgnoreList: type: EnumSubsetReply @@ -324,6 +347,7 @@ structs: OldValidatorStruct: description: "This struct contains a field where the old version contains a validator while the new version does not" + is_command_reply: true fields: oldValidatorField: type: int @@ -331,6 +355,7 @@ structs: ValidatorsEqualStruct: description: "This struct contains a field where the new and old validator are exactly equal" + is_command_reply: true fields: validatorsEqualField: type: double @@ -477,6 +502,7 @@ structs: BsonSerializationTypeAnyReply: description: "This reply contains a field whose type is 'any' and is explicitly allowed" + is_command_reply: true fields: anyTypeField: type: bsonSerializationTypeAnyAllowed @@ -485,6 +511,7 @@ structs: NewlyAddedBsonSerializationTypeAnyReply: description: "This reply contains a newly added field whose type has a bson_serialization_type that contains 'any' that is explicitly allowed" + is_command_reply: true fields: newlyAddedBsonSerializationTypeAnyReplyField: type: bsonSerializationTypeAnyAllowed @@ -501,6 +528,7 @@ structs: OldInternalTypeChangesReply: description: "This reply contains a field that is internal in the old version and has type changes" + is_command_reply: true fields: oldInternalTypeChangesReplyField: stability: internal @@ -511,6 +539,7 @@ structs: NewUnstableTypeChangesReplyIgnoreList: description: "This reply contains a field that is stable in the old version and has type changes, but is also in the ignore list" + is_command_reply: true fields: newUnstableTypeChangesReplyFieldIgnoreList: stability: unstable @@ -550,6 +579,7 @@ structs: 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" + is_command_reply: true fields: anyTypeField: stability: stable @@ -560,6 +590,7 @@ structs: ArrayTypeStruct: description: "Struct with ArrayType field." + is_command_reply: true fields: ArrayCommandParameter: type: array<string> @@ -568,6 +599,7 @@ structs: MissingUnstableFieldNewFieldStruct: description: "This struct contains a field that missing the 'stability' field in the new command." + is_command_reply: true fields: missingUnstableFieldNewField: type: string @@ -575,6 +607,7 @@ structs: MissingUnstableFieldOldFieldStruct: description: "This struct contains a field that missing the 'stability' field in the old command." + is_command_reply: true fields: missingUnstableFieldNewField: type: string @@ -582,6 +615,7 @@ structs: CompatibleChainedStructReply: description: "This reply contains an compatible chained struct" + is_command_reply: true chained_structs: StructFieldTypeRecursiveReplyTwo: StructFieldTypeRecursiveReplyTwo @@ -592,6 +626,7 @@ structs: NewOptionalBoolStruct: description: "This struct gets another field of type optionalBool." + is_command_reply: true fields: ok1: type: bool @@ -603,6 +638,7 @@ structs: OptionalBoolEquivalenceStruct: description: "First two fields get the types swapped." + is_command_reply: true fields: ok1: type: optionalBool @@ -617,6 +653,7 @@ structs: OptionalBoolToBoolStruct: description: "optionalBool field replaced by bool" + is_command_reply: true fields: ok: type: bool @@ -624,6 +661,7 @@ structs: BoolToOptionalBoolStruct: description: "bool field replaced by optionalBool" + is_command_reply: true fields: ok: type: optionalBool @@ -631,6 +669,7 @@ structs: ReplyWithNewArrayTypeField: description: "new field is of ArrayType" + is_command_reply: true fields: ok: type: bool @@ -642,6 +681,7 @@ structs: ReplyWithNewNestedArrayTypeField: description: "new field is a struct with a field of ArrayType" + is_command_reply: true fields: ok: type: bool @@ -2127,4 +2167,4 @@ commands: type: ArrayTypeStruct optional: true stability: stable - reply_type: ReplyWithNewNestedArrayTypeField
\ No newline at end of file + reply_type: ReplyWithNewNestedArrayTypeField 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 18ff435077e..72b320aa229 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 @@ -95,7 +95,8 @@ enums: structs: StableNewFieldReply: description: "This reply contains a field that is unstable in the old command but is - stable in the new command." + stable in the new command." + is_command_reply: true fields: stableNewField: type: string @@ -104,6 +105,7 @@ structs: UnstableNewFieldReplyIgnoreList: description: "This reply contains a field that is stable in the old command and is unstable in the new command, but the change is explicitly allowed." + is_command_reply: true fields: unstableNewFieldIgnoreList: type: string @@ -112,6 +114,7 @@ structs: NewReplyTypeEnumOrStructIgnoreList: description: "the type is a non-enum or struct type in the old command, and an enum or struct in the new command, but the change is explicitly allowed" + is_command_reply: true fields: newReplyTypeEnumOrStructIgnoreList: type: string @@ -120,6 +123,7 @@ structs: RequiredNewFieldReply: description: "This reply contains a field that is optional in the old command but is required in the new command." + is_command_reply: true fields: requiredNewField: type: string @@ -136,10 +140,12 @@ structs: AddedNewFieldReply: description: "This reply contains a field that is added in the new command." + is_command_reply: true UnstableOldFieldReply: description: "This reply contains a field that is unstable in the old command and is unstable and optional in the new command." + is_command_reply: true fields: unstableOldField: type: string @@ -148,6 +154,7 @@ structs: 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" + is_command_reply: true fields: unstableOptionalNewFieldIgnoreList: stability: stable @@ -156,6 +163,7 @@ structs: EnumSubsetReply: description: "This reply contains an enum field where the new enum values is a subset of the old reply type's enum values" + is_command_reply: true fields: replyField: type: NewReplyFieldEnumSubset @@ -164,6 +172,7 @@ structs: BsonSubsetReply: description: "This reply contains a field type where the new bson_serialization_type is a subset of the old bson_serialization_type" + is_command_reply: true fields: bsonSubsetReplyField: type: intStringToInt @@ -172,6 +181,7 @@ structs: BsonSubsetReplyTwo: description: "This reply contains a field type where the new bson_serialization_type is a subset of the old bson_serialization_type" + is_command_reply: true fields: bsonSubsetReplyFieldTwo: type: intStringBoolToIntString @@ -180,6 +190,7 @@ structs: StructFieldTypeRecursiveReplyIgnoreList: description: "This reply contains a field whose new type is a struct that is not compatible with the old field type, but this is explicitly allowed" + is_command_reply: true fields: structReplyField: type: UnstableNewFieldReplyIgnoreList @@ -188,6 +199,7 @@ structs: StructFieldTypeRecursiveReplyOne: description: "This reply contains a field whose new type is a struct that is compatible with the old field type" + is_command_reply: true fields: structReplyField: type: StableNewFieldReply @@ -196,6 +208,7 @@ structs: StructFieldTypeRecursiveReplyTwo: description: "This reply contains a field whose new type is a struct that is compatible with the old field type" + is_command_reply: true fields: structReplyField: type: StructType @@ -220,6 +233,7 @@ structs: OldVariantTypeReply: description: "This reply contains an old field that has a variant type while the new field is not a variant type" + is_command_reply: true fields: oldVariantTypeReplyField: stability: stable @@ -229,6 +243,7 @@ structs: NewVariantNotSubsetReplyIgnoreList: description: "This reply contains a field whose new variant types are not a subset of the old variant types" + is_command_reply: true fields: variantNotSubsetReplyFieldIgnoreList: stability: stable @@ -238,6 +253,7 @@ structs: NewVariantSubsetReply: description: "This reply contains a field whose new variant types are a subset of the old variant types" + is_command_reply: true fields: variantSubsetReplyField: stability: stable @@ -247,6 +263,7 @@ structs: NewVariantSubsetReplyTwo: description: "This reply contains a field whose new variant types are a subset of the old variant types" + is_command_reply: true fields: variantSubsetReplyFieldTwo: stability: stable @@ -256,6 +273,7 @@ structs: VariantRecursiveReply: description: "This reply contains a field that has a new variant type that is compatible with the old variant type" + is_command_reply: true fields: variantRecursiveReplyField: stability: stable @@ -266,6 +284,7 @@ structs: OldVariantStructReply: description: "This reply contains a field whose new variant type does not have a variant struct type while the old one does" + is_command_reply: true fields: variantStructReplyField: stability: stable @@ -275,6 +294,7 @@ structs: VariantStructRecursiveReply: description: "This reply contains a field that has a new variant struct type that is compatible with the old variant struct type" + is_command_reply: true fields: variantStructRecursiveReplyField: stability: stable @@ -285,6 +305,7 @@ structs: VariantDifferentStructReplyIgnoreList: description: "This reply contains a field that has a new variant struct type that is different from the old variant struct type" + is_command_reply: true fields: variantStructRecursiveReplyFieldIgnoreList: stability: stable @@ -294,6 +315,7 @@ structs: NonVariantToVariantReplyIgnoreList: description: "This reply contains a field that changes from a non-variant type to a variant type, but the field is in the ignore list" + is_command_reply: true fields: nonVariantToVariantReplyFieldIgnoreList: stability: stable @@ -302,6 +324,7 @@ structs: NonEnumToEnumReplyIgnoreList: description: "This reply contains a field that changes from a non-enum type to an enum type, but the field is in the ignore list" + is_command_reply: true fields: nonEnumToEnumReplyIgnoreList: type: StructTypeUnstable @@ -330,6 +353,7 @@ structs: OldValidatorStruct: description: "This struct contains a field where the old version contains a validator while the new version does not" + is_command_reply: true fields: oldValidatorField: type: int @@ -339,6 +363,7 @@ structs: ValidatorsEqualStruct: description: "This struct contains a field where the new and old validator are exactly equal" + is_command_reply: true fields: validatorsEqualField: type: double @@ -473,6 +498,7 @@ structs: BsonSerializationTypeAnyReply: description: "This reply contains a field whose type is 'any' and is explicitly allowed" + is_command_reply: true fields: anyTypeField: type: bsonSerializationTypeAnyAllowed @@ -481,9 +507,11 @@ structs: NewlyAddedBsonSerializationTypeAnyReply: description: "This reply contains a newly added field whose type has a bson_serialization_type that contains 'any' that is explicitly allowed" + is_command_reply: true OldUnstableTypeChangesReply: description: "This reply contains a field that is unstable in the old version and has type changes" + is_command_reply: true fields: oldUnstableTypeChangesReplyField: stability: unstable @@ -491,6 +519,7 @@ structs: OldInternalTypeChangesReply: description: "This reply contains a field that is internal in the old version and has type changes" + is_command_reply: true fields: oldInternalTypeChangesReplyField: stability: internal @@ -499,6 +528,7 @@ structs: NewUnstableTypeChangesReplyIgnoreList: description: "This reply contains a field that is stable in the old version and has type changes, but is also in the ignore list" + is_command_reply: true fields: newUnstableTypeChangesReplyFieldIgnoreList: stability: stable @@ -528,6 +558,7 @@ structs: 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" + is_command_reply: true fields: anyTypeField: stability: stable @@ -541,6 +572,7 @@ structs: ArrayTypeStruct: description: "Struct with ArrayType field." + is_command_reply: true fields: ArrayCommandParameter: type: array<string> @@ -549,6 +581,7 @@ structs: MissingUnstableFieldNewFieldStruct: description: "This struct contains a field that missing the 'stability' field in the new command." + is_command_reply: true fields: missingUnstableFieldNewField: type: string @@ -557,12 +590,14 @@ structs: MissingUnstableFieldOldFieldStruct: description: "This struct contains a field that missing the 'stability' field in the old command." + is_command_reply: true fields: missingUnstableFieldNewField: type: string CompatibleChainedStructReply: description: "This reply contains an compatible chained struct" + is_command_reply: true chained_structs: StructFieldTypeRecursiveReplyTwo: StructFieldTypeRecursiveReplyTwo @@ -573,6 +608,7 @@ structs: NewOptionalBoolStruct: description: "This struct gets another field of type optionalBool." + is_command_reply: true fields: ok1: type: bool @@ -581,6 +617,7 @@ structs: OptionalBoolEquivalenceStruct: description: "First two fields get the types swapped." + is_command_reply: true fields: ok1: type: bool @@ -595,6 +632,7 @@ structs: OptionalBoolToBoolStruct: description: "optionalBool field replaced by bool" + is_command_reply: true fields: ok: type: optionalBool @@ -602,6 +640,7 @@ structs: BoolToOptionalBoolStruct: description: "bool field replaced by optionalBool" + is_command_reply: true fields: ok: type: bool @@ -609,6 +648,7 @@ structs: ReplyWithNewArrayTypeField: description: "new field is of ArrayType" + is_command_reply: true fields: ok: type: bool @@ -616,6 +656,7 @@ structs: ReplyWithNewNestedArrayTypeField: description: "new field is a struct with a field of ArrayType" + is_command_reply: true fields: ok: type: bool @@ -2072,4 +2113,4 @@ commands: cpp_name: commandWithNewNestedArrayTypeParameterAndNestedArrayTypeReply strict: true api_version: "1" - reply_type: ReplyWithNewNestedArrayTypeField
\ No newline at end of file + reply_type: ReplyWithNewNestedArrayTypeField |