Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40879

Locked areas are executed multiple times in parallel

    XMLWordPrintable

Details

    Description

      My pipeline consists of several exclusive sections like this, which should never be executed in parallel:

      milestone()
      lock(resource: "unit-tests", inversePrecedence: true) {
          milestone()
          stage('Unit Tests') {
          }
      }
      
      milestone()
      lock(resource: "integration-tests", inversePrecedence: true) {
          milestone()
          stage('Integration Tests') {
          }
      }
      

      This worked perfectly fine with lockable-resources-plugin 1.10.
      However with version 1.11 the locking does not work properly anymore.

      It happens that two builds are running the integration tests in parallel,
      although this should not be possible given the above configuration.

      Whenever this happens I have a look at the http://<jenkins>/lockable-resources overview.
      It shows that the resource is locked by only one build, although two builds are just concurrently executing the integration tests.

      I am afraid it has to do with the recently implemented features:

      Since I consider this a bug and regression, I changed the priority to critical.

      Attachments

        Issue Links

          Activity

            People

              abayer Andrew Bayer
              dawi Daniel Wilmer
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: