{"record":{"id":"d610bbcd97394f30","repo":"GoogleContainerTools/skaffold","slug":"generating-checksum-as-fall-back-tag-for-q-w","errorCode":null,"errorMessage":"generating checksum as fall-back tag for %q: %w","messagePattern":"generating checksum as fall-back tag for %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/deploy/util/util.go","lineNumber":250,"sourceCode":"\tshowWarning := false\n\n\tfor i, artifact := range artifacts {\n\t\timageName := artifact.ImageName\n\t\tout, ctx := output.WithEventContext(ctx, out, constants.Build, imageName)\n\t\toutput.Default.Fprintf(out, \" - %s -> \", imageName)\n\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn nil, context.Canceled\n\n\t\tcase t := <-tagErrs[i]:\n\t\t\tif t.err != nil {\n\t\t\t\tlog.Entry(ctx).Debug(t.err)\n\t\t\t\tlog.Entry(ctx).Debug(\"Using a fall-back tagger\")\n\n\t\t\t\tfallbackTag, err := tag.GenerateFullyQualifiedImageName(ctx, &tag.ChecksumTagger{}, *artifact)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"generating checksum as fall-back tag for %q: %w\", imageName, err)\n\t\t\t\t}\n\n\t\t\t\tt.tag = fallbackTag\n\t\t\t\tshowWarning = true\n\t\t\t}\n\n\t\t\t_tag, err := ApplyDefaultRepo(runCtx.GlobalConfig(), runCtx.DefaultRepo(), t.tag)\n\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tfmt.Fprintln(out, _tag)\n\t\t\timageTags[imageName] = _tag\n\t\t}\n\t}\n\n\tif showWarning {","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/deploy/util/util.go#L232-L268","documentation":"Skaffold's ImageTags function resolves image tags via the configured tagger. When the primary tagger fails (its error is only logged at debug level), it retries with a ChecksumTagger that derives a tag from the build artifact's checksum. If even that fallback tag generation fails, this wrapped error is returned naming the image.","triggerScenarios":"Calling deploy tag resolution (ImageTags) where the configured tagger fails (e.g. git tagger in a non-git directory, env template tagger missing vars, date tagger failure) AND tag.GenerateFullyQualifiedImageName with ChecksumTagger also fails because the artifact workspace is missing or its template expansion fails.","commonSituations":"Running skaffold deploy/render without a prior build in a workspace that was moved or deleted; a git-based tagger outside a git repo combined with a broken/empty artifact workspace; malformed image name templates in skaffold.yaml.","solutions":["Check the debug log output (-vdebug) to see the original tagger error and the fallback failure cause","Verify each artifact's workspace directory exists and contains the expected source files","If the tagger is git-based, run from inside a valid git repository or switch to a checksum/date tagger in skaffold.yaml","Run skaffold build first so tags can be resolved from a real build"],"exampleFix":"// before: running deploy in a moved workspace\nskaffold deploy -vdebug\n// error: generating checksum as fall-back tag for \"img\": ...\n// after: ensure the workspace exists before deploying\ncd /path/to/project && skaffold deploy","handlingStrategy":"fallback","validationCode":"if _, err := os.Stat(artifact.Workspace); err != nil {\n\treturn fmt.Errorf(\"workspace missing, checksum fallback tag will fail: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"tags, err := ImageTags(ctx, runCtx, artifacts, tagger, out)\nif err != nil && strings.Contains(err.Error(), \"generating checksum as fall-back tag\") {\n\tlog.Warnf(\"tagger and checksum fallback failed: %v\", err)\n}","preventionTips":["Run skaffold from the project root with all artifact workspaces present","Prefer explicit taggers (envTemplate with full templates) you have verified work","Check debug logs for the original tagger error before assuming a code bug"],"tags":["skaffold","tagging","build-artifacts"],"backgroundTag":"image-tag-generation-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"}