You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/08/30 14:23:01 UTC

[GitHub] [solr] alextu opened a new pull request #277: SOLR-15603: Activate Gradle build cache

alextu opened a new pull request #277:
URL: https://github.com/apache/solr/pull/277


   https://issues.apache.org/jira/browse/SOLR-15603
   
   <!--
   _(If you are a project committer then you may remove some/all of the following template.)_
   
   Before creating a pull request, please file an issue in the ASF Jira system for Solr:
   
   * https://issues.apache.org/jira/projects/SOLR
   
   You will need to create an account in Jira in order to create an issue.
   
   The title of the PR should reference the Jira issue number in the form:
   
   * SOLR-####: <short description of problem or changes>
   
   SOLR must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
   
   Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
   
   
   # Description
   
   Activate gradle local build cache to take advantage of re-using past build executions on a single machine, it improves build time when switching between branches for example. 
   
   # Solution
   
   Set the gradle build cache flag, upgrade gradle to 6.9.1, upgrade a 3rd party plugin and make some tasks cacheable when easily doable. More context below:
   
   - the most costly task is `solr:core:test`, it takes advantage of up-to-date checks and local cache if the `tests.seed`property is set to a fixed value. That said it does not take advantage of remote cache because some system properties use absolute path.
   Using a remote cache would be interesting since you have a CI that could publish to a remote cache node, remote developpers would then have faster local builds.
   - `checkBrokenLinks, renderJavadoc, renderSiteJavadoc, buildLocalJavadocLinksSite, buildSite, prepareLocalJavadocLinksSiteSources, prepareSiteSources` tasks are now cacheable, but still `:solr:solr-ref-guide:jrubyPrepare` is always executed and quite heavy (dowloading/installing gems).
   
   
   # Tests
   
   Manually checked the build performance improvement:
   ```
   ./gradlew clean check -Ptests.seed=DEADBEE
   BUILD SUCCESSFUL in 27m 26s
   409 actionable tasks: 351 executed, 13 from cache, 45 up-to-date
   ```
   
   ```
   ./gradlew clean check -Ptests.seed=DEADBEE
   BUILD SUCCESSFUL in 45s
   409 actionable tasks: 260 executed, 99 from cache, 50 up-to-date
   ```
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request title.
   - [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r699061855



##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -215,20 +216,21 @@ check.dependsOn checkLocalJavadocLinksSite, checkSite
 // Hook site building to assemble.
 assemble.dependsOn buildSite
 
+@CacheableTask
 abstract class PrepareSources extends DefaultTask {
     // Original Source files we'll be syncing <b>FROM</b>
     @InputDirectory
-    public DirectoryProperty srcDir = project.objects.directoryProperty()
+    abstract DirectoryProperty getSrcDir()

Review comment:
       Ah, I see it now. Yeah - it'd be good to require the Inject annotation on those abstract properties too. This would be more intuitive (to me at least).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss merged pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss merged pull request #277:
URL: https://github.com/apache/solr/pull/277


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] alextu commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
alextu commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r699108383



##########
File path: gradle/generate-defaults.gradle
##########
@@ -42,6 +42,7 @@ configure(rootProject) {
                 "systemProp.file.encoding=UTF-8",
                 "org.gradle.jvmargs=-Xmx3g", // TODO figure out why "gradlew check" runs out of memory if 2g
                 "org.gradle.parallel=true",
+                "org.gradle.caching=true",

Review comment:
       Right, so if you're afraid of this, I can remove this setting and you can enable it through the command line when building, check after a few weeks of dev if it's acceptable. It's hard to predict the size, currently I see on my machine it's about 400Mb (after removing the cache directory and running a few solr builds)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] alextu commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
alextu commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r698578438



##########
File path: build.gradle
##########
@@ -20,7 +20,7 @@ import java.time.format.DateTimeFormatter
 
 plugins {
   id "base"
-  id "com.palantir.consistent-versions" version "1.14.0"

Review comment:
       Ho, I missed this effort upgrading to 7.x, good stuff ! I can wait for your branch to be merged and I'll fix my branch




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r698541218



##########
File path: build.gradle
##########
@@ -20,7 +20,7 @@ import java.time.format.DateTimeFormatter
 
 plugins {
   id "base"
-  id "com.palantir.consistent-versions" version "1.14.0"

Review comment:
       There is a patch upgrading this plugin (and all of gradle infrastructure) here - https://github.com/apache/solr/pull/275. It'll conflict with your PR, once applied. I'll cherry pick relevant areas if you don't want to spend any more time on it.

##########
File path: gradle/generate-defaults.gradle
##########
@@ -42,6 +42,7 @@ configure(rootProject) {
                 "systemProp.file.encoding=UTF-8",
                 "org.gradle.jvmargs=-Xmx3g", // TODO figure out why "gradlew check" runs out of memory if 2g
                 "org.gradle.parallel=true",
+                "org.gradle.caching=true",

Review comment:
       This enables local caches, right? I'm not sure folks will be enthusiastic about their home folders increasing in size so dramatically - solr build outputs are pretty heavy.

##########
File path: gradle/validation/check-broken-links.gradle
##########
@@ -40,11 +41,13 @@ class CheckBrokenLinksTask extends DefaultTask {
   @InputFile
   File script = project.rootProject.file("dev-tools/scripts/checkJavadocLinks.py")
 
+  @OutputFile

Review comment:
       Yup, this is good, thanks.

##########
File path: gradle/wrapper/gradle-wrapper.properties
##########
@@ -1,5 +1,5 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip

Review comment:
       this alone won't work - requires a new checksum too (dont in that other PR).

##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -215,20 +216,21 @@ check.dependsOn checkLocalJavadocLinksSite, checkSite
 // Hook site building to assemble.
 assemble.dependsOn buildSite
 
+@CacheableTask
 abstract class PrepareSources extends DefaultTask {
     // Original Source files we'll be syncing <b>FROM</b>
     @InputDirectory
-    public DirectoryProperty srcDir = project.objects.directoryProperty()
+    abstract DirectoryProperty getSrcDir()

Review comment:
       Are these abstract properties automatically injected if you declare them like this? Where is the gradle docs that explains this (and which properties can be injected like so)? Thanks.

##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -184,6 +184,7 @@ ext {
         group "Documentation"
         description "Builds the ${details.desc}"
 
+        outputs.cacheIf { true }

Review comment:
       I'm not sure what it does here?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] alextu commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
alextu commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r698588029



##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -215,20 +216,21 @@ check.dependsOn checkLocalJavadocLinksSite, checkSite
 // Hook site building to assemble.
 assemble.dependsOn buildSite
 
+@CacheableTask
 abstract class PrepareSources extends DefaultTask {
     // Original Source files we'll be syncing <b>FROM</b>
     @InputDirectory
-    public DirectoryProperty srcDir = project.objects.directoryProperty()
+    abstract DirectoryProperty getSrcDir()

Review comment:
       Yes exactly, so the docs are [here](https://docs.gradle.org/current/userguide/lazy_configuration.html#working_with_files_in_lazy_properties) but afaik it does not explain the runtime magical injection happening. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r699189769



##########
File path: gradle/generate-defaults.gradle
##########
@@ -42,6 +42,7 @@ configure(rootProject) {
                 "systemProp.file.encoding=UTF-8",
                 "org.gradle.jvmargs=-Xmx3g", // TODO figure out why "gradlew check" runs out of memory if 2g
                 "org.gradle.parallel=true",
+                "org.gradle.caching=true",

Review comment:
       I think this should be left commented out in the generated user defaults - let it be an opt-in. I plan to commit gradle 7.2 path tomorrow and reiterate on your patch, cherry picking the obvious parts of it. Stay tuned. :)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r698541218



##########
File path: build.gradle
##########
@@ -20,7 +20,7 @@ import java.time.format.DateTimeFormatter
 
 plugins {
   id "base"
-  id "com.palantir.consistent-versions" version "1.14.0"

Review comment:
       There is a patch upgrading this plugin (and all of gradle infrastructure) here - https://github.com/apache/solr/pull/275. It'll conflict with your PR, once applied. I'll cherry pick relevant areas if you don't want to spend any more time on it.

##########
File path: gradle/generate-defaults.gradle
##########
@@ -42,6 +42,7 @@ configure(rootProject) {
                 "systemProp.file.encoding=UTF-8",
                 "org.gradle.jvmargs=-Xmx3g", // TODO figure out why "gradlew check" runs out of memory if 2g
                 "org.gradle.parallel=true",
+                "org.gradle.caching=true",

Review comment:
       This enables local caches, right? I'm not sure folks will be enthusiastic about their home folders increasing in size so dramatically - solr build outputs are pretty heavy.

##########
File path: gradle/validation/check-broken-links.gradle
##########
@@ -40,11 +41,13 @@ class CheckBrokenLinksTask extends DefaultTask {
   @InputFile
   File script = project.rootProject.file("dev-tools/scripts/checkJavadocLinks.py")
 
+  @OutputFile

Review comment:
       Yup, this is good, thanks.

##########
File path: gradle/wrapper/gradle-wrapper.properties
##########
@@ -1,5 +1,5 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip

Review comment:
       this alone won't work - requires a new checksum too (dont in that other PR).

##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -215,20 +216,21 @@ check.dependsOn checkLocalJavadocLinksSite, checkSite
 // Hook site building to assemble.
 assemble.dependsOn buildSite
 
+@CacheableTask
 abstract class PrepareSources extends DefaultTask {
     // Original Source files we'll be syncing <b>FROM</b>
     @InputDirectory
-    public DirectoryProperty srcDir = project.objects.directoryProperty()
+    abstract DirectoryProperty getSrcDir()

Review comment:
       Are these abstract properties automatically injected if you declare them like this? Where is the gradle docs that explains this (and which properties can be injected like so)? Thanks.

##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -184,6 +184,7 @@ ext {
         group "Documentation"
         description "Builds the ${details.desc}"
 
+        outputs.cacheIf { true }

Review comment:
       I'm not sure what it does here?

##########
File path: build.gradle
##########
@@ -20,7 +20,7 @@ import java.time.format.DateTimeFormatter
 
 plugins {
   id "base"
-  id "com.palantir.consistent-versions" version "1.14.0"

Review comment:
       I'm planning to merge tomorrow, sorry for not mentioning this earlier.

##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -215,20 +216,21 @@ check.dependsOn checkLocalJavadocLinksSite, checkSite
 // Hook site building to assemble.
 assemble.dependsOn buildSite
 
+@CacheableTask
 abstract class PrepareSources extends DefaultTask {
     // Original Source files we'll be syncing <b>FROM</b>
     @InputDirectory
-    public DirectoryProperty srcDir = project.objects.directoryProperty()
+    abstract DirectoryProperty getSrcDir()

Review comment:
       Ah, I see it now. Yeah - it'd be good to require the Inject annotation on those abstract properties too. This would be more intuitive (to me at least).

##########
File path: gradle/generate-defaults.gradle
##########
@@ -42,6 +42,7 @@ configure(rootProject) {
                 "systemProp.file.encoding=UTF-8",
                 "org.gradle.jvmargs=-Xmx3g", // TODO figure out why "gradlew check" runs out of memory if 2g
                 "org.gradle.parallel=true",
+                "org.gradle.caching=true",

Review comment:
       I think this should be left commented out in the generated user defaults - let it be an opt-in. I plan to commit gradle 7.2 path tomorrow and reiterate on your patch, cherry picking the obvious parts of it. Stay tuned. :)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r699189769



##########
File path: gradle/generate-defaults.gradle
##########
@@ -42,6 +42,7 @@ configure(rootProject) {
                 "systemProp.file.encoding=UTF-8",
                 "org.gradle.jvmargs=-Xmx3g", // TODO figure out why "gradlew check" runs out of memory if 2g
                 "org.gradle.parallel=true",
+                "org.gradle.caching=true",

Review comment:
       I think this should be left commented out in the generated user defaults - let it be an opt-in. I plan to commit gradle 7.2 path tomorrow and reiterate on your patch, cherry picking the obvious parts of it. Stay tuned. :)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] alextu commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
alextu commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r699108383



##########
File path: gradle/generate-defaults.gradle
##########
@@ -42,6 +42,7 @@ configure(rootProject) {
                 "systemProp.file.encoding=UTF-8",
                 "org.gradle.jvmargs=-Xmx3g", // TODO figure out why "gradlew check" runs out of memory if 2g
                 "org.gradle.parallel=true",
+                "org.gradle.caching=true",

Review comment:
       Right, so if you're afraid of this, I can remove this setting and you can enable it through the command line when building, check after a few weeks of dev if it's acceptable. It's hard to predict the size, currently I see on my machine it's about 400Mb (after removing the cache directory and running a few solr builds)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] alextu commented on pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
alextu commented on pull request #277:
URL: https://github.com/apache/solr/pull/277#issuecomment-910115829


   Hi Dawid, I will rebase locally and investigate (today hopefuly)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] alextu commented on pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
alextu commented on pull request #277:
URL: https://github.com/apache/solr/pull/277#issuecomment-910246204


   Ho right, I missed it, after rebasing I've managed to fix those issues locally, is it ok for you if I force push my changes with a clean commit ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on pull request #277:
URL: https://github.com/apache/solr/pull/277#issuecomment-910086421


   Hi Alexis. I've rebased your patch on top of main (gradle 7.2) and cleaned up some minor noise here and there. The build currently fails though - not sure which normalization strategy would be suitable here.
   ```
   A problem was found with the configuration of task ':solr:solrj:renderSiteJavadoc' (type 'RenderJavadocTask').
     - Type 'RenderJavadocTask' property 'srcDirSet' is annotated with @InputFiles but missing a normalization strategy.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] alextu commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
alextu commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r698578438



##########
File path: build.gradle
##########
@@ -20,7 +20,7 @@ import java.time.format.DateTimeFormatter
 
 plugins {
   id "base"
-  id "com.palantir.consistent-versions" version "1.14.0"

Review comment:
       Ho, I missed this effort upgrading to 7.x, good stuff ! I can wait for your branch to be merged and I'll fix my branch

##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -184,6 +184,7 @@ ext {
         group "Documentation"
         description "Builds the ${details.desc}"
 
+        outputs.cacheIf { true }

Review comment:
       it makes the task cacheable, same as putting `@Cacheable` annotation on a task class (not possible here since it's created on the fly) 

##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -215,20 +216,21 @@ check.dependsOn checkLocalJavadocLinksSite, checkSite
 // Hook site building to assemble.
 assemble.dependsOn buildSite
 
+@CacheableTask
 abstract class PrepareSources extends DefaultTask {
     // Original Source files we'll be syncing <b>FROM</b>
     @InputDirectory
-    public DirectoryProperty srcDir = project.objects.directoryProperty()
+    abstract DirectoryProperty getSrcDir()

Review comment:
       Yes exactly, so the docs are [here](https://docs.gradle.org/current/userguide/lazy_configuration.html#working_with_files_in_lazy_properties) but afaik it does not explain the runtime magical injection happening. 

##########
File path: gradle/generate-defaults.gradle
##########
@@ -42,6 +42,7 @@ configure(rootProject) {
                 "systemProp.file.encoding=UTF-8",
                 "org.gradle.jvmargs=-Xmx3g", // TODO figure out why "gradlew check" runs out of memory if 2g
                 "org.gradle.parallel=true",
+                "org.gradle.caching=true",

Review comment:
       Right, so if you're afraid of this, I can remove this setting and you can enable it through the command line when building, check after a few weeks of dev if it's acceptable. It's hard to predict the size, currently I see on my machine it's about 400Mb (after removing the cache directory and running a few solr builds)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on pull request #277:
URL: https://github.com/apache/solr/pull/277#issuecomment-910244185


   Hey, no rush. I don't think you need to rebase - just pull the changes? I pushed the cleanups directly to your branch (PRs allow for this).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] alextu commented on pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
alextu commented on pull request #277:
URL: https://github.com/apache/solr/pull/277#issuecomment-910680589


   @dweiss ok it's pushed, it should be fine now


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on pull request #277:
URL: https://github.com/apache/solr/pull/277#issuecomment-910288119


   Sure, go ahead.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] alextu commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
alextu commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r698581182



##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -184,6 +184,7 @@ ext {
         group "Documentation"
         description "Builds the ${details.desc}"
 
+        outputs.cacheIf { true }

Review comment:
       it makes the task cacheable, same as putting `@Cacheable` annotation on a task class (not possible here since it's created on the fly) 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on pull request #277:
URL: https://github.com/apache/solr/pull/277#issuecomment-910086421


   Hi Alexis. I've rebased your patch on top of main (gradle 7.2) and cleaned up some minor noise here and there. The build currently fails though - not sure which normalization strategy would be suitable here.
   ```
   A problem was found with the configuration of task ':solr:solrj:renderSiteJavadoc' (type 'RenderJavadocTask').
     - Type 'RenderJavadocTask' property 'srcDirSet' is annotated with @InputFiles but missing a normalization strategy.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on a change in pull request #277: SOLR-15603: Activate Gradle build cache

Posted by GitBox <gi...@apache.org>.
dweiss commented on a change in pull request #277:
URL: https://github.com/apache/solr/pull/277#discussion_r699060499



##########
File path: build.gradle
##########
@@ -20,7 +20,7 @@ import java.time.format.DateTimeFormatter
 
 plugins {
   id "base"
-  id "com.palantir.consistent-versions" version "1.14.0"

Review comment:
       I'm planning to merge tomorrow, sorry for not mentioning this earlier.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org