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

Possible issue on rebase/amend of a pull request

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • Jenkins 2.9, GitHub Organization Folder Plugin 1.3,
      GitHub Branch Source Plugin 1.7, GitHub plugin 1.19.1, GitHub API Plugin 1.75, Git plugin 2.4.4, Git client plugin 1.19.6

      After rebasing this pull request:
      https://github.com/elifesciences/api-sdk-php/pull/1

      I got the following error in the build triggered by the webhook:

      Branch indexing
      Connecting to https://api.github.com using elife-alfred-user/****** (Used for listing branches in Multibranch pipelines)
       > 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/api-sdk-php.git # timeout=10
      Fetching upstream changes from https://github.com/elifesciences/api-sdk-php.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/git290847354312573576.credentials # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/elifesciences/api-sdk-php.git +refs/heads/*:refs/remotes/origin/*
       > git config --local --remove-section credential # timeout=10
       > git config remote.origin1.url https://github.com/elifesciences/api-sdk-php.git # timeout=10
      Fetching upstream changes from https://github.com/elifesciences/api-sdk-php.git
      using .gitcredentials to set credentials
       > git config --local credential.username elife-alfred-user # timeout=10
       > git config --local credential.helper store --file=/tmp/git1965350685167259234.credentials # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/elifesciences/api-sdk-php.git +refs/pull/*/merge:refs/remotes/origin/pr/*
       > git config --local --remove-section credential # timeout=10
      Checking out Revision d4f40697f8b8d693928c89d55e11823b73b9c049 (PR-1)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f d4f40697f8b8d693928c89d55e11823b73b9c049
      
      GitHub has been notified of this commit’s build result
      
      hudson.plugins.git.GitException: Could not checkout d4f40697f8b8d693928c89d55e11823b73b9c049
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1992)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1135)
      	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:410)
      Caused by: hudson.plugins.git.GitException: Command "git checkout -f d4f40697f8b8d693928c89d55e11823b73b9c049" returned status code 128:
      stdout: 
      stderr: fatal: reference is not a tree: d4f40697f8b8d693928c89d55e11823b73b9c049
      
      	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
      

      I could find no trace of this sha (d4f406) in the workspace PR-1@script, so it may have been one pointing to the code before the amend; but I'm aware that Jenkins creates a new commit merging the PR code onto master, so it may be normal that I cannot find it.

      I tried to reproduce this behavior by amending a commit on another pull request, but it worked and the amended commit was even shown in the Changes page. Any clue to what happened?

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

              Created:
              Updated:
              Resolved: