konveyor / move2kube-api

HTTP REST API for move2kube
https://move2kube.konveyor.io/
Apache License 2.0
6 stars 18 forks source link

Make cbuild is failing with Go 1.18 #160

Closed Akash-Nayak closed 5 months ago

Akash-Nayak commented 5 months ago

Describe the bug make cbuild fails to build the move2kube-api image as it requires Go 1.19

> [builder 12/12] RUN make build:                                                   
0.124 go mod download                                                                
0.163 make get_swagger                                                               
0.166 make[1]: Entering directory '/go/src/move2kube-api'
0.190 curl -Lo swagger-ui.tgz https://github.com/swagger-api/swagger-ui/archive/refs/tags/v3.52.3.tar.gz \
0.190     && tar -xzf swagger-ui.tgz \
0.190     && mv swagger-ui-3.52.3/dist assets/swagger \
0.190     && cp assets/openapi.json assets/swagger/openapi.json \
0.190     && cp assets/index.html assets/swagger/index.html \
0.190     && rm swagger-ui.tgz \
0.190     && rm -rf swagger-ui-3.52.3
0.195   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
0.195                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 6030k    0 6030k    0     0  1777k      0 --:--:--  0:00:03 --:--:-- 3291k
3.793 make[1]: Leaving directory '/go/src/move2kube-api'
3.795 go build -ldflags '-w -s -X github.com/konveyor/move2kube-api/cmd/version.version=latest -X github.com/konveyor/move2kube-api/cmd/version.buildmetadata=unreleased -X github.com/konveyor/move2kube-api/cmd/version.gitCommit=594b44e064af54e284b15c2156d7e3adfdcca8b9 -X github.com/konveyor/move2kube-api/cmd/version.gitTreeState=dirty -extldflags "-static"' -o /go/src/move2kube-api/bin/move2kube-api ./cmd/main
5.988 # github.com/konveyor/move2kube-api/internal/move2kubeapi/handlers
5.988 internal/move2kubeapi/handlers/inputs.go:57:19: undefined: http.MaxBytesError
5.988 note: module requires Go 1.19
6.002 make: *** [Makefile:87: /go/src/move2kube-api/bin/move2kube-api] Error 2
------
Dockerfile:48
--------------------
  46 |     ARG VERSION=latest
  47 |     COPY . .
  48 | >>> RUN make build
  49 |     
  50 |     # Run image
--------------------
ERROR: failed to solve: process "/bin/sh -c make build" did not complete successfully: exit code: 2
make: *** [cbuild] Error 1

To Reproduce Steps to reproduce the behavior:

  1. Run make cbuild

Expected behavior It should successfully build the move2kube-api image.