{"record":{"id":"28743119e470277e","repo":"hashicorp/nomad","slug":"dequeue-requires-at-least-one-scheduler-type","errorCode":null,"errorMessage":"dequeue requires at least one scheduler type","messagePattern":"dequeue requires at least one scheduler type","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/eval_endpoint.go","lineNumber":136,"sourceCode":"\n// Dequeue is used to dequeue a pending evaluation\nfunc (e *Eval) Dequeue(args *structs.EvalDequeueRequest,\n\treply *structs.EvalDequeueResponse) error {\n\n\taclObj, err := e.srv.AuthenticateServerOnly(e.ctx, args)\n\te.srv.MeasureRPCRate(\"eval\", structs.RateMetricWrite, args)\n\tif err != nil || !aclObj.AllowServerOp() {\n\t\treturn structs.ErrPermissionDenied\n\t}\n\n\tif done, err := e.srv.forward(\"Eval.Dequeue\", args, args, reply); done {\n\t\treturn err\n\t}\n\tdefer metrics.MeasureSince([]string{\"nomad\", \"eval\", \"dequeue\"}, time.Now())\n\n\t// Ensure there is at least one scheduler\n\tif len(args.Schedulers) == 0 {\n\t\treturn fmt.Errorf(\"dequeue requires at least one scheduler type\")\n\t}\n\n\t// Check that there isn't a scheduler version mismatch\n\tif args.SchedulerVersion != scheduler.SchedulerVersion {\n\t\treturn fmt.Errorf(\"dequeue disallowed: calling scheduler version is %d; leader version is %d\",\n\t\t\targs.SchedulerVersion, scheduler.SchedulerVersion)\n\t}\n\n\t// Ensure there is a default timeout\n\tif args.Timeout <= 0 {\n\t\targs.Timeout = DefaultDequeueTimeout\n\t}\n\n\t// If the eval broker is paused, attempt to block and wait for a state\n\t// change before returning. This avoids a tight loop and mimics the\n\t// behaviour where there are no evals to process.\n\t//\n\t// The call can return because either the timeout is reached or the broker","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/eval_endpoint.go#L118-L154","documentation":"Guard in Eval.Dequeue: the server-only dequeue request listed no scheduler types, so the eval broker cannot match the request to any queued evaluation; at least one scheduler name is required.","triggerScenarios":"Thrown at nomad/eval_endpoint.go:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the scheduler type(s) the caller supports in the dequeue request","Use the CLI/API which always specifies scheduler types"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}