{"record":{"id":"027128020187b6fa","repo":"argoproj/argo-workflows","slug":"failed-to-update-submodules-w","errorCode":null,"errorMessage":"failed to update submodules: %w","messagePattern":"failed to update submodules: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/artifacts/git/git.go","lineNumber":202,"sourceCode":"\t\th, err := r.ResolveRevision(plumbing.Revision(a.Revision))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to get resolve revision: %w\", err)\n\t\t}\n\t\tif err := w.Checkout(&git.CheckoutOptions{Hash: plumbing.NewHash(h.String())}); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to checkout %q: %w\", h, err)\n\t\t}\n\t}\n\tif !a.DisableSubmodules {\n\t\ts, err := w.Submodules()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to get submodules: %w\", err)\n\t\t}\n\t\tif err := s.Update(&git.SubmoduleUpdateOptions{\n\t\t\tInit:              true,\n\t\t\tRecurseSubmodules: git.DefaultSubmoduleRecursionDepth,\n\t\t\tAuth:              auth,\n\t\t}); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to update submodules: %w\", err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc isFetchErr(err error) bool {\n\treturn err != nil && err.Error() != \"already up-to-date\"\n}\n\nfunc (g *ArtifactDriver) OpenStream(ctx context.Context, a *wfv1.Artifact) (io.ReadCloser, error) {\n\t// todo: this is a temporary implementation which loads file to disk first\n\treturn common.LoadToStream(ctx, a, g)\n}\n\nfunc (g *ArtifactDriver) ListObjects(ctx context.Context, artifact *wfv1.Artifact) ([]string, error) {\n\treturn nil, fmt.Errorf(\"ListObjects is currently not supported for this artifact type, but it will be in a future version\")\n}\n","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/artifacts/git/git.go#L184-L220","documentation":"In the git artifact driver's Load, when submodules are not disabled the driver initializes and updates them via go-git Submodules.Update; this wraps any error from that update (network failure cloning a submodule, missing credentials for a private submodule, bad .gitmodules, or git object errors). It fires while materializing a git artifact that declares submodules without DisableSubmodules.","triggerScenarios":"Thrown at workflow/artifacts/git/git.go:202 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set disableSubmodules: true to skip submodule checkout","Ensure the git credentials grant access to submodule repositories"],"exampleFix":null,"handlingStrategy":"try-catch","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"}