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

Git tool chooser unpacks then deletes git install in each job

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • Jenkins 2.263
      Git plugin 4.4.5
      Git client plugin 3.5.1

      I have multiple git tool installers defined for Windows computers so that jobs have the option to declare their dependency on a specific version of Git for Windows. The git tool chooser iterates over each of those installers, installing them on the Windows computer as a tool, then deletes them.

      That's inefficient and should be resolved either by a code change to retain multiple tool installations or by documenting a technique so that the tool installers will not delete one another when multiple versions are installed.

      Job output in the console log looks like this:

      Started by upstream project "Bugs-Individual/Bugs-10-000-to-19-999/JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit" build number 20
      originally caused by:
       Started by user Mark Waite
      Running as SYSTEM
      [EnvInject] - Loading node environment variables.
      Building remotely on mark-pc3-ssh (git-1.9+ amd64) in workspace C:\J\PC\workspace\Bugs-Individual\Bugs-10-000-to-19-999\JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit\label\mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/MinGit-2.27.0-busybox-64-bit.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.11.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.17.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.20.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.25.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.26.2.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.28.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
      Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
      The recommended git tool is: C:\J\PC\tools\git\PortableGit-2.29.1\bin\git.exe
      No credentials specified
      Wiping out workspace first.
      Cloning the remote Git repository
      Avoid fetching tags
      Honoring refspec on initial clone
      Cloning repository https://github.com/MarkEWaite/jenkins-bugs
      

      Each of the "Unpacking" statements results in the tools\git directory being emptied of the current git tool then it is populated with the git tool that is being iterated. Since each of those git tool zip files is a 100 MB zip file, time is wasted installing each tool and then removing it.

      I now avoid the issue by having only a single git tool definition for the Windows agents. See my docker-lfs jenkins.yaml file for an example.

          [JENKINS-64092] Git tool chooser unpacks then deletes git install in each job

          Mark Waite created issue -
          Mark Waite made changes -
          Description Original: I have multiple git tool installers defined for Windows computers so that jobs have the option to declare their dependency on a specific version of Git for Windows. The git tool chooser iterates over each of those installers, installing them on the Windows computer as a tool, then deletes them.

          That's inefficient and should be resolved either by a code change to retain multiple tool installations or by documenting a technique so that the tool installers will not delete one another when multiple versions are installed.

          Job output in the console log looks like this:

          {noformat}
          Started by upstream project "Bugs-Individual/Bugs-10-000-to-19-999/JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit" build number 20
          originally caused by:
           Started by user Mark Waite
          Running as SYSTEM
          [EnvInject] - Loading node environment variables.
          Building remotely on mark-pc3-ssh (git-1.9+ git-2.21+ git-2.11+ git-2.23+ git-1.7+ git-2.25+ windows-10.0 java java8 jdk11 git-2.28 jdk8 git-2.27+ jdk-8 git-2.0+ git-2.17+ git-2.19+ 64bit git-2.7+ git-1.8+ git-2.20+ git-2.10+ highmem java-8 python git-2.22+ git-2.24+ git-2.26+ jdk-11 maven-windows amd64-windows windows java-11 java11 amd64-windows-10.0 jenkins-maven 10.0 git-2.16+ maven-11-windows git-2.28+ git-lfs git-2.18+ amd64) in workspace C:\J\PC\workspace\Bugs-Individual\Bugs-10-000-to-19-999\JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit\label\mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/MinGit-2.27.0-busybox-64-bit.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.11.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.17.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.20.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.25.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.26.2.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.28.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          The recommended git tool is: C:\J\PC\tools\git\PortableGit-2.29.1\bin\git.exe
          No credentials specified
          Wiping out workspace first.
          Cloning the remote Git repository
          Avoid fetching tags
          Honoring refspec on initial clone
          Cloning repository https://github.com/MarkEWaite/jenkins-bugs
          {noformat}

          Each of the "Unpacking" statements results in the tools\git directory being emptied of the current git tool then it is populated with the git tool that is being iterated. Since each of those git tool zip files is a 100 MB zip file, time is wasted installing each tool and then removing it.
          New: I have multiple git tool installers defined for Windows computers so that jobs have the option to declare their dependency on a specific version of Git for Windows. The git tool chooser iterates over each of those installers, installing them on the Windows computer as a tool, then deletes them.

          That's inefficient and should be resolved either by a code change to retain multiple tool installations or by documenting a technique so that the tool installers will not delete one another when multiple versions are installed.

          Job output in the console log looks like this:

          {noformat}
          Started by upstream project "Bugs-Individual/Bugs-10-000-to-19-999/JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit" build number 20
          originally caused by:
           Started by user Mark Waite
          Running as SYSTEM
          [EnvInject] - Loading node environment variables.
          Building remotely on mark-pc3-ssh (git-1.9+ amd64) in workspace C:\J\PC\workspace\Bugs-Individual\Bugs-10-000-to-19-999\JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit\label\mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/MinGit-2.27.0-busybox-64-bit.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.11.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.17.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.20.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.25.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.26.2.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.28.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          The recommended git tool is: C:\J\PC\tools\git\PortableGit-2.29.1\bin\git.exe
          No credentials specified
          Wiping out workspace first.
          Cloning the remote Git repository
          Avoid fetching tags
          Honoring refspec on initial clone
          Cloning repository https://github.com/MarkEWaite/jenkins-bugs
          {noformat}

          Each of the "Unpacking" statements results in the tools\git directory being emptied of the current git tool then it is populated with the git tool that is being iterated. Since each of those git tool zip files is a 100 MB zip file, time is wasted installing each tool and then removing it.
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]
          Mark Waite made changes -
          Labels New: regression
          Mark Waite made changes -
          Description Original: I have multiple git tool installers defined for Windows computers so that jobs have the option to declare their dependency on a specific version of Git for Windows. The git tool chooser iterates over each of those installers, installing them on the Windows computer as a tool, then deletes them.

          That's inefficient and should be resolved either by a code change to retain multiple tool installations or by documenting a technique so that the tool installers will not delete one another when multiple versions are installed.

          Job output in the console log looks like this:

          {noformat}
          Started by upstream project "Bugs-Individual/Bugs-10-000-to-19-999/JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit" build number 20
          originally caused by:
           Started by user Mark Waite
          Running as SYSTEM
          [EnvInject] - Loading node environment variables.
          Building remotely on mark-pc3-ssh (git-1.9+ amd64) in workspace C:\J\PC\workspace\Bugs-Individual\Bugs-10-000-to-19-999\JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit\label\mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/MinGit-2.27.0-busybox-64-bit.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.11.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.17.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.20.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.25.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.26.2.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.28.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          The recommended git tool is: C:\J\PC\tools\git\PortableGit-2.29.1\bin\git.exe
          No credentials specified
          Wiping out workspace first.
          Cloning the remote Git repository
          Avoid fetching tags
          Honoring refspec on initial clone
          Cloning repository https://github.com/MarkEWaite/jenkins-bugs
          {noformat}

          Each of the "Unpacking" statements results in the tools\git directory being emptied of the current git tool then it is populated with the git tool that is being iterated. Since each of those git tool zip files is a 100 MB zip file, time is wasted installing each tool and then removing it.
          New: I have multiple git tool installers defined for Windows computers so that jobs have the option to declare their dependency on a specific version of Git for Windows. The git tool chooser iterates over each of those installers, installing them on the Windows computer as a tool, then deletes them.

          That's inefficient and should be resolved either by a code change to retain multiple tool installations or by documenting a technique so that the tool installers will not delete one another when multiple versions are installed.

          Job output in the console log looks like this:

          {noformat}
          Started by upstream project "Bugs-Individual/Bugs-10-000-to-19-999/JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit" build number 20
          originally caused by:
           Started by user Mark Waite
          Running as SYSTEM
          [EnvInject] - Loading node environment variables.
          Building remotely on mark-pc3-ssh (git-1.9+ amd64) in workspace C:\J\PC\workspace\Bugs-Individual\Bugs-10-000-to-19-999\JENKINS-15103-open-pack-file-prevents-wipe-cli-jgit\label\mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/MinGit-2.27.0-busybox-64-bit.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.11.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.17.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.20.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.25.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.26.2.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.28.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.0.zip to C:\J\PC\tools\git on mark-pc3-ssh
          Unpacking https://home.markwaite.net/~mwaite/git/PortableGit-2.29.1.zip to C:\J\PC\tools\git on mark-pc3-ssh
          The recommended git tool is: C:\J\PC\tools\git\PortableGit-2.29.1\bin\git.exe
          No credentials specified
          Wiping out workspace first.
          Cloning the remote Git repository
          Avoid fetching tags
          Honoring refspec on initial clone
          Cloning repository https://github.com/MarkEWaite/jenkins-bugs
          {noformat}

          Each of the "Unpacking" statements results in the tools\git directory being emptied of the current git tool then it is populated with the git tool that is being iterated. Since each of those git tool zip files is a 100 MB zip file, time is wasted installing each tool and then removing it.

          I now avoid the issue by having only a single git tool definition for the Windows agents. See my [docker-lfs jenkins.yaml file|https://github.com/MarkEWaite/docker-lfs/blob/1f6953e628dd9780dbbe275b1ce017781468f41a/ref/jenkins.yaml#L418] for an example.
          Rishabh Budhouliya made changes -
          Assignee New: Rishabh Budhouliya [ rishabhbudhouliya ]
          Mark Waite made changes -
          Assignee Original: Rishabh Budhouliya [ rishabhbudhouliya ]

            Unassigned Unassigned
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: