quarkus
quarkus copied to clipboard
3.8.4: quarkus.analytics.disabled ignored + command line answer not processed
Seems like quarkus.analytics.disabled just does nothing.
quarkus.analytics.disabled is set to false (both in application.yaml and application-dev-yaml):
Config value itself is correctly set:
... but ignored by Quarkus:
Even trying to answer the question via the console is not working, the input is not scanned:
Originally posted by @rupert-jung-mw in https://github.com/quarkusio/quarkus/issues/34626#issuecomment-2185933766
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.
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?)
on the command line not honoring are you typing 'n' and press enter before it continues?
yes, see screenshot, I pressed ENTER (see new line after 'n'):
Tried it multiple times, also with "No" like mentioned here: https://quarkus.io/usage/
ok, probably question for @brunobat - are you simply opening the main class and run it using intellij via Run or some other mechanism?
Hello @maxandersen,
yes, I am just using the default main method automatically found by IntelliJ IDEA:
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.
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:
@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 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. :)
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?
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).
What console are you using? What operating system and version?
It's just the built-in console output window of IntelliJ IDEA 2024.1.2 . Windows 11x64 23H2.
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 are you also on Windows?
@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.
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.
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.
@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.