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

BFA fails to catch pipeline related exceptions

    Details

    • Similar Issues:
    • Released As:
      1.23.0-beta-1

      Description

      Here is an interesting bug related to BFA and pipelines.

      When the job runs BFA fails to spot the exception as this exceptions seems to reach stdout after BFA runs.

      If I force the BFA to rescan the builds it will spot it.

      I find this behaviour confusing, can we fix it?

       

      [Pipeline] }
      [Pipeline] // timestamps
      [Pipeline] End of Pipeline
      [BFA] Scanning build for known causes...
      [BFA] No failure causes found
      [BFA] Done. 0s
      org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method groovy.lang.GroovyObject invokeMethod java.lang.String java.lang.Object (org.jenkinsci.plugins.workflow.cps.CpsClosure2 scm java.util.LinkedHashMap)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectMethod(StaticWhitelist.java:183)
      	at 
      

        Attachments

          Issue Links

            Activity

            Hide
            dmaxfield Dana Maxfield added a comment -

            I am also experiencing this same behavior. I set up 2 test jobs to always error with 1 of 4 messages. 1 job is a Pipeline, the other is a Freestyle executing a shell. The Freestyle works as expected and finds any/all error(s). The Pipeline does not find any of the saved error(s), and instead always reports "No identified problem". If you force a scan using: "Failure Scan Options -> All builds -> Scan", it does find and report the errors.

             

            We are using Jenkins 2.19.1 and 1.19.0 of BFA.

            Show
            dmaxfield Dana Maxfield added a comment - I am also experiencing this same behavior. I set up 2 test jobs to always error with 1 of 4 messages. 1 job is a Pipeline, the other is a Freestyle executing a shell. The Freestyle works as expected and finds any/all error(s). The Pipeline does not find any of the saved error(s), and instead always reports "No identified problem". If you force a scan using: "Failure Scan Options -> All builds -> Scan", it does find and report the errors.   We are using Jenkins 2.19.1 and 1.19.0 of BFA.
            Hide
            vallon Justin Vallon added a comment -

            I had the same trouble, and am also using the "timestamps" feature.  When timestamps is active, it prefixes every line of output with a date+time; it seems BFA wants that to match as well.  I added '^.*' to my rule, and now it matches the lines in the "Failure Cause Editor" and it was able to find "Identified Problems" in the build page.

            Show
            vallon Justin Vallon added a comment - I had the same trouble, and am also using the "timestamps" feature.  When timestamps is active, it prefixes every line of output with a date+time; it seems BFA wants that to match as well.  I added '^.*' to my rule, and now it matches the lines in the "Failure Cause Editor" and it was able to find "Identified Problems" in the build page.
            Hide
            therealwaldo Will Freeman added a comment -

            The timestamps thing I expect, however, we experience the exact same issue as the OP.  It appears anything output from stderr is not processed by BFA on the build run, but only after in the subsequent scan.

            Show
            therealwaldo Will Freeman added a comment - The timestamps thing I expect, however, we experience the exact same issue as the OP.  It appears anything output from stderr is not processed by BFA on the build run, but only after in the subsequent scan.
            Show
            timja Tim Jacomb added a comment - https://github.com/jenkinsci/build-failure-analyzer-plugin/pull/103
            Hide
            simontunnat Simon Tunnat added a comment -

            I have now stumbled up on this bug / missing feature as well. Is there any chance you will merge the PR?

            Show
            simontunnat Simon Tunnat added a comment - I have now stumbled up on this bug / missing feature as well. Is there any chance you will merge the PR?
            Hide
            timja Tim Jacomb added a comment -

            Released in 1.23.0-beta-1

            Show
            timja Tim Jacomb added a comment - Released in 1.23.0-beta-1

              People

              • Assignee:
                t_westling Tomas Westling
                Reporter:
                ssbarnea Sorin Sbarnea
              • Votes:
                12 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: