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

Migrate from optparse to argparse

    • Fully Compatible
    • v4.4, v4.2
    • STM 2020-04-20, STM 2020-05-04
    • 49
    • 3

      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

            Assignee:
            vlad.rachev@mongodb.com Vlad Rachev (Inactive)
            Reporter:
            vlad.rachev@mongodb.com Vlad Rachev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: