Quarkus.config-tracking.file-suffix Does Not Work As Expected

by ADMIN 62 views

Introduction

Quarkus is a popular Java framework known for its speed, low latency, and high productivity. One of its key features is the ability to track configuration changes and generate configuration files. However, in Quarkus 3.8.6, the quarkus.config-tracking.file-suffix configuration property does not work as expected. This issue prevents the Gradle Quarkus Build Caching Extension from providing build cache hits with the Develocity extension.

Describe the Bug

When configuring quarkus.config-tracking.file-suffix with Quarkus 3.8.6, the quarkus-prod-config-check file is not identical to the one generated with the default file suffix (-config-dump). This is a critical issue that affects the functionality of the Gradle Quarkus Build Caching Extension.

Expected Behavior

When building twice in a row a Quarkus project using 3.8.6, the following files should be identical:

  • .quarkus/quarkus-prod-foo-bar
  • target/quarkus-prod-config-check

These files should have the same content, as the configuration tracking feature is supposed to generate identical files with the same suffix.

Actual Behavior

However, the actual behavior is that the two files have some differences. This is evident from the screenshot provided, which shows the contents of the two files side by side.

How to Reproduce

To reproduce this issue, follow these steps:

  1. Clone the helm-quickstart repository from GitHub.
  2. Build the project twice using the following command:
./mvnw clean package -Pcustom-suffix
./mvnw clean package -Pcustom-suffix

This will generate the quarkus-prod-config-check file with the custom suffix.

Output of uname -a or ver

The output of uname -a or ver is:

Darwin NJ7NXYPHH7 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020 arm64 arm Darwin

Output of java -version

The output of java -version is:

openjdk version "17.0.6" 2023-01-17 LTS OpenJDK Runtime Environment (build 17.0.6+10-LTS) OpenJDK 64-Bit Server VM (build 17.0.6+10-LTS, mixed mode, sharing)

Quarkus version or git rev

The Quarkus version or git rev is:

3.8.6

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

The build tool is Apache Maven 3.9.9, with the following output:

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937) Maven home: /Users/jprinet/.m2/wrapper/dists/apache-maven-3.9.9-bin/33b4b2b4/apache-maven-3.9.9 Java version: 17.0.6, vendor: BellSoft, runtime: /Users/jprinet/.asdf/installs/java/liberica-17.0.6+10 Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "15.3.1", arch: "aarch64", family: "mac"

Additional Information

Unfortunately, there is no additional information available to provide further context or insights into this issue.

Conclusion

Q: What is the purpose of the quarkus.config-tracking.file-suffix configuration property?

A: The quarkus.config-tracking.file-suffix configuration property is used to specify a custom suffix for the configuration files generated by Quarkus. This allows you to customize the naming convention of the configuration files.

Q: What is the expected behavior of the quarkus.config-tracking.file-suffix configuration property?

A: When you configure the quarkus.config-tracking.file-suffix property, Quarkus is expected to generate configuration files with the specified suffix. For example, if you set the suffix to -custom, Quarkus should generate files with names like quarkus-prod-config-check-custom.

Q: What is the actual behavior of the quarkus.config-tracking.file-suffix configuration property in Quarkus 3.8.6?

A: In Quarkus 3.8.6, the quarkus.config-tracking.file-suffix property does not work as expected. When you configure the property, Quarkus generates configuration files with the default suffix (-config-dump) instead of the custom suffix you specified.

Q: How does this issue affect the Gradle Quarkus Build Caching Extension?

A: The issue with the quarkus.config-tracking.file-suffix property prevents the Gradle Quarkus Build Caching Extension from providing build cache hits with the Develocity extension. This means that the build cache is not updated correctly, and you may experience issues with build performance.

Q: How can I reproduce this issue?

A: To reproduce this issue, follow these steps:

  1. Clone the helm-quickstart repository from GitHub.
  2. Build the project twice using the following command:
./mvnw clean package -Pcustom-suffix
./mvnw clean package -Pcustom-suffix

This will generate the quarkus-prod-config-check file with the custom suffix.

Q: What are the system requirements for reproducing this issue?

A: To reproduce this issue, you need:

  • Quarkus 3.8.6
  • Gradle 6.9 or later
  • Java 17 or later
  • macOS or Linux operating system

Q: How can I provide additional information to help resolve this issue?

A: If you are experiencing this issue, please provide the following information:

  • Your Quarkus version and build tool version
  • Your Java version and operating system
  • The exact steps you took to reproduce the issue
  • Any relevant configuration files or logs

This will help the Quarkus team to investigate and resolve the issue.