Skip to content

Commit

Permalink
Add ability to force running rollback or not after cancelling (#615)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:

**Which issue(s) this PR fixes**:

Fixes #

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
-->
```release-note
NONE
```


This PR was merged by Kapetanios.
  • Loading branch information
nghialv authored Aug 13, 2020
1 parent b9e8314 commit b8acf05
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/app/api/api/web_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,9 @@ func (a *WebAPI) CancelDeployment(ctx context.Context, req *webservice.CancelDep
Type: model.Command_CANCEL_DEPLOYMENT,
Commander: claims.Subject,
CancelDeployment: &model.Command_CancelDeployment{
DeploymentId: req.DeploymentId,
WithoutRollback: req.WithoutRollback,
DeploymentId: req.DeploymentId,
//ForceRollback: req.ForceRollback,
//ForceNoRollback: req.ForceNoRollback,
},
}
if err := a.addCommand(ctx, &cmd); err != nil {
Expand Down
2 changes: 2 additions & 0 deletions pkg/app/api/service/webservice/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ message GetStageLogResponse {

message CancelDeploymentRequest {
string deployment_id = 1 [(validate.rules).string.min_len = 1];
//bool force_rollback = 2;
//bool force_no_rollback = 3;
bool without_rollback = 2;
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/model/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ message Command {

message CancelDeployment {
string deployment_id = 1 [(validate.rules).string.min_len = 1];
bool without_rollback = 2;
bool force_rollback = 2;
bool force_no_rollback = 3;
}

message ApproveStage {
Expand Down

0 comments on commit b8acf05

Please sign in to comment.