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

Enable/Disable verbose Git command logging in Jenkins build log

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The git plugin currently prints out the git commands that it executes.

      git rev-parse master^{commit} # timeout=10
      

      In some cases, these commands can be numerous and thus distract the user from other pertinent information in the build log.

      It would be very valuable to be able to enable or disable this verbose output via a option in the job configuration.

        Attachments

          Issue Links

            Activity

            Hide
            markewaite Mark Waite added a comment -

            Sam Deane I am not aware of any recent change in the plugin that would affect this behavior. Did you recently upgrade either the git plugin or the git client plugin?

            Did the number of tags (or branches) in your repository increase dramatically recently?

            Did a job setting change recently?

            Did you add a new plugin recently (like the timestamper plugin)?

            Show
            markewaite Mark Waite added a comment - Sam Deane I am not aware of any recent change in the plugin that would affect this behavior. Did you recently upgrade either the git plugin or the git client plugin? Did the number of tags (or branches) in your repository increase dramatically recently? Did a job setting change recently? Did you add a new plugin recently (like the timestamper plugin)?
            Hide
            samdeane Sam Deane added a comment - - edited

            > Did you recently upgrade either the git plugin or the git client plugin?

            They're upgraded (by me) periodically. I think the last change was 17 days ago. A number of plugins were updated, include the git plugin which went from 3.0.1 to 3.2.0.

            I can't say for certain if that coincides with this problem starting.

            > Did the number of tags (or branches) in your repository increase dramatically recently?

            No. There are 2242 tags, but they're largely historical.

            > Did a job setting change recently?

            No.

            > Did you add a new plugin recently (like the timestamper plugin)?

            No, the timestamper plugin has been installed for a long time.

            Show
            samdeane Sam Deane added a comment - - edited > Did you recently upgrade either the git plugin or the git client plugin? They're upgraded (by me) periodically. I think the last change was 17 days ago. A number of plugins were updated, include the git plugin which went from 3.0.1 to 3.2.0. I can't say for certain if that coincides with this problem starting. > Did the number of tags (or branches) in your repository increase dramatically recently? No. There are 2242 tags, but they're largely historical. > Did a job setting change recently? No. > Did you add a new plugin recently (like the timestamper plugin)? No, the timestamper plugin has been installed for a long time.
            Hide
            samdeane Sam Deane added a comment -

            Just noticed this in one of the logs, reported directly after the last rev-parse entry. Not sure if it's relevant:

             
            07:41:09 JENKINS-19022: warning: possible memory leak due to Git plugin usage; see:
            https://wiki.jenkins-ci.org/display/JENKINS/Remove+Git+Plugin+BuildsByBranch+BuildData

            Show
            samdeane Sam Deane added a comment - Just noticed this in one of the logs, reported directly after the last rev-parse entry. Not sure if it's relevant:   07:41:09 JENKINS-19022 : warning: possible memory leak due to Git plugin usage; see: https://wiki.jenkins-ci.org/display/JENKINS/Remove+Git+Plugin+BuildsByBranch+BuildData
            Hide
            samdeane Sam Deane added a comment - - edited

            The contents of that link is very unclear.

            Is it supposed to be a script to run as a work around? Once? Periodically? From the shell? From a job?

            Is it a report that the script itself is the cause of the "leak"?

            It would be helpful if it was explained clearly, with instructions on what to do if you hit this problem.

            The issue that it then points to in turn seems to suggest that the script should be run, but reading the whole thread of comments (most of which are hidden by default), even then it's far from clear whether it will help or not, or if it's always safe to run it, etc.

             

             

             

            Show
            samdeane Sam Deane added a comment - - edited The contents of that link is very unclear. Is it supposed to be a script to run as a work around? Once? Periodically? From the shell? From a job? Is it a report that the script itself is the cause of the "leak"? It would be helpful if it was explained clearly, with instructions on what to do if you hit this problem. The issue that it then points to in turn seems to suggest that the script should be run, but reading the whole thread of comments (most of which are hidden by default), even then it's far from clear whether it will help or not, or if it's always safe to run it, etc.      
            Hide
            markewaite Mark Waite added a comment -

            Is it supposed to be a script to run as a work around? Once? Periodically? From the shell? From a job?

            It is run as a workaround, whenever you encounter the problem. It can be run periodically if you wish. Another alternative is to limit the amount of history you retain with your jobs.

            Is it a report that the script itself is the cause of the "leak"?

            No, the script is not the cause of the problem. The git plugin is the cause of the problem.

            It would be helpful if it was explained clearly, with instructions on what to do if you hit this problem.

            I'm not sure I understand. Can you edit that wiki page to better describe it? If a user has many history records in a git job, the git plugin incorrectly stores too much information about that history within each of the individual build records. Those bloated build records are then loaded into memory, which slows Jenkins startup and makes the Jenkins process much larger than necessary.

            The issue that it then points to in turn seems to suggest that the script should be run, but reading the whole thread of comments (most of which are hidden by default), even then it's far from clear whether it will help or not, or if it's always safe to run it, etc.

            If you depend on the information in those bloated build records, then the script is not safe to run. Most people do not depend on the information in those bloated build records.

            Another way to avoid the issue is to limit the number of build records you retain for your jobs. The configuration slicing plugin will allow you to modify the job definitions of all jobs in your system to limit the amount of history you keep for the jobs. That then avoids the problem by removing historical build records which include that duplicated information.

            Show
            markewaite Mark Waite added a comment - Is it supposed to be a script to run as a work around? Once? Periodically? From the shell? From a job? It is run as a workaround, whenever you encounter the problem. It can be run periodically if you wish. Another alternative is to limit the amount of history you retain with your jobs. Is it a report that the script itself is the cause of the "leak"? No, the script is not the cause of the problem. The git plugin is the cause of the problem. It would be helpful if it was explained clearly, with instructions on what to do if you hit this problem. I'm not sure I understand. Can you edit that wiki page to better describe it? If a user has many history records in a git job, the git plugin incorrectly stores too much information about that history within each of the individual build records. Those bloated build records are then loaded into memory, which slows Jenkins startup and makes the Jenkins process much larger than necessary. The issue that it then points to in turn seems to suggest that the script should be run, but reading the whole thread of comments (most of which are hidden by default), even then it's far from clear whether it will help or not, or if it's always safe to run it, etc. If you depend on the information in those bloated build records, then the script is not safe to run. Most people do not depend on the information in those bloated build records. Another way to avoid the issue is to limit the number of build records you retain for your jobs. The configuration slicing plugin will allow you to modify the job definitions of all jobs in your system to limit the amount of history you keep for the jobs. That then avoids the problem by removing historical build records which include that duplicated information.

              People

              • Assignee:
                Unassigned
                Reporter:
                scoheb Scott Hebert
              • Votes:
                10 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated: