-
Notifications
You must be signed in to change notification settings - Fork 162
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: allow configuration of retry attempts for Promotion steps #2940
Conversation
✅ Deploy Preview for docs-kargo-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
16407fe
to
a98bbd1
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2940 +/- ##
==========================================
+ Coverage 51.04% 51.27% +0.23%
==========================================
Files 280 282 +2
Lines 25380 25465 +85
==========================================
+ Hits 12955 13057 +102
+ Misses 11719 11707 -12
+ Partials 706 701 -5 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
174f60a
to
482226b
Compare
1d9a82a
to
c6aa00f
Compare
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
c6aa00f
to
f8c4a5b
Compare
api/v1alpha1/promotion_types.go
Outdated
// PromotionRetry describes the retry policy for a PromotionStep. | ||
type PromotionRetry struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given #2972, I wonder if we should name this PromotionStepRetry
or even PromotionStepRetryPolicy
as I think we will probably also end up with Promotion-level retry policies in addition to step-level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed it to PromotionStepRetry
to reserve the policy version for e.g. some enum that describes how it should be retried.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 This is awesome!
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
…ty#2940) Signed-off-by: Hidde Beydals <hidde@hhh.computer>
We have discovered some edge cases in which a Promotion step may end up in an infinite loop. To remediate this, we can configure the number of (retry) attempts a step is allowed to make before bailing.
This could later be extended to a waiting (or polling) configuration for steps like
git-wait-for-pr
, to e.g., set a deadline for merging a pull request.With this pull request, any step execution (no matter the outcome) is counted as an "attempt", while the
wait-for-pr
andargocd-update
steps have been allowed an unlimited number of retries (by default) to achieve backwards compatible behavior.Note: In the future, we probably want to introduce more rigorous handling of errors, to be able to distinguish "fatal" errors from transient ones.