Skip to content

Commit

Permalink
Merge pull request #762 from imeoer/upgrade-go-1.18
Browse files Browse the repository at this point in the history
contrib: upgrade to go 1.18
  • Loading branch information
imeoer authored Sep 28, 2022
2 parents e2c6a15 + 7e44a5e commit 6283405
Show file tree
Hide file tree
Showing 22 changed files with 61 additions and 1,702 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.16.x, 1.17.x]
go-version: [1.17.x, 1.18.x]
env:
DOCKER: false
steps:
Expand All @@ -35,7 +35,7 @@ jobs:
${{ runner.os }}-go
- name: test contrib UT
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
make contrib-test
smoke:
Expand All @@ -55,7 +55,7 @@ jobs:
continue-on-error: true
- name: Smoke Test
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
echo Cargo Home: $CARGO_HOME
echo Running User: $(whoami)
make docker-smoke
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
- name: Setup pytest
run: |
sudo apt install --no-install-recommends -y attr libattr1-dev fio pkg-config libssl-dev python3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.17'
go-version: '1.18'
- name: cache go mod
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dind_cache_mount := $(if $(DIND_CACHE_DIR),-v $(DIND_CACHE_DIR):/var/lib/docker,
define build_golang
echo "Building target $@ by invoking: $(2)"
if [ $(DOCKER) = "true" ]; then \
docker run --rm -v ${go_path}:/go -v ${current_dir}:/nydus-rs --workdir /nydus-rs/$(1) golang:1.17 $(2) ;\
docker run --rm -v ${go_path}:/go -v ${current_dir}:/nydus-rs --workdir /nydus-rs/$(1) golang:1.18 $(2) ;\
else \
$(2) -C $(1); \
fi
Expand Down
2 changes: 0 additions & 2 deletions contrib/ctr-remote/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
Expand Down
2 changes: 1 addition & 1 deletion contrib/ctr-remote/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dragonflyoss/image-service/contrib/ctr-remote

go 1.17
go 1.18

require (
github.com/containerd/containerd v1.6.6
Expand Down
340 changes: 0 additions & 340 deletions contrib/ctr-remote/go.sum

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions contrib/docker-nydus-graphdriver/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
Expand Down
2 changes: 1 addition & 1 deletion contrib/docker-nydus-graphdriver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17
FROM golang:1.18
ARG GOPROXY="https://goproxy.cn,direct"
RUN mkdir -p /app
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion contrib/docker-nydus-graphdriver/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dragonflyoss/image-service/contrib/nydus_graphdriver

go 1.17
go 1.18

require (
github.com/docker/docker v20.10.3-0.20211206061157-934f955e3d62+incompatible
Expand Down
1,036 changes: 0 additions & 1,036 deletions contrib/docker-nydus-graphdriver/go.sum

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions contrib/nydus-overlayfs/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
Expand Down
4 changes: 2 additions & 2 deletions contrib/nydus-overlayfs/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ var (
)

/*
containerd run fuse.mount format: nydus-overlayfs overlay /tmp/ctd-volume107067851
-o lowerdir=/foo/lower2:/foo/lower1,upperdir=/foo/upper,workdir=/foo/work,extraoption={...},dev,suid]
containerd run fuse.mount format: nydus-overlayfs overlay /tmp/ctd-volume107067851
-o lowerdir=/foo/lower2:/foo/lower1,upperdir=/foo/upper,workdir=/foo/work,extraoption={...},dev,suid]
*/
type mountArgs struct {
fsType string
Expand Down
2 changes: 1 addition & 1 deletion contrib/nydus-overlayfs/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dragonflyoss/image-service/contrib/nydus-overlayfs

go 1.17
go 1.18

require (
github.com/pkg/errors v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions contrib/nydus-test/misc/containerize/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ RUN wget https://github.com/opencontainers/runc/releases/download/v1.1.2/runc.am
RUN chmod +x /usr/bin/*; chmod +x /usr/bin/runc

# Install golang
RUN wget https://go.dev/dl/go1.17.8.linux-amd64.tar.gz -O /home/go1.17.8.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf /home/go1.17.8.linux-amd64.tar.gz
RUN wget https://go.dev/dl/go1.18.1.linux-amd64.tar.gz -O /home/go1.18.1.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf /home/go1.18.1.linux-amd64.tar.gz
ENV PATH $PATH:/usr/local/go/bin
RUN mkdir /root/go
RUN rm -rf /home/*
Expand Down
2 changes: 0 additions & 2 deletions contrib/nydusify/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
Expand Down
41 changes: 37 additions & 4 deletions contrib/nydusify/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
module github.com/dragonflyoss/image-service/contrib/nydusify

go 1.14
go 1.18

require (
github.com/aliyun/aliyun-oss-go-sdk v2.1.5+incompatible
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.com/containerd/containerd v1.6.6
github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible
github.com/docker/distribution v2.8.1+incompatible
github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible // indirect
github.com/dustin/go-humanize v1.0.0
github.com/google/uuid v1.2.0
github.com/opencontainers/go-digest v1.0.0
Expand All @@ -18,11 +16,46 @@ require (
github.com/prometheus/client_golang v1.11.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
github.com/tidwall/gjson v1.9.3
github.com/urfave/cli/v2 v2.3.0
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
lukechampine.com/blake3 v1.1.5
)

require (
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Microsoft/hcsshim v0.9.3 // indirect
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/containerd/cgroups v1.0.3 // indirect
github.com/containerd/continuity v0.2.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible // indirect
github.com/docker/docker-credential-helpers v0.6.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/klauspost/compress v1.11.13 // indirect
github.com/klauspost/cpuid v1.3.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/sys/mountinfo v0.5.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.30.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/stretchr/objx v0.2.0 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.43.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

replace github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.2
Loading

0 comments on commit 6283405

Please sign in to comment.