Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53201

Check for removed commands in IDL compatibility checker script

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • Replication
    • None
    • Fully Compatible
    • Repl 2021-01-25, Repl 2021-02-08

    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.

      Attachments

        Activity

          People

            huayu.ouyang@mongodb.com Huayu Ouyang
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: