{"record":{"id":"3d818e91c8d62d08","repo":"argoproj/argo-workflows","slug":"key-unsupported-cannot-set-key-for-raw-artifact","errorCode":null,"errorMessage":"key unsupported: cannot set key for raw artifact","messagePattern":"key unsupported: cannot set key for raw artifact","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apis/workflow/v1alpha1/workflow_types.go","lineNumber":3151,"sourceCode":"\tKrbConfigConfigMap *apiv1.ConfigMapKeySelector `json:\"krbConfigConfigMap,omitempty\" protobuf:\"bytes,5,opt,name=krbConfigConfigMap\"`\n\n\t// KrbServicePrincipalName is the principal name of Kerberos service\n\t// It must be set if either ccache or keytab is used.\n\tKrbServicePrincipalName string `json:\"krbServicePrincipalName,omitempty\" protobuf:\"bytes,6,opt,name=krbServicePrincipalName\"`\n}\n\n// RawArtifact allows raw string content to be placed as an artifact in a container\ntype RawArtifact struct {\n\t// Data is the string contents of the artifact\n\tData string `json:\"data\" protobuf:\"bytes,1,opt,name=data\"`\n}\n\nfunc (r *RawArtifact) GetKey() (string, error) {\n\treturn \"\", fmt.Errorf(\"key unsupported: raw artifat does not have key\")\n}\n\nfunc (r *RawArtifact) SetKey(string) error {\n\treturn fmt.Errorf(\"key unsupported: cannot set key for raw artifact\")\n}\n\nfunc (r *RawArtifact) HasLocation() bool {\n\treturn r != nil\n}\n\n// Header indicate a key-value request header to be used when fetching artifacts over HTTP\ntype Header struct {\n\t// Name is the header name\n\tName string `json:\"name\" protobuf:\"bytes,1,opt,name=name\"`\n\n\t// Value is the literal value to use for the header\n\tValue string `json:\"value\" protobuf:\"bytes,2,opt,name=value\"`\n}\n\n// BasicAuth describes the secret selectors required for basic authentication\ntype BasicAuth struct {\n\t// UsernameSecret is the secret selector to the repository username","sourceCodeStart":3133,"sourceCodeEnd":3169,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/pkg/apis/workflow/v1alpha1/workflow_types.go#L3133-L3169","documentation":"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.","triggerScenarios":"Thrown at pkg/apis/workflow/v1alpha1/workflow_types.go:3151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the key field from the raw artifact in the spec"],"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"}