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

Fail-fast Matrix builds, as soon some configuration fail

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • matrix-project-plugin
    • None

      If my latest matrix build was successful, during my next execution, the overall project status is the same as the latest build status until the entire build is done.
      I was checking the sources and noted the "problem" is the hudson.matrix.DefaultMatrixExecutionStrategyImpl.waitForCompletion(MatrixBuildExecution, MatrixConfiguration) method that blocks until the configuration is done, inside a loop over all configurations.
      Maybe if this method do a "checkForCompletion" and update the build status for every configurations that finishes (I know it's not a trivial solution), we could have a fail-fast solution for matrix projects.

          [JENKINS-24020] Fail-fast Matrix builds, as soon some configuration fail

          ikedam added a comment -

          How about aborting other child builds when a child build fails?

          ikedam added a comment - How about aborting other child builds when a child build fails?

          My boss give me the same idea. My point is this must be an opt-in feature, because I want to know all failures (to map my correction actions). But allowing the build stop after the first failure should be very useful in some scenarios.

          Bruno Meneguello added a comment - My boss give me the same idea. My point is this must be an opt-in feature, because I want to know all failures (to map my correction actions). But allowing the build stop after the first failure should be very useful in some scenarios.

          ikedam added a comment -

          I got what you want. Let's find a good approach to get the failure result in advance but leave the build running.

          What do you exactly mean with "the overall project status"?
          If you mean ball icons of projects, you can change its behavior by overriding MatrixBuild#getIconColor.
          The current behavior is defined in Run#getIconColor. It uses an animating icon of the result of the last completed build if the current build is running.
          How about using an animating failure icon if the current build is running but a child build have failed?

          ikedam added a comment - I got what you want. Let's find a good approach to get the failure result in advance but leave the build running. What do you exactly mean with "the overall project status"? If you mean ball icons of projects, you can change its behavior by overriding MatrixBuild#getIconColor . The current behavior is defined in Run#getIconColor . It uses an animating icon of the result of the last completed build if the current build is running. How about using an animating failure icon if the current build is running but a child build have failed?

            kohsuke Kohsuke Kawaguchi
            bkmeneguello Bruno Meneguello
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: