{"record":{"id":"da1a8ff786b3cbe6","repo":"hashicorp/nomad","slug":"cannot-update-parameterized-job-to-being-non-param","errorCode":null,"errorMessage":"cannot update parameterized job to being non-parameterized","messagePattern":"cannot update parameterized job to being non-parameterized","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/job_endpoint.go","lineNumber":1970,"sourceCode":"\t\treturn nil\n\t}\n\n\t// Type transitions are disallowed\n\tif old.Type != new.Type {\n\t\treturn fmt.Errorf(\"cannot update job from type %q to %q\", old.Type, new.Type)\n\t}\n\n\t// Transitioning to/from periodic is disallowed\n\tif old.IsPeriodic() && !new.IsPeriodic() {\n\t\treturn fmt.Errorf(\"cannot update periodic job to being non-periodic\")\n\t}\n\tif new.IsPeriodic() && !old.IsPeriodic() {\n\t\treturn fmt.Errorf(\"cannot update non-periodic job to being periodic\")\n\t}\n\n\t// Transitioning to/from parameterized is disallowed\n\tif old.IsParameterized() && !new.IsParameterized() {\n\t\treturn fmt.Errorf(\"cannot update parameterized job to being non-parameterized\")\n\t}\n\tif new.IsParameterized() && !old.IsParameterized() {\n\t\treturn fmt.Errorf(\"cannot update non-parameterized job to being parameterized\")\n\t}\n\n\tif old.Dispatched != new.Dispatched {\n\t\treturn fmt.Errorf(\"field 'Dispatched' is read-only\")\n\t}\n\n\treturn nil\n}\n\n// Dispatch a parameterized job.\nfunc (j *Job) Dispatch(args *structs.JobDispatchRequest, reply *structs.JobDispatchResponse) error {\n\tauthErr := j.srv.Authenticate(j.ctx, args)\n\tif done, err := j.srv.forward(\"Job.Dispatch\", args, args, reply); done {\n\t\treturn err\n\t}","sourceCodeStart":1952,"sourceCodeEnd":1988,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/job_endpoint.go#L1952-L1988","documentation":"Fires in validateJobUpdate when a job that was parameterized is updated to a spec without a parameterized block; Nomad forbids crossing the parameterized/non-parameterized boundary on update.","triggerScenarios":"Thrown at nomad/job_endpoint.go:1970 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep the parameterized block on the updated job","Deregister and register a fresh non-parameterized job if the change is intended"],"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"}