{"record":{"id":"cd69400fbefbf910","repo":"argoproj/argo-workflows","slug":"unsupported-artifact-driver","errorCode":null,"errorMessage":"unsupported artifact driver","messagePattern":"unsupported artifact driver","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/artifacts/artifacts.go","lineNumber":24,"sourceCode":"\tgohttp \"net/http\"\n\n\twfv1 \"github.com/argoproj/argo-workflows/v4/pkg/apis/workflow/v1alpha1\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/azure\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/common\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/gcs\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/git\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/hdfs\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/http\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/logging\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/oss\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/plugin\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/raw\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/resource\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/artifacts/s3\"\n\t\"github.com/argoproj/argo-workflows/v4/workflow/tracing\"\n)\n\nvar ErrUnsupportedDriver = fmt.Errorf(\"unsupported artifact driver\")\n\ntype NewDriverFunc func(ctx context.Context, art *wfv1.Artifact, ri resource.Interface) (common.ArtifactDriver, error)\n\n// NewDriver initializes an instance of an artifact driver\nfunc NewDriver(ctx context.Context, art *wfv1.Artifact, ri resource.Interface) (common.ArtifactDriver, error) {\n\tdrv, err := newDriver(ctx, art, ri)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn logging.New(drv), nil\n}\n\nfunc newDriver(ctx context.Context, art *wfv1.Artifact, ri resource.Interface) (common.ArtifactDriver, error) {\n\tif art.S3 != nil {\n\t\tvar accessKey string\n\t\tvar secretKey string\n\t\tvar sessionToken string\n\t\tvar serverSideCustomerKey string","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/artifacts/artifacts.go#L6-L42","documentation":"ErrUnsupportedDriver is a sentinel error returned by newDriver/NewDriver when an artifact's type does not match any of the built-in artifact drivers (s3, gcs, azure, oss, hdfs, git, http, raw, plugin). It surfaces in the executor as a 400 BadRequest 'Unsupported artifact driver for <name>'.","triggerScenarios":"Calling artifacts.NewDriver with a wfv1.Artifact whose type field (S3/GCS/Azure/OSS/HDFS/Git/HTTP/Raw/Plugin) is all unset or is a type the current build does not implement; newDriver falls through every type switch case and returns the sentinel at artifacts.go:290.","commonSituations":"Submitting a workflow with a typo'd or missing artifact type; using an artifact type introduced in a newer Argo version while running an older controller; generating artifacts programmatically and forgetting to set exactly one type stanza.","solutions":["Set exactly one recognized artifact type stanza (s3, git, http, raw, gcs, azure, oss, hdfs, or plugin) on the artifact.","Check the controller/server version supports the artifact type you are using (e.g. plugin artifacts require recent Argo).","Verify the rendered template actually populates the artifact type — an empty artifact yields the same error."],"exampleFix":"// before\nartifacts:\n  - name: output\n    path: /tmp/out\n    s3:\n      key: my/key\n# after — type must actually be registered; here 'gcs' was intended\nartifacts:\n  - name: output\n    path: /tmp/out\n    gcs:\n      bucket: my-bucket\n      key: my/key","handlingStrategy":"validation","validationCode":"func hasArtifactDriver(art *wfv1.Artifact) bool {\n\treturn art != nil && (art.S3 != nil || art.GCS != nil || art.Azure != nil || art.OSS != nil ||\n\t\tart.HDFS != nil || art.Git != nil || art.HTTP != nil || art.Raw != nil || art.Plugin != nil)\n}","typeGuard":"func isSupportedArtifact(art *wfv1.Artifact) bool { return hasArtifactDriver(art) }","tryCatchPattern":"driver, err := artifacts.NewDriver(ctx, art, ri)\nif errors.Is(err, artifacts.ErrUnsupportedDriver) {\n\treturn argoerrs.Errorf(argoerrs.CodeBadRequest, \"Unsupported artifact driver for %s\", art.Name)\n}\nif err != nil { return err }","preventionTips":["Always set exactly one artifact type stanza per artifact.","Lint workflows (argo lint) before submit — validation catches unknown artifact shapes.","Pin the artifact types you use to features present in your controller's Argo version."],"tags":["artifacts","configuration","argo-workflows"],"backgroundTag":"unsupported-artifact-driver","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"}