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

Add getSupersededBuilds method to hudson.model.Run

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None

      Batching changes via the milestone/lock is really useful to maximize resource usage. In that model, testing is done in incrementally larger batches, the rationale being that later stages will run tests that are less critical. However, if a test fails, bisecting needs to be done in all the changes included in the batch to find the culprit. 

      Currently, there is no easy way to find all the builds that are batched via a milestone/lock construct. It is possible to iterate through the builds (currentBuild.getPreviousBuilds()), then call build.getActions(InterruptedBuildAction.class) to get the reason why a build was aborted, but that is brittle. For starters, the info needs to be parsed from cause.getShortDescription(). Also, it's needed to go back in history (skipping successful builds) to construct the list of all builds that were batched.

      After going down this path, it started to seem like there should be a new method on the hudson.model.Run class. The class already have several methods to get previous builds, using different heuristics. The idea would be to add a new one, called getSupersededBuilds or something among those lines.

            Unassigned Unassigned
            adelcast Alejandro del Castillo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: