Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-46138

[CLI] Review command line arguments

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • 7.0.0
    • None
    • Jepsen
    • None

    Description

      What's the problem?

      Command line arguments can currently be broken into the following categories:

      Category A

      There's a sensible default value and the option is used all the time. E.g. --doc-count

      A user can supply a different value, but a workload is unlikely to override this.

      Category B

      The default value is not set to indicate the command line argument hasn't been supplied.

      As the option will not be present in the option map, various portions of the code base will use this option in the following way:

      example

      (:option opts some-default-value)

      A workload may also use the same logic to set the option to a workload specific default value if the user has not supplied the command line arguments.

      Furthermore there might be logic which branches on option being present in the map.

      This leads to technical debt and where the logic in the example is repeated with variations on the default value in various places in the project.

      Good examples of this is 'custom-vbucket-count' or 'failover-type'.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            asad.zaidi Asad Zaidi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty