quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.63k stars 2.64k forks source link

Live coding feature not working when shutdown timeout is configured #40398

Open ghost opened 5 months ago

ghost commented 5 months ago

Describe the bug

Currently, there seems to be an issue with the live coding feature when shutdown.timeout is configured. The live coding feature, which is supposed to automatically reload changes made to source files during development, ceases to function properly under these circumstances.

Expected behavior

The live coding feature should continue to function as expected, automatically detecting and applying changes to source files, only when dev mode is used, regardless of whether a shutdown timeout is configured or not.

Actual behavior

Live coding feature takes a lot of time to reload when changes are detected, requiring a manual restart of the application to reflect the changes most of the times.

How to Reproduce?

Set up a Quarkus application with any of these stacks:

Use the following YAML configuration file:

quarkus:
  banner:
    enabled: false
  console:
    color: false
  http:
    enable-compression: true
  log:
    category:
      "io.quarkus":
        level: INFO
    console:
      async: true
      enable: true
    level: WARN
  qute:
    suffixes: html
  shutdown: # As soon as this is removed, it works fine
    timeout: 90 # second(s)
---
"%dev":
  quarkus:
    banner:
      enabled: true
    console:
      color: true
---
"%prod":
  quarkus:
---
"%test":
  quarkus:

Output of uname -a or ver

Linux continental 6.6.28-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 17 Apr 2024 10:11:09 +0000 x86_64 GNU/Linux

Output of java -version

OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)

Quarkus version or git rev

3.9.3

Build tool (ie. output of mvnw --version or gradlew --version)

------------------------------------------------------------
Gradle 8.7
------------------------------------------------------------

Build time:   2024-03-22 15:52:46 UTC
Revision:     650af14d7653aa949fce5e886e685efc9cf97c10

Kotlin:       1.9.22
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          21.0.3 (Eclipse Adoptium 21.0.3+9-LTS)
OS:           Linux 6.6.28-1-lts amd64

Additional information

No response

quarkus-bot[bot] commented 5 months ago

/cc @geoand (kotlin), @radcortez (config)

geoand commented 5 months ago

As a workaround I would suggest using the prod profile for setting the property

geoand commented 5 months ago

I am actually leaning on closing this as won't fix, because if we do disregard this in dev-mode, there will no way for people to actually see it's effect unless using the production mode of the application.