1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
|
# Copyright (C) 2021-present MongoDB, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the Server Side Public License, version 1,
# as published by MongoDB, Inc.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Server Side Public License for more details.
#
# You should have received a copy of the Server Side Public License
# along with this program. If not, see
# <http://www.mongodb.com/licensing/server-side-public-license>.
#
# As a special exception, the copyright holders give permission to link the
# code of portions of this program with the OpenSSL library under certain
# conditions as described in each individual source file and distribute
# linked combinations including the program with the OpenSSL library. You
# must comply with the Server Side Public License in all respects for
# all of the code used other than as permitted herein. If you modify file(s)
# with this exception, you may extend this exception to your version of the
# file(s), but you are not obligated to do so. If you do not wish to do so,
# delete this exception statement from your version. If you delete this
# exception statement from all source files in the program, then also delete
# it in the license file.
#
global:
cpp_namespace: "mongo"
imports:
- "mongo/idl/basic_types.idl"
- "../buildscripts/idl/tests/compatibility_test_pass/old/imports.idl"
types:
intStringToInt:
bson_serialization_type:
- int
- string
description: "The bson_serialization_type changes from [int, string] in the old command's
reply field type to int in the new command's reply field type"
cpp_type: "std::int32_t"
intStringBoolToIntString:
bson_serialization_type:
- int
- string
- bool
description: "The bson_serialization_type changes from [int, string, bool] in the old
command's reply field type to [int, string] in the new command's reply
field type"
cpp_type: "std::int32_t"
intStringToIntStringBool:
bson_serialization_type:
- int
- string
description: "The bson_serialization_type changes from [int, string] in the old command's
reply field type to [int, string, bool] in the new command's reply field
type"
cpp_type: "std::int32_t"
intToIntString:
bson_serialization_type:
- int
description: "The bson_serialization_type changes from [int] in the old command
parameter's type to [int, string] in the new command parameter's type"
cpp_type: "std::int32_t"
bsonSerializationTypeAnyAllowed:
bson_serialization_type:
- int
- any
description: "The bson_serialization_type contains 'any'"
cpp_type: "std::int32_t"
enums:
NewReplyFieldEnumSubset:
description: "The new reply type is an enum that is a subset of the old reply type's
enum values"
type: string
values:
valueOne: "one"
valueTwo: "two"
valueThree: "three"
EnumSuperset:
description: "The new enum is a superset of the old enum values"
type: string
values:
valueOne: "one"
valueTwo: "two"
structs:
StableNewFieldReply:
description: "This reply contains a field that is unstable in the old command but is
stable in the new command."
fields:
stableNewField:
type: string
unstable: true
RequiredNewFieldReply:
description: "This reply contains a field that is optional in the old command but is
required in the new command."
fields:
requiredNewField:
type: string
optional: true
OptionalNewField:
description: "This struct contains a field that is required in the old command but is
optional in the new command."
fields:
optionalNewField:
type: string
AddedNewFieldReply:
description: "This reply contains a field that is added in the new command."
UnstableOldFieldReply:
description: "This reply contains a field that is unstable in the old command and is
unstable and optional in the new command."
fields:
unstableOldField:
type: string
unstable: true
EnumSubsetReply:
description: "This reply contains an enum field where the new enum values is a subset
of the old reply type's enum values"
fields:
replyField:
type: NewReplyFieldEnumSubset
BsonSubsetReply:
description: "This reply contains a field type where the new bson_serialization_type
is a subset of the old bson_serialization_type"
fields:
bsonSubsetReplyField:
type: intStringToInt
BsonSubsetReplyTwo:
description: "This reply contains a field type where the new bson_serialization_type
is a subset of the old bson_serialization_type"
fields:
bsonSubsetReplyFieldTwo:
type: intStringBoolToIntString
StructFieldTypeRecursiveReplyOne:
description: "This reply contains a field whose new type is a struct that is
compatible with the old field type"
fields:
structReplyField:
type: StableNewFieldReply
StructFieldTypeRecursiveReplyTwo:
description: "This reply contains a field whose new type is a struct that is
compatible with the old field type"
fields:
structReplyField:
type: StructType
StructType:
description: "This struct contains a field whose new type is compatible with the
old field type"
fields:
fieldOne:
type: BsonSubsetReply
OldVariantTypeReply:
description: "This reply contains an old field that has a variant type while the new field
is not a variant type"
fields:
oldVariantTypeReplyField:
type:
variant: [int, string, array<string>]
NewVariantSubsetReply:
description: "This reply contains a field whose new variant types are a subset
of the old variant types"
fields:
variantSubsetReplyField:
type:
variant: [int, bool, string, array<string>]
NewVariantSubsetReplyTwo:
description: "This reply contains a field whose new variant types are a subset
of the old variant types"
fields:
variantSubsetReplyFieldTwo:
type:
variant: [int, string, bool, double, array<string>]
VariantRecursiveReply:
description: "This reply contains a field that has a new variant type that is compatible
with the old variant type"
fields:
variantRecursiveReplyField:
type:
variant: [int, intStringBoolToIntString,
array<intStringBoolToIntString>, array<string>]
OldVariantStructReply:
description: "This reply contains a field whose new variant type does not have a variant
struct type while the old one does"
fields:
variantStructReplyField:
type:
variant: [int, string, StructType, array<StructType>, array<string>]
VariantStructRecursiveReply:
description: "This reply contains a field that has a new variant struct type that is
compatible with the old variant struct type"
fields:
variantStructRecursiveReplyField:
type:
variant: [int, StructFieldTypeRecursiveReplyTwo,
array<StructFieldTypeRecursiveReplyTwo>, array<string>]
NewCommandParameterStruct:
description: "The new command parameter's type and the
old command parameter's type are both structs"
CommandParamStructRecursiveOne:
description: "This command parameter struct type contains a unstable field while the
new struct field is stable and optional"
fields:
unstableToStableOptionalField:
type: string
unstable: true
CommandParamStructRecursiveTwo:
description: "This command parameter struct type contains a field whose new type is
a superset of the old field type"
fields:
supersetField:
type: intToIntString
OldValidatorStruct:
description: "This struct contains a field where the old version contains a validator while
the new version does not"
fields:
oldValidatorField:
type: int
validator:
lt: 0
ValidatorsEqualStruct:
description: "This struct contains a field where the new and old validator are exactly equal"
fields:
validatorsEqualField:
type: double
validator:
lt: 0.0
gt: -1.1
lte: 2.0
gte: -2.98
callback: "callback"
AddedOptionalTypeFieldStruct:
description: "This struct contains a field that is added and optional in the new version"
StableOptionalTypeFieldStruct:
description: "This struct contains a field that is stable and optional in the new version
but unstable in the corresponding old version"
fields:
stableOptionalTypeField:
type: string
unstable: true
StableWithDefaultTypeFieldStruct:
description: "This struct contains a field that is stable and required with a default value
in the new version but unstable in the corresponding old version"
fields:
stableWithDefaultTypeField:
type: string
unstable: true
RemovedUnstableTypeFieldStruct:
description: "This struct contains a field that is unstable in the old version and
is removed in the new version"
fields:
removedUnstableTypeField:
type: string
unstable: true
AddedUnstableTypeFieldStruct:
description: "This struct contains a field that is added and unstable in the new version"
KeptUnstableTypeFieldStruct:
description: "This struct contains a field that is unstable in the new version and also
exists in the old version"
fields:
keptUnstableTypeField:
type: string
unstable: true
StructCommandParameterTypeRecursive:
description: "This param struct type contains a field that is compatible between the
old and new versions"
fields:
structCommandParameterTypeRecursiveField:
type: intStringToIntStringBool
VariantSupersetStruct:
description: "This struct contains a field where the new variant types are a superset
of the old variant types"
fields:
variantSupersetField:
type:
variant: [int, bool, array<string>]
VariantSupersetStructTwo:
description: "This struct contains a field where the new variant types are a superset
of the old variant types"
fields:
variantSupersetFieldTwo:
type:
variant: [int, bool, array<string>]
OldTypeNotVariantStruct:
description: "This struct contains a field where the new type is variant while the
old one is not"
fields:
variantField:
type: int
VariantRecursiveStruct:
description: "This struct contains a field where the new variant types are
compatible with the old variant types"
fields:
variantRecursiveField:
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
VariantStructSupersetStruct:
description: "This struct contains a field where the new variant types contains a struct
while the old one does not"
fields:
variantStructSupersetField:
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
VariantStructRecursiveStruct:
description: "This struct contains a field where the old variant struct and the new
variant struct are compatible"
fields:
variantStructRecursiveField:
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
BsonSerializationTypeAnyReply:
description: "This reply contains a field whose type is 'any' and is explicitly allowed"
fields:
anyTypeField:
type: bsonSerializationTypeAnyAllowed
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"
fields:
anyTypeField:
type:
variant: [intStringBoolToIntString,
bsonSerializationTypeAnyAllowed,
StructFieldTypeRecursiveReplyTwo,
array<intStringBoolToIntString>,
array<bsonSerializationTypeAnyAllowed>,
array<StructFieldTypeRecursiveReplyTwo>]
ArrayTypeStruct:
description: "Struct with ArrayType field."
fields:
ArrayCommandParameter:
type: array<string>
commands:
testCommand:
description: "old passing test command"
command_name: testCommand
namespace: ignored
cpp_name: testCommand
strict: true
api_version: "1"
reply_type: OkReply
removedCommandNotInAPIV1:
description: "removing a command not in API v1 passes"
command_name: removedCommandNotInAPIV1
namespace: ignored
cpp_name: removedCommandNotInAPIV1
strict: true
api_version: ""
reply_type: OkReply
addedCommandParameter:
description: "new optional command parameter is added and should pass"
command_name: addedCommandParameter
namespace: ignored
cpp_name: addedCommandParameter
strict: true
api_version: "1"
reply_type: OkReply
addedCommandParameterStable:
description: "new command has an optional stable parameter that is unstable
in the corresponding old command and still passes"
command_name: addedCommandParameterStable
namespace: ignored
cpp_name: addedCommandParameterStable
strict: true
api_version: "1"
reply_type: OkReply
fields:
newOptionalStableParam:
type: string
unstable: true
addedCommandParameterStableWithDefault:
description: "new command has a required stable parameter with a default value
that is unstable in the corresponding old command and still passes"
command_name: addedCommandParameterStableWithDefault
namespace: ignored
cpp_name: addedCommandParameterStableWithDefault
strict: true
api_version: "1"
reply_type: OkReply
fields:
newStableParamWithDefault:
type: string
unstable: true
removeCommandParameterUnstable:
description: "new command removes parameter that is unstable
in the corresponding old command and still passes"
command_name: removeCommandParameterUnstable
namespace: ignored
cpp_name: removeCommandParameterUnstable
strict: true
api_version: "1"
reply_type: OkReply
fields:
unstableParamToRemove:
type: string
unstable: true
addedCommandParameterOptional:
description: "new command has an optional parameter that is required
in the corresponding old command and still passes"
command_name: addedCommandParameterOptional
namespace: ignored
cpp_name: addedCommandParameterOptional
strict: true
api_version: "1"
reply_type: OkReply
fields:
newOptionalParam:
type: string
optional: false
addedUnstableCommandParameter:
description: "new command has a new unstable parameter that does not
exist in the corresponding old command and still passes"
command_name: addedUnstableCommandParameter
namespace: ignored
cpp_name: addedUnstableCommandParameter
strict: true
api_version: "1"
reply_type: OkReply
keptUnstableCommandParameter:
description: "new command has an unstable parameter that also
exists in the corresponding old command and still passes"
command_name: keptUnstableCommandParameter
namespace: ignored
cpp_name: keptUnstableCommandParameter
strict: true
api_version: "1"
reply_type: OkReply
fields:
unstableParam:
type: string
unstable: true
newCommandParameterType:
description: "new command passes because its command parameter type is compatible with
the corresponding old command's parameter type"
command_name: newCommandParameterType
namespace: ignored
cpp_name: newCommandParameterType
strict: true
api_version: "1"
reply_type: OkReply
fields:
compatibleParameter:
type: string
newCommandParameterTypeEnumSuperset:
description: "new command passes because its command parameter type is an enum that is
a superset of the corresponding old command parameter's type's enum values"
command_name: newCommandParameterTypeEnumSuperset
namespace: ignored
cpp_name: newCommandParameterTypeEnumSuperset
strict: true
api_version: "1"
reply_type: OkReply
fields:
parameterEnumSuperset:
type: EnumSuperset
newCommandParameterTypeStruct:
description: "new command passes because its command parameter type is a struct and the
corresponding old command parameter type is also a struct"
command_name: newCommandParameterTypeStruct
namespace: ignored
cpp_name: newCommandParameterTypeStruct
strict: true
api_version: "1"
reply_type: OkReply
fields:
parameterStruct:
type: NewCommandParameterStruct
newCommandParameterTypeBsonSuperset:
description: "new command passes because its parameter type has a bson_serialization_type
that is a superset of the corresponding old command parameter type's
bson_serialization_type"
command_name: newCommandParameterTypeBsonSuperset
namespace: ignored
cpp_name: newCommandParameterTypeBsonSuperset
strict: true
api_version: "1"
reply_type: OkReply
fields:
bsonSupersetParam:
type: intToIntString
newCommandParameterTypeStructRecursiveOne:
description: "new command passes because its parameter type is a struct that is
compatible with the old parameter type struct"
command_name: newCommandParameterTypeStructRecursiveOne
namespace: ignored
cpp_name: newCommandParameterTypeStructRecursiveOne
strict: true
api_version: "1"
reply_type: OkReply
fields:
unstableToStableOptionalStructParameter:
type: CommandParamStructRecursiveOne
newCommandParameterTypeStructRecursiveTwo:
description: "new command passes because its parameter type is a struct that is
compatible with the old parameter type struct"
command_name: newCommandParameterTypeStructRecursiveTwo
namespace: ignored
cpp_name: newCommandParameterTypeStructRecursiveTwo
strict: true
api_version: "1"
reply_type: OkReply
fields:
supersetStructParameter:
type: CommandParamStructRecursiveTwo
oldCommandParameterValidator:
description: "new command passes when it contains a parameter that does not contain a validator
that is present in the old parameter"
command_name: oldCommandParameterValidator
namespace: ignored
cpp_name: oldCommandParameterValidator
strict: true
api_version: "1"
reply_type: OkReply
fields:
newParam:
type: int
validator:
lt: 0
commandParameterValidatorsEqual:
description: "new command passes because it contains a parameter that contains a validator
that is exactly equal to the old parameter validator"
command_name: commandParameterValidatorsEqual
namespace: ignored
cpp_name: commandParameterValidatorsEqual
strict: true
api_version: "1"
reply_type: OkReply
fields:
newParam:
type: double
validator:
lt: 0.0
gt: -1.1
lte: 2.0
gte: -2.98
callback: "callback"
oldCommandTypeValidator:
description: "new command passes because it contains a type that does not contain a validator
that is present in the old type"
command_name: oldCommandTypeValidator
namespace: type
type: OldValidatorStruct
cpp_name: oldCommandTypeValidator
strict: true
api_version: "1"
reply_type: OkReply
commandTypeValidatorsEqual:
description: "new command passes because it contains a type that contains a validator
that is exactly equal to the old type validator"
command_name: commandTypeValidatorsEqual
namespace: type
type: ValidatorsEqualStruct
cpp_name: commandTypeValidatorsEqual
strict: true
api_version: "1"
reply_type: OkReply
newReplyFieldStable:
description: "new command contains a stable reply field that is unstable
in the corresponding old command and still passes"
command_name: newReplyFieldStable
namespace: ignored
cpp_name: newReplyFieldStable
strict: true
api_version: "1"
reply_type: StableNewFieldReply
newReplyFieldRequired:
description: "new command contains a required reply field that is optional
in the corresponding old command and still passes"
command_name: newReplyFieldRequired
namespace: ignored
cpp_name: newReplyFieldRequired
strict: true
api_version: "1"
reply_type: RequiredNewFieldReply
newReplyFieldAdded:
description: "new command adds a new reply field and still passes"
command_name: newReplyFieldAdded
namespace: ignored
cpp_name: newReplyFieldAdded
strict: true
api_version: "1"
reply_type: AddedNewFieldReply
oldReplyFieldUnstable:
description: "old reply field is unstable so new commmand passes even if its new reply
field is unstable"
command_name: oldReplyFieldUnstable
namespace: ignored
cpp_name: oldReplyFieldUnstable
strict: true
api_version: "1"
reply_type: UnstableOldFieldReply
importedReplyCommand:
description: "reply is imported"
command_name: importedReplyCommand
namespace: ignored
cpp_name: importedReplyCommand
strict: true
api_version: "1"
reply_type: ImportedStableNewFieldReply
newReplyFieldTypeEnumSubset:
description: "new command passes because its reply field type is an enum that is
a subset of the corresponding old reply field type's enum values"
command_name: newReplyFieldTypeEnumSubset
namespace: ignored
cpp_name: newReplyFieldTypeEnumSubset
strict: true
api_version: "1"
reply_type: EnumSubsetReply
newReplyFieldTypeBsonSubset:
description: "new command passes because its reply field type has a
bson_serialization_type that is a subset of the corresponding
old reply field type's bson_serialization_type"
command_name: newReplyFieldTypeBsonSubset
namespace: ignored
cpp_name: newReplyFieldTypeBsonSubset
strict: true
api_version: "1"
reply_type: BsonSubsetReply
newReplyFieldTypeBsonSubsetTwo:
description: "new command passes because its reply field type has a
bson_serialization_type that is a subset of the corresponding
old reply field type's bson_serialization_type"
command_name: newReplyFieldTypeBsonSubsetTwo
namespace: ignored
cpp_name: newReplyFieldTypeBsonSubsetTwo
strict: true
api_version: "1"
reply_type: BsonSubsetReplyTwo
newReplyFieldTypeStructRecursiveOne:
description: "new command passes because its reply field type is a struct that is
compatible with the old reply field type struct"
command_name: newReplyFieldTypeStructRecursiveOne
namespace: ignored
cpp_name: newReplyFieldTypeStructRecursiveOne
strict: true
api_version: "1"
reply_type: StructFieldTypeRecursiveReplyOne
newReplyFieldTypeStructRecursiveTwo:
description: "new command passes because its reply field type is a struct that is
compatible with the old reply field type struct"
command_name: newReplyFieldTypeStructRecursiveTwo
namespace: ignored
cpp_name: newReplyFieldTypeStructRecursiveTwo
strict: true
api_version: "1"
reply_type: StructFieldTypeRecursiveReplyTwo
newNamespaceIgnored:
description: "new command passes when its namespace is changed to ignored"
command_name: newNamespaceIgnored
namespace: concatenate_with_db_or_uuid
cpp_name: newNamespaceIgnored
strict: true
api_version: "1"
reply_type: OkReply
newNamespaceConcatenateWithDbOrUuid:
description: "new command passes when its namespace is changed to
concatenate_with_db_or_uuid from concatenate_with_db"
command_name: newNamespaceConcatenateWithDbOrUuid
namespace: concatenate_with_db
cpp_name: newNamespaceConcatenateWithDbOrUuid
strict: true
api_version: "1"
reply_type: OkReply
newNamespaceTypeToIgnored:
description: "new command passes when its namespace is changed from type to ignored"
command_name: newNamespaceTypeToIgnored
namespace: type
type: string
cpp_name: newNamespaceTypeToIgnored
strict: true
api_version: "1"
reply_type: OkReply
oldNamespaceTypeNamespaceString:
description: "If old command has namespace: type and type: namespacestring,
the new namespace can be changed to concatenate_with_db"
command_name: oldNamespaceTypeNamespaceString
namespace: type
type: namespacestring
cpp_name: oldNamespaceTypeNamespaceString
strict: true
api_version: "1"
reply_type: OkReply
oldNamespaceTypeNamespaceStringTwo:
description: "If old command has namespace: type and type: namespacestring,
the new namespace can be changed to concatenate_with_db_or_uuid"
command_name: oldNamespaceTypeNamespaceStringTwo
namespace: type
type: namespacestring
cpp_name: oldNamespaceTypeNamespaceStringTwo
strict: true
api_version: "1"
reply_type: OkReply
newTypeSuperset:
description: "new command passes because its type is a superset
of the old type"
command_name: newTypeSuperset
namespace: type
type: intStringToIntStringBool
cpp_name: newTypeSuperset
strict: true
api_version: "1"
reply_type: OkReply
newTypeEnumSuperset:
description: "new command passes because its type is an enum that is
a superset of the corresponding old type's enum values"
command_name: newTypeEnumSuperset
namespace: type
type: EnumSuperset
cpp_name: newTypeEnumSuperset
strict: true
api_version: "1"
reply_type: OkReply
newTypeFieldOptional:
description: "new command type contains an optional field that is required
in the corresponding old command and still passes"
command_name: newTypeFieldOptional
namespace: type
type: OptionalNewField
cpp_name: newTypeFieldOptional
strict: true
api_version: "1"
reply_type: OkReply
newTypeFieldAddedOptional:
description: "new optional type field is added and should pass"
command_name: newTypeFieldAddedOptional
namespace: type
type: AddedOptionalTypeFieldStruct
cpp_name: newTypeFieldAddedOptional
strict: true
api_version: "1"
reply_type: OkReply
newTypeFieldStableOptional:
description: "new command has an optional type field that is unstable
in the corresponding old command and still passes"
command_name: newTypeFieldStableOptional
namespace: type
type: StableOptionalTypeFieldStruct
cpp_name: newTypeFieldStableOptional
strict: true
api_version: "1"
reply_type: OkReply
newTypeFieldStableWithDefault:
description: "new command has a required type field with a default value
that is unstable in the corresponding old command and still passes"
command_name: newTypeFieldStableWithDefault
namespace: type
type: StableWithDefaultTypeFieldStruct
cpp_name: newTypeFieldStableWithDefault
strict: true
api_version: "1"
reply_type: OkReply
removeTypeFieldUnstable:
description: "new command removes type field that is unstable
in the corresponding old command and still passes"
command_name: removeTypeFieldUnstable
namespace: type
type: RemovedUnstableTypeFieldStruct
cpp_name: removeTypeFieldUnstable
strict: true
api_version: "1"
reply_type: OkReply
addedUnstableTypeField:
description: "new command has a new unstable type field that does not
exist in the corresponding old command and still passes"
command_name: addedUnstableTypeField
namespace: type
type: AddedUnstableTypeFieldStruct
cpp_name: addedUnstableTypeField
strict: true
api_version: "1"
reply_type: OkReply
keptUnstableTypeField:
description: "new command has an unstable type field that also
exists in the corresponding old command and still passes"
command_name: keptUnstableTypeField
namespace: type
type: KeptUnstableTypeFieldStruct
cpp_name: keptUnstableTypeField
strict: true
api_version: "1"
reply_type: OkReply
oldReplyFieldVariantType:
description: "new command passes when its reply field type is not a variant type while
the old reply field is a variant type"
command_name: oldReplyFieldVariantType
namespace: ignored
cpp_name: oldReplyFieldVariantType
strict: true
api_version: "1"
reply_type: OldVariantTypeReply
newReplyFieldVariantSubset:
description: "new command when its reply field type is a variant type that is
a subset of the old reply field variant types"
command_name: newReplyFieldVariantSubset
namespace: ignored
cpp_name: newReplyFieldVariantSubset
strict: true
api_version: "1"
reply_type: NewVariantSubsetReply
newReplyFieldVariantSubsetTwo:
description: "new command when its reply field type is a variant type that is
a subset of the old reply field variant types"
command_name: newReplyFieldVariantSubsetTwo
namespace: ignored
cpp_name: newReplyFieldVariantSubsetTwo
strict: true
api_version: "1"
reply_type: NewVariantSubsetReplyTwo
replyFieldVariantRecursive:
description: "new command passes when its reply field type is a variant type that is
compatible with the old reply field variant type"
command_name: replyFieldVariantRecursive
namespace: ignored
cpp_name: replyFieldVariantRecursive
strict: true
api_version: "1"
reply_type: VariantRecursiveReply
oldReplyFieldVariantStruct:
description: "new command passes if it doesn't have a variant struct type while the
old command does"
command_name: oldReplyFieldVariantStruct
namespace: ignored
cpp_name: oldReplyFieldVariantStruct
strict: true
api_version: "1"
reply_type: OldVariantStructReply
replyFieldVariantStructRecursive:
description: "new command passes when its reply field type has a variant struct type
that is compatible with the old reply field variant struct type"
command_name: replyFieldVariantStructRecursive
namespace: ignored
cpp_name: replyFieldVariantStructRecursive
strict: true
api_version: "1"
reply_type: VariantStructRecursiveReply
commandAllowedAnyTypes:
description: "new command that has parameter and reply type with
explicitly allowed 'any' bson serialization type passes"
command_name: commandAllowedAnyTypes
namespace: type
type: bsonSerializationTypeAnyAllowed
cpp_name: commandAllowedAnyTypes
strict: true
api_version: "1"
reply_type: BsonSerializationTypeAnyReply
fields:
anyTypeParam:
type: bsonSerializationTypeAnyAllowed
commandAllowedAnyTypesWithVariant:
description: "command that has reply variant types with
explicitly allowed 'any' bson serialization type passes"
command_name: commandAllowedAnyTypesWithVariant
namespace: ignored
cpp_name: commandAllowedAnyTypesWithVariant
strict: true
api_version: "1"
reply_type: BsonSerializationTypeAnyWithVariantReply
newParamVariantSuperset:
description: "new command passes because its parameter type is a variant type that is
a superset of the old parameter variant types"
command_name: newParamVariantSuperset
namespace: ignored
cpp_name: newParamVariantSuperset
strict: true
api_version: "1"
reply_type: OkReply
fields:
variantSupersetParam:
type:
variant: [int, bool, string, array<string>]
newParamVariantSupersetTwo:
description: "new command passes because its parameter type is a variant type that is
a superset of the old parameter variant types"
command_name: newParamVariantSupersetTwo
namespace: ignored
cpp_name: newParamVariantSupersetTwo
strict: true
api_version: "1"
reply_type: OkReply
fields:
variantSupersetParam:
type:
variant: [int, string, bool, double, array<string>]
oldParamTypeNotVariant:
description: "new command passes because its parameter type is variant while the old
param type is not"
command_name: newParamTypeNotVariant
namespace: ignored
cpp_name: newParamTypeNotVariant
strict: true
api_version: "1"
reply_type: OkReply
fields:
variantParam:
type:
variant: [int, string, array<string>]
newParamVariantRecursive:
description: "new command passes because its param type is a variant type that is
compatible with the old param variant type"
command_name: newParamVariantRecursive
namespace: ignored
cpp_name: newParamVariantRecursive
strict: true
api_version: "1"
reply_type: OkReply
fields:
variantRecursiveParam:
type:
variant: [int, intStringToIntStringBool,
array<intStringToIntStringBool>, array<string>]
newParamVariantStructSuperset:
description: "new command passes because its parameter type is a variant type that is
a subset of the old parameter variant types"
command_name: newParamVariantStructSuperset
namespace: ignored
cpp_name: newParamVariantStructSuperset
strict: true
api_version: "1"
reply_type: OkReply
fields:
variantStructSupersetParam:
type:
variant: [int, string, NewCommandParameterStruct,
array<NewCommandParameterStruct>, array<string>]
newParamVariantStructRecursive:
description: "new command passes because its parameter type has a variant
struct type that is compatible with the old parameter variant
struct type"
command_name: newParamVariantStructRecursive
namespace: ignored
cpp_name: newParamVariantStructRecursive
strict: true
api_version: "1"
reply_type: OkReply
fields:
variantStructRecursiveParam:
type:
variant: [int, string, StructCommandParameterTypeRecursive,
array<StructCommandParameterTypeRecursive>, array<string>]
newCommandTypeVariantSuperset:
description: "new command passes because its type is a variant type that is
a superset of the old type variant types"
command_name: newCommandTypeVariantSuperset
namespace: type
type: VariantSupersetStruct
cpp_name: newCommandTypeVariantSuperset
strict: true
api_version: "1"
reply_type: OkReply
newCommandTypeVariantSupersetTwo:
description: "new command passes because its type is a variant type that is
a superset of the old command type variant types"
command_name: newCommandTypeVariantSupersetTwo
namespace: type
type: VariantSupersetStructTwo
cpp_name: newCommandTypeVariantSupersetTwo
strict: true
api_version: "1"
reply_type: OkReply
oldCommandTypeNotVariant:
description: "new command passes because its type is variant while the old
type is not"
command_name: oldCommandTypeNotVariant
namespace: type
type: OldTypeNotVariantStruct
cpp_name: oldCommandTypeNotVariant
strict: true
api_version: "1"
reply_type: OkReply
newCommandTypeVariantRecursive:
description: "new command passes because its type is a variant type that is passes
compatible with the old command type variant type"
command_name: newCommandTypeVariantRecursive
namespace: type
type: VariantRecursiveStruct
cpp_name: newCommandTypeVariantRecursive
strict: true
api_version: "1"
reply_type: OkReply
newCommandTypeVariantStructSuperset:
description: "new command passes because its type is a variant type that is
a superset of the old command type variant types"
command_name: newCommandTypeVariantStructSuperset
namespace: type
type: VariantStructSupersetStruct
cpp_name: newCommandTypeVariantStructSuperset
strict: true
api_version: "1"
reply_type: OkReply
newCommandTypeVariantStructRecursive:
description: "new command passes because its type has a variant
struct type that is compatible with the old command type variant
struct type"
command_name: newCommandTypeVariantStructRecursive
namespace: type
type: VariantStructRecursiveStruct
cpp_name: newCommandTypeVariantStructRecursive
strict: true
api_version: "1"
reply_type: OkReply
oldReplyFieldValidator:
description: "new command passes because it contains a reply field that does not contain a validator
that is present in the old reply field"
command_name: oldReplyFieldValidator
namespace: ignored
cpp_name: oldReplyFieldValidator
strict: true
api_version: "1"
reply_type: OldValidatorStruct
replyFieldValidatorsEqual:
description: "new command passes because it contains a reply field that contains a validator
that is exactly equal to the old reply field validator"
command_name: replyFieldValidatorsEqual
namespace: ignored
cpp_name: replyFieldValidatorsEqual
strict: true
api_version: "1"
reply_type: ValidatorsEqualStruct
simpleCheckEqual:
description: "new command passes because its simple check is equal to
the old check"
command_name: simpleCheckEqual
namespace: ignored
cpp_name: simpleCheckEqual
strict: true
api_version: "1"
reply_type: OkReply
access_check:
simple:
check: check
simplePrivilegeEqual:
description: "new command passes because its simple privilege is equal to
the old privilege"
command_name: simplePrivilegeEqual
namespace: ignored
cpp_name: simplePrivilegeEqual
strict: true
api_version: "1"
reply_type: OkReply
access_check:
simple:
privilege:
resource_pattern: resourcePattern
action_type: [actionTypeOne, actionTypeTwo, actionTypeThree]
newSimpleActionTypeSubset:
description: "new command passes because its simple privilege action_type is a subset
of the old privilege action_type"
command_name: newSimpleActionTypeSubset
namespace: ignored
cpp_name: newSimpleActionTypeSubset
strict: true
api_version: "1"
reply_type: OkReply
access_check:
simple:
privilege:
resource_pattern: resourcePattern
action_type: [actionTypeOne, actionTypeTwo, actionTypeThree]
ArrayCommand:
description: "new command will pass because the command type and the field type are of
ArrayType of a type that is compatible with the old command."
command_name: arrayCommand
namespace: type
type: array<ArrayTypeStruct>
cpp_name: arrayCommand
strict: true
api_version: "1"
fields:
parameterStruct:
type: array<ArrayTypeStruct>
reply_type: ArrayTypeStruct
complexActionTypesSubset:
description: "new command passes when the action types are a subset"
command_name: complexActionTypesSubset
namespace: ignored
cpp_name: complexActionTypesSubset
strict: true
api_version: "1"
reply_type: OkReply
access_check:
complex:
- privilege:
resource_pattern: resourcePattern
action_type: [actionTypeOne, actionTypeTwo, actionTypeThree]
- privilege:
resource_pattern: resourcePatternTwo
action_type: [actionTypeOne, actionTypeTwo]
- check: checkOne
complexActionTypesSubsetTwo:
description: "new command passes when the action types are a subset"
command_name: complexActionTypesSubsetTwo
namespace: ignored
cpp_name: complexActionTypesSubsetTwo
strict: true
api_version: "1"
reply_type: OkReply
access_check:
complex:
- privilege:
resource_pattern: resourcePattern
action_type: [actionTypeOne, actionTypeTwo]
- check: checkOne
- check: checkTwo
- privilege:
resource_pattern: resourcePatternTwo
action_type: [actionTypeOne, actionTypeTwo, actionTypeThree]
complexChecksSubset:
description: "new command passes when the complex checks are a subset of the old checks"
command_name: complexChecksSubset
namespace: ignored
cpp_name: complexChecksSubset
strict: true
api_version: "1"
reply_type: OkReply
access_check:
complex:
- check: checkOne
- check: checkTwo
- check: checkThree
removedComplexPrivilege:
description: "new command passes when a complex privilege is removed"
command_name: removedComplexPrivilege
namespace: ignored
cpp_name: removedComplexPrivilege
strict: true
api_version: "1"
reply_type: OkReply
access_check:
complex:
- privilege:
resource_pattern: resourcePattern
action_type: [actionTypeOne, actionTypeTwo]
- check: checkOne
- privilege:
resource_pattern: resourcePattern
action_type: [actionTypeOne, actionTypeTwo, actionTypeThree]
addedAccessCheckField:
description: "new command passes because it adds the access_check field when the api_version is not '1'"
command_name: addedAccessCheckField
namespace: ignored
cpp_name: addedAccessCheckField
strict: true
api_version: ""
reply_type: OkReply
|