{"record":{"id":"01cb25fd1cddf126","repo":"semaphoreui/semaphore","slug":"unknown-runner-executor-type-q","errorCode":null,"errorMessage":"unknown runner executor type %q","messagePattern":"unknown runner executor type %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"services/runners/executor_factory.go","lineNumber":37,"sourceCode":"// else (JobPool, executor lifecycle, access-key hydration) needs to change.\nfunc newExecutorProvider(executorCfg *util.ExecutorConfig, keyInstaller db_lib.AccessKeyInstaller) (tasks.ExecutorProvider, error) {\n\tswitch resolveExecutorType(executorCfg) {\n\tcase util.ExecutorTypeLocal:\n\t\treturn tasks.NewLocalExecutorProvider(keyInstaller), nil\n\tcase util.ExecutorTypeKubernetes:\n\t\tk8sCfg := util.RunnerK8sConfig{}\n\t\tif executorCfg != nil {\n\t\t\tk8sCfg = executorCfg.K8s\n\t\t}\n\t\treturn k8s.NewProvider(k8sCfg)\n\tcase util.ExecutorTypeDocker:\n\t\tdockerCfg := util.RunnerDockerConfig{}\n\t\tif executorCfg != nil {\n\t\t\tdockerCfg = executorCfg.Docker\n\t\t}\n\t\treturn docker.NewProvider(dockerCfg)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown runner executor type %q\", resolveExecutorType(executorCfg))\n\t}\n}\n\n// resolveExecutorType returns the executor type from config, defaulting to \"local\"\n// when the field is missing or empty. Defaulting in one place keeps the rest of the\n// runner code free of nil-checks against the config tree.\nfunc resolveExecutorType(executorCfg *util.ExecutorConfig) util.ExecutorType {\n\tif executorCfg == nil || executorCfg.Type == \"\" {\n\t\treturn util.ExecutorTypeLocal\n\t}\n\treturn executorCfg.Type\n}\n\n// newExecutor wires per-task data through the Provider. Access keys are hydrated\n// here (not inside each Provider) so the behaviour is identical regardless of\n// strategy: ansible vault passwords, SSH keys, inventory keys, and the inventory\n// repo SSH key all land on the JobData before the Executor is built.\nfunc newExecutor(","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/semaphoreui/semaphore/blob/1774ccb71a0a8b82eb74ea24c23ac9ab713de2fa/services/runners/executor_factory.go#L19-L55","documentation":"The runner's executor factory did not recognize the configured executor type. newExecutorProvider switches on the executor type resolved from the runner config (defaulting to \"local\" when empty) and the default branch means the value is neither local, docker, nor any supported provider. No executor provider is created and the runner cannot execute jobs.","triggerScenarios":"newExecutorProvider is called with a config whose executor.type (after resolveExecutorType defaulting) is an unrecognized string, e.g. a typo like \"dockr\" or a type not compiled into this build.","commonSituations":"Typo in the runner's config.yml executor type; copying config from documentation of a newer/older version with extra executor types; environment-specific config templates with invalid values.","solutions":["Open the runner config and set executor.type to a supported value (e.g. \"local\" or \"docker\").","Check for typos and trailing whitespace in the executor type value.","Confirm the binary version supports the configured executor type; upgrade or downgrade accordingly.","Remove the executor section entirely to fall back to the \"local\" default."],"exampleFix":"// before (config)\nexecutor:\n  type: dockr\n// after\nexecutor:\n  type: docker","handlingStrategy":"validation","validationCode":"validTypes := map[string]bool{\"local\": true, \"docker\": true}\nexecType := cfg.Executor.Type\nif execType == \"\" { execType = \"local\" }\nif !validTypes[execType] {\n    return fmt.Errorf(\"executor type %q not supported by this runner build\", execType)\n}","typeGuard":null,"tryCatchPattern":"pool, err := runners.NewJobPool(cfg)\nif err != nil {\n    if strings.Contains(err.Error(), \"unknown runner executor type\") {\n        log.Fatalf(\"fix executor.type in runner config: %v\", err)\n    }\n    return err\n}","preventionTips":["Copy executor type values only from the documentation matching your binary version.","Lint runner configs against a schema before startup.","Prefer omitting executor.type to get the \"local\" default."],"tags":["runner","executor","configuration","factory"],"backgroundTag":"invalid-enum-value","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"}