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

Using BUILD_FAILURE_ANALYZER token in office365Connector results in no reasons

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.235.1
      build-failure-analyzer 1.26.0
      office-365-connector 4.13.0

      test done on pipeline job

      If you enable office-365-connector and add a ${BUILD_FAILURE_ANALYZER} token in definitions (which would result in nice failure reason on Microsoft Teams) you get actually no failure reasons at all.

      Without usage of ${BUILD_FAILURE_ANALYZER} token all failure reasons are read correctly.

      I've did a little debugging of the plugin and I've found that it's due to:
      1) Office365Connector sends notification on start/fail.
      a) Job starts we get a request for ${BUILD_FAILURE_ANALYZER}.
      2) Build-failure-analyzer recognizes that it does not have failure reasons so it tries to parse log and marks job as analyzed and as job just started there's no failures yet.
      3) Job finishes so we get once more call to analyze but as it was already done it's skipped.

          [JENKINS-63077] Using BUILD_FAILURE_ANALYZER token in office365Connector results in no reasons

          NoNo User added a comment -

          I believe that the plugin should recognize a job state and handle it correctly.

          I assume that it would still need to parse the log on demand but do not mark it as 'analyzed' this is due to the fact that token might get really asked in middle of job and it should be filled properly. Also I can imagine that somebody could ask for token right before job is 'finished'.

          NoNo User added a comment - I believe that the plugin should recognize a job state and handle it correctly. I assume that it would still need to parse the log on demand but do not mark it as 'analyzed' this is due to the fact that token might get really asked in middle of job and it should be filled properly. Also I can imagine that somebody could ask for token right before job is 'finished'.

            t_westling Tomas Westling
            nonouser NoNo User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: