[ECS-Plugin] Implement ECS_ROLLBACK stage#6573
Open
armistcxy wants to merge 2 commits intopipe-cd:masterfrom
Open
[ECS-Plugin] Implement ECS_ROLLBACK stage#6573armistcxy wants to merge 2 commits intopipe-cd:masterfrom
armistcxy wants to merge 2 commits intopipe-cd:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6573 +/- ##
===========================================
+ Coverage 28.86% 46.37% +17.51%
===========================================
Files 560 67 -493
Lines 59971 6866 -53105
===========================================
- Hits 17309 3184 -14125
+ Misses 41339 3433 -37906
+ Partials 1323 249 -1074 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
30b7a89 to
ab2f886
Compare
Signed-off-by: Hoang Ngo <adlehoang118@gmail.com>
Signed-off-by: Hoang Ngo <adlehoang118@gmail.com>
ab2f886 to
2520b46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does: Implementing Rollback stage
sequenceDiagram participant Plugin as ECSRollbackStage participant Provider as ECS Client participant ECS as AWS ECS Plugin->>Plugin: Read runningDeploymentSource alt First deployment (no commit hash) Plugin->>Plugin: Log error Plugin-->>Plugin: StageStatusFailure else Commit hash exists Plugin->>Plugin: Load AppConfig Plugin->>Provider: Create ECS client end Plugin->>Plugin: Load TaskDefinition alt Standalone task mode Plugin->>Plugin: Skip rollback (no ECS service) Plugin-->>Plugin: StageStatusSuccess else Service mode Plugin->>Plugin: Load ServiceDefinition end Plugin->>Provider: RegisterTaskDefinition Provider->>ECS: RegisterTaskDefinition ECS-->>Provider: TaskDefinition Plugin->>Provider: ApplyServiceDefinition Provider->>ECS: Create/Update Service ECS-->>Provider: Service Plugin->>Provider: GetServiceTaskSets Provider->>ECS: DescribeTaskSets ECS-->>Provider: Existing TaskSets Plugin->>Provider: CreateTaskSet (100% scale) Provider->>ECS: CreateTaskSet ECS-->>Provider: New TaskSet Plugin->>Provider: Promote TaskSet to PRIMARY Provider->>ECS: UpdateServicePrimaryTaskSet loop previous tasksets Plugin->>Provider: DeleteTaskSet Provider->>ECS: DeleteTaskSet end Plugin-->>Plugin: StageStatusSuccessWait until #6559 merged to rebase since this branch is inherited from ecs_sync branch
Why we need it: Rollback ECS to previous commit in case of failing to sync with newest commit
Which issue(s) this PR fixes: Part of #6443
This PR has not dealt with ELB Traffic Routing Rollback yet, this work will be performed later when additional PR when Implementing traffic shifting stage
Fixes #
Does this PR introduce a user-facing change?: