Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11401

Jenkins: Properly isolate workspace directories for parallel stages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      The default workspace name is not unique for parallel stages which run incidentally on the same node. That could lead to race conditions (e.g. between clean and install).

      An example can be found here (https://ci-builds.apache.org/job/Sling/job/modules/job/sling-maven-enforcer-rules/job/master/19/console) where the rat-check was executed on a workspace which was populated by another job.

      [WARNING] Files with unapproved licenses:
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/maven-metadata.xml.sha1
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/1.0.1-SNAPSHOT/maven-metadata.xml.sha1
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/1.0.1-SNAPSHOT/maven-metadata.xml.md5
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/1.0.1-SNAPSHOT/maven-enforcer-rules-1.0.1-20220618.114744-1-sources.jar.sha1
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/1.0.1-SNAPSHOT/maven-enforcer-rules-1.0.1-20220618.114744-1.jar.md5
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/1.0.1-SNAPSHOT/maven-enforcer-rules-1.0.1-20220618.114744-1.pom.sha1
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/1.0.1-SNAPSHOT/maven-enforcer-rules-1.0.1-20220618.114744-1.jar.sha1
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/1.0.1-SNAPSHOT/maven-metadata.xml
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/1.0.1-SNAPSHOT/maven-enforcer-rules-1.0.1-20220618.114744-1.pom.md5
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/1.0.1-SNAPSHOT/maven-enforcer-rules-1.0.1-20220618.114744-1-sources.jar.md5
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/maven-metadata.xml.md5
        local-snapshots-dir/org/apache/sling/maven-enforcer-rules/maven-metadata.xml
      

      Also the Maven repository should not be shared until Maven 3.9 (with Maven Resolver 1.7+) has been released as there is no proper locking in place there (compare with https://lists.apache.org/thread/yovswz70v3f4d2b5ofyoqymvg9lbmzrg).

      As the installation to the local repository directory may be executed for multi-module jobs prior to execution of rat-maven-plugin the local repository should be created below target where it is excluded by default (and also cleaned up through a regular mvn clean).

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m