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

Error logged with Quarkus stacks related to telemetry usage #1611

Open
apupier opened this issue Jul 4, 2024 · 1 comment · May be fixed by devfile/registry#443
Open

Error logged with Quarkus stacks related to telemetry usage #1611

apupier opened this issue Jul 4, 2024 · 1 comment · May be fixed by devfile/registry#443
Labels
kind/bug Something isn't working

Comments

@apupier
Copy link

apupier commented Jul 4, 2024

/kind bug

Which area is this bug related to?

/area registry

What versions of software are you using?

Go project

Operating System and version:

Go Pkg Version:

Node.js project

Operating System and version:

Fedora

Node.js version:

Yarn version:

Project.json:

Web browser

Operating System and version:

Browser name and version:

Bug Summary

Describe the bug:

When Starting dev on remote OpenShift with a Quarkus stack, there is this error logged:

tools: ----------------------------
tools: --- Help improve Quarkus ---
tools: ----------------------------
tools: * Learn more: https://quarkus.io/usage/
tools: * Do you agree to contribute anonymous build time data to the Quarkus community? (y/n and enter) 
tools: [WARNING] Failed to collect user input for analytics
tools: java.util.NoSuchElementException: No line found
tools:     at java.util.Scanner.nextLine (Scanner.java:1660)
tools:     at io.quarkus.maven.DevMojo.lambda$execute$0 (DevMojo.java:445)
tools:     at io.quarkus.analytics.ConfigService.lambda$userAcceptance$0 (ConfigService.java:79)
tools:     at java.util.concurrent.CompletableFuture$AsyncSupply.run (CompletableFuture.java:1768)
tools:     at java.lang.Thread.run (Thread.java:1583)
tools: [info] [Quarkus build analytics] Didn't receive a valid user's answer: `y` or `n`. The question will be asked again next time.

Given that it is launched inside the container with quarkus:dev, i think we will neverbe able to answer to it. It would be nice to configure in away that prevents this stacktrace.

To Reproduce:

Expected behavior

no log stacktrace

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable

commands:
- exec:
    commandLine: ./mvnw -Dmaven.repo.local=/home/user/.m2/repository compile
    component: tools
    workingDir: ${PROJECT_SOURCE}
  id: init-compile
- exec:
    commandLine: ./mvnw -Dmaven.repo.local=/home/user/.m2/repository quarkus:dev -Dquarkus.http.host=0.0.0.0
      -Djava.util.logging.manager=org.jboss.logmanager.LogManager
    component: tools
    group:
      isDefault: true
      kind: run
    hotReloadCapable: true
    workingDir: ${PROJECT_SOURCE}
  id: dev-run
- exec:
    commandLine: ./mvnw -Dmaven.repo.local=/home/user/.m2/repository quarkus:dev -Dquarkus.http.host=0.0.0.0
      -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Ddebug=${DEBUG_PORT}
    component: tools
    group:
      isDefault: true
      kind: debug
    hotReloadCapable: true
    workingDir: ${PROJECT_SOURCE}
  id: dev-debug
components:
- container:
    args:
    - tail
    - -f
    - /dev/null
    endpoints:
    - name: https-quarkus
      protocol: https
      targetPort: 8080
    - exposure: none
      name: debug
      targetPort: 5858
    env:
    - name: DEBUG_PORT
      value: "5858"
    image: registry.access.redhat.com/ubi8/openjdk-21:1.19-1
    memoryLimit: 1024Mi
    mountSources: true
    volumeMounts:
    - name: m2
      path: /home/user/.m2
  name: tools
- name: m2
  volume:
    size: 3Gi
events:
  postStart:
  - init-compile
metadata:
  description: Java application using Quarkus and OpenJDK 21
  displayName: Quarkus Java
  icon: https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg
  language: Java
  name: community
  projectType: Quarkus
  tags:
  - Java
  - Quarkus
  version: 1.5.0
  website: https://quarkus.io
schemaVersion: 2.2.0
starterProjects:
- name: community
  zip:
    location: https://code.quarkus.io/d?e=io.quarkus%3Aquarkus-resteasy&e=io.quarkus%3Aquarkus-micrometer&e=io.quarkus%3Aquarkus-smallrye-health&e=io.quarkus%3Aquarkus-openshift&cn=devfile&j=21
- name: redhat-product
  zip:
    location: https://code.quarkus.redhat.com/d?e=io.quarkus%3Aquarkus-resteasy&e=io.quarkus%3Aquarkus-smallrye-health&e=io.quarkus%3Aquarkus-openshift&j=21

Additional context

Any workaround?

Suggestion on how to fix the bug

deactivate from the devfile commands (--batch-mode? Specific option provided by Quarkus -Dquarkus.analytics.disabled=true https://quarkus.io/usage/#set-per-build ?)
Wondering if it might be completely deactivated in case quarkus:dev is used because I'm wondering if it won't be a problem too (in this case need to report the issue in quarkus directly)

@openshift-ci openshift-ci bot added the kind/bug Something isn't working label Jul 4, 2024
@apupier
Copy link
Author

apupier commented Jul 5, 2024

When using quarkus:dev locally after cleaning the .redhat/io.quarkus.analytics.localconfig file, the question is asked but there is no stacktrace:

----------------------------
--- Help improve Quarkus ---
----------------------------
* Learn more: https://quarkus.io/usage/
* Do you agree to contribute anonymous build time data to the Quarkus community? (y/n and enter) 
[info] [Quarkus build analytics] Didn't receive the user's answer after 10 seconds. The question will be asked again next time.

apupier added a commit to apupier/registry that referenced this issue Jul 5, 2024
Users won't have the possibility to answer to the question and we need
to keep it opt-in

fixes devfile/api#1611

Signed-off-by: Aurélien Pupier <[email protected]>
@apupier apupier linked a pull request Jul 5, 2024 that will close this issue
4 tasks
apupier added a commit to apupier/registry that referenced this issue Jul 24, 2024
Users won't have the possibility to answer to the question and we need
to keep it opt-in

fixes devfile/api#1611

Signed-off-by: Aurélien Pupier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant