Skip to content

Commit

Permalink
Gracefully handle old pipelines where output commit is ALIAS and meta…
Browse files Browse the repository at this point in the history
… commit is AUTO (#8485)

Gracefully handle old pipelines where output commit is ALIAS and meta commit is AUTO
  • Loading branch information
acohen4 committed Jan 5, 2023
1 parent 68170a4 commit 199d14f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/server/worker/pipeline/transform/pending_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,18 @@ func (pj *pendingJob) load() error {
return errors.EnsureStack(err)
}
// both commits must have succeeded - a validation error will only show up in the output
if metaCI.Error == "" && outputCI.Error == "" {
// the commit must also not be of type ALIAS, to ensure that we have a corresponding job
if metaCI.Error == "" && outputCI.Error == "" && outputCI.Origin.Kind != pfs.OriginKind_ALIAS {
break
}
}
pj.baseMetaCommit = metaCI.ParentCommit
}
if pj.baseMetaCommit != nil {
pj.logger.Logf("base meta commit for job %q is %q", pj.ji.Job.String(), pj.baseMetaCommit.ID)
} else {
pj.logger.Logf("base meta commit for job %q not selected", pj.ji.Job.String())
}
// Load the job info.
pj.ji, err = pachClient.InspectJob(pj.ji.Job.Pipeline.Name, pj.ji.Job.ID, true)
if err != nil {
Expand Down

0 comments on commit 199d14f

Please sign in to comment.