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

workflow-basic-steps-plugin "waitUntil" should have a quiet mode

    Details

    • Similar Issues:
    • Released As:
      workflow-basic-steps 2.20

      Description

      My code looks like this :

       

      // setup a latch
      MAX_CONCURRENT = 4
      latch = new java.util.concurrent.LinkedBlockingDeque(MAX_CONCURRENT)
      // put a number of items into the queue to allow that number of branches to run
      for (int i=0;i<MAX_CONCURRENT;i++) {
          latch.offer("$i")
      }
      
      tests.each{ testName, jobDesc ->
          runnedTests.push(testName)
          stages[testName] = {
              def testSlot = null
              // this will not allow proceeding until there is something in the queue.
              waitUntil {
                  testSlot = latch.pollFirst();
                  return testSlot != null;
              }
              try {
                  stage("Test: " + testName) {
                      build job: jobDesc.test, parameters: params, propagate: true
                  }
              }
              finally {
                  latch.offer(testSlot)
              }
          }
      }
      parallel(stages) 

      To make it possible to run multiple stages in parallel, with a maximum of jobs runned.

       

      However, this means that I have an enormous amount of logs since the wait between the stages is approximately 20 to 30 minutes in average.

      I would like to have an option to remove the log completely since it gives no information in my usecase, and it "hides" the real useful logs.

       

      The log is done here : https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/5a406e8cdad581b93cffdfac5275c7a61a54d674/src/main/java/org/jenkinsci/plugins/workflow/steps/WaitForConditionStep.java#L126

      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      ...
      ...

        Attachments

          Activity

          Hide
          shaybc shay bc added a comment -

          can you please accept this merge,

          it is pretty annoying to see a print every 0.3 seconds,

          we all count on the console for everything,

          Show
          shaybc shay bc added a comment - can you please accept this merge, it is pretty annoying to see a print every 0.3 seconds, we all count on the console for everything,
          Hide
          tlacy Terry Lacy added a comment - - edited

          Seriously. The "Will try again after" output is obnoxious and pretty useless. If I really want to see what's happening in the logs I can put my own output in the waitUntil block.
          One of the reasons I switched from sleep loops was that I was hoping to avoid the output from the sleep command.

          Show
          tlacy Terry Lacy added a comment - - edited Seriously. The "Will try again after" output is obnoxious and pretty useless. If I really want to see what's happening in the logs I can put my own output in the waitUntil block. One of the reasons I switched from sleep loops was that I was hoping to avoid the output from the sleep command.
          Hide
          puetzk Kevin Puetz added a comment -

          Just to update the status here: https://github.com/jenkinsci/workflow-basic-steps-plugin/pull/100 is now merged (not by me, I just got notified by github and see the status isn't updated here)

          Show
          puetzk Kevin Puetz added a comment - Just to update the status here: https://github.com/jenkinsci/workflow-basic-steps-plugin/pull/100 is now merged (not by me, I just got notified by github and see the status isn't updated here)
          Hide
          dnusbaum Devin Nusbaum added a comment -

          A fix for this issue was just released in version 2.20 of Pipeline: Basic Steps Plugin. Thanks Bryan Jensen for adding the new option!

          Show
          dnusbaum Devin Nusbaum added a comment - A fix for this issue was just released in version 2.20 of Pipeline: Basic Steps Plugin . Thanks Bryan Jensen for adding the new option!

            People

            • Assignee:
              bawjensen Bryan Jensen
              Reporter:
              edi9999 edgar hipp
            • Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: