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

"git clone" should add --progress




      When cloning a large repository over HTTP, the git server goes quiet for quite some time, busy computing a pack file. Normally, Apache is configured such that a prolonged inactivity in a socket will trigger a shutdown. So what the end user sees is that after a while, "git clone" fails by the unexpected connection reset by the server.

      If the user tries the same command from the shell, Git silently adds the --progress option (see the quote from the man page.) This keeps the socket chatty enough to avoid a shutdown from Apache.

          Progress status is reported on the standard error stream by default when it is attached to a terminal,
          unless -q is specified. This flag forces progress status even if the standard error stream is not
          directed to a terminal.

      So the unsuspecting users would end up concluding that Jenkins is broken.

      Even worse, normally the server is owned by a different person, which makes it difficult to tweak the Apache setting. Besides, there are legitimate reasons why Apache needs to shutdown idle connections (for example to avoid DoS attack.)

      So to improve the user experience, I think the best course of action is for the Git plugin to add the --progress option to the "git clone" command. We don't need to report the git clone output unless it fails, so this doesn't clutter the output, and in this way Jenkins would Just Work (TM).



          kohsuke Kohsuke Kawaguchi created issue -
          scm_issue_link SCM/JIRA link daemon made changes -
          Field Original Value New Value
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 139324 ] JNJira + In-Review [ 204981 ]


            abayer Andrew Bayer
            kohsuke Kohsuke Kawaguchi
            1 Vote for this issue
            1 Start watching this issue