argoproj/argo-workflows · error
failed to get resolve revision: %w
Error message
failed to get resolve revision: %w
What it means
git artifact Load with a revision set: ResolveRevision could not resolve the requested revision (branch, tag, or commit) to a hash after fetching. The revision likely does not exist on the remote or is misspelled.
Source
Thrown at workflow/artifacts/git/git.go:186
if err != nil {
return fmt.Errorf("failed to get work tree: %w", err)
}
if a.Revision != "" {
refSpecs := []config.RefSpec{"refs/heads/*:refs/heads/*"}
if a.SingleBranch {
refSpecs = []config.RefSpec{config.RefSpec(fmt.Sprintf("refs/heads/%s:refs/heads/%s", a.Branch, a.Branch))}
}
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)
}
}View on GitHub (pinned to 35bff19146)
Solutions
- Verify the revision exists on the remote (git ls-remote)
- For single-branch clones, ensure the branch is fetched before resolving its commits
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at workflow/artifacts/git/git.go:186 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/777b5d1657b4867f.
Report an issue: GitHub.