{"record":{"id":"ae10394366cce399","repo":"argoproj/argo-workflows","slug":"hdfs-artifact-does-not-suppot-directory-copy","errorCode":null,"errorMessage":"HDFS artifact does not suppot directory copy","messagePattern":"HDFS artifact does not suppot directory copy","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/artifacts/hdfs/hdfs.go","lineNumber":158,"sourceCode":"}\n\n// Load downloads artifacts from HDFS compliant storage\nfunc (driver *ArtifactDriver) Load(ctx context.Context, _ *wfv1.Artifact, path string) error {\n\thdfscli, err := createHDFSClient(driver.Addresses, driver.HDFSUser, driver.DataTransferProtection, driver.KrbOptions)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer hdfscli.Close()\n\n\tsrcStat, err := hdfscli.Stat(driver.Path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn errors.New(errors.CodeNotFound, err.Error())\n\t\t}\n\t\treturn err\n\t}\n\tif srcStat.IsDir() {\n\t\treturn fmt.Errorf(\"HDFS artifact does not suppot directory copy\")\n\t}\n\n\t_, err = os.Stat(path)\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn err\n\t}\n\n\tif os.IsNotExist(err) {\n\t\tdirPath := filepath.Dir(driver.Path)\n\t\tif dirPath != \".\" && dirPath != \"/\" {\n\t\t\t// Follow umask for the permission\n\t\t\terr = os.MkdirAll(dirPath, 0o777)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t} else if driver.Force {\n\t\terr = os.Remove(path)","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/artifacts/hdfs/hdfs.go#L140-L176","documentation":"The HDFS artifact driver's Load supports downloading regular files only; when the Stat of the configured source path reports a directory it refuses with this sentinel error. It fires during artifact loading when an HDFS artifact path points at a directory, since the driver does not implement recursive directory copy.","triggerScenarios":"Thrown at workflow/artifacts/hdfs/hdfs.go:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the HDFS artifact path at a specific file","Tar the directory first and store it as a single file artifact"],"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"}