kcl-lang / flux-kcl-controller

Flux KCL Controller
https://kcl-lang.io
Apache License 2.0
22 stars 7 forks source link

kcl run error: failed to compile the KCL source code #166

Open Jamel-jun opened 1 week ago

Jamel-jun commented 1 week ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

My application is compiled and deployed into k8s correctly

3. What did you see instead (Required)

kcl controller pod appear error logs

{"level":"error","ts":"2024-11-11T08:24:25.638Z","msg":"failed to compile the KCL source code","controller":"kclrun","controllerGroup":"krm.kcl.dev.fluxcd","controllerKind":"KCLRun","KCLRun":{"name":"kcl-git-controller","namespace":"infa"},"namespace":"infa","name":"kcl-git-controller","reconcileID":"f8b9a463-2974-454a-8450-fba476f14319","error":"failed to compile the kcl package\nfailed to hash the kcl package 'oam' in ''.\nlstat : no such file or directory\n\n"}
{"level":"error","ts":"2024-11-11T08:24:25.639Z","msg":"Reconciler error","controller":"kclrun","controllerGroup":"krm.kcl.dev.fluxcd","controllerKind":"KCLRun","KCLRun":{"name":"kcl-git-controller","namespace":"infa"},"namespace":"infa","name":"kcl-git-controller","reconcileID":"f8b9a463-2974-454a-8450-fba476f14319","error":"failed to compile the kcl package\nfailed to hash the kcl package 'oam' in ''.\nlstat : no such file or directory\n\n"}

image

4. What is your KCL components version? (Required)

pod image: ghcr.io/kcl-lang/flux-kcl-controller:v0.1.0

Peefy commented 1 week ago

Hello @Jamel-jun Have you try the latest image? ghcr.io/kcl-lang/flux-kcl-controller:v0.7.0

cc @zong-zhe

Jamel-jun commented 1 week ago

你好@Jamel-jun 您想浏览最新的图片吗?ghcr.io/kcl-lang/flux-kcl-controller:v0.7.0

抄送@zong-zhe

Error occurred: image image

sigunused commented 6 days ago

I'm seeing this with all images after v0.1.1, including v0.7.0:

kcl-controller flag redefined: log-encoding
panic: kcl-controller flag redefined: log-encoding

goroutine 1 [running]:
github.com/spf13/pflag.(*FlagSet).AddFlag(0xc00069e000, 0xc0004ec6e0)
    /go/pkg/mod/github.com/spf13/pflag@v1.0.5/flag.go:848 +0x5fc
github.com/spf13/pflag.(*FlagSet).VarPF(0xc00069e000, {0x2af5ee8, 0xc000795bc0}, {0x2625b4d, 0xc}, {0x0, 0x0}, {0x26938ac, 0x30})
    /go/pkg/mod/github.com/spf13/pflag@v1.0.5/flag.go:831 +0x105
github.com/spf13/pflag.(*FlagSet).VarP(...)
    /go/pkg/mod/github.com/spf13/pflag@v1.0.5/flag.go:837
github.com/spf13/pflag.(*FlagSet).StringVar(...)
    /go/pkg/mod/github.com/spf13/pflag@v1.0.5/string.go:37
github.com/fluxcd/pkg/runtime/logger.(*Options).BindFlags(0xc000795bc0, 0xc00069e000)
    /go/pkg/mod/github.com/fluxcd/pkg/runtime@v0.49.1/logger/logger.go:84 +0x75
main.main()
    /src/cmd/main.go:99 +0x3ed
Peefy commented 6 days ago

Thank you! We will fix it later. cc @zong-zhe