-
Notifications
You must be signed in to change notification settings - Fork 167
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(promo): support long-lived promotions and improve reactiveness #1038
Conversation
✅ Deploy Preview for docs-kargo-akuity-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
b3f37e4
to
1176066
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1038 +/- ##
==========================================
+ Coverage 51.41% 51.83% +0.41%
==========================================
Files 104 106 +2
Lines 7680 7802 +122
==========================================
+ Hits 3949 4044 +95
- Misses 3586 3612 +26
- Partials 145 146 +1
☔ View full report in Codecov by Sentry. |
2bc95bd
to
4c1aeee
Compare
a781a5b
to
f370a6f
Compare
Super excited for this! Reviewing is my top priority on Monday! |
|
||
// If we get here, the Stage does not have any Promotions Running against it. | ||
// Now check if it this promo is the one that should run next. | ||
first := pq.Peek() |
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.
I really like this approach and wish I'd thought of it from the start.
@jessesuen with only a few non-blocking nits, this all looks good to me. Want to make sure that I properly understand that the extent of the "long-running" promotion support here is that running promotions can be re-reconciled, whereas they were not before. That doesn't do much for us at the moment, but opens some doors. Have I got that right? |
You have it exactly right. All of our promo mechanisms happen synchronously so it doesn't really help, yet. In the future, a call to The next PR may need to add concepts like Resume() to the promo interface, so that a promo that has already started, might do a different piece of work (e.g. check on the status of pull request) for the 2nd reconcile vs. the first reconcile (create the pull request). |
2f89d34
to
b0df0a8
Compare
Signed-off-by: Jesse Suen <jesse@akuity.io>
aaafba7
to
939e02f
Compare
Signed-off-by: Jesse Suen <jesse@akuity.io>
939e02f
to
9b886f1
Compare
This change refactors the promo controller to support long lived promotions as well as make it more reactive to completions of other promos on the stage.
Changes:
The following video shows 20 promotions getting created via a bash command, and then the promo reconciler working through them one by one, from earliest to latest:
Screen.Recording.2023-10-26.at.6.46.24.PM.mov
Ignore the fact that they error, that is expected.