Skip to content

Commit

Permalink
Fix: failed to create the record when rollbacking the application
Browse files Browse the repository at this point in the history
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
  • Loading branch information
barnettZQG committed Jan 30, 2023
1 parent f733d74 commit 57d85ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/apiserver/domain/service/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,10 @@ func (c *applicationServiceImpl) RollbackWithRevision(ctx context.Context, appli
if err != nil {
return nil, err
}
// The deploy version is the primary key of the revision
if rollbackApplication.Annotations[oam.AnnotationDeployVersion] == "" {
rollbackApplication.Annotations[oam.AnnotationDeployVersion] = publishVersion
}
record, err := c.WorkflowService.CreateWorkflowRecord(ctx, application, rollbackApplication, &work)
if err != nil {
return nil, fmt.Errorf("create workflow record failure %w", err)
Expand Down

0 comments on commit 57d85ec

Please sign in to comment.