{"record":{"id":"739c2d5d296ec6c7","repo":"GoogleContainerTools/skaffold","slug":"unexpected-artifact-type-q-s","errorCode":null,"errorMessage":"unexpected artifact type %q:\n%s","messagePattern":"unexpected artifact type %q:\n(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/graph/dependencies.go","lineNumber":162,"sourceCode":"\t\tpaths, err = docker.GetDependencies(ctx, docker.NewBuildConfig(kaniko.GetContext(a.KanikoArtifact, a.Workspace), a.ImageName, a.KanikoArtifact.DockerfilePath, args), cfg)\n\n\tcase a.BazelArtifact != nil:\n\t\tpaths, err = bazel.GetDependencies(ctx, a.Workspace, a.BazelArtifact)\n\n\tcase a.JibArtifact != nil:\n\t\tpaths, err = jib.GetDependencies(ctx, a.Workspace, a.JibArtifact)\n\n\tcase a.CustomArtifact != nil:\n\t\tpaths, err = custom.GetDependencies(ctx, a.Workspace, a.ImageName, a.CustomArtifact, cfg)\n\n\tcase a.BuildpackArtifact != nil:\n\t\tpaths, err = buildpacks.GetDependencies(ctx, a.Workspace, a.BuildpackArtifact)\n\n\tcase a.KoArtifact != nil:\n\t\tpaths, err = ko.GetDependencies(ctx, a.Workspace, a.KoArtifact)\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unexpected artifact type %q:\\n%s\", misc.ArtifactType(a), misc.FormatArtifact(a))\n\t}\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn util.AbsolutePaths(a.Workspace, paths), nil\n}\n","sourceCodeStart":144,"sourceCodeEnd":171,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/graph/dependencies.go#L144-L171","documentation":"sourceDependenciesForArtifact switches over the artifact type (docker, kaniko, bazel, jib, buildpacks, ko). If none matches — the artifact has no recognized type set, or a type Skaffold's dependency resolution doesn't support — it throws this error including the artifact type string and a formatted dump of the artifact.","triggerScenarios":"An Artifact struct reaches sourceDependenciesForArtifact with all of DockerArtifact/KanikoArtifact/BazelArtifact/JibArtifact/BuildpackArtifact/KoArtifact nil — e.g. a custom resolver handing over an untyped artifact, a custom builder plugin artifact, or an artifact constructed programmatically without setting its type.","commonSituations":"Using custom build types (e.g. `customArtifact` or cluster-only artifacts) in a context that computes source dependencies; programmatic use of the resolver API with hand-built Artifact structs; skaffold.yaml parsing produced an empty artifact definition.","solutions":["Check skaffold.yaml for an artifact entry missing its build type definition (empty or malformed build stanza).","If using a custom builder, note that source-dependency computation doesn't support it — define watch/file dependencies explicitly or switch to a supported builder.","When calling the resolver programmatically, populate one of the typed artifact fields (e.g. DockerArtifact) before invoking.","Read the %q artifact type and format dump in the message to identify which artifact was untyped."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func hasSupportedArtifactType(a *latest.Artifact) bool {\n\treturn a != nil && (a.DockerArtifact != nil || a.KanikoArtifact != nil ||\n\t\ta.BazelArtifact != nil || a.JibArtifact != nil ||\n\t\ta.BuildpackArtifact != nil || a.KoArtifact != nil)\n}","tryCatchPattern":null,"preventionTips":["Ensure every skaffold.yaml artifact has exactly one build type stanza","Don't feed custom/custom-tool artifacts into source-dependency resolution","Validate skaffold.yaml with `skaffold diagnose` before running pipelines","When constructing Artifacts programmatically, set one typed field explicitly"],"tags":["artifact-resolution","config","skaffold-yaml"],"backgroundTag":"unsupported-artifact-type","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"}