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

Autofavouriting breaks first build of a new job/branch

      When a new branch is discovered by multibranch, it fails due to a missing commit (which is actually there in github). Re-running the build subsequently fixes this.

      The stack trace should be informative (this is from the job: https://ci.blueocean.io/job/blueocean/job/bug%252FJENKINS-39627-buttonbarlayout/1/console):

      GitHub has been notified of this commit’s build result
      
      hudson.plugins.git.GitException: org.eclipse.jgit.errors.MissingObjectException: Missing commit afbbb05dc881da89e63c5901e94f333deaeaf020
      	at org.jenkinsci.plugins.gitclient.JGitAPIImpl$4.includes(JGitAPIImpl.java:1020)
      	at io.jenkins.blueocean.autofavorite.FavoritingScmListener.onCheckout(FavoritingScmListener.java:58)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:123)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
      	at hudson.security.ACL.impersonate(ACL.java:213)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing commit afbbb05dc881da89e63c5901e94f333deaeaf020
      	at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:159)
      	at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:903)
      	at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:155)
      	at org.eclipse.jgit.revwalk.RevWalk.markStart(RevWalk.java:293)
      	at org.jenkinsci.plugins.gitclient.JGitAPIImpl$4.includes(JGitAPIImpl.java:1016)
      	... 12 more
      Finished: FAILURE
      

      Yay for dogfooding for picking this up

          [JENKINS-39704] Autofavouriting breaks first build of a new job/branch

          Michael Neale created issue -
          Michael Neale made changes -
          Epic Link New: JENKINS-35761 [ 171656 ]

          Code changed in jenkins
          User: James Dumay
          Path:
          src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java
          http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/57cd6bdbf44fcc8175ec64b512b7457f44c69b80
          Log:
          JENKINS-39704 retry fetching the changeset when the repository appears inconsistent

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Dumay Path: src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/57cd6bdbf44fcc8175ec64b512b7457f44c69b80 Log: JENKINS-39704 retry fetching the changeset when the repository appears inconsistent

          Code changed in jenkins
          User: James William Dumay
          Path:
          src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java
          http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/15db351ef5948cd9e9f7bb65e14b4a1e6d7b913f
          Log:
          JENKINS-39704 retry fetching the changeset when the repository appears inconsistent (#2)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James William Dumay Path: src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/15db351ef5948cd9e9f7bb65e14b4a1e6d7b913f Log: JENKINS-39704 retry fetching the changeset when the repository appears inconsistent (#2)
          James Dumay made changes -
          Component/s New: blueocean-autofavorite-plugin [ 21924 ]
          James Dumay made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          James Dumay made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

          James Dumay added a comment -

          Released 0.3 that attempts to fix this.

          James Dumay added a comment - Released 0.3 that attempts to fix this.
          James Dumay made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          James Dumay made changes -
          Link New: This issue blocks JENKINS-39832 [ JENKINS-39832 ]

            jamesdumay James Dumay
            michaelneale Michael Neale
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: