{"record":{"id":"929b92a73b8502bb","repo":"argoproj/argo-workflows","slug":"codebadrequest-929b92","errorCode":"CodeBadRequest","errorMessage":"Invalid lock key: unknown format","messagePattern":"Invalid lock key: unknown format","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/sync/lock_name.go","lineNumber":100,"sourceCode":"}\n\nfunc (i *syncItem) lockName(wfNamespace string) (*lockName, error) {\n\tswitch {\n\tcase i.semaphore != nil:\n\t\treturn getSemaphoreLockName(i.semaphore, wfNamespace)\n\tcase i.mutex != nil:\n\t\treturn getMutexLockName(i.mutex, wfNamespace), nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"cannot get lockName if not semaphore or mutex\")\n\t}\n}\n\nfunc DecodeLockName(ctx context.Context, name string) (LockName, error) {\n\tlog := logging.RequireLoggerFromContext(ctx)\n\tlog.WithField(\"name\", name).Info(ctx, \"DecodeLockName\")\n\titems := strings.SplitN(name, \"/\", 3)\n\tif len(items) < 3 {\n\t\treturn nil, errors.New(errors.CodeBadRequest, \"Invalid lock key: unknown format\")\n\t}\n\n\tvar lock lockName\n\tkind := lockKind(items[1])\n\tnamespace := items[0]\n\n\tswitch kind {\n\tcase lockKindMutex, lockKindDatabase:\n\t\tlock = lockName{namespace: namespace, kind: kind, resourceName: items[2]}\n\tcase lockKindConfigMap:\n\t\tcomponents := strings.Split(items[2], \"/\")\n\n\t\tif len(components) != 2 {\n\t\t\treturn nil, errors.New(errors.CodeBadRequest, \"Invalid ConfigMap lock key: unknown format\")\n\t\t}\n\n\t\tlock = lockName{namespace: namespace, kind: kind, resourceName: components[0], key: components[1]}\n\tdefault:","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/sync/lock_name.go#L82-L118","documentation":"DecodeLockName could not split the synchronization lock reference into its three slash-delimited parts (configmap-or-db, namespace, key). The name string has fewer than 3 segments, so it does not match the expected <type>/<namespace>/<key> encoding.","triggerScenarios":"Thrown at workflow/sync/lock_name.go:100 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the lock name as namespace/configmap-name/key (or the DB-encoded form) with all three segments","Check for double slashes or a missing namespace in the semaphore/mutex reference"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}