manticore-projects commented on a change in pull request #275:
URL: https://github.com/apache/poi/pull/275#discussion_r741655886



##########
File path: build.gradle
##########
@@ -271,8 +278,10 @@ subprojects {
             
'-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl',
             "-Dversion.id=${project.version}",
             '-ea',
-            '-Djunit.jupiter.execution.parallel.config.strategy=fixed',
-            '-Djunit.jupiter.execution.parallel.config.fixed.parallelism=2'
+            '-Djunit.jupiter.execution.parallel.enabled=true',
+            '-Djunit.jupiter.execution.parallel..mode.default=concurrent'

Review comment:
       > So we should avoid running into the same problems again. Can we have 
at least a way to configure the run in CI to not run with full parallel build 
so we can keep CI stable without adding such hard to track-down breakages?
   
   Thank you for the feedback. It is definitely possible, although I have one 
major question: How to detect the "CI" and to know that we are building on the 
"CI"? 
   I have built everything just fine on a 2 Core 3GB machine, is the "CI" 
anyhow worse equipped? Does the "CI" have a certain distinct hostname or 
configuration we could use for identifying?

##########
File path: gradle.properties
##########
@@ -1,3 +1,15 @@
 # Specifies the JVM arguments used for the daemon process.
 # The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx4096m
\ No newline at end of file
+# Less than 2G definitely slows things down.
+org.gradle.jvmargs=-Xmx2G -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError 
-Dfile.encoding=UTF-8

Review comment:
       > Previously we needed more than 2g for running all the tests, but maybe 
memory requirements did change in the meantime?
   
   I was able to run everything with Xmx=1GB, but it got slower. I found 2GB 
the optimal setting.
   Also bear in mind, a lots of old Laptop Computers still are equipped with 
4GB only (less 1GB for shared graphics making it 3 GB effectively). I think POI 
still should build on such a Laptop and the original build froze the system on 
my junk laptop computer.
   
   > Enabling heap-dump always can lead to leftover files and disk filling up 
in CI, can we at least send it somewhere else, e.g. /tmp?
   
   I will just remove it. This has no direct advantage. Apologies for 
accidentally "re-introducing" such stuff, I was not aware that there was a 
history on this already.
   
   

##########
File path: build.gradle
##########
@@ -271,8 +278,10 @@ subprojects {
             
'-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl',
             "-Dversion.id=${project.version}",
             '-ea',
-            '-Djunit.jupiter.execution.parallel.config.strategy=fixed',
-            '-Djunit.jupiter.execution.parallel.config.fixed.parallelism=2'
+            '-Djunit.jupiter.execution.parallel.enabled=true',
+            '-Djunit.jupiter.execution.parallel..mode.default=concurrent'

Review comment:
       Would it be possible to rely on an Environment Variable, e. g.:
   ```
   boolean isJenkinsBuild = Boolean.valueOf(System.getenv("CI_BUILD"));
   boolean isSoftwarePresent = new ProcessBuilder("check software 
presence").start().waitFor() == 0;
   Assume.assumeTrue("Software not present", isSoftwarePresent || 
isJenkinsBuild);
   ```
   for restricting the build to serial mode?
   
   Would you be able and willing to set the Environment Variable "CI_BUILD" 
when kicking off Jenkins:
   ```
   pipeline {
               stage('test'){ 
   
                       sh '''CI_BUILD="TRUE" // setting the env variable in the 
same shell where you are running mvn
                           mvn test'''
                }
           }
   ```
   
   Any better idea?

##########
File path: build.gradle
##########
@@ -271,8 +278,10 @@ subprojects {
             
'-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl',
             "-Dversion.id=${project.version}",
             '-ea',
-            '-Djunit.jupiter.execution.parallel.config.strategy=fixed',
-            '-Djunit.jupiter.execution.parallel.config.fixed.parallelism=2'
+            '-Djunit.jupiter.execution.parallel.enabled=true',
+            '-Djunit.jupiter.execution.parallel..mode.default=concurrent'

Review comment:
       I do not think, I damaged this `jenkins` task, I only let it set the 
global `CI_BUILD` variable (in case it has not been set on the command line).

##########
File path: build.gradle
##########
@@ -499,7 +533,9 @@ task allJavaDoc(type: Javadoc) {
 }
 
 
-task jenkins(dependsOn: ['replaceVersion', subprojects.build, 
'binDistZip','binDistTar','srcDistZip','srcDistTar']) {}
+task jenkins(dependsOn: ['replaceVersion', subprojects.build, 
'binDistZip','binDistTar','srcDistZip','srcDistTar']) {
+       isCIBuild = true;

Review comment:
       Sorry for being slow: does `isCIBuild = true` do any harm?
   I could remove that easily of course, but I found it handy when `jenkins` 
always simulated the CI build.
   
   But yes, adding the Environment Variables and also setting the Gradle 
Switches at 
https://github.com/apache/poi/blob/584c8c059b6b317178df635b37244c6e393d6c96/jenkins/create_jobs.groovy#L372
 should do.
   
   Can someone please try? :-D




-- 
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: dev-unsubscr...@poi.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to