Details
-
Task
-
Resolution: Unresolved
-
Major
-
None
-
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'.