[JIRA] (JENKINS-59776) workflow-basic-steps-plugin "waitUntil" should have a quiet mode

14 views
Skip to first unread message

80ovshze6sus@opayq.com (JIRA)

unread,
Oct 14, 2019, 7:53:03 AM10/14/19
to jenkinsc...@googlegroups.com
edgar hipp created an issue
 
Jenkins / Improvement JENKINS-59776
workflow-basic-steps-plugin "waitUntil" should have a quiet mode
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: workflow-basic-steps-plugin
Created: 2019-10-14 11:52
Priority: Minor Minor
Reporter: edgar hipp

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
...
...
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

shay.groups@gmail.com (JIRA)

unread,
Nov 27, 2019, 8:27:03 PM11/27/19
to jenkinsc...@googlegroups.com
shay bc commented on Improvement JENKINS-59776
 
Re: workflow-basic-steps-plugin "waitUntil" should have a quiet mode

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,

7h6v4r4fa4@snkmail.com (JIRA)

unread,
Feb 12, 2020, 9:43:03 AM2/12/20
to jenkinsc...@googlegroups.com

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.

7h6v4r4fa4@snkmail.com (JIRA)

unread,
Feb 12, 2020, 9:44:13 AM2/12/20
to jenkinsc...@googlegroups.com
Terry Lacy edited a comment on Improvement JENKINS-59776
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.

puetzk@puetzk.org (JIRA)

unread,
Mar 11, 2020, 1:26:03 PM3/11/20
to jenkinsc...@googlegroups.com

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)

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

dnusbaum@cloudbees.com (JIRA)

unread,
Apr 20, 2020, 5:04:03 PM4/20/20
to jenkinsc...@googlegroups.com
Devin Nusbaum resolved as Fixed
 

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!

Change By: Devin Nusbaum
Status: Open Resolved
Assignee: Bryan Jensen
Resolution: Fixed
Released As: workflow-basic-steps 2.20
Reply all
Reply to author
Forward
0 new messages