Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarkus CLI - Some expected errors lead to a stacktrace and they shouldn't #41513

Closed
gsmet opened this issue Jun 27, 2024 · 2 comments · Fixed by #41633
Closed

Quarkus CLI - Some expected errors lead to a stacktrace and they shouldn't #41513

gsmet opened this issue Jun 27, 2024 · 2 comments · Fixed by #41633

Comments

@gsmet
Copy link
Member

gsmet commented Jun 27, 2024

In the case of quarkus config enc, if I forget the parameter, I end up with a stacktrace which is not really expected: we should have a standard Picocli error output and not a full stacktrace as this is a standard use case of the CLI and not an underlying error.

$ quarkus config enc
2024-06-27 14:23:25,703 ERROR [io.qua.run.Application] (main) Failed to start application (with profile [prod]): picocli.CommandLine$MissingParameterException: Missing required parameter: 'SECRET'
	at picocli.CommandLine$Interpreter.assertNoMissingParameters(CommandLine.java:14930)
	at picocli.CommandLine$Interpreter.validateConstraints(CommandLine.java:13659)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:13620)
	at picocli.CommandLine$Interpreter.processSubcommand(CommandLine.java:13915)
	at picocli.CommandLine$Interpreter.processArguments(CommandLine.java:13811)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:13597)
	at picocli.CommandLine$Interpreter.processSubcommand(CommandLine.java:13915)
	at picocli.CommandLine$Interpreter.processArguments(CommandLine.java:13811)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:13597)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:13565)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:13460)
	at picocli.CommandLine.parseArgs(CommandLine.java:1552)
	at io.quarkus.cli.QuarkusCli.checkMissingCommand(QuarkusCli.java:165)
	at io.quarkus.cli.QuarkusCli.run(QuarkusCli.java:109)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:132)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
	at io.quarkus.cli.Main.main(Main.java:9)
Copy link

quarkus-bot bot commented Jun 27, 2024

/cc @brunobat (opentelemetry,tracing), @ebullient (picocli), @radcortez (opentelemetry,tracing)

@gsmet gsmet changed the title Picocli - Some expected errors lead to a stacktrace and they shouldn't Quarkus CLI - Some expected errors lead to a stacktrace and they shouldn't Jul 2, 2024
@gsmet
Copy link
Member Author

gsmet commented Jul 2, 2024

This is not a problem with the Picocli extension but specific to the Quarkus CLI. PR in the works...

gsmet added a commit to gsmet/quarkus that referenced this issue Jul 2, 2024
We want to check for the missing commands only, any other error will
have to be handled by Picocli later (and thus will properly handle the
formatting of the feedback and avoid a stacktrace).

Fixes quarkusio#41513
gsmet added a commit to gsmet/quarkus that referenced this issue Jul 2, 2024
We want to check for the missing commands only, any other error will
have to be handled by Picocli later (and thus will properly handle the
formatting of the feedback and avoid a stacktrace).

Fixes quarkusio#41513
@quarkus-bot quarkus-bot bot added this to the 3.13 - main milestone Jul 2, 2024
gsmet added a commit to gsmet/quarkus that referenced this issue Jul 2, 2024
We want to check for the missing commands only, any other error will
have to be handled by Picocli later (and thus will properly handle the
formatting of the feedback and avoid a stacktrace).

Fixes quarkusio#41513

(cherry picked from commit f2455e3)
@gsmet gsmet modified the milestones: 3.13 - main, 3.12.1 Jul 2, 2024
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Jul 31, 2024
We want to check for the missing commands only, any other error will
have to be handled by Picocli later (and thus will properly handle the
formatting of the feedback and avoid a stacktrace).

Fixes quarkusio#41513
@gsmet gsmet modified the milestones: 3.12.1, 3.8.6 Aug 14, 2024
gsmet added a commit to gsmet/quarkus that referenced this issue Aug 14, 2024
We want to check for the missing commands only, any other error will
have to be handled by Picocli later (and thus will properly handle the
formatting of the feedback and avoid a stacktrace).

Fixes quarkusio#41513

(cherry picked from commit f2455e3)
danielsoro pushed a commit to danielsoro/quarkus that referenced this issue Sep 20, 2024
We want to check for the missing commands only, any other error will
have to be handled by Picocli later (and thus will properly handle the
formatting of the feedback and avoid a stacktrace).

Fixes quarkusio#41513
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant