GoogleContainerTools/skaffold · error

walking workspace: %w

Error message

walking workspace: %w

What it means

Fires in getDependencies when WalkWorkspace fails while enumerating files in the workspace (excluding .dockerignore'd paths) to compute the docker build's dependency set. Typically a filesystem error mid-walk: unreadable directory, dangling symlink handling failure, or a path disappearing during the walk.

Source

Thrown at pkg/skaffold/docker/dependencies.go:148

	fts, err := ReadCopyCmdsFromDockerfile(ctx, false, absDockerfilePath, workspace, buildArgs, cfg)
	if err != nil {
		return nil, err
	}

	excludes, err := readDockerignore(workspace, absDockerfilePath)
	if err != nil {
		return nil, fmt.Errorf("reading .dockerignore: %w", err)
	}

	deps := make([]string, 0, len(fts))
	for _, ft := range fts {
		deps = append(deps, ft.From)
	}

	files, err := WalkWorkspace(workspace, excludes, deps)
	if err != nil {
		return nil, fmt.Errorf("walking workspace: %w", err)
	}

	// Always add dockerfile even if it's .dockerignored. The daemon will need it anyways.
	if !filepath.IsAbs(dockerfilePath) {
		files[dockerfilePath] = true
	} else {
		files[absDockerfilePath] = true
	}

	// Ignore .dockerignore
	delete(files, ".dockerignore")

	var dependencies []string
	for file := range files {
		dependencies = append(dependencies, file)
	}
	sort.Strings(dependencies)

View on GitHub (pinned to a1189de023)

Solutions

  1. Check for unreadable directories or permission problems under the workspace
  2. Fix dangling symlinks or unusual filesystem entries in the build context
  3. Tighten the .dockerignore to exclude problematic directories that don't belong in the build context
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at pkg/skaffold/docker/dependencies.go:148 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/41c2fc40455b063c. Report an issue: GitHub.