{"record":{"id":"b6064c523c21cc52","repo":"argoproj/argo-workflows","slug":"requested-configuration-is-invalid-w","errorCode":null,"errorMessage":"requested configuration is invalid: %w","messagePattern":"requested configuration is invalid: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/sync/sync_manager.go","lineNumber":461,"sourceCode":"\t}\n\tsm.log.Info(ctx, \"Sync manager initialized successfully\")\n\treturn staleHolds, nil\n}\n\n// TryAcquire tries to acquire the lock from semaphore.\n// It returns status of acquiring a lock , status of Workflow status updated, waiting message if lock is not available, the failed lock, and any error encountered\nfunc (sm *Manager) TryAcquire(ctx context.Context, wf *wfv1.Workflow, nodeName string, syncLockRef *wfv1.Synchronization) (bool, bool, string, string, error) {\n\tsm.lock.Lock()\n\tdefer sm.lock.Unlock()\n\n\tif syncLockRef == nil {\n\t\treturn false, false, \"\", \"\", fmt.Errorf(\"cannot acquire lock from nil Synchronization\")\n\t}\n\n\tfailedLockName := \"\"\n\tsyncItems, err := allSyncItems(syncLockRef)\n\tif err != nil {\n\t\treturn false, false, \"\", failedLockName, fmt.Errorf(\"requested configuration is invalid: %w\", err)\n\t}\n\tholderKey := getHolderKey(wf, nodeName)\n\n\tlockKeys := make([]string, len(syncItems))\n\tfor i, syncItem := range syncItems {\n\t\tsyncLockName, lockNameErr := syncItem.lockName(wf.Namespace)\n\t\tif lockNameErr != nil {\n\t\t\treturn false, false, \"\", failedLockName, fmt.Errorf(\"requested configuration is invalid: %w\", lockNameErr)\n\t\t}\n\t\tsm.log.WithField(\"syncLockName\", syncLockName).Info(ctx, \"TryAcquire\")\n\t\tlockKeys[i] = syncLockName.String(ctx)\n\t}\n\n\tif ok, msg, prepLockName, prepErr := sm.prepAcquire(ctx, wf, holderKey, syncItems, lockKeys); !ok {\n\t\treturn false, false, msg, prepLockName, prepErr\n\t}\n\n\tneedDB, err := needDBSession(ctx, lockKeys)","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/sync/sync_manager.go#L443-L479","documentation":"TryAcquire expands the Synchronization reference into concrete lock items via allSyncItems; when expansion fails the call returns 'requested configuration is invalid' wrapping the cause. The lock is not acquired and the workflow keeps waiting until the configuration is fixed.","triggerScenarios":"A synchronization reference with malformed items that allSyncItems cannot parse — invalid list item format, ill-formed lock reference, or empty spec in the workflow's synchronization block.","commonSituations":"Typos in the workflow synchronization config; referencing a semaphore via a bad configmap key string; CRD accepting values the sync layer cannot parse.","solutions":["Read the wrapped cause to find which item failed to parse","Correct the synchronization declaration in the workflow spec","Lint the workflow with `argo lint` before submitting","Re-submit the workflow after fixing the config"],"exampleFix":"// before\nsynchronization:\n  semaphore:\n    configMapKeyRef: {}   # missing name/key\n// after\nsynchronization:\n  semaphore:\n    configMapKeyRef:\n      name: my-semaphore\n      key: workflow","handlingStrategy":"validation","validationCode":"if _, err := sync.AllSyncItems(syncRef); err != nil {\n    return fmt.Errorf(\"fix workflow synchronization before submitting: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if _, _, _, _, err := sm.TryAcquire(ctx, wf, node, ref); err != nil && strings.Contains(err.Error(), \"requested configuration is invalid\") { /* surface to user as spec error */ }","preventionTips":["Run `argo lint` on every workflow before submit","Validate semaphore configmap references in CI","Pin CRD/schema versions to match the controller"],"tags":["argo-workflows","sync","configuration","validation"],"backgroundTag":"invalid-sync-config","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}