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

2 Jobs w/same repo. Job triggers twice when first triggered job is Git SCM is still downloading

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • CentOS 5, JDK 1.7

      Problem:
      A job keeps triggering when it should not.

      Background:
      2 separate jobs are configured to be triggered on the same Github repository depending on branch that pushed to.

      When pushing to the 1st branch, "origin/test/branch1", the 1st job is triggered. Good.
      When pushing to the 2nd branch, "origin/test/branch2", the 2nd job triggers. Good.
      But the 1st job is triggered again. Bad. There's only been 2 pushes.

      The repository is very large, so the git clone takes a few minutes for both jobs.

      The problem consistently occurs when pushing to the 1st branch, THEN immediately pushing to the 2nd branch. The 1st job is triggered and git cloning. And the 2nd job is triggered and queued. BUT another 1st job is triggered and queued.

      Seems to happen when it's still downloading during the clone.

      That extra triggered job is causing us grief, because it's used for deployments.

      This is reproducible consistently with this script:

      ----------------------------
      #!/bin/bash
      pushd mydirectory
      git checkout develop
      echo ${1}d >> d.txt
      git add .
      git commit -m "${1}d"
      git push

      git checkout test/branch1
      git pull --no-edit upstream develop
      git push

      git checkout test/branch2
      git pull --no-edit upstream test/branch1
      git push
      popd
      ----------------------------

      And run it as:

      1. ./script 1
      2. ./script 2
        etc...

      Jenkins v1.558
      Git Client v1.9.1
      Git plugin v2.2.1
      GitHub API v1.54
      Github OAuth v0.14
      GitHub Pull Request Builder 1.12
      GitHub plugin v1.8

          [JENKINS-23415] 2 Jobs w/same repo. Job triggers twice when first triggered job is Git SCM is still downloading

          Frank Lee created issue -
          Frank Lee made changes -
          Description Original: Problem:
          A job keeps triggering when it should not.

          Background:
          2 separate jobs are configured to be triggered on the same Github repository depending on branch that pushed to.

          When pushing to the 1st branch, "origin/test/branch1", the 1st job is triggered. Good.
          When pushing to the 2nd branch, "origin/test/branch2", the 2nd job triggers. Good.
          But the 1st job is triggered again. Bad. There's only been 2 pushes.

          The repository is very large, so the git clone takes a few minutes for both jobs.

          The problem consistently occurs when pushing to the 1st branch, THEN immediately pushing to the 2nd branch. The 1st job is triggered and git cloning. And the 2nd job is triggered and queued. BUT another 1st job is triggered and queued.

          Seems to happen when it's still downloading during the clone.

          That extra triggered job is causing us grief, because it's used for deployments.

          This is reproducible consistently with this script:


          ----------------------------
          #!/bin/bash
          pushd mydirectory
            git checkout develop
            echo ${1}d >> d.txt
            git add .
            git commit -m "${1}d"
            git push

          git checkout test/branch1
          git pull --no-edit upstream develop
          git push

          git checkout test/main
          git pull --no-edit upstream test/branch2
          git push
          popd
          ----------------------------

          And run it as:

          # ./script 1
          # ./script 2
          etc...


          Jenkins v1.558
          Git Client v1.9.0
          Git plugin v2.2.1
          GitHub API v1.44
          Github OAuth v0.14
          GitHub Pull Request Builder 1.12
          New: Problem:
          A job keeps triggering when it should not.

          Background:
          2 separate jobs are configured to be triggered on the same Github repository depending on branch that pushed to.

          When pushing to the 1st branch, "origin/test/branch1", the 1st job is triggered. Good.
          When pushing to the 2nd branch, "origin/test/branch2", the 2nd job triggers. Good.
          But the 1st job is triggered again. Bad. There's only been 2 pushes.

          The repository is very large, so the git clone takes a few minutes for both jobs.

          The problem consistently occurs when pushing to the 1st branch, THEN immediately pushing to the 2nd branch. The 1st job is triggered and git cloning. And the 2nd job is triggered and queued. BUT another 1st job is triggered and queued.

          Seems to happen when it's still downloading during the clone.

          That extra triggered job is causing us grief, because it's used for deployments.

          This is reproducible consistently with this script:


          ----------------------------
          #!/bin/bash
          pushd mydirectory
            git checkout develop
            echo ${1}d >> d.txt
            git add .
            git commit -m "${1}d"
            git push

          git checkout test/branch1
          git pull --no-edit upstream develop
          git push

          git checkout test/branch2
          git pull --no-edit upstream test/branch1
          git push
          popd
          ----------------------------

          And run it as:

          # ./script 1
          # ./script 2
          etc...


          Jenkins v1.558
          Git Client v1.9.0
          Git plugin v2.2.1
          GitHub API v1.44
          Github OAuth v0.14
          GitHub Pull Request Builder 1.12
          Mark Waite made changes -
          Component/s Original: github [ 15896 ]
          Component/s Original: github-oauth [ 15900 ]
          Component/s Original: github-api [ 17496 ]
          Labels Original: git jenkins scm New: git scm
          Frank Lee made changes -
          Labels Original: git scm New: git github scm
          Frank Lee made changes -
          Description Original: Problem:
          A job keeps triggering when it should not.

          Background:
          2 separate jobs are configured to be triggered on the same Github repository depending on branch that pushed to.

          When pushing to the 1st branch, "origin/test/branch1", the 1st job is triggered. Good.
          When pushing to the 2nd branch, "origin/test/branch2", the 2nd job triggers. Good.
          But the 1st job is triggered again. Bad. There's only been 2 pushes.

          The repository is very large, so the git clone takes a few minutes for both jobs.

          The problem consistently occurs when pushing to the 1st branch, THEN immediately pushing to the 2nd branch. The 1st job is triggered and git cloning. And the 2nd job is triggered and queued. BUT another 1st job is triggered and queued.

          Seems to happen when it's still downloading during the clone.

          That extra triggered job is causing us grief, because it's used for deployments.

          This is reproducible consistently with this script:


          ----------------------------
          #!/bin/bash
          pushd mydirectory
            git checkout develop
            echo ${1}d >> d.txt
            git add .
            git commit -m "${1}d"
            git push

          git checkout test/branch1
          git pull --no-edit upstream develop
          git push

          git checkout test/branch2
          git pull --no-edit upstream test/branch1
          git push
          popd
          ----------------------------

          And run it as:

          # ./script 1
          # ./script 2
          etc...


          Jenkins v1.558
          Git Client v1.9.0
          Git plugin v2.2.1
          GitHub API v1.44
          Github OAuth v0.14
          GitHub Pull Request Builder 1.12
          New: Problem:
          A job keeps triggering when it should not.

          Background:
          2 separate jobs are configured to be triggered on the same Github repository depending on branch that pushed to.

          When pushing to the 1st branch, "origin/test/branch1", the 1st job is triggered. Good.
          When pushing to the 2nd branch, "origin/test/branch2", the 2nd job triggers. Good.
          But the 1st job is triggered again. Bad. There's only been 2 pushes.

          The repository is very large, so the git clone takes a few minutes for both jobs.

          The problem consistently occurs when pushing to the 1st branch, THEN immediately pushing to the 2nd branch. The 1st job is triggered and git cloning. And the 2nd job is triggered and queued. BUT another 1st job is triggered and queued.

          Seems to happen when it's still downloading during the clone.

          That extra triggered job is causing us grief, because it's used for deployments.

          This is reproducible consistently with this script:


          ----------------------------
          #!/bin/bash
          pushd mydirectory
            git checkout develop
            echo ${1}d >> d.txt
            git add .
            git commit -m "${1}d"
            git push

          git checkout test/branch1
          git pull --no-edit upstream develop
          git push

          git checkout test/branch2
          git pull --no-edit upstream test/branch1
          git push
          popd
          ----------------------------

          And run it as:

          # ./script 1
          # ./script 2
          etc...


          Jenkins v1.558
          Git Client v1.9.0
          Git plugin v2.2.1
          GitHub API v1.44
          Github OAuth v0.14
          GitHub Pull Request Builder 1.12
          GitHub plugin v1.8
          Frank Lee made changes -
          Description Original: Problem:
          A job keeps triggering when it should not.

          Background:
          2 separate jobs are configured to be triggered on the same Github repository depending on branch that pushed to.

          When pushing to the 1st branch, "origin/test/branch1", the 1st job is triggered. Good.
          When pushing to the 2nd branch, "origin/test/branch2", the 2nd job triggers. Good.
          But the 1st job is triggered again. Bad. There's only been 2 pushes.

          The repository is very large, so the git clone takes a few minutes for both jobs.

          The problem consistently occurs when pushing to the 1st branch, THEN immediately pushing to the 2nd branch. The 1st job is triggered and git cloning. And the 2nd job is triggered and queued. BUT another 1st job is triggered and queued.

          Seems to happen when it's still downloading during the clone.

          That extra triggered job is causing us grief, because it's used for deployments.

          This is reproducible consistently with this script:


          ----------------------------
          #!/bin/bash
          pushd mydirectory
            git checkout develop
            echo ${1}d >> d.txt
            git add .
            git commit -m "${1}d"
            git push

          git checkout test/branch1
          git pull --no-edit upstream develop
          git push

          git checkout test/branch2
          git pull --no-edit upstream test/branch1
          git push
          popd
          ----------------------------

          And run it as:

          # ./script 1
          # ./script 2
          etc...


          Jenkins v1.558
          Git Client v1.9.0
          Git plugin v2.2.1
          GitHub API v1.44
          Github OAuth v0.14
          GitHub Pull Request Builder 1.12
          GitHub plugin v1.8
          New: Problem:
          A job keeps triggering when it should not.

          Background:
          2 separate jobs are configured to be triggered on the same Github repository depending on branch that pushed to.

          When pushing to the 1st branch, "origin/test/branch1", the 1st job is triggered. Good.
          When pushing to the 2nd branch, "origin/test/branch2", the 2nd job triggers. Good.
          But the 1st job is triggered again. Bad. There's only been 2 pushes.

          The repository is very large, so the git clone takes a few minutes for both jobs.

          The problem consistently occurs when pushing to the 1st branch, THEN immediately pushing to the 2nd branch. The 1st job is triggered and git cloning. And the 2nd job is triggered and queued. BUT another 1st job is triggered and queued.

          Seems to happen when it's still downloading during the clone.

          That extra triggered job is causing us grief, because it's used for deployments.

          This is reproducible consistently with this script:


          ----------------------------
          #!/bin/bash
          pushd mydirectory
            git checkout develop
            echo ${1}d >> d.txt
            git add .
            git commit -m "${1}d"
            git push

          git checkout test/branch1
          git pull --no-edit upstream develop
          git push

          git checkout test/branch2
          git pull --no-edit upstream test/branch1
          git push
          popd
          ----------------------------

          And run it as:

          # ./script 1
          # ./script 2
          etc...


          Jenkins v1.558
          Git Client v1.9.1
          Git plugin v2.2.1
          GitHub API v1.54
          Github OAuth v0.14
          GitHub Pull Request Builder 1.12
          GitHub plugin v1.8
          Mark Waite made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 156039 ] New: JNJira + In-Review [ 179190 ]
          Mark Waite made changes -
          Component/s Original: git-client-plugin [ 17423 ]

            Unassigned Unassigned
            tokyowizard Frank Lee
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: