Skip to content

3.18 regression Quarkus quarkus-maven-plugin with failsafe and quarkus.test.arg-line #45878

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

Closed
michael-simons opened this issue Jan 27, 2025 · 7 comments · Fixed by #45888
Closed
Labels
Milestone

Comments

@michael-simons
Copy link
Contributor

michael-simons commented Jan 27, 2025

Describe the bug

I am using quarkus.test.arg-line to setup custom arg lines for integration tests running with failsafe:

See https://github.com/michael-simons/neo4j-migrations/blob/main/neo4j-migrations-quarkus-parent/integration-tests/pom.xml#L141

JaCoCo configures it to hold […]/target/jacoco.exec,append=true,includes=**/*, notice the commas.

Up to including Quarkus 3.17.7, this works fine, but starts failing in 3.18: https://github.com/michael-simons/neo4j-migrations/actions/runs/12987143055/job/36215407194?pr=1575#step:12:2957

Notice the lack of commas!

Also, the arg-line is actually duplicated, sort of.

Command that Quarkus 3.17.7 runs

java \
  -javaagent:/Users/msimons/.m2/repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar=destfile=[..]/integration-tests/target/jacoco.exec,append=true,includes=**/* \
  -Dquarkus.http.port=8081 \
  -Dquarkus.http.ssl-port=8444 \
  -Dtest.url=http://localhost:8081 \
  -Dquarkus.log.file.path=/Users/msimons/Projects/michael-simons/neo4j-migrations/neo4j-migrations-quarkus-parent/integration-tests/target/quarkus.log \
  -Dquarkus.log.file.enable=true \
  -Dquarkus.log.category."io.quarkus".level=INFO \
  -Dquarkus.test.arg-line=-javaagent:/Users/msimons/.m2/repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar=destfile=/Users/msimons/Projects/michael-simons/neo4j-migrations/neo4j-migrations-quarkus-parent/integration-tests/target/jacoco.exec,append=true,includes=**/* \
  -jar /Users/msimons/Projects/michael-simons/neo4j-migrations/neo4j-migrations-quarkus-parent/integration-tests/target/quarkus-app/quarkus-run.jar

Quarkus 3.18

java \
  -javaagent:/Users/msimons/.m2/repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar=destfile=[..]/integration-tests/target/jacoco.exec append=true includes=**/* \
  -Dquarkus.http.port=8081 \
  -Dquarkus.http.ssl-port=8444 \
  -Dtest.url=http://localhost:8081 \
  -Dquarkus.log.file.path=/Users/msimons/Projects/michael-simons/neo4j-migrations/neo4j-migrations-quarkus-parent/integration-tests/target/quarkus.log \
  -Dquarkus.log.file.enable=true \
  -Dquarkus.log.category."io.quarkus".level=INFO \
  -Dquarkus.profile=prod \
  -Dquarkus.test.arg-line=-javaagent:/Users/msimons/.m2/repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar=destfile=[..]/integration-tests/target/jacoco.exec,append=true,includes=**/* \
  -jar /Users/msimons/Projects/michael-simons/neo4j-migrations/neo4j-migrations-quarkus-parent/integration-tests/target/quarkus-app/quarkus-run.jar"

Do reproduce with above project:

git clone [email protected]:michael-simons/neo4j-migrations.git
cd neo4j-migrations
mvn -Dfast clean install
mvn clean verify -pl neo4j-migrations-quarkus-parent/integration-tests

Quarkus does a couple of odd things: It duplicates the quarkus.test.arg so that is passed to the original call to Java, and than as Quarkus property. I guess the latter can be omitted.
The former is that what breaks: Prior to 3.18, it just worked, now something replaces single , with blanks.
You can reproduce this without JaCoCo too, by just setting it to <quarkus.test.arg-line>asd,asd</quarkus.test.arg-line>,

Giving you something like this

Executing "/Users/msimons/.sdkman/candidates/java/21.0.5-zulu/zulu-21.jdk/Contents/Home/bin/java asd asd -Dquarkus.http.port=8081 -Dquarkus.http.ssl-port=8444 -Dtest.url=http://localhost:8081 -Dquarkus.log.file.path=/Users/msimons/Projects/michael-simons/neo4j-migrations/neo4j-migrations-quarkus-parent/integration-tests/target/quarkus.log -Dquarkus.log.file.enable=true -Dquarkus.log.category."io.quarkus".level=INFO -Dquarkus.profile=prod -Dquarkus.config.build-time-mismatch-at-runtime=fail -Dorg.neo4j.migrations.enabled=false -Dquarkus.test.arg-line=asd,asd -jar /Users/msimons/Projects/michael-simons/neo4j-migrations/neo4j-migrations-quarkus-parent/integration-tests/target/quarkus-app/quarkus-run.jar"

Output of uname -a or ver

24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000 arm64

Output of java -version

openjdk version "21.0.5" 2024-10-15 LTS
OpenJDK Runtime Environment Zulu21.38+21-CA (build 21.0.5+11-LTS)
OpenJDK 64-Bit Server VM Zulu21.38+21-CA (build 21.0.5+11-LTS, mixed mode, sharing)

Quarkus version or git rev

3.18.0

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

Maven home: /Users/msimons/.m2/wrapper/dists/apache-maven-3.9.4-bin/32a55694/apache-maven-3.9.4
Java version: 21.0.5, vendor: Azul Systems, Inc., runtime: /Users/msimons/.sdkman/candidates/java/21.0.5-zulu/zulu-21.jdk/Contents/Home
Default locale: de_DE, platform encoding: UTF-8
OS name: "mac os x", version: "15.2", arch: "aarch64", family: "Mac"
@michael-simons michael-simons added the kind/bug Something isn't working label Jan 27, 2025
Copy link

quarkus-bot bot commented Jan 27, 2025

/cc @quarkusio/devtools (maven)

@gsmet
Copy link
Member

gsmet commented Jan 27, 2025

Thanks for the detailed report, I will have a look soon.

@gsmet
Copy link
Member

gsmet commented Jan 27, 2025

My bet is on #45100 . We used to consider arg line as a full string split with spaces and we now split it with commas first.

@radcortez I'm not sure how we can best fix this? Maybe we should have a specific list converter for quarkus.test.arg-line that splits on spaces instead of commas? Another option would be to consider this thing a String in the config and split it later.

I think it's something we need to fix before we officially ship 3.18 as it's going to be a problem for everyone using Jacoco.

@michael-simons
Copy link
Contributor Author

Very welcome, thanks for taking care.

I am pretty sure it will happens if you follow https://quarkus.io/guides/tests-with-coverage in a less elaborate setup than my project, so I agree there's a good chance of a bigger blast radius.

@gsmet
Copy link
Member

gsmet commented Jan 27, 2025

#45888 might fix it but I will let @radcortez decide if it needs a more involved fix.

@gsmet gsmet closed this as completed in 7be5a75 Jan 27, 2025
@quarkus-bot quarkus-bot bot added this to the 3.19 - main milestone Jan 27, 2025
@gsmet gsmet modified the milestones: 3.19 - main, 3.18.1 Jan 28, 2025
gsmet added a commit to gsmet/quarkus that referenced this issue Jan 28, 2025
We don't want to split it on commas but spaces so here is a quick fix
for it.
We could write a specific converter but I'm not really sure it's worth
it.

Fixes quarkusio#45878

(cherry picked from commit 7be5a75)
@michael-simons
Copy link
Contributor Author

Thank you! I can confirm this fixes my build 🙇

@gsmet
Copy link
Member

gsmet commented Jan 29, 2025

Thanks for the confirmation. Glad we could catch this one before the official release!

carlesarnal pushed a commit to carlesarnal/quarkus that referenced this issue Feb 6, 2025
We don't want to split it on commas but spaces so here is a quick fix
for it.
We could write a specific converter but I'm not really sure it's worth
it.

Fixes quarkusio#45878
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants