Skip to content

Commit

Permalink
return COMMAND_STATUS_FAILURE
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-breen committed Sep 13, 2024
1 parent 97c153b commit f6df19f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/file/file_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,25 +205,25 @@ func (fp *FilePlugin) handleConfigApplyRequest(ctx context.Context, msg *bus.Mes
ctx,
configApplyRequest.GetOverview().GetConfigVersion().GetInstanceId(),
)

if rollbackErr != nil {
rollbackResponse := fp.createDataPlaneResponse(
correlationID,
mpi.CommandResponse_COMMAND_STATUS_ERROR,
"Rollback failed",
mpi.CommandResponse_COMMAND_STATUS_FAILURE,
"Config apply failed, rollback failed",
configApplyRequest.GetOverview().GetConfigVersion().GetInstanceId(),
rollbackErr.Error())

fp.messagePipe.Process(ctx, &bus.Message{Topic: bus.DataPlaneResponseTopic, Data: rollbackResponse})
fp.fileManagerService.ClearCache()

return
}

response = fp.createDataPlaneResponse(
correlationID,
mpi.CommandResponse_COMMAND_STATUS_FAILURE,
"Rollback failed",
"Config apply failed, rollback success",
configApplyRequest.GetOverview().GetConfigVersion().GetInstanceId(),
err.Error())

fp.messagePipe.Process(ctx, &bus.Message{Topic: bus.DataPlaneResponseTopic, Data: response})
fp.fileManagerService.ClearCache()

Expand Down

0 comments on commit f6df19f

Please sign in to comment.