argoproj/argo-workflows · error
failed to get submodules: %w
Error message
failed to get submodules: %w
What it means
git artifact Load called w.Submodules() to enumerate submodules and it failed — usually a missing/corrupt .gitmodules file or an unexpected work-tree state. Only reached when disableSubmodules is false.
Source
Thrown at workflow/artifacts/git/git.go:195
opts := &git.FetchOptions{Auth: auth, RefSpecs: refSpecs, InsecureSkipTLS: g.InsecureSkipTLS}
if err := opts.Validate(); err != nil {
return fmt.Errorf("failed to validate fetch %v: %w", refSpecs, err)
}
if err := r.Fetch(opts); isFetchErr(err) {
return fmt.Errorf("failed to fetch %v: %w", refSpecs, err)
}
h, err := r.ResolveRevision(plumbing.Revision(a.Revision))
if err != nil {
return fmt.Errorf("failed to get resolve revision: %w", err)
}
if err := w.Checkout(&git.CheckoutOptions{Hash: plumbing.NewHash(h.String())}); err != nil {
return fmt.Errorf("failed to checkout %q: %w", h, err)
}
}
if !a.DisableSubmodules {
s, err := w.Submodules()
if err != nil {
return fmt.Errorf("failed to get submodules: %w", err)
}
if err := s.Update(&git.SubmoduleUpdateOptions{
Init: true,
RecurseSubmodules: git.DefaultSubmoduleRecursionDepth,
Auth: auth,
}); err != nil {
return fmt.Errorf("failed to update submodules: %w", err)
}
}
return nil
}
func isFetchErr(err error) bool {
return err != nil && err.Error() != "already up-to-date"
}
func (g *ArtifactDriver) OpenStream(ctx context.Context, a *wfv1.Artifact) (io.ReadCloser, error) {
// todo: this is a temporary implementation which loads file to disk firstView on GitHub (pinned to 35bff19146)
Solutions
- Set disableSubmodules: true if submodules are not needed
- Fix or remove a broken .gitmodules in the source repo
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at workflow/artifacts/git/git.go:195 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/9df4f3f71ae5492c.
Report an issue: GitHub.