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

Build status page displays incorrect run combinaison for matrix build with dynamic axis




      On the build status page of a matrix build configured with one or more dynamic axis, run combinaison are not shown properly (but on-disk saved data is correct). The page is not using dynamic axis values coming from the build but cached values from the latest build.

      For example, if all the values of a dynamic axis change between 2 builds, the build status page of the first build will show all run combinaison as "Not Run" because no combinaison with latest value of dynamic axis ever run.

      Problem comes from MatrixBuild.axes field which is a reference of MatrixProject.axes. For manually configured axis, it isn't a problem. When the user updates axis values in job configuration page, MatrixProject.axes field is replaced with a newly instanciated AxisList object holding new Axis objects. As DynamicAxis might hold different values for each build, MatrixBuild.axes should hold a dedicated instance for each build.

      When Jenkins restarts and configuration is loaded from disk, each build gets its own DynamicAxis instance with the right values.

      The only fix I can see is to deep clone MatrixBuild.axes in MatrixBuild.doRun(), but there's no way to do that easily.

      I tried to change the copy of MatrixProject.axes in MatrixBuild.doRun() here with

      axes = (AxisList) Jenkins.XSTREAM.fromXML(Jenkins.XSTREAM.toXML(p.getAxes()));

      It works, but it's clearly not acceptable.

      Any thought?


        Issue Links



              Unassigned Unassigned
              ydubreuil Yoann Dubreuil
              8 Vote for this issue
              12 Start watching this issue