[JIRA] (JENKINS-59678) Add a time delay capability to the retry basic step

5 views
Skip to first unread message

krotte1@yahoo.com (JIRA)

unread,
Oct 5, 2019, 4:30:02 PM10/5/19
to jenkinsc...@googlegroups.com
Kyle Rotte created an issue
 
Jenkins / Improvement JENKINS-59678
Add a time delay capability to the retry basic step
Issue Type: Improvement Improvement
Assignee: Kyle Rotte
Components: workflow-basic-steps-plugin
Created: 2019-10-05 20:29
Priority: Major Major
Reporter: Kyle Rotte

@dnusbaum suggested creating this ticket for an enhancement I am proposing to the retry basic step.

The retry step is a great utility step, but adding the ability to add a time delay between retries would be great. It can be as basic as adding a fixed time delay as a property to the step or an extensible option that allows you to use different algorithms for the time delay (Fixed, incremental, exponential, random, random exponential.

A pull request for the basic fixed implementation has already been created at https://github.com/jenkinsci/workflow-basic-steps-plugin/pull/97. This allows the user to do something like

 

retry(count: 3, useRetryDelay: true, delay: 40, units: "SECONDS").

If the more advanced implementation is desired, it has also been implemented (and can be added to the pull request. @basil suggested modeling the extensible solution of other existing APIs that do something like this and proposed looking at Tenacity. The algorithms currently implemented are fixed, random, incremental, exponential, random Exponential. This would allow the user to do something like:

 

 

retry(count: 3, useRetryDelay: true, delay: incremental(increment: 2, max: 10, min: 1, unit: 'SECONDS'))

All of this while still remaining backwards compatible and supporting something as simple as:

 

 

retry(3)

 

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

krotte1@yahoo.com (JIRA)

unread,
Oct 5, 2019, 6:19:02 PM10/5/19
to jenkinsc...@googlegroups.com
Kyle Rotte updated an issue
Change By: Kyle Rotte
@dnusbaum suggested creating this ticket for an enhancement I am proposing to the retry basic step.

The retry step is a great utility step, but adding the ability to add a time delay between retries would be great. It can be as basic as adding a fixed time delay as a property to the step or an extensible option that allows you to use different algorithms for the time delay (Fixed, incremental, exponential, random, random exponential.



A pull request for the basic fixed implementation has already been created at [https://github.com/jenkinsci/workflow-basic-steps-plugin/pull/97.] This allows the user to do something like

 
{code:java}

retry(count: 3, useRetryDelay: true, delay: 40, units: "SECONDS").
{code}
If the more advanced implementation is desired, it has also been implemented (and can be added to the pull request. @basil suggested modeling the extensible solution of other existing APIs that do something like this and proposed looking at [Tenacity|https://tenacity.readthedocs.io/en/latest/#waiting-before-retrying]. The algorithms currently implemented are fixed, random, incremental, exponential, random Exponential. This would allow the user to do something like:


 

 
{code:java}

retry(count: 3, useRetryDelay: true, delay: incremental(increment: 2, max: 10, min: 1, unit: 'SECONDS'))
{code}

All of this while still remaining backwards compatible and supporting something as simple as:


 

 
{code:java}
retry(3)
{code}
 

 

 

dnusbaum@cloudbees.com (JIRA)

unread,
Oct 7, 2019, 9:21:03 AM10/7/19
to jenkinsc...@googlegroups.com
Devin Nusbaum updated an issue
Change By: Devin Nusbaum
@ [~ dnusbaum ] suggested creating this ticket for an enhancement I am proposing to the retry basic step.
Reply all
Reply to author
Forward
0 new messages