Create run workspaces only when needed
This commit is contained in:
@@ -28,6 +28,8 @@ type cleanupSemanticConfig struct {
|
||||
|
||||
func (cleanupStage) Name() string { return "cleanup" }
|
||||
|
||||
func (cleanupStage) RequiresRunWorkspace() bool { return false }
|
||||
|
||||
func (cleanupStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (*StageResult, error) {
|
||||
plan, err := buildCleanupPlan(env, m)
|
||||
if err != nil {
|
||||
|
||||
@@ -43,6 +43,12 @@ type Stage interface {
|
||||
Run(ctx context.Context, env *Env, m *manifest.Manifest) (*StageResult, error)
|
||||
}
|
||||
|
||||
// RunWorkspacePolicy lets a stage declare whether it requires the current
|
||||
// invocation's run directory. Stages require it by default.
|
||||
type RunWorkspacePolicy interface {
|
||||
RequiresRunWorkspace() bool
|
||||
}
|
||||
|
||||
const maxResumeReasonLength = 512
|
||||
|
||||
// ResumeValidation reports whether a previously succeeded stage can be reused.
|
||||
|
||||
Reference in New Issue
Block a user