From 3e7191ccb7028d40fcaed9b6010474b0dd136927 Mon Sep 17 00:00:00 2001 From: Mark Johnston <42784895+c3pmark@users.noreply.github.com> Date: Tue, 5 Mar 2024 18:49:28 -0600 Subject: [PATCH] Fix wording of ACL error message (#20071) When creating a job ACL, you must supply a job ID if you supply a namespace. If you try to give a namespace without a job ID, the error states "JobACL.JobID without Namespace" instead. --- nomad/state/schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/state/schema.go b/nomad/state/schema.go index 9fafe0f97..93c77d0e4 100644 --- a/nomad/state/schema.go +++ b/nomad/state/schema.go @@ -927,7 +927,7 @@ func (a *ACLPolicyJobACLFieldIndex) FromObject(obj interface{}) (bool, []byte, e jobID := policy.JobACL.JobID if jobID == "" { return false, nil, fmt.Errorf( - "object %#v is not a valid ACLPolicy: JobACL.JobID without Namespace", obj) + "object %#v is not a valid ACLPolicy: Namespace without JobID", obj) } val := ns + "\x00" + jobID + "\x00"