argoproj/argo-workflows · error
requested configuration is invalid
Error message
requested configuration is invalid: %w
What it means
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.
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
Example fix
// before
synchronization:
semaphore:
configMapKeyRef: {} # missing name/key
// after
synchronization:
semaphore:
configMapKeyRef:
name: my-semaphore
key: workflow Defensive patterns
Strategy: validation
Validate before calling
if _, err := sync.AllSyncItems(syncRef); err != nil {
return fmt.Errorf("fix workflow synchronization before submitting: %w", err)
} Try / catch
if _, _, _, _, err := sm.TryAcquire(ctx, wf, node, ref); err != nil && strings.Contains(err.Error(), "requested configuration is invalid") { /* surface to user as spec error */ } Prevention
- Run `argo lint` on every workflow before submit
- Validate semaphore configmap references in CI
- Pin CRD/schema versions to match the controller
When it happens
Trigger: 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.
Common situations: Typos in the workflow synchronization config; referencing a semaphore via a bad configmap key string; CRD accepting values the sync layer cannot parse.
Related errors
- invalid lock kind when initializing mutex
- malformed workflow template parameter
- synchronization database session is not available
- ArtifactGCStrategy not valid
- BadRequest
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/b6064c523c21cc52.
Report an issue: GitHub.
Appendix: source
Thrown at workflow/sync/sync_manager.go:461
}
sm.log.Info(ctx, "Sync manager initialized successfully")
return staleHolds, nil
}
// TryAcquire tries to acquire the lock from semaphore.
// 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
func (sm *Manager) TryAcquire(ctx context.Context, wf *wfv1.Workflow, nodeName string, syncLockRef *wfv1.Synchronization) (bool, bool, string, string, error) {
sm.lock.Lock()
defer sm.lock.Unlock()
if syncLockRef == nil {
return false, false, "", "", fmt.Errorf("cannot acquire lock from nil Synchronization")
}
failedLockName := ""
syncItems, err := allSyncItems(syncLockRef)
if err != nil {
return false, false, "", failedLockName, fmt.Errorf("requested configuration is invalid: %w", err)
}
holderKey := getHolderKey(wf, nodeName)
lockKeys := make([]string, len(syncItems))
for i, syncItem := range syncItems {
syncLockName, lockNameErr := syncItem.lockName(wf.Namespace)
if lockNameErr != nil {
return false, false, "", failedLockName, fmt.Errorf("requested configuration is invalid: %w", lockNameErr)
}
sm.log.WithField("syncLockName", syncLockName).Info(ctx, "TryAcquire")
lockKeys[i] = syncLockName.String(ctx)
}
if ok, msg, prepLockName, prepErr := sm.prepAcquire(ctx, wf, holderKey, syncItems, lockKeys); !ok {
return false, false, msg, prepLockName, prepErr
}
needDB, err := needDBSession(ctx, lockKeys)View on GitHub (pinned to 35bff19146)