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

Building on an executor for Pipeline job is incorrect

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Minor Minor
    • metrics-plugin
    • Jenkins Enterprise

      The pipeline job report shows incorrect message "building on an executor" . Please see the attached file.

      Current status and reproducing the issue:
      -------------------------------------------------------
      Create a pipeline job with below simple script:

      echo "" + new java.util.Date()
      timeout(3) {
          node ('windows && linux') { // should no be satisfiable and will spend 3 minutes in the queue before the timeout
            abort "impossible"
          }
      }
      

      After running the pipeline job, it waits for the build to timeout. It should have spent at least 3 minutes (the initial queue time + 3 minutes waiting for a slave to match windows && linux) in the queue - rather than running.

      Look at the time reported by the job

      • 9 ms waiting in the queue;
        * 3 min 0 sec building on an executor;
      • 3 min 0 sec total from scheduled to completion.

      The report in not correct for 3 min 0 sec building on an executor; and it needs to change to 3 min 0 sec executing the pipeline because executing the pipleine != building on an executor

      Now I'm guessing someone will point out that whilst it was waiting for a node it was actually running the CPS thread so it was running - but that is really just an implementation detail and not what users expect to see.

      Now the interesting part would come with steps in parallel

      • should it sum up all time spent waiting for all nodes, and the build time is that a sum of the build time on all slaves - such that a build could have finished in 10 minutes but report 20 minutes waiting in the queue and 45 minutes building on an executor...

      I think the reporting here needs to be changed to be pipeline specific at least so it says:

      * 9 ms initially waiting in the queue; 
      * 3 min 0 sec executing the pipeline;      < executing the pipleine != building on an executor)
      * 3 min 0 sec total from scheduled to completion.
      

            Unassigned Unassigned
            bsanaei Bahram Sanaei
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: