kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.24k stars 4.87k forks source link

"make local-kicbase-debug" broken #19455

Closed medyagh closed 1 month ago

medyagh commented 1 month ago

we have a helper make target that supposed to build Kicbase and once it is built it should replace the code with the locally built kicbase image name

but the sed part of it is broken

$ make local-kicbase-debug

docker tag local/kicbase:v0.0.44-1723650208-19443 local/kicbase:latest
docker tag local/kicbase:v0.0.44-1723650208-19443 local/kicbase:v0.0.44-1723650208-19443-c039149d5
sed -i '' 's|Version = .*|Version = \"v0.0.44-1723650208-19443-c039149d5\"|;s|baseImageSHA = .*|baseImageSHA = \"\"|;s|gcrRepo = .*|gcrRepo = \"local/kicbase\"|;s|dockerhubRepo = .*|dockerhubRepo = \"local/kicbase\"|' pkg/drivers/kic/types.go
sed: can't read s|Version = .*|Version = \"v0.0.44-1723650208-19443-c039149d5\"|;s|baseImageSHA = .*|baseImageSHA = \"\"|;s|gcrRepo = .*|gcrRepo = \"local/kicbase\"|;s|dockerhubRepo = .*|dockerhubRepo = \"local/kicbase\"|: No such file or directory
make: *** [local-kicbase-debug] Error 2
medyagh commented 1 month ago

ok update, this seems to be affecting specific versions of Macos we replace sed for macos

SED = sed -i
ifeq ($(GOOS),darwin)
    SED = sed -i ''
endif

however if I let it be normal sed without the additional '' it works fine for me,

it seems like I am using Gnu SED and not macos Sed we need to fix it in a way that if i tis Gnu sed it should not add '' after -i

xcarolan commented 1 month ago

/assign

afbjorklund commented 1 month ago

Or just use /usr/bin/sed, instead of any weird overrides from brew or whatever

If you add "gnubin" to your PATH, you can get errors such as these (from coreutils)

medyagh commented 1 month ago

that was done