This is an automated email from the ASF dual-hosted git repository.
zhangliang2022 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new f29d31451 Kw upgrade go1.20.4 for better generic support (#5611)
f29d31451 is described below
commit f29d31451418b31d0afdcbcca0102f5ba8c08faf
Author: Klesh Wong <[email protected]>
AuthorDate: Tue Jul 4 15:22:16 2023 +0800
Kw upgrade go1.20.4 for better generic support (#5611)
* chore: upgrade golang to 1.20
* ci: upgrade golang to v1.20.4
* ci: add go version to test/lint
* chore: upgrade mapstructure and python image
* fix: fixing golang to minor version
---
.github/workflows/golangci-lint.yml | 1 +
.github/workflows/test-e2e.yml | 2 ++
.github/workflows/test.yml | 1 +
backend/Dockerfile | 4 ++--
backend/go.mod | 2 +-
backend/go.sum | 2 ++
devops/docker/lake-builder/Dockerfile | 6 +++---
7 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/golangci-lint.yml
b/.github/workflows/golangci-lint.yml
index 1b2bb9aa4..d79ca9ac7 100644
--- a/.github/workflows/golangci-lint.yml
+++ b/.github/workflows/golangci-lint.yml
@@ -38,6 +38,7 @@ jobs:
key: ${{ runner.os }}-backend-golangci-lint
- name: generate mock
run: |
+ go version
cd backend
make mock
- name: golangci-lint
diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml
index 8d8f6a1f2..59619efae 100644
--- a/.github/workflows/test-e2e.yml
+++ b/.github/workflows/test-e2e.yml
@@ -70,6 +70,7 @@ jobs:
DB_URL: mysql://root:root@db:3306/lake?charset=utf8mb4&parseTime=True
E2E_DB_URL:
mysql://root:root@db:3306/lake?charset=utf8mb4&parseTime=True
run: |
+ go version
cp env.example .env
cd backend
make e2e-plugins-test
@@ -109,6 +110,7 @@ jobs:
DB_URL: postgres://merico:merico@db:5432/lake
E2E_DB_URL: postgres://merico:merico@db:5432/lake
run: |
+ go version
cp env.example .env
cd backend
make e2e-plugins-test
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 858919cf9..2ef9da145 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -64,6 +64,7 @@ jobs:
${{ runner.os }}-go-
- name: Unit tests
run: |
+ go version
cp env.example .env
cd backend
make unit-test
diff --git a/backend/Dockerfile b/backend/Dockerfile
index 4a3b4eb39..eef532cdf 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -31,7 +31,7 @@ FROM --platform=linux/arm64 debian:bullseye as debian-arm64
RUN apt-get update
RUN apt-get install -y libssh2-1-dev libssl-dev zlib1g-dev
-FROM --platform=$BUILDPLATFORM golang:1.19-bullseye as builder
+FROM --platform=$BUILDPLATFORM golang:1.20.4-bullseye as builder
# docker build --build-arg GOPROXY=https://goproxy.io,direct -t mericodev/lake
.
ARG GOPROXY=
@@ -111,7 +111,7 @@ RUN cd /usr/local/deps/target/lib && \
done
-FROM python:3.9.9-slim-bullseye as base
+FROM python:3.9-slim-bullseye as base
ENV PYTHONUNBUFFERED=1
diff --git a/backend/go.mod b/backend/go.mod
index ffc165d96..2bd432502 100644
--- a/backend/go.mod
+++ b/backend/go.mod
@@ -22,7 +22,7 @@ require (
github.com/manifoldco/promptui v0.9.0
github.com/merico-dev/graphql v0.0.0-20221027131946-77460a1fd4cd
github.com/mitchellh/hashstructure v1.1.0
- github.com/mitchellh/mapstructure v1.4.1
+ github.com/mitchellh/mapstructure v1.5.0
github.com/panjf2000/ants/v2 v2.4.6
github.com/robfig/cron/v3 v3.0.0
github.com/sirupsen/logrus v1.8.1
diff --git a/backend/go.sum b/backend/go.sum
index d60de3ef6..cbbfa50ae 100644
--- a/backend/go.sum
+++ b/backend/go.sum
@@ -536,6 +536,8 @@ github.com/mitchellh/mapstructure
v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F
github.com/mitchellh/mapstructure v1.1.2/go.mod
h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.4.1
h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
github.com/mitchellh/mapstructure v1.4.1/go.mod
h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/mapstructure v1.5.0
h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
+github.com/mitchellh/mapstructure v1.5.0/go.mod
h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod
h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod
h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
diff --git a/devops/docker/lake-builder/Dockerfile
b/devops/docker/lake-builder/Dockerfile
index b777c389b..ac86c5fd9 100644
--- a/devops/docker/lake-builder/Dockerfile
+++ b/devops/docker/lake-builder/Dockerfile
@@ -18,7 +18,7 @@ FROM --platform=linux/amd64 debian:bullseye as debian-amd64
RUN apt-get -y update && apt -y upgrade &&\
apt-get install -y libssh2-1-dev libssl-dev zlib1g-dev
-FROM golang:1.19.7-bullseye as builder
+FROM golang:1.20.4-bullseye as builder
# Base dependencies
RUN apt-get -y update && apt -y upgrade &&\
@@ -41,7 +41,7 @@ RUN \
cp *libgit2* /tmp/deps/ &&\
cp -r ../include /tmp/deps/include
-FROM python:3.9.9-slim-bullseye
+FROM python:3.9-slim-bullseye
RUN apt -y update && apt -y upgrade && apt -y install tzdata make tar curl gcc
g++ pkg-config git \
libssh2-1 zlib1g libffi-dev \
@@ -55,7 +55,7 @@ COPY --from=builder /tmp/deps/include/ /usr/include/
ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
# Install Golang
-RUN curl -L https://git.io/vQhTU | bash -s -- --version 1.19.7
+RUN curl -L https://git.io/vQhTU | bash -s -- --version 1.20.4
RUN mv /root/go /go &&\
mv /root/.go /usr/local/go &&\
ln -sf /usr/local/go/bin/* /usr/bin