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

Pull request build stuck on not existent commit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None

      Some commits were added to a pull request which was building, bringing it from a diff of 2 commits to 5 commits on top of master.
      The build of the pull request by the Organization Folder plugin was made over the commit resulting from the merge of the 2nd commit onto master.
      After this commit was garbage-collected by Github (it's not in the repository anymore), the build failed:

      Started by user Giorgio Sironi
      Connecting to https://api.github.com using elife-alfred-user/****** (Access to Github as elife-alfred-user. Used e.g. for listing branches in Organization folder)
       > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from 2 remote Git repositories
       > git config remote.origin.url https://github.com/elifesciences/pattern-library.git # timeout=10
      Fetching upstream changes from https://github.com/elifesciences/pattern-library.git
       > git --version # timeout=10
      using .gitcredentials to set credentials
       > git config --local credential.username elife-alfred-user # timeout=10
       > git config --local credential.helper store --file=/tmp/git4178245349311672378.credentials # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/elifesciences/pattern-library.git +refs/heads/*:refs/remotes/origin/*
       > git config --local --remove-section credential # timeout=10
       > git config remote.origin1.url https://github.com/elifesciences/pattern-library.git # timeout=10
      Fetching upstream changes from https://github.com/elifesciences/pattern-library.git
      using .gitcredentials to set credentials
       > git config --local credential.username elife-alfred-user # timeout=10
       > git config --local credential.helper store --file=/tmp/git1174167449186412605.credentials # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/elifesciences/pattern-library.git +refs/pull/*/merge:refs/remotes/origin/pr/*
       > git config --local --remove-section credential # timeout=10
      Checking out Revision e82306057bb9fe98e714b854965cc348e8e2f2af (PR-270)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f e82306057bb9fe98e714b854965cc348e8e2f2af
      
      GitHub has been notified of this commit’s build result
      
      hudson.plugins.git.GitException: Could not checkout e82306057bb9fe98e714b854965cc348e8e2f2af
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1992)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1117)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      Caused by: hudson.plugins.git.GitException: Command "git checkout -f e82306057bb9fe98e714b854965cc348e8e2f2af" returned status code 128:
      stdout: 
      stderr: fatal: reference is not a tree: e82306057bb9fe98e714b854965cc348e8e2f2af
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:63)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1984)
      	... 7 more
      Finished: FAILURE
      

      This is fine: it can't build not existent code. The strange thing was that no matter how I re-index the branches, and delete the related workspaces, still every build triggered by pressing Build Now on this PR will be stuck on this commit. Where this information is stored and how can I reset it?

            kohsuke Kohsuke Kawaguchi
            giorgiosironi Giorgio Sironi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: