{"record":{"id":"69d39ab7195191bd","repo":"GoogleContainerTools/skaffold","slug":"listing-artifact-dependencies-w","errorCode":null,"errorMessage":"listing artifact dependencies: %w","messagePattern":"listing artifact dependencies: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/diagnose/diagnose.go","lineNumber":64,"sourceCode":"\t\t\toutput.Default.Fprintf(out, \"\\n%s: %s\\n\", typeOfArtifact(artifact), artifact.ImageName)\n\n\t\t\tif artifact.DockerArtifact != nil {\n\t\t\t\tsize, err := sizeOfDockerContext(ctx, artifact, cfg)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"computing the size of the Docker context: %w\", err)\n\t\t\t\t}\n\n\t\t\t\tfmt.Fprintf(out, \" - Size of the context: %vbytes\\n\", size)\n\t\t\t}\n\n\t\t\ttag, ok := tags[artifact.ImageName]\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"getting tag for image %s\", artifact.ImageName)\n\t\t\t}\n\n\t\t\ttimeDeps1, deps, err := timeToListDependencies(ctx, artifact, tag, cfg)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"listing artifact dependencies: %w\", err)\n\t\t\t}\n\t\t\ttimeDeps2, _, err := timeToListDependencies(ctx, artifact, tag, cfg)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"listing artifact dependencies: %w\", err)\n\t\t\t}\n\n\t\t\tfmt.Fprintln(out, \" - Dependencies:\", len(deps), \"files\")\n\t\t\tfmt.Fprintf(out, \" - Time to list dependencies: %v (2nd time: %v)\\n\", timeDeps1, timeDeps2)\n\n\t\t\t// Only check sync map if inferred sync is configured on artifact\n\t\t\tif artifact.Sync != nil && len(artifact.Sync.Infer) > 0 {\n\t\t\t\ttimeSyncMap1, err := timeToConstructSyncMap(ctx, artifact, cfg)\n\t\t\t\tif err != nil {\n\t\t\t\t\tif _, isNotSupported := err.(build.ErrSyncMapNotSupported); !isNotSupported {\n\t\t\t\t\t\treturn fmt.Errorf(\"constructing inferred sync map: %w\", err)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttimeSyncMap2, err := timeToConstructSyncMap(ctx, artifact, cfg)","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/diagnose/diagnose.go#L46-L82","documentation":"CheckArtifacts times how long it takes to enumerate an artifact's source dependencies via graph.NewSourceDependenciesCache/SingleArtifactDependencies. If that dependency listing fails on the first pass, the error is wrapped with this message.","triggerScenarios":"Running `skaffold diagnose` when SingleArtifactDependencies fails for an artifact — e.g. Jib/Buildpack/Ko dependency resolution failing due to missing build tooling (mvn/gradle not installed), invalid workspace, or bad build configuration in skaffold.yaml.","commonSituations":"Jib artifacts with no Maven/Gradle wrapper available; custom dependency dependencies.json pointing to missing files; workspace path wrong in skaffold.yaml.","solutions":["Check the wrapped underlying error for the specific buildlet failure","Install/verify required build tools (mvn, gradle) on PATH for Jib artifacts","Verify the artifact's workspace path and dependency configuration in skaffold.yaml","Run the underlying build tool's dependency command manually in the workspace"],"exampleFix":"// before: jib artifact without maven installed\nskaffold diagnose\n// error: listing artifact dependencies: ... mvn: not found\n// after\nmvn -v && skaffold diagnose","handlingStrategy":"try-catch","validationCode":"if a.JibArtifact != nil {\n\tif _, err := exec.LookPath(\"mvn\"); err != nil {\n\t\tif _, err := exec.LookPath(\"gradle\"); err != nil {\n\t\t\treturn errors.New(\"install maven or gradle for jib dependency listing\")\n\t\t}\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := CheckArtifacts(ctx, cfg, tags, out); err != nil {\n\tif strings.Contains(err.Error(), \"listing artifact dependencies\") {\n\t\tlog.Warnf(\"dependency resolution failed: %v\", err)\n\t}\n}","preventionTips":["Install required build tools (mvn/gradle/bazel) before running skaffold","Verify workspace paths in skaffold.yaml resolve from the invocation directory","Run the build tool's own dependency goal manually to validate configuration"],"tags":["skaffold","dependencies","diagnose"],"backgroundTag":"dependency-listing-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}