Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

bake: panic value is unknown #2960

Closed
crazy-max opened this issue Feb 1, 2025 · 0 comments · Fixed by #2965
Closed

bake: panic value is unknown #2960

crazy-max opened this issue Feb 1, 2025 · 0 comments · Fixed by #2965
Assignees
Labels
area/bake kind/bug Something isn't working
Milestone

Comments

@crazy-max
Copy link
Member

Made a typo in my definition and it panics:

variable "REPO_SLUG" {
  default = "foo/bar"
}

target "default" {
  cache-from = ["${REPO}:master"]
}
$ docker buildx bake --print
#1 [internal] load local bake definitions
panic: value is unknown

goroutine 1 [running]:
github.com/zclconf/go-cty/cty.Value.AsString({{{0x2c99178?, 0xc000012861?}}, {0x2430a80?, 0xc000355990?}})
        github.com/zclconf/go-cty@v1.16.0/cty/value_ops.go:1393 +0xf8
github.com/docker/buildx/util/buildflags.isEmpty(...)
        github.com/docker/buildx/util/buildflags/utils.go:53
github.com/docker/buildx/util/buildflags.(*CacheOptions).fromCtyValue(0xc00062c450, {{{0x2c989f0?, 0xc00062c3d8?}}, {0x22c96c0?, 0xc00062c3f0?}}, {0x0, 0x0, 0x0})
        github.com/docker/buildx/util/buildflags/cache_cty.go:29 +0x1b5
github.com/docker/buildx/util/buildflags.(*CacheOptions).FromCtyValue(0x41f5bb0?, {{{0x2c989f0?, 0xc00062c3d8?}}, {0x22c96c0?, 0xc00062c3f0?}}, {0x0?, 0x10?, 0x10?})
        github.com/docker/buildx/util/buildflags/cache_cty.go:17 +0x59
github.com/docker/buildx/bake/hclparser.capsuleValueCapsuleType.func1.1({{{0x2c989f0?, 0xc00062c3d8?}}, {0x22c96c0?, 0xc00062c3f0?}}, {0x0, 0x0, 0x0})
        github.com/docker/buildx/bake/hclparser/type_implied_ext.go:66 +0x111
github.com/zclconf/go-cty/cty/convert.conversionToCapsule.func1({{{0x2c989f0?, 0xc00062c3d8?}}, {0x22c96c0?, 0xc00062c3f0?}}, {0x0?, 0xc0004f3f80?, 0x10?})
        github.com/zclconf/go-cty@v1.16.0/cty/convert/conversion_capsule.go:14 +0x4a
github.com/zclconf/go-cty/cty/convert.getConversion.func1({{{0x2c989f0?, 0xc00062c3d8?}}, {0x22c96c0?, 0xc00062c3f0?}}, {0x0, 0x0, 0x0})
        github.com/zclconf/go-cty@v1.16.0/cty/convert/conversion.go:57 +0x2ae
github.com/zclconf/go-cty/cty/convert.GetConversionUnsafe.retConversion.func1({{{0x2c989f0?, 0xc00062c3d8?}}, {0x22c96c0?, 0xc00062c3f0?}})
        github.com/zclconf/go-cty@v1.16.0/cty/convert/conversion.go:203 +0x34
github.com/zclconf/go-cty/cty/convert.Convert({{{0x2c989f0?, 0xc00062c3d8?}}, {0x22c96c0?, 0xc00062c3f0?}}, {{0x2c98980?, 0xc00062b140?}})
        github.com/zclconf/go-cty@v1.16.0/cty/convert/public.go:51 +0x1fb
github.com/docker/buildx/bake/hclparser/gohcl.DecodeOptions.DecodeExpression({0x2a07b48?, 0x2a08bc8?}, {0x7fc9041bed18, 0xc0004f4820}, 0x2cca330?, {0x25f10c0, 0xc0006053f0})
        github.com/docker/buildx/bake/hclparser/gohcl/decode.go:295 +0x114
github.com/docker/buildx/bake/hclparser/gohcl.DecodeOptions.decodeBodyToStruct({0x2a07b48?, 0x2a08bc8?}, {0x2c98910, 0xc0004f3740}, 0xc00062c018, {0x28598e0?, 0xc000605340?, 0xc00062c018?})
        github.com/docker/buildx/bake/hclparser/gohcl/decode.go:138 +0xda5
github.com/docker/buildx/bake/hclparser/gohcl.DecodeOptions.decodeBodyToValue({0x2a07b48?, 0x2a08bc8?}, {0x2c98910, 0xc0004f3740}, 0xc00062c018, {0x28598e0?, 0xc000605340?, 0x508a8d?})
        github.com/docker/buildx/bake/hclparser/gohcl/decode.go:57 +0xee
github.com/docker/buildx/bake/hclparser/gohcl.DecodeOptions.DecodeBody({0x2a07b48?, 0x0?}, {0x2c98910, 0xc0004f3740}, 0xc00062c018, {0x25efec0?, 0xc000605340?})
        github.com/docker/buildx/bake/hclparser/gohcl/decode.go:30 +0x126
github.com/docker/buildx/bake/hclparser.decodeBody(...)
        github.com/docker/buildx/bake/hclparser/hclparser.go:993
github.com/docker/buildx/bake/hclparser.(*parser).resolveBlock(0xc0004d1880, 0xc000619ba0, 0x0)
        github.com/docker/buildx/bake/hclparser/hclparser.go:456 +0xb85
github.com/docker/buildx/bake/hclparser.Parse({0x2c988d8, 0xc000011968}, {0x2a07b40?, 0xc0004a3680?, 0x2a07b38?}, {0x2657f60, 0xc0004a36b0})
        github.com/docker/buildx/bake/hclparser/hclparser.go:814 +0x1ce7
github.com/docker/buildx/bake.ParseFiles({0xc0004a3650, 0x1, 0x46d31d?}, 0xc0004a3680)
        github.com/docker/buildx/bake/bake.go:347 +0xa5d
github.com/docker/buildx/bake.ReadTargets({0xc0004d1480?, 0x2c983b0?}, {0xc0004a3650?, 0x0?, 0x0?}, {0xc0003552e0, 0x1, 0x0?}, {0x0, 0x0, ...}, ...)
        github.com/docker/buildx/bake/bake.go:197 +0x46
github.com/docker/buildx/commands.runBake({_, _}, {_, _}, {_, _, _}, {{0x426f800, 0x0, 0x0}, ...}, ...)
        github.com/docker/buildx/commands/bake.go:216 +0x185e
github.com/docker/buildx/commands.bakeCmd.func1(0xc0005c0c08, {0xc0003b1350, 0x0, 0x1})
        github.com/docker/buildx/commands/bake.go:454 +0x2e5
github.com/docker/cli/cli-plugins/plugin.RunPlugin.func1.1.2(0xc0005c0c08, {0xc0003b1350, 0x0, 0x1})
        github.com/docker/cli@v27.5.0+incompatible/cli-plugins/plugin/plugin.go:64 +0x6c
github.com/spf13/cobra.(*Command).execute(0xc0005c0c08, {0xc00001bc10, 0x1, 0x1})
        github.com/spf13/cobra@v1.8.1/command.go:985 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0xc000457b08)
        github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.8.1/command.go:1041
github.com/docker/cli/cli-plugins/plugin.RunPlugin(0xc0002eb900, 0xc0005c0608, {{0x28a30e5, 0x5}, {0x28ad4f4, 0xb}, {0x2c6e770, 0x1a}, {0x0, 0x0}, ...})
        github.com/docker/cli@v27.5.0+incompatible/cli-plugins/plugin/plugin.go:79 +0x145
main.runPlugin(0xc0002eb900)
        github.com/docker/buildx/cmd/buildx/main.go:65 +0xe6
main.run(0xc0002eb900)
        github.com/docker/buildx/cmd/buildx/main.go:79 +0xe5
main.main()
        github.com/docker/buildx/cmd/buildx/main.go:89 +0x86
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/bake kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants