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

Rename --tests option to --skip-tests in Quarkus CLI #18438

Closed
wants to merge 2 commits into from

Conversation

tqvarnst
Copy link
Contributor

@tqvarnst tqvarnst commented Jul 6, 2021

Fix #18391

Currently, the CLI is documented to default run the test and then the user can control it with --tests or --no-tests. However, the way that Piccoli works a boolean command line option works adding the option will flip the default value, which means that when you add --tests it actually set io.quarkus.cli.common.BuildOptions.runTest to false, and the negotiated flag --no-tests set it to true given the inverted behavior of what was intended.

In this pull request I suggest that we rename the parameter to --skip-tests remove the negotable option, which gives us the intended behavior where default the CLI build task will run tests, but you can turn if off with --skip-tests.

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 6, 2021

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

This message is automatically generated by a bot.

@tqvarnst tqvarnst requested a review from ebullient July 6, 2021 07:17
@quarkus-bot quarkus-bot bot added area/cli Related to quarkus cli (not maven/gradle/etc.) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins labels Jul 6, 2021
@tqvarnst tqvarnst requested a review from gsmet July 6, 2021 07:18
@tqvarnst
Copy link
Contributor Author

tqvarnst commented Jul 6, 2021

@gsmet Adding you as a review since this is potentially a breaking change, but in reality, I don't think it will affect any users since the current --no-tests parameters don't work as intended. Better to have a quick fix before users start to depend on the fault --tests flag that actually turns off the testing.

@tqvarnst tqvarnst changed the title Renaming option --tests to --skip-tests, fixes #18391 Renaming option --tests to --skip-tests Jul 6, 2021
@geoand geoand changed the title Renaming option --tests to --skip-tests Rename --tests option to --skip-tests in Quarkus CLI Jul 6, 2021
@@ -13,7 +13,7 @@
@CommandLine.Option(order = 5, names = { "--offline" }, description = "Work offline.", defaultValue = "false")
public boolean offline = false;

@CommandLine.Option(order = 6, names = { "--tests" }, description = "Run tests.", negatable = true)
@CommandLine.Option(order = 6, names = { "--skip-tests" }, description = "Skip tests.")
public boolean runTests = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the meaning of this property be changed too? I suspect it won't work as is (or I might miss how Picocli is working as I have no experience with it).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree with this change. I am on PTO, but I would prefer to make the options as they exist work (which I thought I had tests for, but apparently not...).

@gsmet
Copy link
Member

gsmet commented Jul 6, 2021

This will require a proper rebase to avoid the merge commit before merging.

@ebullient
Copy link
Member

i don't agree with this. I would like to fix --tests and --no-tests.

Copy link
Member

@ebullient ebullient left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix behavior of existing options. Picocli can do this just fine, I just missed a validating step along the way

@gsmet
Copy link
Member

gsmet commented Jul 12, 2021

I'm closing this one as apparently this is not what we want. @ebullient can you take care of the follow-up? Thanks!

@gsmet gsmet closed this Jul 12, 2021
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Jul 12, 2021
@ebullient
Copy link
Member

back today.. yes, I will

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins release/breaking-change triage/invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quarkus CLI test are run even if --no-tests is specified
4 participants