quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

3.8.4: quarkus.analytics.disabled ignored + command line answer not processed

Open rupert-jung-mw opened this issue 1 year ago • 14 comments
trafficstars

Seems like quarkus.analytics.disabled just does nothing.

quarkus.analytics.disabled is set to false (both in application.yaml and application-dev-yaml):

image

Config value itself is correctly set: image

... but ignored by Quarkus: image

Even trying to answer the question via the console is not working, the input is not scanned:

image

Originally posted by @rupert-jung-mw in https://github.com/quarkusio/quarkus/issues/34626#issuecomment-2185933766

rupert-jung-mw avatar Jun 24 '24 11:06 rupert-jung-mw

as documented on https://quarkus.io/usage/ it needs to be system property.

It is not a quarkus application property as its needed before quarkus is in any way involved.

maxandersen avatar Jun 24 '24 12:06 maxandersen

Thank you @maxandersen ,

this has indeed been a missunderstanding on my side, thank you. Setting an env VAR named 'quarkus.analytics.disabled' with value 'true' made the message and delay disappear. But why was the 'n' not recognized in the command line (I am using IntelliJ with default settings?)

rupert-jung-mw avatar Jun 24 '24 12:06 rupert-jung-mw

on the command line not honoring are you typing 'n' and press enter before it continues?

maxandersen avatar Jun 24 '24 12:06 maxandersen

yes, see screenshot, I pressed ENTER (see new line after 'n'):

image

Tried it multiple times, also with "No" like mentioned here: https://quarkus.io/usage/

rupert-jung-mw avatar Jun 24 '24 12:06 rupert-jung-mw

ok, probably question for @brunobat - are you simply opening the main class and run it using intellij via Run or some other mechanism?

maxandersen avatar Jun 24 '24 13:06 maxandersen

Hello @maxandersen,

yes, I am just using the default main method automatically found by IntelliJ IDEA:

image

rupert-jung-mw avatar Jun 24 '24 13:06 rupert-jung-mw

Hello @maxandersen,

yes, I am just using the default main method automatically found by IntelliJ IDEA:

I don't believe that execution method accepts any input. Please execute on the command line the dev mode with mvn quarkus:dev.

brunobat avatar Jun 25 '24 07:06 brunobat

Hi @brunobat,

I am using gradle, so I can not use any mvn functionality. But the execution method can in fact be configured in IntelliJ: image

rupert-jung-mw avatar Jun 25 '24 07:06 rupert-jung-mw

@rupert-jung-mw the equivalent command to run Quarkus in dev mode with gradle is: ./gradlew --console=plain quarkusDev For reference: https://quarkus.io/guides/gradle-tooling#dev-mode

brunobat avatar Jun 25 '24 07:06 brunobat

@brunobat Thank you. So does this mean that Quarkus usage statistics command line scanning is just not expected to run via the default run configuration in IntelliJ?

I worked around my using your suggested start mode with gradle + quarkusDev instead. Also used the environment variable to work around the problem with the usage statistics startup delay. So long it worked. :)

rupert-jung-mw avatar Jun 25 '24 10:06 rupert-jung-mw

Yes, @rupert-jung-mw and that question will only happen once per user... No need to answer yes or no all the time. Please see the details here: https://quarkus.io/usage/ Can we close this issue?

brunobat avatar Jun 25 '24 13:06 brunobat

Hi @brunobat,

problem is, that it seems not possible to answer the question via the command line when just starting the main class because the command line scanning seems not working in the console (see screenshot).

rupert-jung-mw avatar Jun 25 '24 17:06 rupert-jung-mw

What console are you using? What operating system and version?

brunobat avatar Jun 26 '24 07:06 brunobat

It's just the built-in console output window of IntelliJ IDEA 2024.1.2 . Windows 11x64 23H2.

rupert-jung-mw avatar Jun 27 '24 15:06 rupert-jung-mw

FWIW this kinda ruins the out-of-the-box developer experience (clone repo, press run in the IDE). I’m considering whether I should add instructions to write to ~/.redhat/io.quarkus.analytics.localconfig in our README but I probably shouldn’t have to do that.

rodcheater avatar Apr 08 '25 06:04 rodcheater

@rodcheater are you also on Windows?

brunobat avatar Apr 08 '25 09:04 brunobat

@rodcheater are you also on Windows?

No, not on Windows.

I’m talking about that the only way to get rid of the prompt or the 10 second delay is via a system property. I can’t use application.properties, therefore I can’t add something to version control, therefore every one of my teammates who goes to develop for our application must figure out on their own how to get rid of the prompt and 10 second delay. Not being able to answer the prompt when running in the IDE exacerbates the problem.

rodcheater avatar Apr 08 '25 22:04 rodcheater

By the way, using -Dquarkus.analytics.disabled=false on the command line doesn’t seem to get rid of the prompt. Only -Dquarkus.analytics.disabled=true does.

rodcheater avatar Apr 08 '25 23:04 rodcheater

We need to schedule this for fixing but in the meantime, can't you just run the app in dev mode once and answer yes?... It will be valid for all projects. No more questions. Just run mvn quarkus:dev.

brunobat avatar Apr 11 '25 18:04 brunobat

@rodcheater, @rupert-jung-mw. I took another look at this. You mention that Only -Dquarkus.analytics.disabled=true gets rid of the prompt. That's on purpose.

Also, this is not supposed to be overridable per organisation by setting the prop in a repo, either in application.properties or application-dev-yaml The question is personal, meaning per individual user and happens once, on the first time the user runs dev mode in any Quarkus project.

I don't think this is a bug because the behaviour matches the original intent of the feature.

Closing as won't do.

brunobat avatar Apr 15 '25 12:04 brunobat