[SERVER-53201] Check for removed commands in IDL compatibility checker script Created: 03/Dec/20  Updated: 29/Oct/23  Resolved: 25/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   

As a part of this we should be finding all IDL specs for API V1 commands in the old directory and checking that no command was removed in the new directory. This corresponds to the following pseudocode:

# Check new commands' compatibility with old ones.
# Note, a command can be added to V1 at any time, it's ok if a
# new command has no corresponding old command.
old_commands = {}
for each file old_file in old_dir:
    old_idl := idl.parser.parse(old_file)
    if any commands in old_idl have non-empty api_version != "1":
        # We're not ready to handle future API versions yet.
        print error and quit
 
    for each command old_cmd in old_idl:
        if old_cmd.api_version == "":
            continue
 
        assert old_cmd.command_name not in old_commands
        old_commands.add(old_cmd.command_name)
 
        new_cmd := new_commands[old_cmd.command_name]
        assert new_cmd is not null # Can't remove a command from V1

We should also check that the old and new commands' "namespace" and "type" fields haven't changed in incompatible ways.



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

Author:

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

Message: SERVER-53201 Check for removed commands in IDL compatibility checker script
Branch: master
https://github.com/mongodb/mongo/commit/9d762dc9255cca8a6d164230386206b7d1804282

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