-
Notifications
You must be signed in to change notification settings - Fork 3k
Make Quarkus Maven/Gradle plugins compatible with Develocity test distribution #50602
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks @oehme! Do you think we could keep the Jackson JSON binding in a separate module, out of the appmodel artifact? E.g. |
This comment has been minimized.
This comment has been minimized.
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 |
b0ca678 to
d8ed192
Compare
This comment has been minimized.
This comment has been minimized.
d8ed192 to
2270268
Compare
|
Fixed the formatting issue above. |
This comment has been minimized.
This comment has been minimized.
|
The failures above are probably due to a merge conflict, I'll fix those up. |
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.
2270268 to
823022f
Compare
|
This should be passing now. |
Status for workflow
|
|
All green :) The flaky tests look like the same as on the mainline branch. |
| <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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
Hi there ! |
|
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. |
|
Lovely. Thanks for the update! |
|
I opened #51430 for a review and further discussion. |
|
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! |
Develocity's test distribution feature allows distributing Gradle/Maven tests on remote machines. To do so, it needs to:
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.