Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-78632

com.liferay.node does not support gradle parallel builds

    Details

    • Fix Priority:
      2
    • OS:
      CentOS 7
    • JDK:
      Oracle Sun JDK 8

      Description

      When a multi module gradle build with subprojects run in parallel multiple threads write and attempt to move the same node files in the cache directory:

      This is resolved in FileUtil

      private static File _getMirrorsCacheDir() { 
      String userHome = System.getProperty("user.home"); 

      return new File(userHome, ".liferay/mirrors"); 

       

      A resolution to this would be to not used a globally shared cache but rather use $buildDir/tmp/com.liferay.gulp/ as the cache directory

      Additionally defaulting to the "user.home" also breaks different gradle builds running on the same machine (e.g. on CI).

       

       

      Example failure log:

       FAILURE: Build completed with 2 failures.

      1: Task failed with an exception.
      -----------

      • What went wrong:
        Execution failed for task ':client-portal:downloadNode'.
        > Unable to expand TAR '/home/centos/.liferay/mirrors/nodejs.org/dist/v6.9.1/node-v6.9.1-linux-x64.tar.gz'
        The tar might be corrupted or it is compressed in an unexpected way.
        By default the tar tree tries to guess the compression based on the file extension.
        If you need to specify the compression explicitly please refer to the DSL reference.
      • Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
        ==============================================================================

      2: Task failed with an exception.
      -----------

      • What went wrong:
        Execution failed for task ':feedback:downloadNode'.
        > Unable to rename /home/centos/.liferay/mirrors/nodejs.org/dist/v6.9.1/node-v6.9.1-linux-x64.tar.gz.tmp to /home/centos/.liferay/mirrors/nodejs.org/dist/v6.9.1/node-v6.9.1-linux-x64.tar.gz

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              judd.gaddie Judd Gaddie
              Participants of an Issue:
              Recent user:
              Sherry Zhu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                1 year, 19 weeks ago

                Packages

                Version Package