goharbor/harbor · error · errors.Error
PRECONDITION
PRECONDITION
Error message
the execution %d has tasks that aren't in final status, stop the tasks first
What it means
Error "the execution %d has tasks that aren't in final status, stop the tasks first" thrown in goharbor/harbor.
Source
Thrown at src/pkg/task/execution.go:278
if origError != nil {
return e.MarkError(ctx, id, origError.Error())
}
return nil
}
func (e *executionManager) Delete(ctx context.Context, id int64) error {
tasks, err := e.taskDAO.List(ctx, &q.Query{
Keywords: map[string]any{
"ExecutionID": id,
},
})
if err != nil {
return err
}
for _, task := range tasks {
if !job.Status(task.Status).Final() {
return errors.New(nil).WithCode(errors.PreconditionCode).
WithMessagef("the execution %d has tasks that aren't in final status, stop the tasks first", id)
}
log.Debugf("delete task %d as execution %d has been deleted", task.ID, task.ExecutionID)
if err = e.taskDAO.Delete(ctx, task.ID); err != nil {
// the tasks may be deleted by the other execution deletion operation in the same time(e.g. execution sweeper),
// ignore the not found error for the tasks
if errors.IsNotFoundErr(err) {
continue
}
return err
}
}
return e.executionDAO.Delete(ctx, id)
}
func (e *executionManager) DeleteByVendor(ctx context.Context, vendorType string, vendorID int64) error {View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/pkg/task/execution.go:278 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/976d35e853ae853f.
Report an issue: GitHub.