Skip to content

[Feat] Refactor and finalize Run service #6824

@machichima

Description

@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

run, err := s.repo.ActionRepo().CreateRun(ctx, req.Msg)

err = s.db.TaskRepo().CreateTask(ctx, taskModel)

  1. There's some TODOs left that we need to build the response from the run model

// 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

tasks, err := transformers.TaskModelsToTaskDetailsWithoutIdentity(ctx, []*models.Task{model})

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions