func updateTimeoutInAction(logger lager.Logger, action *models.Action) {
	if action == nil {
		logger.Debug("no-action-to-convert")
		return
	}

	a := action.GetValue()
	switch actionModel := a.(type) {
	case *models.RunAction, *models.DownloadAction, *models.UploadAction:
		return

	case *models.TimeoutAction:
		timeoutAction := actionModel
		timeoutAction.TimeoutMs = timeoutAction.DeprecatedTimeoutNs / 1000000

	case *models.EmitProgressAction:
		updateTimeoutInAction(logger, actionModel.Action)

	case *models.TryAction:
		updateTimeoutInAction(logger, actionModel.Action)

	case *models.ParallelAction:
		for _, subaction := range actionModel.Actions {
			updateTimeoutInAction(logger, subaction)
		}

	case *models.SerialAction:
		for _, subaction := range actionModel.Actions {
			updateTimeoutInAction(logger, subaction)
		}

	case *models.CodependentAction:
		for _, subaction := range actionModel.Actions {
			updateTimeoutInAction(logger, subaction)
		}
	}
}