-
Notifications
You must be signed in to change notification settings - Fork 157
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
Support configuration cache #387
Comments
@wyhasany thx for pointing it out, I'll fix this |
It will take a while, almost every tasks uses project to reconfigure some properties at runtime ;( |
did older version work ok? |
To be honest I don't know. I've tested it only with newest version. However I don't think so :) |
I think so too. Please be assured that from now on we'll refactor each task to support configuration cache during regular development! |
...as of 1.13.6 the following tasks fail when doing 'release':
|
@bgalek starting to look through this one. Worked through a simple slice below to illustrate the nature of required changes. Biggest challenge is maintaining VersionConfig compatibility with existing users while migrating to managed properties. Will see what options (if any) exist to accomplish that. Primary activity to make tasks configuration-cache compatible is to remove use of 'project'. One slice for LocalOnlyResolverFactory (nested in GradleAwareContext):
... in the end, the same result is achieved: create a LocalOnlyResolver based on the resolved configuration at execution time. |
Looks like this will be clean for Groovy consumers, but not for Kotlin consumers of the plugin:
(from: https://docs.gradle.org/current/userguide/lazy_configuration.html#lazy_configuration) Thoughts on best release target to tackle this partially-breaking change? |
@cloudshiftchris I'm ok with 1.14.0 release with realse notes explaining what people need to change |
Excellent. Into this now, it will take a bit to wade through it all. |
* #387 Gradle configuration cache compatibility * #387 attempt to fix mysterious CI build failure * fixing maven jar publication problems * Update ci.yml * fixing maven jar publication problems * fixing maven jar publication problems * Update build.gradle * setAutomatedPublishing set to default (true) (#486) * MavenPublication artifact changed * publishing artifact configuration changed * Bump mkdocs-material from 8.2.16 to 8.3.2 (#485) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.2.16 to 8.3.2. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](squidfunk/mkdocs-material@8.2.16...8.3.2) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update README.md * Update README.md * fix: customize pom, not create another publication (#487) * Update publish.yml * Implement #480: handle empty overriddenBranchName same as not set (#489) * Bump pl.allegro.tech.build.axion-release from 1.13.9 to 1.13.14 (#496) Bumps [pl.allegro.tech.build.axion-release](https://github.com/allegro/axion-release-plugin) from 1.13.9 to 1.13.14. - [Release notes](https://github.com/allegro/axion-release-plugin/releases) - [Commits](v1.13.9...v1.13.14) --- updated-dependencies: - dependency-name: pl.allegro.tech.build.axion-release dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump mkdocs-material from 8.3.2 to 8.3.4 (#494) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.3.2 to 8.3.4. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](squidfunk/mkdocs-material@8.3.2...8.3.4) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump mkdocs-material from 8.3.4 to 8.3.6 (#498) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.3.4 to 8.3.6. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](squidfunk/mkdocs-material@8.3.4...8.3.6) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * GH-490 Support encoding in `fileUpdate` hook (Fix #490) (#493) * Bump com.coditory.integration-test from 1.4.0 to 1.4.2 (#508) Bumps com.coditory.integration-test from 1.4.0 to 1.4.2. --- updated-dependencies: - dependency-name: com.coditory.integration-test dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump mkdocs-material from 8.3.6 to 8.3.9 (#504) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.3.6 to 8.3.9. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](squidfunk/mkdocs-material@8.3.6...8.3.9) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump objenesis from 3.2 to 3.3 (#514) Bumps [objenesis](https://github.com/easymock/objenesis) from 3.2 to 3.3. - [Release notes](https://github.com/easymock/objenesis/releases) - [Commits](easymock/objenesis@3.2...3.3) --- updated-dependencies: - dependency-name: org.objenesis:objenesis dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump mkdocs from 1.3.0 to 1.3.1 (#512) Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.3.0 to 1.3.1. - [Release notes](https://github.com/mkdocs/mkdocs/releases) - [Commits](mkdocs/mkdocs@1.3.0...1.3.1) --- updated-dependencies: - dependency-name: mkdocs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.jetbrains.kotlin.jvm from 1.4.0 to 1.7.10 (#507) Bumps [org.jetbrains.kotlin.jvm](https://github.com/JetBrains/kotlin) from 1.4.0 to 1.7.10. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.7.10/ChangeLog.md) - [Commits](JetBrains/kotlin@v1.4.0...v1.7.10) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin.jvm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump sshd-git from 2.8.0 to 2.9.0 (#511) Bumps [sshd-git](https://github.com/apache/mina-sshd) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/apache/mina-sshd/releases) - [Changelog](https://github.com/apache/mina-sshd/blob/master/CHANGES.md) - [Commits](apache/mina-sshd@sshd-2.8.0...sshd-2.9.0) --- updated-dependencies: - dependency-name: org.apache.sshd:sshd-git dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump sshd-core from 2.8.0 to 2.9.0 (#513) Bumps [sshd-core](https://github.com/apache/mina-sshd) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/apache/mina-sshd/releases) - [Changelog](https://github.com/apache/mina-sshd/blob/master/CHANGES.md) - [Commits](apache/mina-sshd@sshd-2.8.0...sshd-2.9.0) --- updated-dependencies: - dependency-name: org.apache.sshd:sshd-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Lee <chris@cloudshiftconsulting.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Artur Frysiak <artur@frysiak.net> Co-authored-by: David <david0@users.noreply.github.com> Co-authored-by: Dzikoysk <dzikoysk@dzikoysk.net>
Seeing this issue is still opened, I'll share that I started observing the plugin throwing an error when running with Gradle 8.1 (which has the Configuration Cache feature stabilized) I apply plugin within my own convention plugin:
which should somewhat transform into what Basic Usage section presents. The error is
+ one of stacktraces from `configuration-cache-report.html`
The stacktrace points at The interesting part is I don't observe the error at every run, it pops up at occasionally (a guess: when gradle tries to create new configuration cache entry?) |
Any update on this? axion-release-plugin is currently blocking us from enabling configuration cache. |
I'm able to consistently reproduce the configuration cache problem by stopping the gradle daemon beforehand: ./gradlew --stop && ./gradlew currentVersion The issue appears to stem from JGit attempting to load the system config. You can disable this feature in JGit using the ./gradlew --stop && GIT_CONFIG_NOSYSTEM=true ./gradlew currentVersion |
I have not yet found any time to do this fix, I'll appreciate a PR :) |
Hope to release with a fix soon |
@bgalek @SmialyKot are you sure this is fixed? I got this on
having only axion in place, if I remove it - I don't have this issue anymore |
Newest version of axion-release-plugin doesn't support configuration cache. Here you can see why it fails:
Both problems are related with using
Project
during task execution:Here you can see how to resolve typical problems with using Project inside a task:
https://docs.gradle.org/6.8.3/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
It's also related to that issue:
gradle/gradle#13490
The text was updated successfully, but these errors were encountered: