Skip to content

Commit 6283405

Browse files
authored
Merge pull request #762 from imeoer/upgrade-go-1.18
contrib: upgrade to go 1.18
2 parents e2c6a15 + 7e44a5e commit 6283405

File tree

22 files changed

+61
-1702
lines changed

22 files changed

+61
-1702
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
go-version: [1.16.x, 1.17.x]
21+
go-version: [1.17.x, 1.18.x]
2222
env:
2323
DOCKER: false
2424
steps:
@@ -35,7 +35,7 @@ jobs:
3535
${{ runner.os }}-go
3636
- name: test contrib UT
3737
run: |
38-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0
38+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
3939
make contrib-test
4040
4141
smoke:
@@ -55,7 +55,7 @@ jobs:
5555
continue-on-error: true
5656
- name: Smoke Test
5757
run: |
58-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0
58+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
5959
echo Cargo Home: $CARGO_HOME
6060
echo Running User: $(whoami)
6161
make docker-smoke

.github/workflows/it.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Go
1919
uses: actions/setup-go@v3
2020
with:
21-
go-version: 1.17
21+
go-version: 1.18
2222
- name: Setup pytest
2323
run: |
2424
sudo apt install --no-install-recommends -y attr libattr1-dev fio pkg-config libssl-dev python3

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- uses: actions/checkout@v2
9191
- uses: actions/setup-go@v2
9292
with:
93-
go-version: '1.17'
93+
go-version: '1.18'
9494
- name: cache go mod
9595
uses: actions/cache@v2
9696
with:

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ dind_cache_mount := $(if $(DIND_CACHE_DIR),-v $(DIND_CACHE_DIR):/var/lib/docker,
6767
define build_golang
6868
echo "Building target $@ by invoking: $(2)"
6969
if [ $(DOCKER) = "true" ]; then \
70-
docker run --rm -v ${go_path}:/go -v ${current_dir}:/nydus-rs --workdir /nydus-rs/$(1) golang:1.17 $(2) ;\
70+
docker run --rm -v ${go_path}:/go -v ${current_dir}:/nydus-rs --workdir /nydus-rs/$(1) golang:1.18 $(2) ;\
7171
else \
7272
$(2) -C $(1); \
7373
fi

contrib/ctr-remote/.golangci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
linters:
44
enable:
5-
- structcheck
6-
- varcheck
75
- staticcheck
86
- unconvert
97
- gofmt

contrib/ctr-remote/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/dragonflyoss/image-service/contrib/ctr-remote
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/containerd/containerd v1.6.6

contrib/ctr-remote/go.sum

-340
Large diffs are not rendered by default.

contrib/docker-nydus-graphdriver/.golangci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
linters:
44
enable:
5-
- structcheck
6-
- varcheck
75
- staticcheck
86
- unconvert
97
- gofmt

contrib/docker-nydus-graphdriver/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17
1+
FROM golang:1.18
22
ARG GOPROXY="https://goproxy.cn,direct"
33
RUN mkdir -p /app
44
WORKDIR /app

contrib/docker-nydus-graphdriver/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/dragonflyoss/image-service/contrib/nydus_graphdriver
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/docker/docker v20.10.3-0.20211206061157-934f955e3d62+incompatible

contrib/docker-nydus-graphdriver/go.sum

-1,036
Large diffs are not rendered by default.

contrib/nydus-overlayfs/.golangci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
linters:
44
enable:
5-
- structcheck
6-
- varcheck
75
- staticcheck
86
- unconvert
97
- gofmt

contrib/nydus-overlayfs/cmd/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ var (
2222
)
2323

2424
/*
25-
containerd run fuse.mount format: nydus-overlayfs overlay /tmp/ctd-volume107067851
26-
-o lowerdir=/foo/lower2:/foo/lower1,upperdir=/foo/upper,workdir=/foo/work,extraoption={...},dev,suid]
25+
containerd run fuse.mount format: nydus-overlayfs overlay /tmp/ctd-volume107067851
26+
-o lowerdir=/foo/lower2:/foo/lower1,upperdir=/foo/upper,workdir=/foo/work,extraoption={...},dev,suid]
2727
*/
2828
type mountArgs struct {
2929
fsType string

contrib/nydus-overlayfs/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/dragonflyoss/image-service/contrib/nydus-overlayfs
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/pkg/errors v0.9.1

contrib/nydus-test/misc/containerize/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ RUN wget https://github.com/opencontainers/runc/releases/download/v1.1.2/runc.am
2525
RUN chmod +x /usr/bin/*; chmod +x /usr/bin/runc
2626

2727
# Install golang
28-
RUN wget https://go.dev/dl/go1.17.8.linux-amd64.tar.gz -O /home/go1.17.8.linux-amd64.tar.gz
29-
RUN tar -C /usr/local -xzf /home/go1.17.8.linux-amd64.tar.gz
28+
RUN wget https://go.dev/dl/go1.18.1.linux-amd64.tar.gz -O /home/go1.18.1.linux-amd64.tar.gz
29+
RUN tar -C /usr/local -xzf /home/go1.18.1.linux-amd64.tar.gz
3030
ENV PATH $PATH:/usr/local/go/bin
3131
RUN mkdir /root/go
3232
RUN rm -rf /home/*

contrib/nydusify/.golangci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
linters:
44
enable:
5-
- structcheck
6-
- varcheck
75
- staticcheck
86
- unconvert
97
- gofmt

contrib/nydusify/go.mod

+37-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
module github.com/dragonflyoss/image-service/contrib/nydusify
22

3-
go 1.14
3+
go 1.18
44

55
require (
66
github.com/aliyun/aliyun-oss-go-sdk v2.1.5+incompatible
7-
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
87
github.com/containerd/containerd v1.6.6
98
github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible
109
github.com/docker/distribution v2.8.1+incompatible
11-
github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible // indirect
1210
github.com/dustin/go-humanize v1.0.0
1311
github.com/google/uuid v1.2.0
1412
github.com/opencontainers/go-digest v1.0.0
@@ -18,11 +16,46 @@ require (
1816
github.com/prometheus/client_golang v1.11.1
1917
github.com/sirupsen/logrus v1.8.1
2018
github.com/stretchr/testify v1.7.0
21-
github.com/tidwall/gjson v1.9.3
2219
github.com/urfave/cli/v2 v2.3.0
2320
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
2421
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
2522
lukechampine.com/blake3 v1.1.5
2623
)
2724

25+
require (
26+
github.com/Microsoft/go-winio v0.5.1 // indirect
27+
github.com/Microsoft/hcsshim v0.9.3 // indirect
28+
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
29+
github.com/beorn7/perks v1.0.1 // indirect
30+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
31+
github.com/containerd/cgroups v1.0.3 // indirect
32+
github.com/containerd/continuity v0.2.2 // indirect
33+
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
34+
github.com/davecgh/go-spew v1.1.1 // indirect
35+
github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible // indirect
36+
github.com/docker/docker-credential-helpers v0.6.3 // indirect
37+
github.com/gogo/protobuf v1.3.2 // indirect
38+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
39+
github.com/golang/protobuf v1.5.2 // indirect
40+
github.com/klauspost/compress v1.11.13 // indirect
41+
github.com/klauspost/cpuid v1.3.1 // indirect
42+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
43+
github.com/moby/locker v1.0.1 // indirect
44+
github.com/moby/sys/mountinfo v0.5.0 // indirect
45+
github.com/pmezard/go-difflib v1.0.0 // indirect
46+
github.com/prometheus/client_model v0.2.0 // indirect
47+
github.com/prometheus/common v0.30.0 // indirect
48+
github.com/prometheus/procfs v0.7.3 // indirect
49+
github.com/russross/blackfriday/v2 v2.0.1 // indirect
50+
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
51+
github.com/stretchr/objx v0.2.0 // indirect
52+
go.opencensus.io v0.23.0 // indirect
53+
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
54+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
55+
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
56+
google.golang.org/grpc v1.43.0 // indirect
57+
google.golang.org/protobuf v1.27.1 // indirect
58+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
59+
)
60+
2861
replace github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.2

0 commit comments

Comments
 (0)