Propagate cancellation and preserve resumable state
This commit is contained in:
@@ -46,6 +46,9 @@ type analyzeExecutionContext struct {
|
||||
}
|
||||
|
||||
func (analyzeStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (*StageResult, error) {
|
||||
if err := ctx.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if env == nil || env.Config == nil {
|
||||
return nil, fmt.Errorf("analyze: stage environment config is required")
|
||||
}
|
||||
@@ -138,6 +141,9 @@ func (analyzeStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (*S
|
||||
}
|
||||
|
||||
for _, item := range workPlan.ExecutionOrder {
|
||||
if err := ctx.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
artifactCfg := env.Config.ConcreteArtifacts()[item.Key]
|
||||
fingerprint, _, _, err := computeAnalyzeArtifactFingerprint(
|
||||
item.Key,
|
||||
|
||||
Reference in New Issue
Block a user