Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add advanced retry policy #74

Merged
merged 2 commits into from
Sep 12, 2024
Merged

feat: add advanced retry policy #74

merged 2 commits into from
Sep 12, 2024

Conversation

Apollorion
Copy link
Member

@Apollorion Apollorion commented Sep 11, 2024

Description of the change

This adds an "advanced retry policy" that will allow users to configure a retry policy that retries more than once.

Users can set the max_retries default to the absolute maximum the policy will allow. By default, the policy will retry up to max_retries but users can also set the spacelift_retry:<number> label on a stack and it will then retry up to that number or up to the policies max_retries whichever is less.

If the run succeeds, it does not retry:
success

If the tracked run fails, it retries 3 times by default:
defaults

If the stack has the spacelift_retry:2 label on it, it will only retry twice:
labels

Checklist

Please make sure that the proposed change checks all the boxes below before requesting a review:

  • Each new policy has corresponding tests.
  • All the tests pass.
  • The pull request is opened against the main branch.
  • The pull request is no longer marked as a draft.
  • You agree to license your contribution under the MIT license to Spacelift (not required for Spacelift employees).

If the proposed change is ready to be merged, please request a review from @spacelift-io/solutions-engineering. Someone will review and merge the pull request.

Spacelift employees should request reviews from the relevant engineers and are allowed to merge pull requests after they got at least one approval.

Thank you for your contribution! 🙇

@Apollorion Apollorion force-pushed the retry-policy branch 4 times, most recently from 877109d to 185dcd8 Compare September 11, 2024 23:43
@Apollorion Apollorion requested a review from a team September 11, 2024 23:49
@Apollorion Apollorion force-pushed the retry-policy branch 2 times, most recently from 5adc07b to 3ce7a81 Compare September 11, 2024 23:58
michieldewilde
michieldewilde previously approved these changes Sep 12, 2024
trigger/advanced-automated-retries.yml Outdated Show resolved Hide resolved
trigger/advanced-automated-retries.yml Outdated Show resolved Hide resolved
@Apollorion Apollorion merged commit 4d58d40 into main Sep 12, 2024
3 checks passed
@Apollorion Apollorion deleted the retry-policy branch September 12, 2024 15:16
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