goharbor/harbor · error · *errors.Error
PRECONDITION
PRECONDITION
Error message
execution %d under the policy %s is running, stop it and retry
What it means
Error "execution %d under the policy %s is running, stop it and retry" thrown in goharbor/harbor.
Source
Thrown at src/server/v2.0/handler/preheat.go:361
detectRunningExecutions := func(executions []*task.Execution) error {
for _, exec := range executions {
if exec.Status == job.RunningStatus.String() {
return fmt.Errorf("execution %d under the policy %s is running, stop it and retry", exec.ID, policy.Name)
}
}
return nil
}
executions, err := api.executionCtl.List(ctx, &q.Query{Keywords: map[string]any{
"vendor_type": job.P2PPreheatVendorType,
"vendor_id": policy.ID,
}})
if err != nil {
return api.SendError(ctx, err)
}
// Detecting running tasks under the policy
if err = detectRunningExecutions(executions); err != nil {
return api.SendError(ctx, errors.New(err).WithCode(errors.PreconditionCode))
}
err = api.preheatCtl.DeletePolicy(ctx, policy.ID)
if err != nil {
return api.SendError(ctx, err)
}
return operation.NewDeletePolicyOK()
}
// ListPolicies is List preheat policies
func (api *preheatAPI) ListPolicies(ctx context.Context, params operation.ListPoliciesParams) middleware.Responder {
if err := api.RequireProjectAccess(ctx, params.ProjectName, rbac.ActionList, rbac.ResourcePreatPolicy); err != nil {
return api.SendError(ctx, err)
}
project, err := api.projectCtl.GetByName(ctx, params.ProjectName)
if err != nil {View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/server/v2.0/handler/preheat.go:361 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/b551363c681b7302.
Report an issue: GitHub.