Repository navigation
Make CLI error output concise and consistent - #133
Closed
anmarchenko wants to merge 1 commit into
Closed
anmarchenko wants to merge 1 commit into
anmarchenko wants to merge 1 commit into
Conversation
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 5ca71d1 | Docs | View more details | Give us feedback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Print CLI failures once on stderr without automatically dumping usage. For example,
ddtest plan --unknownnow prints the error and addtest plan --helphint instead of 27 lines ending with a duplicateFAILURElog.Planner and runner handlers return errors through Cobra, preserving error codes and telemetry flushing. Exit status remains 1 on failure; explicit help and version output are unchanged.
Why
Repeated errors and unrelated flag listings obscure the action users need to take, particularly in CI logs. This follows the CLI guidelines for useful, low-noise errors.
E2E testing
GOTOOLCHAIN=go1.26.5 make testandGOTOOLCHAIN=go1.26.5 make lint.plan --unknown,run --min-parallelism=nope, and an unknown subcommand print one error plus a help hint, write nothing to stdout, and exit 1. Runningplanwith Git absent from PATH prints one prerequisite error without usage or a duplicate log.plan --helpand--versionstill succeed. Regression tests cover these process-level behaviors, missing flag values, planner/runner errors, and telemetry flushing.