[SERVER-53205] Check for a removed field from reply type in IDL compatibility checker script Created: 03/Dec/20  Updated: 29/Oct/23  Resolved: 27/Jan/21

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Huayu Ouyang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2021-01-25, Repl 2021-02-08
Participants:

 Description   

We should be checking whether each field in the old command's reply type exists in the new command's reply type and hasn't become unstable in the new command. If the field is optional in the old command's reply type, it should be optional in the new command's reply type as well. This corresponds to the following pseudocode:

old_reply := old_cmd.reply_type
new_reply := new_cmd.reply_type
    
for each field old_field in old_reply:
    if old_field.unstable:
        continue
 
    new_field := get field from new_reply with old_field's name
 
    assert new_field exists and !new_field.unstable
    if new_field.optional:
         assert old_field.optional



 Comments   
Comment by Githook User [ 27/Jan/21 ]

Author:

{'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}

Message: SERVER-53205 Check for a removed field from reply type in IDL compatibility checker script
Branch: master
https://github.com/mongodb/mongo/commit/3b3e3f2bafca78b1acd80102f069fd4a28c2617c

Generated at Thu Feb 08 05:30:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.