<#6824 [Feat] Refactor and finalize Run service> I...
# flyte-github
a
#6824 [Feat] Refactor and finalize Run service Issue created by machichima ## Description There are few tasks left in run service: 1. Some function pass protobuf request directly to the repository. This violates separation of concerns and creates a dependency from the repository layer to the API layer. We should refactor this to follow how we did in
task_service
flyte/runs/service/run_service.go Line 53 in</flyteorg/flyte/commit/5c20324bf44a22c12deee974fbaa0b984f4e0b51|5c20324> | run, err := s.repo.ActionRepo().CreateRun(ctx, req.Msg) | | ------------------------------------------------------- | flyte/runs/service/task_service.go Line 66 in</flyteorg/flyte/commit/5c20324bf44a22c12deee974fbaa0b984f4e0b51|5c20324> | err = s.db.TaskRepo().CreateTask(ctx, taskModel) | | ------------------------------------------------ | 1. There's some TODOs left that we need to build the response from the run model flyte/runs/service/run_service.go Lines 163 to 169 in</flyteorg/flyte/commit/5c20324bf44a22c12deee974fbaa0b984f4e0b51|5c20324> | // TODO: Build full RunDetails from the run model | | ------------------------------------------------- | | // For now, return a minimal response | | resp := &workflow.GetRunDetailsResponse{ | | Details: &workflow.RunDetails{ | | // Would populate this from run model | | }, | | } | Can also follow what we have in task service flyte/runs/service/task_service.go Line 82 in</flyteorg/flyte/commit/5c20324bf44a22c12deee974fbaa0b984f4e0b51|5c20324> | tasks, err := transformers.TaskModelsToTaskDetailsWithoutIdentity(ctx, []*models.Task{model}) | | --------------------------------------------------------------------------------------------- | flyteorg/flyte