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

BFA runs too early to see the cause

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • Jenkins 2.73.2 running on Windows Server 2012 R2, Build Failure Analyzer plugin 1.19.0, Git plugin 3.6.0, Git client plugin 2.5.0

      Looks like BFA is running not at the very end of the build, since it proclaims that "No failure causes found" but the line indicating the failure comes later.

      Example output:

      > C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
       > C:\Program Files\Git\bin\git.exe checkout -f f09f3eae6bbce03717cb160cef87cc4b7c10ec4a
      [BFA] Scanning build for known causes...
      [BFA] No failure causes found
      [BFA] Done. 0s
      [Bitbucket] Notifying pull request build result
      [Bitbucket] Build result notified
      hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe checkout -f f09f3eae6bbce03717cb160cef87cc4b7c10ec4a" returned status code 128:
      stdout: 
      stderr: fatal: reference is not a tree: f09f3eae6bbce03717cb160cef87cc4b7c10ec4a
      
      at
      org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1924)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$800(CliGitAPIImpl.java:71)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2214)
      Caused: hudson.plugins.git.GitException: Could not checkout f09f3eae6bbce03717cb160cef87cc4b7c10ec4a
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2237)
       at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1165)
       at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
       at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
       at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:120)
       at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
       at hudson.model.ResourceController.execute(ResourceController.java:97)
       at hudson.model.Executor.run(Executor.java:421)
      Finished: FAILURE
      

      There is a failure cause configured that would listen for lines with "stderr: fatal: reference is not a tree:" in them, but BFA analyses the build before this line is logged. If the failure cause analysis is run later on all builds this failure is found as well.

            t_westling Tomas Westling
            zovitsadam Adam Zovits
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: