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

JGit 5.02 logs failure to delete a pruned branch

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-client-plugin
    • Labels:
      None
    • Environment:
      Git client plugin 3.0.0-beta5
      Git plugin 4.0.0-beta pre-release
      Jenkins 2.121.2
      My lts-with-plugins repo, in the caches directory
    • Similar Issues:

      Description

      The JGitAPIImpl prune implementation logs a message that it is unable to remove path. Possible behavioral change in the transition from JGit 4.5.4 to JGIt 5.0.2.

      Stack trace indicates it is happening in the caches directory used by a multi-branch project. The referenced directory is not empty. The message is correct, but if deletion is not expected to succeed and is harmless, the exception should be accepted and suppressed.

      Aug 10, 2018 11:04:46 PM org.eclipse.jgit.internal.storage.file.RefDirectory delete
      WARNING: Unable to remove path /var/jenkins_home/caches/git-c3acd33583448548d14667df83b93ee1/.git/logs/refs/remotes/origin
      java.nio.file.DirectoryNotEmptyException: /var/jenkins_home/caches/git-c3acd33583448548d14667df83b93ee1/.git/logs/refs/remotes/origin
              at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242)
              at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
              at java.nio.file.Files.delete(Files.java:1126)
              at org.eclipse.jgit.internal.storage.file.RefDirectory.delete(RefDirectory.java:1289)
              at org.eclipse.jgit.internal.storage.file.RefDirectory.delete(RefDirectory.java:1273)
              at org.eclipse.jgit.internal.storage.file.RefDirectory.delete(RefDirectory.java:694)
              at org.eclipse.jgit.internal.storage.file.RefDirectoryUpdate.doDelete(RefDirectoryUpdate.java:153)
              at org.eclipse.jgit.lib.RefUpdate$2.execute(RefUpdate.java:680)
              at org.eclipse.jgit.lib.RefUpdate.updateImpl(RefUpdate.java:774)
              at org.eclipse.jgit.lib.RefUpdate.delete(RefUpdate.java:677)
              at org.eclipse.jgit.lib.RefUpdate.delete(RefUpdate.java:649)
              at org.eclipse.jgit.api.DeleteBranchCommand.call(DeleteBranchCommand.java:144)
              at org.jenkinsci.plugins.gitclient.JGitAPIImpl$2.execute(JGitAPIImpl.java:635)
              at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:356)
              at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:544)
              at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:357)
              at jenkins.scm.api.SCMSource.fetch(SCMSource.java:267)
              at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:633)
              at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
              at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
              at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1024)
              at hudson.model.ResourceController.execute(ResourceController.java:97)
              at hudson.model.Executor.run(Executor.java:429)
      

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          The JGit fix will be available in JGit 5.0.3 (if released) and JGit 5.1 (current master branch)

          Show
          markewaite Mark Waite added a comment - The JGit fix will be available in JGit 5.0.3 (if released) and JGit 5.1 (current master branch)
          Hide
          markewaite Mark Waite added a comment -

          Fixed in git client plugin 3.0.0-beta6, released Dec 15, 2018

          Show
          markewaite Mark Waite added a comment - Fixed in git client plugin 3.0.0-beta6, released Dec 15, 2018

            People

            • Assignee:
              Unassigned
              Reporter:
              markewaite Mark Waite
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: