mantle icon indicating copy to clipboard operation
mantle copied to clipboard

Improvements based on CLIG

Open blake-mealey opened this issue 3 years ago • 1 comments

List of improvements based on my reading of CLIG

  • ~Send messaging to stderr. Log messages, errors, and so on should all be sent to stderr. This means that when commands are piped together, these messages are displayed to the user and not fed into the next command.~ (fixed in #204)
  • Improve subcommand help text by including one or two example invocations.
  • Provide a support path for feedback and issues. A website or GitHub link in the top-level help text is common.
  • Disable colors: NO_COLOR set, TERM=dumb, --no-color
  • Confirm before doing anything dangerous. See #19 and maybe even make the dry run the default? For mantle destroy, require a prompt by default?
  • Make it idempotent. If the program fails for some transient reason (e.g. the internet connection went down), you should be able to hit and and it should pick up from where it left off. See #106
  • If a user hits Ctrl-C (the INT signal), exit as soon as possible. Say something immediately, before you start clean-up. Add a timeout to any clean-up code so it can’t hang forever. Currently we don't exit gracefully in this case. See above note on idempotence as well
  • Do not read secrets from environment variables. While environment variables may be convenient for storing secrets, they have proven too prone to leakage. This is an interesting one, and I'm not quite sure that I agree or that I like the alternative solutions. Should be considered though

blake-mealey avatar Jan 21 '22 17:01 blake-mealey

Adding this to v1.0.0 because there are a few points in here which I think are important for production use. Specifically:

  • confirming before doing anything dangerous
  • idempotency
  • ctrl+c cleanup

blake-mealey avatar Feb 17 '22 03:02 blake-mealey