Skip to content

Commit

Permalink
Removed unnecessary validation check on timestamp returned from CNS API
Browse files Browse the repository at this point in the history
  • Loading branch information
lintongj committed Jul 22, 2021
1 parent 7855306 commit bb2cb3c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/csi/service/vanilla/controller.go
Expand Up @@ -1197,12 +1197,7 @@ func (c *controller) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshot
return nil, logger.LogNewErrorCodef(log, codes.Internal,
"failed to create snapshot on volume %q: %v", volumeID, err)
}

snapshotCreateTimeInProto := timestamppb.New(*snapshotCreateTimePtr)
if err := snapshotCreateTimeInProto.CheckValid(); err != nil {
return nil, logger.LogNewErrorCodef(log, codes.Internal,
"failed to convert creation timestamp to proto format: %v", err)
}

createSnapshotResponse := &csi.CreateSnapshotResponse{
Snapshot: &csi.Snapshot{
Expand Down

0 comments on commit bb2cb3c

Please sign in to comment.