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

Casc reload events seem to cause issues for this plugin.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      AWS ECS with Docker image based on the official one.

      Jenkins 2.303.3
      BFA Plugin 2.1.0
      Casc 1.54
    • Similar Issues:

      Description

      I have Jenkins instances that get the casc reload event fired regularly to allow them to synchronise the yaml from a Git repo.

      This seems to cause the Build Failure Analyser to always fail with a Null Pointer.

      at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.findCauses(BuildFailureScanner.java:392)
      at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.splitCauses(BuildFailureScanner.java:519)
      at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.findIndications(BuildFailureScanner.java:438)
      at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.scan(BuildFailureScanner.java:176)
      at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.scanIfNotScanned(BuildFailureScanner.java:154)
      at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.doScan(BuildFailureScanner.java:130)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:625)
      at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.onCompleted(BuildFailureScanner.java:120)
      at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:208)

      If I turn off the Casc reload then this doesn't occur and the scan works OK.

        Attachments

          Activity

          Hide
          sfryffdc Stephen Fry added a comment -

          I see two issues here.

          1. The Mongo cache has an issue if you create a new one, call start and immediately ask for data. It can be null as the update thread may not have loaded the data yet.
          2. The Plugin doesn't handle the case with a casc reload event. This seems to update the knowledge base data bound property, with a new instance that has not been started. UI updates handled through configure handle the knowledge base updates.

          Fixing just 1 makes it work but won't benefit from the caching if you are calling reload a lot.

          Show
          sfryffdc Stephen Fry added a comment - I see two issues here. 1. The Mongo cache has an issue if you create a new one, call start and immediately ask for data. It can be null as the update thread may not have loaded the data yet. 2. The Plugin doesn't handle the case with a casc reload event. This seems to update the knowledge base data bound property, with a new instance that has not been started. UI updates handled through configure handle the knowledge base updates. Fixing just 1 makes it work but won't benefit from the caching if you are calling reload a lot.
          Hide
          t_westling Tomas Westling added a comment -

          Since we aren't using casc yet at my company, this won't be at the top of my priority list to fix.

          I see that you offered to submit a PR for it but retracted it, if you feel up for doing the bugfix please do, otherwise I will have to carve out some time

          for looking at bugfixes to various stuff in the plugin.

          Show
          t_westling Tomas Westling added a comment - Since we aren't using casc yet at my company, this won't be at the top of my priority list to fix. I see that you offered to submit a PR for it but retracted it, if you feel up for doing the bugfix please do, otherwise I will have to carve out some time for looking at bugfixes to various stuff in the plugin.
          Hide
          sfryffdc Stephen Fry added a comment -

          Yes, I will submit a PR. I just need to check this is OK with my boss.

          Show
          sfryffdc Stephen Fry added a comment - Yes, I will submit a PR. I just need to check this is OK with my boss.
          Hide
          sfryffdc Stephen Fry added a comment -

          Do you have an example build environment for this. I'm getting some test failures before I even start....

          I was using this Docker image to build on.
           
          maven:3.8.4-jdk-11-slim
           
          Any ideas what might be wrong?

          Show
          sfryffdc Stephen Fry added a comment - Do you have an example build environment for this. I'm getting some test failures before I even start.... I was using this Docker image to build on.   maven:3.8.4-jdk-11-slim   Any ideas what might be wrong?
          Hide
          sfryffdc Stephen Fry added a comment -

          maven:3.8.4-jdk-8 seems to get me building.

          Show
          sfryffdc Stephen Fry added a comment - maven:3.8.4-jdk-8 seems to get me building.

            People

            Assignee:
            t_westling Tomas Westling
            Reporter:
            sfryffdc Stephen Fry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: