{"record":{"id":"6504315fef6137c4","repo":"argoproj/argo-workflows","slug":"artifact-s-failed-to-load-w","errorCode":null,"errorMessage":"artifact %s failed to load: %w","messagePattern":"artifact (.+?) failed to load: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/executor/executor.go","lineNumber":338,"sourceCode":"\n\t// The artifact is downloaded to a temporary location, after which we determine if\n\t// the file is a tarball or not. If it is, it is first extracted then renamed to\n\t// the desired location. If not, it is simply renamed to the location.\n\ttempArtPath := artPath + \".tmp\"\n\t// Ensure parent directory exist, create if missing\n\ttempArtDir := filepath.Dir(tempArtPath)\n\tif mkdirErr := os.MkdirAll(tempArtDir, 0o700); mkdirErr != nil {\n\t\treturn fmt.Errorf(\"failed to create artifact temporary parent directory %s: %w\", tempArtDir, mkdirErr)\n\t}\n\tctx, span := we.Tracing.StartLoadArtifact(ctx, artPath)\n\tdefer span.End()\n\terr = artDriver.Load(ctx, driverArt, tempArtPath)\n\tif err != nil {\n\t\tif art.Optional && argoerrs.IsCode(argoerrs.CodeNotFound, err) {\n\t\t\tlogger.WithField(\"name\", art.Name).Info(ctx, \"Skipping optional input artifact that was not found\")\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"artifact %s failed to load: %w\", art.Name, err)\n\t}\n\n\terr = we.unarchiveArtifact(ctx, art, tempArtPath, artPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tlogger.WithField(\"path\", artPath).Info(ctx, \"Successfully download file\")\n\tif art.Mode != nil {\n\t\terr = chmod(artPath, *art.Mode, art.RecurseMode)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else if driverArt.Plugin != nil {\n\t\t// For plugin artifacts without explicit mode, ensure the file is writable\n\t\t// by setting mode to 0666 so the main container can read/write it\n\t\terr = chmod(artPath, 0666, art.RecurseMode)\n\t\tif err != nil {","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/executor/executor.go#L320-L356","documentation":"After creating the temp dir, the executor calls artDriver.Load to fetch the artifact into the temp path. Any non-recoverable driver error is wrapped as 'artifact <name> failed to load: <cause>'. Optional artifacts whose error is CodeNotFound are silently skipped instead.","triggerScenarios":"The storage driver (s3/gcs/azure/oss/http/git/raw/...) fails to download the artifact: object does not exist (and artifact not optional), bad credentials, network failure, wrong bucket/key, or a driver misconfiguration.","commonSituations":"Upstream step did not produce the output artifact but it isn't marked optional; expired/missing storage credentials; key renamed or bucket region wrong; network egress blocked from the pod; artifact deleted by retention policy.","solutions":["Read the wrapped cause to identify the driver-level failure (404, auth, network)","Mark the artifact optional: true if the producer may legitimately skip it","Verify the artifact's bucket/key and the artifact-repository credentials/secret","Check pod network egress and the storage backend's availability"],"exampleFix":"# before\nartifacts:\n  - name: maybe-data\n    path: /mnt/data\n    s3:\n      key: outputs/maybe.json\n# after\nartifacts:\n  - name: maybe-data\n    path: /mnt/data\n    optional: true\n    s3:\n      key: outputs/maybe.json","handlingStrategy":"validation","validationCode":"# Verify the object exists and credentials work before running:\n# aws s3 ls s3://my-bucket/outputs/maybe.json --region <region>\n# Mark artifacts optional when the producer may skip them:\n# artifacts:\n#   - name: maybe-data\n#     optional: true","typeGuard":null,"tryCatchPattern":"if err := loadArtifacts(ctx); err != nil {\n\tif strings.Contains(err.Error(), \"failed to load\") {\n\t\t// inspect wrapped cause: 404 -> mark optional or fix key;\n\t\t// 401/403 -> fix credentials; timeout -> retry\n\t}\n}","preventionTips":["Mark artifacts optional: true when upstream output is not guaranteed","Verify bucket/key, region and credentials in the artifact repository config","Check pod network egress to the storage backend","Confirm the upstream step actually produced and archived the output"],"tags":["artifacts","executor","storage","network"],"backgroundTag":"artifact-download-failed","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"}