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

Commit messages are broken in the CentOS 6 build details - changes

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • Jenkins 2.150.2
      Git plugin 4.0.0-rc

      We have a Jenkins job that gets triggered on git push. When clicking on a particular build number, I don't see commit messages of the git commits triggered this build. Instead I see "%B".

          [JENKINS-56116] Commit messages are broken in the CentOS 6 build details - changes

          Mark Waite added a comment - - edited

          What version of command line git is available on the computer running the Jenkins master?

          You can list the command line git version with the command:

          $ git --version
          

          What operating system is running the Jenkins master (Windows, Linux, FreeBSD, OpenBSD, etc.)?

          Mark Waite added a comment - - edited What version of command line git is available on the computer running the Jenkins master? You can list the command line git version with the command: $ git --version What operating system is running the Jenkins master (Windows, Linux, FreeBSD, OpenBSD, etc.)?

          git --version
          git version 1.8.3.1

          cat /etc/redhat-release
          Red Hat Enterprise Linux Server release 7.5 (Maipo)

          Arseniy Tashoyan added a comment - git --version git version 1.8.3.1 cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.5 (Maipo)

          Mark Waite added a comment - - edited

          I can't duplicate the problem you've reported. Steps I took to try to duplicate the problem:

          1. Install Jenkins 2.150.2 with suggested plugins on fully patched CentOS 7.6.1810 as of February 16, 2019 using yum repo
            [jenkins]
            name=Jenkins-stable
            baseurl=http://pkg.jenkins.io/redhat-stable
            gpgcheck=1
            
          2. Create a Freestyle project that clones the master branch of https://github.com/MarkEWaite/jenkins-bugs with a custom refspec +refs/heads/master:refs/remotes/origin/master and the additional behavior Honor refspec on initial clone for fast cloning and reduced disc use, with SCM polling every minute
          3. Commit changes to the master branch, confirm that the changes are reported as expected in both the job view and the build view
          4. Install git client plugin 3.0.0-rc and git plugin 4.0.0-rc
          5. Restart the Jenkins server
          6. Commit changes to the master branch, confirm that the changes are reported as expected in both the job view and the build view
          7. Create a Pipeline job that attempts to duplicate the problem

          The job view looks like this:

          The build view looks like this:

          Please provide additional information that will allow others to duplicate the problem you're seeing.

          My system configuration information looks like this:

          [mwaite@centos7-d ~]$ lsb_release -a
          LSB Version:    :core-4.1-amd64:core-4.1-noarch
          Distributor ID: CentOS
          Description:    CentOS Linux release 7.6.1810 (Core)
          Release:        7.6.1810
          Codename:       Core
          [mwaite@centos7-d ~]$ cat /etc/redhat-release
          CentOS Linux release 7.6.1810 (Core)
          [mwaite@centos7-d ~]$ git --version
          git version 1.8.3.1
          

          The Freestyle job definition I'm using is attached as config.xml

          Some ideas of what might be different between my environment and yours:

          • I installed Jenkins with the yum repo, you might be running jenkins.war
          • I use bash as my default shell, you might be using csh or zsh or ksh
          • I patched the operating system with the latest updates, you might be running with different patches
          • I used command line git as installed in /usr/bin/git, you might be using a different installation
          • I relied on the default git tool definition in Jenkins, you might have defined a custom git tool in Jenkins which points to a different git version

          Mark Waite added a comment - - edited I can't duplicate the problem you've reported. Steps I took to try to duplicate the problem: Install Jenkins 2.150.2 with suggested plugins on fully patched CentOS 7.6.1810 as of February 16, 2019 using yum repo [jenkins] name=Jenkins-stable baseurl=http://pkg.jenkins.io/redhat-stable gpgcheck=1 Create a Freestyle project that clones the master branch of https://github.com/MarkEWaite/jenkins-bugs with a custom refspec +refs/heads/master:refs/remotes/origin/master and the additional behavior Honor refspec on initial clone for fast cloning and reduced disc use, with SCM polling every minute Commit changes to the master branch, confirm that the changes are reported as expected in both the job view and the build view Install git client plugin 3.0.0-rc and git plugin 4.0.0-rc Restart the Jenkins server Commit changes to the master branch, confirm that the changes are reported as expected in both the job view and the build view Create a Pipeline job that attempts to duplicate the problem The job view looks like this: The build view looks like this: Please provide additional information that will allow others to duplicate the problem you're seeing. My system configuration information looks like this: [mwaite@centos7-d ~]$ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.6.1810 (Core) Release: 7.6.1810 Codename: Core [mwaite@centos7-d ~]$ cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) [mwaite@centos7-d ~]$ git --version git version 1.8.3.1 The Freestyle job definition I'm using is attached as config.xml Some ideas of what might be different between my environment and yours: I installed Jenkins with the yum repo, you might be running jenkins.war I use bash as my default shell, you might be using csh or zsh or ksh I patched the operating system with the latest updates, you might be running with different patches I used command line git as installed in /usr/bin/git, you might be using a different installation I relied on the default git tool definition in Jenkins, you might have defined a custom git tool in Jenkins which points to a different git version

          I was able to narrow down the search. This problem occurs:

          • both for Maven and Freestyle jobs
          • configured to run on a specific slave

          Here is the configuration of this slave:

           cat /etc/redhat-release 
          Red Hat Enterprise Linux Server release 6.10 (Santiago)
          
           git --version
          git version 1.7.1
          

          I tried to cleanup that slave, but of no avail:

          1. disconnect the node
          2. kill processes of user jenkins
          3. remove all files and directories belonging to user jenkins
          4. connect the node back

           

           

          Arseniy Tashoyan added a comment - I was able to narrow down the search. This problem occurs: both for Maven and Freestyle jobs configured to run on a specific slave Here is the configuration of this slave:  cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.10 (Santiago)  git --version git version 1.7.1 I tried to cleanup that slave, but of no avail: disconnect the node kill processes of user jenkins remove all files and directories belonging to user jenkins connect the node back    

          Mark Waite added a comment - - edited

          Thanks for the clarification. I appreciate it very much!

          Command line git 1.7.1 lacks many of the basic features needed to support the Jenkins git plugin. The Jenkins git plugin wiki page notes that the earliest supported version is git 1.7.10. Even that version has cases in the git plugin source code which can't be supported due to missing features. The best supported command line git versions for the Jenkins git plugin begin with 1.9 and continue through command line git 2.20 (the current release).

          Command line git 1.7.1 was released over 8 years ago. It is a very old version of command line git.

          You can switch to use JGit as the implementation instead of command line git in many cases and that will provide the correct changes output. There are known cases where JGit does not support a use case that command line git supports. Thus, "switch to JGit" is not always available as an option.

          You can install a newer version of command line git on your CentOS 6 machines. See the stackoverflow article for one technique.

          You can switch back to Jenkins git plugin 3.9.x and git client plugin 2.7.x. That will remove several bug fixes but gives support for this case with command line git 1.7.1.

          Mark Waite added a comment - - edited Thanks for the clarification. I appreciate it very much! Command line git 1.7.1 lacks many of the basic features needed to support the Jenkins git plugin. The Jenkins git plugin wiki page notes that the earliest supported version is git 1.7.10. Even that version has cases in the git plugin source code which can't be supported due to missing features. The best supported command line git versions for the Jenkins git plugin begin with 1.9 and continue through command line git 2.20 (the current release). Command line git 1.7.1 was released over 8 years ago. It is a very old version of command line git. You can switch to use JGit as the implementation instead of command line git in many cases and that will provide the correct changes output. There are known cases where JGit does not support a use case that command line git supports. Thus, "switch to JGit" is not always available as an option. You can install a newer version of command line git on your CentOS 6 machines. See the stackoverflow article for one technique. You can switch back to Jenkins git plugin 3.9.x and git client plugin 2.7.x. That will remove several bug fixes but gives support for this case with command line git 1.7.1.

          After upgrade to RHEL 7 with git 1.8.3.1, the problem disappeared. Thank you for your investigation and help.

          Arseniy Tashoyan added a comment - After upgrade to RHEL 7 with git 1.8.3.1, the problem disappeared. Thank you for your investigation and help.

            Unassigned Unassigned
            tashoyan Arseniy Tashoyan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: