code: func (s *ReleaseServer) RollbackRelease(c ctx.Context, req *services.RollbackReleaseRequest) (*services.RollbackReleaseResponse, error) {
  	s.Log("preparing rollback of %s", req.Name)
  	currentRelease, targetRelease, err := s.prepareRollback(req)
  	if err != nil {
  		return nil, err
  	}
  
  	if !req.DryRun {
  		s.Log("creating rolled back release for %s", req.Name)
  		if err := s.env.Releases.Create(targetRelease); err != nil {
  			return nil, err
  		}
  	}
  	s.Log("performing rollback of %s", req.Name)
  	res, err := s.performRollback(currentRelease, targetRelease, req)
  	if err != nil {
  		return res, err
  	}
  
  	if !req.DryRun {
  		s.Log("updating status for rolled back release for %s", req.Name)
  		if err := s.env.Releases.Update(targetRelease); err != nil {
  			return res, err
  		}
  	}
  
  	return res, nil
  }
docs: // RollbackRelease rolls back to a previous version of the given release.