Persist retryable post-publish cleanup obligations
This commit is contained in:
@@ -57,23 +57,43 @@ type StageRecord struct {
|
||||
Metadata map[string]any `json:"metadata,omitempty"`
|
||||
}
|
||||
|
||||
// CleanupTarget records one root-confined local deletion requested by a
|
||||
// committed publication.
|
||||
type CleanupTarget struct {
|
||||
Policy string `json:"policy"`
|
||||
Root string `json:"root"`
|
||||
Path string `json:"path"`
|
||||
Completed bool `json:"completed"`
|
||||
}
|
||||
|
||||
// PostPublishCleanup records the durable deletion work left by a committed
|
||||
// publish. It remains after completion as evidence of the exact committed run
|
||||
// and local paths involved.
|
||||
type PostPublishCleanup struct {
|
||||
CommittedRunID string `json:"committed_run_id"`
|
||||
RemoteCommitKey string `json:"remote_commit_key"`
|
||||
CurrentCommitPointerKey string `json:"current_commit_pointer_key"`
|
||||
Targets []CleanupTarget `json:"targets"`
|
||||
}
|
||||
|
||||
// Manifest is the durable run-state record for a session execution.
|
||||
type Manifest struct {
|
||||
SessionID string `json:"session_id"`
|
||||
Campaign string `json:"campaign,omitempty"`
|
||||
RunID string `json:"run_id,omitempty"`
|
||||
LocalWorkDir string `json:"local_workdir,omitempty"`
|
||||
LocalSpoolDir string `json:"local_spool_dir,omitempty"`
|
||||
S3Bucket string `json:"s3_bucket,omitempty"`
|
||||
S3SessionPrefix string `json:"s3_session_prefix,omitempty"`
|
||||
S3RunPrefix string `json:"s3_run_prefix,omitempty"`
|
||||
PipelineVersion string `json:"pipeline_version,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
LastError *ErrorRecord `json:"last_error,omitempty"`
|
||||
Inputs []InputRecord `json:"inputs,omitempty"`
|
||||
Artifacts []ArtifactRecord `json:"artifacts,omitempty"`
|
||||
Stages map[string]*StageRecord `json:"stages"`
|
||||
SessionID string `json:"session_id"`
|
||||
Campaign string `json:"campaign,omitempty"`
|
||||
RunID string `json:"run_id,omitempty"`
|
||||
LocalWorkDir string `json:"local_workdir,omitempty"`
|
||||
LocalSpoolDir string `json:"local_spool_dir,omitempty"`
|
||||
S3Bucket string `json:"s3_bucket,omitempty"`
|
||||
S3SessionPrefix string `json:"s3_session_prefix,omitempty"`
|
||||
S3RunPrefix string `json:"s3_run_prefix,omitempty"`
|
||||
PipelineVersion string `json:"pipeline_version,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
LastError *ErrorRecord `json:"last_error,omitempty"`
|
||||
Inputs []InputRecord `json:"inputs,omitempty"`
|
||||
Artifacts []ArtifactRecord `json:"artifacts,omitempty"`
|
||||
Stages map[string]*StageRecord `json:"stages"`
|
||||
PostPublishCleanup *PostPublishCleanup `json:"post_publish_cleanup,omitempty"`
|
||||
}
|
||||
|
||||
// New constructs a new manifest with deterministic timestamps.
|
||||
|
||||
Reference in New Issue
Block a user