Preserve partial run results and terminal failure causes
This commit is contained in:
@@ -28,6 +28,8 @@ type invocationRuntime struct {
|
||||
artifactStore artifacts.Store
|
||||
manifestPath string
|
||||
manifest *manifest.Manifest
|
||||
started bool
|
||||
stageResults []RunStageResult
|
||||
stageNames []string
|
||||
executed []string
|
||||
skipped []string
|
||||
@@ -159,6 +161,7 @@ func initializeLockedInvocation(runtime *invocationRuntime) error {
|
||||
if err := validateBoundedPrerequisites(runtime.plan, m); err != nil {
|
||||
return fmt.Errorf("validate bounded run prerequisites under session lock: %w", err)
|
||||
}
|
||||
runtime.started = true
|
||||
runtime.identity.applyToSessionManifest(m)
|
||||
applyEffectiveConfigProvenance(m, runtime.cfg)
|
||||
if err := runtime.manifestStore.Save(runtime.ctx, runtime.manifestPath, m); err != nil {
|
||||
@@ -176,14 +179,3 @@ func (runtime *invocationRuntime) ensureRunWorkspaceFor(selected stage.Stage) er
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (runtime *invocationRuntime) persistTerminalFailure(err error) error {
|
||||
return persistSessionTerminalFailure(
|
||||
runtime.ctx,
|
||||
runtime.manifestStore,
|
||||
runtime.manifestPath,
|
||||
runtime.manifest,
|
||||
err,
|
||||
runtime.dependencies.now(),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user