hasura/graphql-engine · error
failed moving files: %w
Error message
failed moving files: %w
What it means
moveAllFiles iterates the plugin's FileOperation list and wraps any per-operation moveFiles failure as 'failed moving files'. It is a pure aggregation wrapper; the actionable cause is in the wrapped error (any of 407–409 for one FileOperation).
Source
Thrown at cli/plugins/move.go:204
err = renameOrCopy(m.from, m.to)
if err != nil {
return errors.E(
op,
fmt.Errorf("could not rename/copy file from %q to %q: %w", m.from, m.to, err),
)
}
}
return nil
}
func moveAllFiles(fromDir, toDir string, fos []FileOperation) error {
var op errors.Op = "plugins.moveAllFiles"
for _, fo := range fos {
err := moveFiles(fromDir, toDir, fo)
if err != nil {
return errors.E(op, fmt.Errorf("failed moving files: %w", err))
}
}
return nil
}
// moveToInstallDir moves plugins from srcDir to dstDir (created in this method) with given FileOperation.
func moveToInstallDir(srcDir, installDir string, fos []FileOperation) error {
var op errors.Op = "plugins.moveToInstallDir"
installationDir := filepath.Dir(installDir)
err := os.MkdirAll(installationDir, 0o755)
if err != nil {
return errors.E(op, fmt.Errorf("error creating directory at %q: %w", installationDir, err))
}
tmp, err := os.MkdirTemp("", "hasura-temp-move")View on GitHub (pinned to 724551b9ae)
Solutions
- Unwrap the error to find which FileOperation and which underlying step failed, then fix that (see 400–409)
- Remove or correct the offending FileOperations entry in the manifest
- Retry after fixing permissions/disk issues
- Reinstall from a refreshed plugin index
Defensive patterns
Strategy: try-catch
Validate before calling
for _, fo := range fos {
if !validFileOperation(fo) { return fmt.Errorf("bad FileOperation %v", fo) }
} Try / catch
if err := moveAllFiles(src, tmp, fos); err != nil {
// unwrap to find failing entry index/log each fo before retry
} Prevention
- Validate every FileOperations entry up front
- Fail fast on first bad entry to avoid partial staging
When it happens
Trigger: At least one FileOperations entry in the plugin manifest fails during install — bad glob, blocked path, mkdir failure, or rename failure — while moving files from the extracted archive into the temp staging dir.
Common situations: One bad entry in a multi-file manifest breaking the whole install; environment permission issues on the plugins dir; archive/manifest drift.
Related errors
- could not find move targets: %w
- failed to move files: %w
- could not get files using a glob string: %w
- no files in the plugin archive matched the glob pattern=%s
- can't move, move target %v is not a subpath from=%q, to=%q
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/a1034b15435aec03.
Report an issue: GitHub.