Hanging build detection criteria at a plan level via specs allows 0 or negative values

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 12.0.0
    • Affects Version/s: 9.6.0
    • Component/s: Bamboo Specs
    • 1
    • Severity 3 - Minor
    • 0

      Issue Summary

      There is an option to override the Hanging build detection criteria (Build time multiplier, Log quiet time, and Build queue timeout) at a plan level. When configuring from UI, there is a validation in place to allow only numbers greater than 0. But when plans are created using Bamboo specs, 0 and negative values are allowed for these configurations. Due to this, builds may get incorrectly killed by BuildHangingMonitor.

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      • Create a Bamboo Specs using Java as below:
         public Plan plan2() {
             final Plan plan = new Plan(new Project()
                     .key(new BambooKey("BAM"))
                     .name("BAM")
                     .description("BAM"),
                     "PLAN2",
                     new BambooKey("PLAN2"))
                 .description("Plan2 Specs Plan")
                 .pluginConfigurations(new ConcurrentBuilds())
                 .stages(new Stage("Default Stage")
                     .jobs(new Job("Default Job",
                             new BambooKey("JOB1"))
                         .pluginConfigurations(new AllOtherPluginsConfiguration()
                             .configuration(new MapBuilder()
                                 .put("custom", new MapBuilder()
                                     .put("buildHangingConfig", new MapBuilder()
                                         .put("minutesBetweenLogs", "0")
                                         .put("minutesQueueTimeout", "0")
                                         .put("multiplier", "0")
                                         .put("enabled", "true")
                                         .build())
                                     .put("ncover.path", "")
                                     .put("clover.path", "")
                                     .build())
                                 .build()))
                         .tasks(new ScriptTask()
                             .inlineBody("echo 'Test'"))))
                 .planBranchManagement(new PlanBranchManagement()
                     .delete(new BranchCleanup())
                     .notificationForCommitters());
             return plan;
         }
      • Publish the plan either using Maven Publish or by using the linked repositary.

      Expected Results

      The Specs scan should fail, reporting that values that are equal to 0 or negative are not allowed for the Hanging build detection criteria (Build time multiplier, Log quiet time, and Build queue timeout) properties, just like in the UI.

      Actual Results

      The Specs scan is completed successfully and the Plan is set with 0 or negative values for Hanging build detection criteria (Build time multiplier, Log quiet time, and Build queue timeout)

      Workaround

      In the Bamboo Specs code, don't use 0 or negative values for the Hanging build detection criteria (Build time multiplier, Log quiet time, and Build queue timeout).

            Assignee:
            Yusif Pasha-zada
            Reporter:
            Venkata Sateesh Pentela
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: