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

Runs that use the Git plugin do not always have changes

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • git-plugin
    • None

      It appears under common triggering scenarios the Git plugin does not produce changesets for runs.

      This is ticket should serve as an umbrella ticket for known problems such as JENKINS-42689 and there needs to be some further investigation to test that the Git plugin creates changesets under other conditions (basically we need to recheck everything).

      Steps to reproduce

      1. Fork the app-store-demo project on Github
      2. Create a new multibranch pipeline that uses the forked repository as a branch source.
      3. Ensure there is 1 run of the master branch
      4. Commit a change to the master branch with the message "Test"
      5. Manually run the branch

      Expected results
      You should see run 2 with one changeset that contains the commit ID and message of the "Test" commit.

      Problem
      There are no changesets associated with run 2.

          [JENKINS-44262] Runs that use the Git plugin do not always have changes

          James Dumay added a comment -

          Confirmed out of band with markewaite and jglick that this is indeed a bug.

          James Dumay added a comment - Confirmed out of band with markewaite and jglick that this is indeed a bug.

          Cannot reproduce using the steps provided:

           

          jamesdumay could you provide the Jenkinsfile that you were using.

          I was using the following Jenkinsfile:

          pipeline {
              agent any
              stages {
                  stage('Sleep'){
                      steps {
                          echo 'Test'
                          sleep 120
                      }
                  }
              }
          }

          I suspect that you are using a Jenkinsfile that does not trigger a checkout

          If I switch the Jenkinsfile to 

          pipeline {
              agent none
              stages {
                  stage('Sleep'){
                      steps {
                          echo 'Test'
                          sleep 120
                      }
                  }
              }
          }

          Then this indeed does reproduce the reported behaviour.

          IIRC this is thus a known issue with the implementation of JENKINS-33273 where it did not include the use of the SCMFileSystem.changesSince() method to capture the changes to the primary repository.

          As such the issue is not with the Git plugin but with the Workflow Multibranch plugin which should be capturing the changes somewhere around here.

          I suspect jglick already has an issue that this is a duplicate of.

          Stephen Connolly added a comment - Cannot reproduce using the steps provided:   jamesdumay could you provide the Jenkinsfile that you were using. I was using the following Jenkinsfile : pipeline {     agent any     stages {         stage( 'Sleep' ){             steps {                 echo 'Test'                 sleep 120             }         }     } } I suspect that you are using a Jenkinsfile  that does not trigger a checkout If I switch the Jenkinsfile to  pipeline {     agent none     stages {         stage( 'Sleep' ){             steps {                 echo 'Test'                 sleep 120             }         }     } } Then this indeed does reproduce the reported behaviour. IIRC this is thus a known issue with the implementation of  JENKINS-33273 where it did not include the use of the SCMFileSystem.changesSince()  method to capture the changes to the primary repository. As such the issue is not with the Git plugin but with the Workflow Multibranch plugin which should be capturing the changes somewhere around  here . I suspect jglick already has an issue that this is a duplicate of.

          Jesse Glick added a comment -

          It is release-noted that if you do not do a real (heavyweight) checkout you will get no changelog. There is no straightforward fix for that and I do not plan to change it any time soon.

          Anyway the original test case involved a realistic Jenkinsfile which would have done a checkout. So this could be closed as unreproducible unless there is more information to be had.

          Jesse Glick added a comment - It is release-noted that if you do not do a real (heavyweight) checkout you will get no changelog. There is no straightforward fix for that and I do not plan to change it any time soon. Anyway the original test case involved a realistic Jenkinsfile which would have done a checkout. So this could be closed as unreproducible unless there is more information to be had.

          James Dumay added a comment -

          stephenconnolly jglick I ran through these instructions again screencast and could not reproduce. This is indeed odd because it was the behaviour I had seen and reproduced to write this ticket. Most bizarre.

          James Dumay added a comment - stephenconnolly jglick I ran through these instructions again screencast and could not reproduce. This is indeed odd because it was the behaviour I had seen and reproduced to write this ticket. Most bizarre.

          Ryan Campbell added a comment -

          Agreed with Michael to close this until we have more info on how to reproduce it.

          Ryan Campbell added a comment - Agreed with Michael to close this until we have more info on how to reproduce it.

            Unassigned Unassigned
            jamesdumay James Dumay
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: