goharbor/harbor · error
invalid execution ID
Error message
invalid execution ID: %d
What it means
Guard in retention launcher.Stop rejecting a non-positive execution ID before delegating to the execution manager. It fires only when the caller passes executionID <= 0, which cannot reference a real retention execution record, so the stop request is refused rather than forwarded to the backend.
Solutions
- Pass the execution ID returned by a prior Launch/Start call, which is always a positive database-generated value
- Check the ID for positivity before calling Stop and surface a client-friendly message for invalid input
- Inspect server logs for the wrapped 'launcher' context to identify the offending caller
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/pkg/retention/launcher.go:257 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/4519f45fe8fb275d.
Report an issue: GitHub.
Appendix: source
Thrown at src/pkg/retention/launcher.go:257
Parameters: jobData.JobParams,
Metadata: &job.Metadata{
JobKind: job.KindGeneric,
},
},
map[string]any{
"repository": jobData.Repository.Name,
"dry_run": jobData.JobParams[ParamDryRun],
})
if err != nil {
return err
}
}
return nil
}
func (l *launcher) Stop(ctx context.Context, executionID int64) error {
if executionID <= 0 {
return launcherError(fmt.Errorf("invalid execution ID: %d", executionID))
}
return l.execMgr.Stop(ctx, executionID)
}
func launcherError(err error) error {
return errors.Wrap(err, "launcher")
}
func getProjects(ctx context.Context, projectMgr project.Manager) ([]*selector.Candidate, error) {
projects, err := projectMgr.List(ctx, nil)
if err != nil {
return nil, err
}
var candidates []*selector.Candidate
for _, pro := range projects {
candidates = append(candidates, &selector.Candidate{
NamespaceID: pro.ProjectID,
Namespace: pro.Name,View on GitHub (pinned to 7b2fd08cc5)