argoproj/argo-workflows · error

key unsupported: cannot set key for raw artifact

Error message

key unsupported: cannot set key for raw artifact

What it means

RawArtifact represents inline string data placed directly in the spec, so it has no external storage location; its GetKey/has-key validation rejects any attempt to assign an artifact key to a raw artifact. This fires when a workflow spec sets a key field on a RawArtifact, an operation that is meaningless because the content is embedded, not fetched from a keyed source.

Source

Thrown at pkg/apis/workflow/v1alpha1/workflow_types.go:3151

	KrbConfigConfigMap *apiv1.ConfigMapKeySelector `json:"krbConfigConfigMap,omitempty" protobuf:"bytes,5,opt,name=krbConfigConfigMap"`

	// KrbServicePrincipalName is the principal name of Kerberos service
	// It must be set if either ccache or keytab is used.
	KrbServicePrincipalName string `json:"krbServicePrincipalName,omitempty" protobuf:"bytes,6,opt,name=krbServicePrincipalName"`
}

// RawArtifact allows raw string content to be placed as an artifact in a container
type RawArtifact struct {
	// Data is the string contents of the artifact
	Data string `json:"data" protobuf:"bytes,1,opt,name=data"`
}

func (r *RawArtifact) GetKey() (string, error) {
	return "", fmt.Errorf("key unsupported: raw artifat does not have key")
}

func (r *RawArtifact) SetKey(string) error {
	return fmt.Errorf("key unsupported: cannot set key for raw artifact")
}

func (r *RawArtifact) HasLocation() bool {
	return r != nil
}

// Header indicate a key-value request header to be used when fetching artifacts over HTTP
type Header struct {
	// Name is the header name
	Name string `json:"name" protobuf:"bytes,1,opt,name=name"`

	// Value is the literal value to use for the header
	Value string `json:"value" protobuf:"bytes,2,opt,name=value"`
}

// BasicAuth describes the secret selectors required for basic authentication
type BasicAuth struct {
	// UsernameSecret is the secret selector to the repository username

View on GitHub (pinned to 35bff19146)

Solutions

  1. Delete the key field from the raw artifact in the spec
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/apis/workflow/v1alpha1/workflow_types.go:3151 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03). Data as JSON: /api/errors/3d818e91c8d62d08. Report an issue: GitHub.