ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Infrastructure
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      `just run-server` and `just setup-tests` wrap Python scripts (run_server.py, setup_tests.py) that build their own argparse parser via get_test_options in utils.py. Passing `-h` is intercepted by that parser and prints its own generic help instead of anything useful for the two cases below.

      * just run-server -h prints run_server.py's own argparse help. The actual server startup is delegated to run-mongodb.sh start in drivers-evergreen-tools, which has its own -h output describing server-specific flags — that never surfaces.
      * just setup-tests kms -h prints the same generic help, which doesn't mention that sub_test_name for kms has specific valid values (see kms_tester.setup_kms in setup_tests.py). A user has to read the script source to find valid sub-test names.

      Definition of done

      * just run-server -h prints the output of run-mongodb.sh start -h.
      * just setup-tests kms -h (and other test_name values with a meaningful sub_test_name) shows the valid sub_test_name options for that test_name.

      Pitfalls

      * get_test_options is shared across multiple entry points (run_server.py, setup_tests.py, others) — changing its -h handling must not break the other callers' help output.
      * Detecting `h`/`-help` before argparse consumes it (e.g. checking sys.argv first) is likely simpler than trying to make argparse forward unknown args on help.
      * The valid sub_test_name values per test_name aren't currently declared in one place — they're implicit in conditional branches — so listing them for help text may require adding an explicit mapping.

            Assignee:
            Steve Silvester
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: