{"record":{"id":"7b9d7dae265698c9","repo":"semaphoreui/semaphore","slug":"error-at-runners-d-s","errorCode":null,"errorMessage":"error at runners[%d]: %s","messagePattern":"error at runners\\[(.+?)\\]: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"services/project/restore.go","lineNumber":583,"sourceCode":"\t}\n\tfor i, o := range backup.SecretStorages {\n\t\tif err := o.Verify(backup); err != nil {\n\t\t\treturn fmt.Errorf(\"error at secret storage[%d]: %s\", i, err.Error())\n\t\t}\n\t}\n\tfor i, o := range backup.Templates {\n\t\tif err := o.Verify(backup); err != nil {\n\t\t\treturn fmt.Errorf(\"error at templates[%d]: %s\", i, err.Error())\n\t\t}\n\t}\n\tfor i, o := range backup.Roles {\n\t\tif err := o.Verify(backup); err != nil {\n\t\t\treturn fmt.Errorf(\"error at roles[%d]: %s\", i, err.Error())\n\t\t}\n\t}\n\tfor i, o := range backup.Runners {\n\t\tif err := o.Verify(backup); err != nil {\n\t\t\treturn fmt.Errorf(\"error at runners[%d]: %s\", i, err.Error())\n\t\t}\n\t}\n\tfor i, o := range backup.Workflows {\n\t\tif err := o.Verify(backup); err != nil {\n\t\t\treturn fmt.Errorf(\"error at workflows[%d]: %s\", i, err.Error())\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (backup *BackupFormat) Restore(user db.User, store db.Store, workflowStore db.WorkflowManager) (*db.Project, error) {\n\tvar b = BackupDB{store: store, workflowStore: workflowStore}\n\tproject := backup.Meta.Project\n\n\t// Prevent importing a project with a name that already exists\n\texistingProjects, err := b.store.GetAllProjects()\n\tif err == nil {","sourceCodeStart":565,"sourceCodeEnd":601,"githubUrl":"https://github.com/semaphoreui/semaphore/blob/1774ccb71a0a8b82eb74ea24c23ac9ab713de2fa/services/project/restore.go#L565-L601","documentation":"This error wraps a per-item failure from BackupFormat.Verify() while validating backup.Runners: the runner at index i failed o.Verify(backup). A runner entry in the backup is invalid (missing fields, bad token config, or broken references), so restore is blocked at the validation stage.","triggerScenarios":"Calling BackupFormat.Verify() where the runner at backup.Runners[i] fails Verify — e.g. empty runner name, missing token/project reference, or an endpoint that doesn't match the runner type.","commonSituations":"Backups exported between Semaphore versions with changed runner schema; runners referencing project entities removed from the backup; hand-edited or merged backup files.","solutions":["Read the inner error after 'runners[i]:' for the exact validation failure","Fix or remove the runner entry at the reported index in the backup file","Ensure referenced entities (project/secret storage) exist elsewhere in the backup","Re-export the backup from the source instance to regenerate a consistent runners section"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"for i, r := range backup.Runners {\n    if r == nil || r.Name == \"\" {\n        return fmt.Errorf(\"runners[%d]: missing name before restore\", i)\n    }\n}\nif err := backup.Verify(); err != nil {\n    return err\n}","typeGuard":"func validRunner(r *RunnerBackup) bool { return r != nil && r.Name != \"\" }","tryCatchPattern":"if err := backup.Verify(); err != nil {\n    if strings.Contains(err.Error(), \"runners[\") {\n        // inspect the runner entry at the reported index\n    }\n    return err\n}","preventionTips":["Re-export runner sections rather than editing them by hand","Always call Verify() before Restore","Match Semaphore versions between export and import"],"tags":["backup","validation","runners","restore"],"backgroundTag":"schema-validation-failed","analyzedSha":"1774ccb71a0a8b82eb74ea24c23ac9ab713de2fa","analyzedAt":"2026-09-07T11:00:33.293Z","contentChangedAt":"2026-09-07T11:00:33.293Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}