• 612.v84da_9c54906d

      A global Jenkins Shared Library is configured. Caching for this library is enabled for 10min.

      There are a lot of jobs in parallel running on Jenkins.
      Sporadically and rarely the jobs fail with

       

      10:39:23 Library my-jsl@rel-1 is cached. Copying from home.
      10:39:23 ERROR: Library my-jsl expected to contain at least one of src or vars directories

       

      My assumption is this is happening right when another job deletes the JSL. I could find another job that run at the same time:

       

      10:39:22 Library my-jsl@rel-1 is due for a refresh after 10 minutes, clearing.
      10:39:23 Caching library my-jsl@rel-1
      10:39:23 Attempting to resolve rel-1 from remote references...

       Looking into the source code LibraryAdder.java  I'm wondering:
      Is it really ensured the library is not deleted when currently being copied?
      I understand it is ensured the library is not beeing cached when already beeing cached by another job, but if I understand the code correctly the library can be deleted even when it is beeing copied?

       

       

          [JENKINS-66898] Cached JSL deleted during copying from master

          Markus Winter added a comment -

          I encountered the same issue. Looking at the code the cache dir is deleted before the lock file is created which can already lead to problems and when another job is just copying it would be also affected.

          Markus Winter added a comment - I encountered the same issue. Looking at the code the cache dir is deleted before the lock file is created which can already lead to problems and when another job is just copying it would be also affected.

          The pr has been merged, and a new version of pipeline-groovy-lib with the fix has been released, mawinter69 do you mind if I close this as done and set you as asignee? You have done the work.

          Raul Arabaolaza added a comment - The pr has been merged, and a new version of pipeline-groovy-lib with the fix has been released, mawinter69 do you mind if I close this as done and set you as asignee? You have done the work.

            mawinter69 Markus Winter
            kai_b Kai B
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: