{"record":{"id":"add9d47111e62de3","repo":"GoogleContainerTools/skaffold","slug":"unable-to-resolve-tag-for-image-s","errorCode":null,"errorMessage":"unable to resolve tag for image: %s","messagePattern":"unable to resolve tag for image: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/graph/dependencies.go","lineNumber":70,"sourceCode":"\treturn &dependencyResolverImpl{cfg: cfg, artifactResolver: r, artifactGraph: g, cache: util.NewSyncStore[[]string]()}\n}\n\ntype dependencyResolverImpl struct {\n\tcfg              docker.Config\n\tartifactResolver docker.ArtifactResolver\n\tartifactGraph    ArtifactGraph\n\tcache            *util.SyncStore[[]string]\n}\n\nfunc (r *dependencyResolverImpl) TransitiveArtifactDependencies(ctx context.Context, a *latest.Artifact) ([]string, error) {\n\tctx, endTrace := instrumentation.StartTrace(ctx, \"TransitiveArtifactDependencies\", map[string]string{\n\t\t\"ArtifactName\": instrumentation.PII(a.ImageName),\n\t})\n\tdefer endTrace()\n\n\ttag, ok := r.artifactResolver.GetImageTag(a.ImageName)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"unable to resolve tag for image: %s\", a.ImageName)\n\t}\n\n\tdeps, err := r.SingleArtifactDependencies(ctx, a, tag)\n\tif err != nil {\n\t\tendTrace(instrumentation.TraceEndError(err))\n\t\treturn nil, err\n\t}\n\tfor _, ad := range a.Dependencies {\n\t\td, err := r.TransitiveArtifactDependencies(ctx, r.artifactGraph[ad.ImageName])\n\t\tif err != nil {\n\t\t\tendTrace(instrumentation.TraceEndError(err))\n\t\t\treturn nil, err\n\t\t}\n\t\tdeps = append(deps, d...)\n\t}\n\treturn deps, nil\n}\n","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/graph/dependencies.go#L52-L88","documentation":"TransitiveArtifactDependencies resolves a single artifact's dependency list, but first it asks the artifactResolver for the image tag that was assigned to the artifact's image name during the current build sequence. If no tag is registered for that image name, dependency computation cannot proceed and this error is thrown.","triggerScenarios":"Calling TransitiveArtifactDependencies (via the resolver chain used by file watching and dependency hashing) for an artifact whose ImageName has not been built/tagged yet — e.g. an artifact referenced only as another artifact's dependency that hasn't completed its build, or an image name typo that matches no configured artifact.","commonSituations":"First iteration of `skaffold dev` before all artifacts are built; `skaffold build` with cross-artifact dependencies where a required artifact was skipped or failed; an artifact's image name in `dependencies` doesn't exactly match any defined artifact; custom resolvers/test harnesses passing an incomplete tag map.","solutions":["Verify the image name referenced in the artifact's `dependencies` exactly matches a defined artifact's `image` name in skaffold.yaml.","Ensure all upstream artifacts are built before dependency resolution (run the full build pipeline rather than a single artifact).","Check that the build didn't fail silently for the upstream artifact, leaving no tag registered.","If invoked programmatically, confirm the artifactResolver you passed actually contains a mapping for every referenced image name."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func tagResolved(resolver graph.ArtifactResolver, imageName string) bool {\n\t_, ok := resolver.GetImageTag(imageName)\n\treturn ok\n}","tryCatchPattern":"deps, err := r.TransitiveArtifactDependencies(ctx, a)\nif err != nil && strings.Contains(err.Error(), \"unable to resolve tag for image\") {\n\t// artifact not built yet — skip dependency computation this cycle\n\treturn nil // defer to next dev loop after build completes\n}","preventionTips":["Keep `dependencies` image names in sync with artifact `image` names","Run the full build pipeline rather than single-artifact builds when using cross-artifact deps","Verify upstream builds succeeded before computing dependency graphs","In tests, always seed the resolver's tag map for every referenced image"],"tags":["build","dependencies","artifact-resolution"],"backgroundTag":"image-tag-unresolved","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"}