Checkpoint analyze artifacts incrementally
This commit is contained in:
@@ -143,6 +143,9 @@ func (analyzeStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (*S
|
||||
}
|
||||
|
||||
state := newAnalyzeExecutionState(execution, workPlan, reconciliation)
|
||||
if err := state.checkpointStartingCollection(ctx); err != nil {
|
||||
return nil, fmt.Errorf("analyze: checkpoint reconciled artifact collection before execution: %w", err)
|
||||
}
|
||||
|
||||
for _, item := range workPlan.ExecutionOrder {
|
||||
artifactCfg := env.Config.Pipeline.Scriptorium.Artifacts[item.Key]
|
||||
@@ -160,7 +163,7 @@ func (analyzeStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (*S
|
||||
if err != nil {
|
||||
return state.failedResult(item, artifactCfg, fingerprint, err), err
|
||||
}
|
||||
if err := state.acceptArtifact(plan, fingerprint, artifactResult); err != nil {
|
||||
if err := state.acceptArtifact(ctx, plan, fingerprint, artifactResult); err != nil {
|
||||
return state.failedResult(item, artifactCfg, fingerprint, err), err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user