Katib image build failed because of Golang version
See original GitHub issue/kind bug
What steps did you take and what happened: Trying to build the katib image, I’m getting the following error:
Step 27/32 : RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o katib-ui ./cmd/new-ui/v1beta1
---> Running in 1361a0fd83b9
# k8s.io/apimachinery/third_party/forked/golang/reflect
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/third_party/forked/golang/reflect/deep_equal.go:376:7: undefined: reflect.Pointer
note: module requires Go 1.19
# k8s.io/apimachinery/pkg/util/validation/field
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/pkg/util/validation/field/errors.go:69:33: undefined: reflect.Pointer
note: module requires Go 1.19
# k8s.io/apimachinery/pkg/conversion/queryparams
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/pkg/conversion/queryparams/convert.go:58:17: undefined: reflect.Pointer
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/pkg/conversion/queryparams/convert.go:142:7: undefined: reflect.Pointer
note: module requires Go 1.19
# sigs.k8s.io/json/internal/golang/encoding/json
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:96:31: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:177:35: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:428:37: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:937:48: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:1143:45: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:1160:42: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:1195:52: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/decode.go:1261:42: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/encode.go:158:16: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/encode.go:175:22: undefined: any
/go/pkg/mod/sigs.k8s.io/json@v0.0.0-20220713155537-f223a00ba0e2/internal/golang/encoding/json/encode.go:175:22: too many errors
note: module requires Go 1.18
# k8s.io/apimachinery/third_party/forked/golang/json
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/third_party/forked/golang/json/fields.go:31:17: undefined: reflect.Pointer
/go/pkg/mod/k8s.io/apimachinery@v0.25.3/third_party/forked/golang/json/fields.go:186:40: undefined: reflect.Pointer
note: module requires Go 1.19
# k8s.io/client-go/third_party/forked/golang/template
/go/pkg/mod/k8s.io/client-go@v0.25.3/third_party/forked/golang/template/exec.go:20:20: undefined: reflect.Pointer
/go/pkg/mod/k8s.io/client-go@v0.25.3/third_party/forked/golang/template/exec.go:34:17: undefined: reflect.Pointer
/go/pkg/mod/k8s.io/client-go@v0.25.3/third_party/forked/golang/template/exec.go:42:22: undefined: reflect.PointerTo
note: module requires Go 1.19
The command '/bin/sh -c CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o katib-ui ./cmd/new-ui/v1beta1' returned a non-zero code: 2
I also tried docker build . -f cmd/new-ui/v1beta1/Dockerfile -t ${IMG}:${TAG} --no-cache
in case of having an older golang image cached but the error persists.
Impacted by this bug? Give it a 👍 We prioritize the issues with the most 👍
Issue Analytics
- State:
- Created 10 months ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Metrics collector fails to create watcher #1769 - kubeflow/katib
Metrics collector fails to create watcher #1769 ... Katib version (check the Katib controller image version): 0.12.0; Kubernetes version: ...
Read more >Hyperparameter Tuning (Katib) - Kubeflow
The Katib project is inspired by Google vizier. Katib is a scalable and flexible hyperparameter tuning framework and is tightly integrated ...
Read more >How Katib tunes hyperparameter automatically in a ... - Medium
Here I focus on introducing Katib v1alpha3 version, which is still in development and will be inlcuded in kubeflow 0.7.0 release. Now nearly...
Read more >From Notebook to Kubeflow Pipelines with HP Tuning: A Data ...
In this codelab, you will learn how to build and deploy complex data science pipelines with hyperparameter tuning on Kubeflow Pipelines, ...
Read more >Go build, with module, fails under an Alpine image but is fine ...
I cannot figure why the same version 1.13 of acts differently under windows and alpine at the moment of resolving dependencies? Am i...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tenzen-y @johnugeorge thank you very much for you help!
In the end we got to the bottom of it and it was indeed an issue with the cache and
golang:alpine
. The problem was that we had fetch thegolang:alpine
previously, when it didn’t have Golang 1.19, and now when building the image it wouldn’t re-pull it.We also misunderstood how
--no-cache
works. This argument tells docker to not use a cached LAYER when building the image. But this will not affect the base images withFROM <image>
. For this they have the--pull
argument https://docs.docker.com/engine/reference/commandline/build/#optionsSo after using the following command we managed to build it successfully
Thanks!