-
Notifications
You must be signed in to change notification settings - Fork 183
Implement k8s multi cluster rollback #5765
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
Conversation
ed689d9
to
9751bd9
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5765 +/- ##
==========================================
+ Coverage 27.14% 27.23% +0.09%
==========================================
Files 506 506
Lines 53705 53788 +83
==========================================
+ Hits 14577 14651 +74
- Misses 38013 38022 +9
Partials 1115 1115 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9751bd9
to
9c68f91
Compare
}) | ||
} | ||
|
||
if err := eg.Wait(); err != nil { |
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.
[ASK] What if one rollback fails and others are still rolling back?
Cancel all of them? Or still continue rolback?
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.
Thank you for pointing that out!
The current implementation is cancelling all.
I forgot to implement to continue rollback. will do it.
BTW, I described that in the rfc 🙏
https://github.com/pipe-cd/pipecd/blob/master/docs/rfcs/0014-multi-cluster-deployment-for-k8s.md
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.
Fixed 362b45e
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.
Thanks, i understood here:
You can select the following behavior by setting the stage.
Rollback if any app fails
Rollback if all apps fail
aa52939
to
362b45e
Compare
// success at least one of the rollback succeed | ||
if result.status != sdk.StageStatusFailure { | ||
finalStatus = sdk.StageStatusSuccess | ||
} |
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.
[ASK] Which should we choose here? (I don't have a strong opinion)
- a. SUCCESS if at least one succeeds
- b. SUCCESS if all succeed
This is difficult... Any choice seems confusing, and I want a status like "Some Success / Some Failure" 😅
If at least one of the rollback processes succeeds, we consider the rollback successful. This ensures that the rollback is executed for other environments even if one of the deployment environments is inaccessible.
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.
We should choose a. SUCCESS if at least one succeeds to ensure rollback when one of the cluster has some trouble but want to rollback another cluster.
This is difficult... Any choice seems confusing, and I want a status like "Some Success / Some Failure" 😅
I know your point, but this spec is only for this plugin. 😇
I plan to add a log to show the each rollback status and the whole status Instead of adding status.
Signed-off-by: Yoshiki Fujikane <[email protected]>
Signed-off-by: Yoshiki Fujikane <[email protected]>
Signed-off-by: Yoshiki Fujikane <[email protected]>
Signed-off-by: Yoshiki Fujikane <[email protected]>
Signed-off-by: Yoshiki Fujikane <[email protected]>
Signed-off-by: Yoshiki Fujikane <[email protected]>
49611f8
to
fa2ebd6
Compare
Signed-off-by: Yoshiki Fujikane <[email protected]>
1d20bfb
to
9a2c241
Compare
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.
👍🏻
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.
👍
What this PR does:
I implemented the rollback stage for the k8s multicluster plugin.
Spec summary
RFC: https://github.com/pipe-cd/pipecd/blob/master/docs/rfcs/0014-multi-cluster-deployment-for-k8s.md
Why we need it:
We want to support the feature to deploy multi-cluster for k8s.
Which issue(s) this PR fixes:
Part of #5006
Does this PR introduce a user-facing change?: