argoproj/argo-workflows · error
memoization configmap doesn't have %s label, refusing to use
Error message
memoization configmap doesn't have %s label, refusing to use it
What it means
Memoization caches are stored in ConfigMaps that must carry the label `workflows.argoproj.io/configmap-type: Cache`. validateConfigMap refuses to use a ConfigMap missing the type label or having the wrong value, to prevent accidentally corrupting an arbitrary user ConfigMap with cache data.
Source
Thrown at workflow/controller/cache/configmap_cache.go:60
logger := logging.RequireLoggerFromContext(ctx)
logger.WithFields(logging.Fields{"namespace": c.namespace, "name": c.name}).WithFields(fields).WithError(err).Debug(ctx, message)
}
func (c *configMapCache) logInfo(ctx context.Context, fields logging.Fields, message string) {
logger := logging.RequireLoggerFromContext(ctx)
logger.WithFields(logging.Fields{"namespace": c.namespace, "name": c.name}).WithFields(fields).Info(ctx, message)
}
func (c *configMapCache) validateConfigmap(ctx context.Context, cm *apiv1.ConfigMap) error {
label, foundLabel := cm.GetLabels()[common.LabelKeyConfigMapType]
errString := ""
if !foundLabel {
errString = fmt.Sprintf("memoization configmap doesn't have %s label, refusing to use it", common.LabelKeyConfigMapType)
} else if label != common.LabelValueTypeConfigMapCache {
errString = fmt.Sprintf("memoization configmap doesn't have label %s = %s, refusing to use it", common.LabelKeyConfigMapType, common.LabelValueTypeConfigMapCache)
}
if errString != "" {
err := errors.New(errString)
c.logError(ctx, err, logging.Fields{}, errString)
return err
}
return nil
}
func (c *configMapCache) Load(ctx context.Context, key string) (*Entry, error) {
var entry *Entry
err := retry.OnError(kwait.Backoff{
Duration: time.Second,
Factor: 2,
Jitter: 0.1,
Steps: 5,
Cap: 30 * time.Second,
}, func(err error) bool {
return argoerr.IsTransientErr(ctx, err) || apierr.IsConflict(err)
}, func() error {
var innerErr errorView on GitHub (pinned to 35bff19146)
Solutions
- Label the ConfigMap: `kubectl label configmap my-cache workflows.argoproj.io/configmap-type=Cache`.
- Check the label value exactly matches `Cache` (case-sensitive).
- Re-apply the ConfigMap manifest including the label; verify with `kubectl get cm my-cache --show-labels`.
Example fix
# before
apiVersion: v1
kind: ConfigMap
metadata:
name: my-cache
# after
apiVersion: v1
kind: ConfigMap
metadata:
name: my-cache
labels:
workflows.argoproj.io/configmap-type: Cache Defensive patterns
Strategy: validation
Validate before calling
cm, err := clientset.CoreV1().ConfigMaps(ns).Get(ctx, name, metav1.GetOptions{})
if err != nil { return err }
l, ok := cm.Labels["workflows.argoproj.io/configmap-type"]
if !ok || l != "Cache" {
return fmt.Errorf("configmap %s must have label workflows.argoproj.io/configmap-type=Cache", name)
} Try / catch
if err := cache.Save(...); err != nil && strings.Contains(err.Error(), "refusing to use it") {
// fix the ConfigMap labels, then retry
} Prevention
- Create memoization ConfigMaps from a templated manifest that always includes the type label
- Check labels after every kubectl apply/edit (edits can drop labels)
- Use `kubectl get cm <name> --show-labels` as a pre-flight check
When it happens
Trigger: Calling load() or save() on a configMapCache whose referenced ConfigMap either lacks the `workflows.argoproj.io/configmap-type` label entirely, or has it set to something other than `Cache`.
Common situations: User created the ConfigMap by hand and forgot the label; label value typo'd (e.g. `cache` lowercase instead of `Cache`); copied a ConfigMap from another memoization setup with a different label scheme; kubectl apply dropped labels during an update.
Related errors
- failed to unmarshal container args: %w
- if you have an item in your config map named 'config', you m
- clientSecret empty
- key %s missing in secret %s
- error getting config map for artifact repository ref "%v": %
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/bfac6aa90ba50ffe.
Report an issue: GitHub.