feat: ProjectConfig API spec and ctx variable for automated rollbacks#6221
Conversation
✅ Deploy Preview for docs-kargo-io ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6221 +/- ##
=======================================
Coverage 58.05% 58.05%
=======================================
Files 499 499
Lines 41743 41748 +5
=======================================
+ Hits 24235 24238 +3
- Misses 16048 16050 +2
Partials 1460 1460 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Does it mean that the full spec would look like this? |
thomastaylor312
left a comment
There was a problem hiding this comment.
Two small, minor changes needed. Otherwise LGTM
| State: State(promo.Status.GetState()), | ||
| Vars: promo.Spec.Vars, | ||
| Rollback: promo.Annotations[kargoapi.AnnotationKeyRollback] == | ||
| kargoapi.AnnotationValueTrue, |
There was a problem hiding this comment.
Shouldn't this be false by default unless set via something like a context option?
There was a problem hiding this comment.
Yes, it will be false by default. It would only be true if someone/something set the kargo.akuity.io/rollback annotation to be true.
We are building the context object here, determining whether the Promotion is a rollback based on the annotation, which will be set by rollback controller upon rollback.
There was a problem hiding this comment.
I completely misread this on my first pass. This is just fine
418a790 to
8adf437
Compare
Correct. |
Signed-off-by: Jesse Suen <jesse@akuity.io>
8adf437 to
2c82d0f
Compare
Introduces the API spec for automated rollbacks in
ProjectConfigCRD, enabled like the following:New
AutoRollbackConfigtype:New
kargo.akuity.io/rollbackannotation:Rollback context propagated through the promotion engine (
ctx.meta.promotion.rollback):