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

Migrate from optparse to argparse

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.4, v4.2
    • Sprint:
      STM 2020-04-20, STM 2020-05-04
    • Linked BF Score:
      49
    • Story Points:
      3

      Description

      Python's optparse does not support subcommands, but argparse/click does. To enable doing that, we need to migrate.

      • Look into click and whether that would be a better option.
      • Define new resmoke syntax with argparse. There are differences between how optparse/argparse work, so the syntax will have to change.
      • Add infrastructure for resmoke to run subcommands, with emphasis on extensibility for the future
      • Attempt to keep old resmoke syntax (and eventually deprecate). This might not be possible. If not, look into having a legacy flag, or at least print nice error messages to make it easy to figure out the new syntax.
      • Update usages of resmoke in the system.
      • Update documentation and do engineer outreach to ensure users are aware of the change

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vlad.rachev Vlad Rachev
              Reporter:
              vlad.rachev Vlad Rachev
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: