Skip to content

feat(queue): provide a way for pipeline stages to specify a backoff period (#4841)#24

Merged
christosarvanitis merged 1 commit intorelease-1.36.xfrom
cherry-pick-1.37.x-backoffConfg
Aug 6, 2025
Merged

feat(queue): provide a way for pipeline stages to specify a backoff period (#4841)#24
christosarvanitis merged 1 commit intorelease-1.36.xfrom
cherry-pick-1.37.x-backoffConfg

Conversation

@christosarvanitis
Copy link
Member

  • feat(queue): provide a way for pipeline stages to specify a backoff period

via a new backoffPeriodMs stage configuration property. Before this, pipeline authors had no control over the backoff period. It came from either spinnaker configuration properties or implementations of RetryableTask.getDynamicBackoffPeriod.

This makes it possible for pipeline authors to, for example, control the delay between attempts when webhook stages retry. The actual backoff used is the largest of:

  • backoffPeriodMs in the stage
  • tasks.global.backOffPeriod
  • tasks..backOffPeriod
  • tasks...backOffPeriod
  • refactor(core): remove duplication in StageExecutionImpl

since getTimeout and getBackoffPeriod were basically the same.

  • refactor(core): simplify StageExecutionImpl.getLongFromContext

since Integer, Long and Double all extend from Number. Also, Optional.map isn't necessary since instanceof returns false when value is null.

  • docs(queue): update javadoc for RetryableTask.retryableBackOffPeriod

to mention backoffPeriodMs stage property

We prefer small, well tested pull requests.

Please refer to Contributing to Spinnaker.

When filling out a pull request, please consider the following:

  • Follow the commit message conventions found here.
  • Provide a descriptive summary for your changes.
  • If it fixes a bug or resolves a feature request, be sure to link to that issue.
  • Add inline code comments to changes that might not be obvious.
  • Squash your commits as you keep adding changes.
  • Add a comment to @spinnaker/reviewers for review if your issue has been outstanding for more than 3 days.

Note that we are unlikely to accept pull requests that add features without prior discussion. The best way to propose a feature is to open an issue first and discuss your ideas there before implementing them.

…eriod (spinnaker#4841)

* feat(queue): provide a way for pipeline stages to specify a backoff period

via a new backoffPeriodMs stage configuration property.  Before this, pipeline authors had
no control over the backoff period.  It came from either spinnaker configuration properties or
implementations of RetryableTask.getDynamicBackoffPeriod.

This makes it possible for pipeline authors to, for example, control the delay between
attempts when webhook stages retry.  The actual backoff used is the largest of:

- backoffPeriodMs in the stage
- tasks.global.backOffPeriod
- tasks.<cloud provider>.backOffPeriod
- tasks.<cloud provider>.<account name>.backOffPeriod

* refactor(core): remove duplication in StageExecutionImpl

since getTimeout and getBackoffPeriod were basically the same.

* refactor(core): simplify StageExecutionImpl.getLongFromContext

since Integer, Long and Double all extend from Number.  Also, Optional.map isn't necessary
since instanceof returns false when value is null.

* docs(queue): update javadoc for RetryableTask.retryableBackOffPeriod

to mention backoffPeriodMs stage property
@christosarvanitis christosarvanitis merged commit 88e90cc into release-1.36.x Aug 6, 2025
2 of 3 checks passed
@mrusan mrusan deleted the cherry-pick-1.37.x-backoffConfg branch February 6, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants