( ctx context.Context, record Task, )
| 1112 | } |
| 1113 | |
| 1114 | func (m *Service) loadTaskRuntimeState( |
| 1115 | ctx context.Context, |
| 1116 | record Task, |
| 1117 | ) ([]Run, Status, error) { |
| 1118 | runs, err := m.store.ListTaskRuns(ctx, RunQuery{TaskID: record.ID}) |
| 1119 | if err != nil { |
| 1120 | return nil, "", err |
| 1121 | } |
| 1122 | dependencies, err := m.store.ListDependencies(ctx, record.ID) |
| 1123 | if err != nil { |
| 1124 | return nil, "", err |
| 1125 | } |
| 1126 | status, err := m.canonicalTaskStatus(ctx, record, dependencies, runs) |
| 1127 | if err != nil { |
| 1128 | return nil, "", err |
| 1129 | } |
| 1130 | return runs, status, nil |
| 1131 | } |
| 1132 | |
| 1133 | func cancellationPropagationRoot(rootTaskID string, idx int) string { |
| 1134 | if idx == 0 { |
no test coverage detected