-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add dependency checksums to quarkus caching extension #1076
Add dependency checksums to quarkus caching extension #1076
Conversation
FYI @aloubyansky @gsmet |
A key component of the caching mechanism is the Quarkus configuration dump file `.quarkus/quarkus-prod-config-dump`. | ||
This file is generated by the Quarkus `build` goal when the Maven property `quarkus.config-tracking.enabled` is `true`. | ||
It contains all the Quarkus properties used during the Quarkus `build` process. | ||
Some properties are discovered late in the `build` phase and can't be determined advance, thus the need for a first full execution to generate the file. |
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.
Some properties are discovered late in the `build` phase and can't be determined advance, thus the need for a first full execution to generate the file. | |
Some properties are discovered late in the `build` phase and can't be determined in advance, thus the need for a first full execution to generate the file. |
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.
Thanks, I fixed it
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.
Gave it a review mostly on the documentation/readme.
Great work!
The file `.quarkus/quarkus-prod-config-dump` generated by the Quarkus build `goal` must be present to allow a cache hit. | ||
|
||
In order to increase the cache hit rate, it is possible to check-in the file in the source code repository. | ||
in continuous integration environment, an alternative is to have a cache restoring the file. |
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.
an alternative is to have a cache restoring the file.
The word cache here can be misleading. I assume you mean some sort of CI store/restore functionality? Not the build cache?
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.
Correct, I'll update with
in continuous integration environment, an alternative is to have the file restored (see this option for GitHub actions as an example).
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 like this
=> The `build` goal is not cacheable | ||
- `build` executes and creates `.quarkus/quarkus-prod-config-dump` | ||
|
||
![Run1](./doc/run-1.png) |
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.
nice to add these diagrams!
quarkus-build-caching-extension/src/main/java/com/gradle/QuarkusExtensionConfiguration.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Nelson Osacky <[email protected]> Signed-off-by: Jérôme Prinet <[email protected]>
Co-authored-by: Nelson Osacky <[email protected]> Signed-off-by: Jérôme Prinet <[email protected]>
Context
This change is the last one before v1.0.
The Quarkus Maven plugin dynamically adds some dependencies to the
classpath
, which must be declared as additional inputs.This change on Quarkus enables the creation of a file containing this list of dependencies.
This file is the one to add as goal input.
This dynamic
classpath
change is also happening for the tests (surefire
/failsafe
), and this PR takes care of adding the extra input based on a propertyaddQuarkusInputs
.Changes
build
andtest
goals