Skip to content

Conversation

@oehme
Copy link

@oehme oehme commented Oct 16, 2025

Develocity's test distribution feature allows distributing Gradle/Maven tests on remote machines. To do so, it needs to:

  • Know all the inputs of the test, so it can transfer them to the remote machine
  • Replace any file paths (e.g. in system properties or configuration files) with the corresponding paths on the remote machine

This PR makes Quarkus compatible with these requirements. It changes the serialized application model to a textual format (JSON), so that Develocity can easily find and replace file paths inside it. Additionally, it exposes the deployment dependencies as a Maven project property, because those were otherwise not visible. In the Gradle plugin, they were already provided as a separate dependency Configuration.

I've opted for Jackson as the serialization library, because it is very flexible and allowed me to adapt to the ApplicationModel with minimal changes to the model classes.

After these changes and some minor tweaks on the Develocity side, I was able to successfully run the quarkus-super-heroes example project with test distribution.

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/maven labels Oct 16, 2025
@aloubyansky
Copy link
Member

Thanks @oehme! Do you think we could keep the Jackson JSON binding in a separate module, out of the appmodel artifact? E.g. quarkus-appmodel-json or something? There are some basic API classes from which we probably don't want to link to Jackson API (such as Artifact*, PathTree, etc).

@quarkus-bot

This comment has been minimized.

@oehme
Copy link
Author

oehme commented Oct 17, 2025

Do you think we could keep the Jackson JSON binding in a separate module, out of the appmodel artifact? E.g. quarkus-appmodel-json or something?

If I can't depend on Jackson in the appmodel project, then I can't use the binding annotations. This would mean writing a bunch of manual serialization/deserialization code to handle all the different types and polymorphism. And then everyone who currently uses BootstrapUtils would have to add a dependency on this new appmodel-json project anyway, so it doesn't really improve anything as far as I can see. So in my opinion, not a realistic/worthwhile option.

@oehme oehme force-pushed the oehme/json-appmodel branch from b0ca678 to d8ed192 Compare October 17, 2025 10:45
@quarkus-bot

This comment has been minimized.

@oehme oehme force-pushed the oehme/json-appmodel branch from d8ed192 to 2270268 Compare October 21, 2025 12:38
@oehme
Copy link
Author

oehme commented Oct 21, 2025

Fixed the formatting issue above.

@quarkus-bot

This comment has been minimized.

@oehme
Copy link
Author

oehme commented Oct 22, 2025

The failures above are probably due to a merge conflict, I'll fix those up.

oehme added 2 commits October 22, 2025 20:49
This allows Develocity to auomatically replace the file paths in this model
when running tests on a remote machine, where the paths are different than
locally.

We use jackson, because it has the necessary flexibility to handle the application
model with its deep nesting and various subclasses without having to make many changes
to the model itself.
In order to run tests on remote agents, Develocity needs to know all files
necessary to run the tests, as well as the application under test. The deploy
classpath contains dependencies that are not part of the regular Maven project
model and we need to expose it in some way that Develocity can easily grab and
track it.
@oehme oehme force-pushed the oehme/json-appmodel branch from 2270268 to 823022f Compare October 22, 2025 20:57
@oehme
Copy link
Author

oehme commented Oct 27, 2025

This should be passing now.

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 28, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 823022f.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/smallrye-reactive-messaging/deployment

io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector - History

  • Expecting actual: ["-6","-7","-8","-10","-11","-12","-13","-14"] to start with: ["-6", "-7", "-8", "-9"] - java.lang.AssertionError
java.lang.AssertionError: 

Expecting actual:
  ["-6","-7","-8","-10","-11","-12","-13","-14"]
to start with:
  ["-6", "-7", "-8", "-9"]

	at io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector(ConnectorChangeTest.java:41)

⚙️ JVM Tests - JDK 21

📦 test-framework/jacoco/runtime

io.quarkus.jacoco.runtime.DataFileWatchTest.waitForDataFileThatNeverAppears - History

  • Expecting value to be false but was true - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: 

Expecting value to be false but was true
	at io.quarkus.jacoco.runtime.DataFileWatchTest.waitForDataFileThatNeverAppears(DataFileWatchTest.java:208)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

⚙️ MicroProfile TCKs Tests

📦 tcks/microprofile-lra

org.eclipse.microprofile.lra.tck.TckRecoveryTests.testCancelWhenParticipantIsUnavailable - History

  • Expecting the metric Compensated callback was called Expected: a value equal to or greater than <1> but: <0> was less than <1> - java.lang.AssertionError
java.lang.AssertionError: 
Expecting the metric Compensated callback was called
Expected: a value equal to or greater than <1>
     but: <0> was less than <1>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.eclipse.microprofile.lra.tck.TckRecoveryTests.assertMetricCallbackCalled(TckRecoveryTests.java:210)
	at org.eclipse.microprofile.lra.tck.TckRecoveryTests.testCancelWhenParticipantIsUnavailable(TckRecoveryTests.java:195)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

@oehme
Copy link
Author

oehme commented Oct 30, 2025

All green :) The flaky tests look like the same as on the mainline branch.

Comment on lines +36 to +43
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand your position but I'm really not excited about this part. That means Jackson Databind will be around in the test classpath for all Quarkus apps.

It seems problematic to me. Especially for a feature that is not really core to Quarkus.

I'm not sure if we could somehow externalize this? Maybe adding an additional test artifact for this support would be acceptable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked into it yet but I thought we could check what it would mean to provide the binding in a separate artifact. It would still have to be added in many places though.

Copy link
Author

@oehme oehme Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if I understand you correctly, you'd like this to be an optional feature and maintain the java serialization as the default? That's possible of course. I didn't do that, since on Slack we had originally agreed on JSON as the only format.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oehme we need to agree on the JSON binding impl library suitable for core. We had a discussion before but we need to conclude it #dev > JSON dependency in the core deployment?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, so no action needed from my side at this point?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's clarify that before making further efforts. Thanks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you made a decision on the JSON library?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, no. Sorry for the delay. I'll look into this this week.

@fabricepipart1a
Copy link

Hi there !
Do you have any update on this matter. Amadeus (the company I work for) is very interested to have that feature. We contemplate huge gains to accelerate our builds that spend most of their time running QuarkusTests. Is there anything blocking the progress?

@aloubyansky
Copy link
Member

I do have some updates. I have a branch where I'm investigating an alternative serialization/deserialization. The basics seem to be working. I need to test it more properly, which is a work in progress.

@fabricepipart1a
Copy link

Lovely. Thanks for the update!

@aloubyansky
Copy link
Member

I opened #51430 for a review and further discussion.
It doesn't include a couple of project properties set in the mojo in this PR. That could be a separate PR and discussion.

@oehme
Copy link
Author

oehme commented Dec 5, 2025

I'll rework this PR to just do those changes, because they'll also be necessary for test distribution.

Thank you so much for your other PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/maven triage/flaky-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants