Propagate cancellation and preserve resumable state
This commit is contained in:
@@ -37,6 +37,9 @@ type invocationRuntime struct {
|
||||
}
|
||||
|
||||
func prepareInvocation(ctx context.Context, cfg *config.Config, plan BoundedPlan, opts RunOptions, dependencies invocationDependencies) (*invocationRuntime, error) {
|
||||
if err := ctx.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var prerequisiteStore manifest.Store
|
||||
if opts.Env != nil {
|
||||
prerequisiteStore = opts.Env.ManifestStore
|
||||
@@ -125,6 +128,9 @@ func prepareInvocation(ctx context.Context, cfg *config.Config, plan BoundedPlan
|
||||
}
|
||||
|
||||
func prepareInvocationLayout(runtime *invocationRuntime) error {
|
||||
if err := runtime.ctx.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
paths, err := runtime.artifactStore.EnsureLayoutFor(runtime.identity.Campaign, runtime.identity.SessionID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("prepare workdir: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user