You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As awaf-tool user I want the CLI to give me helpful (and beautiful) error messages So that it's easy to get results with the CLI And I do not necessarily need to study the README or consult other documentation.
Expected Outcome
All error messages are self-explanatory and give directions on how to fix the situation.
The layout of output (progress status, error and warning messages, etc.) have a common, pleasant, Unix CLI style look, targeted to human consumption.
$ waf-tool tuneFATAL[2020-09-15T11:09:32+02:00] An error occured error="accepts 1 arg(s), received 0"
Confusing error message (should say, "Please log in to your cluster" instead)
$ waf-tool tune asdasdINFO[2020-09-15T11:11:34+02:00] Starting port forward... port=9200FATAL[2020-09-15T11:11:34+02:00] An error occured error="error: You must be logged in to the server (Unauthorized)"
The layout of any output is not particularly human-friendly. Logrus seems optimized for APIs that pick up the text for easy parsing ("Logrus is a structured logger for Go").
What to make use of
The help screens are implemented well (see below). There could be a related hint added to hard-to-understand error messages if their content can help understanding the usage (e.g. "Use --help for additional help.").
$ waf-toolUsage: waf-tool [flags] waf-tool [command]Available Commands: help Help about any command tune Create ModSecurity rule exclusions for a given request unique IDFlags: -h, --help help for waf-tool -v, --verbose Verbose log output --version version for waf-toolUse "waf-tool [command] --help" for more information about a command.
$ waf-tool tune --helpThe tool will use the oc binary to start a port forward to the cluster's Elasticsearch.Using the $KUBECONFIG token it will query ES for the given unique ID.Usage: waf-tool tune [unique-id] [flags]Flags: --es-custom-ca string Custom CA certificate to trust (in PEM format) --es-custom-ca-file string Path to custom CA certificate to trust (in PEM format) -k, --es-insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure -u, --es-url string Elasticsearch target URL (default "https://localhost:9200/") -h, --help help for tuneGlobal Flags: -v, --verbose Verbose log output
The text was updated successfully, but these errors were encountered:
As a
waf-tool
userI want the CLI to give me helpful (and beautiful) error messages
So that it's easy to get results with the CLI
And I do not necessarily need to study the README or consult other documentation.
Expected Outcome
Current State (Examples)
Confusing error message (should say, "Argument UNIQUEID required" instead)
Confusing error message (should say, "Please log in to your cluster" instead)
The layout of any output is not particularly human-friendly. Logrus seems optimized for APIs that pick up the text for easy parsing ("Logrus is a structured logger for Go").
What to make use of
The help screens are implemented well (see below). There could be a related hint added to hard-to-understand error messages if their content can help understanding the usage (e.g. "Use --help for additional help.").
The text was updated successfully, but these errors were encountered: