Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
This is an automated cherry-pick of #1698
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
lance6716 authored and ti-chi-bot committed Jul 27, 2021
1 parent acfbff4 commit 71c15fa
Show file tree
Hide file tree
Showing 12 changed files with 142 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/binlog-999999.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-18.04

steps:
- name: Set up Go 1.13
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.13
go-version: 1.16

- name: Check out code
uses: actions/checkout@v2
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/chaos-mesh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
<<<<<<< HEAD
# Set up Go for building DM, now it's v1.16
- name: Set up Go 1.16
uses: actions/setup-go@v2
Expand All @@ -73,6 +74,75 @@ jobs:
path: |
**/tools
key: ${{ runner.os }}-dm-tools-${{ hashFiles('**/tools/go.sum') }}
=======
# Set up Go for building DM, now it's v1.16
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Print Go version
run: go version

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out code
uses: actions/checkout@v2

- name: Cache go modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-dm-${{ hashFiles('**/go.sum') }}

- name: Cache tools
uses: actions/cache@v2
with:
path: |
**/tools
key: ${{ runner.os }}-dm-tools-${{ hashFiles('**/tools/go.sum') }}

# Set up Kubernetes IN Docker
# - name: Set up kind cluster
# uses: helm/kind-action@v1.0.0
# with:
# cluster_name: dm-chaos
# Set up Kubernetes with K3s
- name: Set up K3s cluster
run: |
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.18.9+k3s1 sh -s - \
--write-kubeconfig-mode=644 \
"${k3s_disable_command:---disable}" metrics-server \
"${k3s_disable_command:---disable}" traefik \
--flannel-backend=none \
--docker
shell: bash
# this may be failed sometimes, and I want to exit the workflow directly if failed,
# but GitHub Actions doesnt' support early-exit yet, see https://github.com/actions/runner/issues/662.
# so, simply wait for a long time.
- name: Wait for coredns
run: |
kubectl rollout status --watch --timeout 600s deployment/coredns -n kube-system
shell: bash
env:
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
- name: Export KUBECONFIG environment variable
run: |
echo 'KUBECONFIG=/etc/rancher/k3s/k3s.yaml' >> $GITHUB_ENV
shell: bash
- name: Print cluster information
run: |
kubectl config view
kubectl cluster-info
kubectl get nodes
kubectl get pods -n kube-system
kubectl get sc
kubectl version
# Disable AppArmor for MySQL, see https://github.com/moby/moby/issues/7512#issuecomment-61787845
- name: Disable AppArmor for MySQL
run: |
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
>>>>>>> 0ec1f8df9 (*: update go version to 1.16 (#1698))

# Set up Kubernetes IN Docker
# - name: Set up kind cluster
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/upgrade-via-tiup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
working-directory: ${{ github.workspace }}/go/src/github.com/pingcap/dm

steps:
<<<<<<< HEAD
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
Expand All @@ -34,6 +35,20 @@ jobs:
- name: Setup containers
working-directory: ${{ env.working-directory }}
run: |
=======
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Check out code
uses: actions/checkout@v2
with:
path: go/src/github.com/pingcap/dm

- name: Setup containers
working-directory: ${{ env.working-directory }}
run: |
>>>>>>> 0ec1f8df9 (*: update go version to 1.16 (#1698))
cd ${{ env.working-directory }}/tests/tiup/docker
GOPATH=${GITHUB_WORKSPACE}/go docker-compose up -d

Expand Down Expand Up @@ -77,6 +92,7 @@ jobs:
previous_v2: ["v2.0.0", "v2.0.1", "v2.0.3", "v2.0.4"]

steps:
<<<<<<< HEAD
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
Expand All @@ -94,6 +110,26 @@ jobs:
- name: Package files
if: ${{ github.ref != 'refs/heads/master' }}
run: |
=======

- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Check out code
uses: actions/checkout@v2
with:
path: go/src/github.com/pingcap/dm

- name: Build
if: ${{ github.ref != 'refs/heads/master' }}
working-directory: ${{ env.working-directory }}
run: make build nolint=true

- name: Package files
if: ${{ github.ref != 'refs/heads/master' }}
run: |
>>>>>>> 0ec1f8df9 (*: update go version to 1.16 (#1698))
mkdir ${{ github.workspace }}/package
cd ${{ github.workspace }}/package

Expand Down Expand Up @@ -188,6 +224,7 @@ jobs:
env:
working-directory: ${{ github.workspace }}/go/src/github.com/pingcap/dm
steps:
<<<<<<< HEAD
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
Expand All @@ -202,6 +239,22 @@ jobs:
- name: Setup containers
working-directory: ${{ env.working-directory }}
run: |
=======
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Check out code
uses: actions/checkout@v2
with:
path: go/src/github.com/pingcap/dm

# TODO: support more versions
- name: Setup containers
working-directory: ${{ env.working-directory }}
run: |
>>>>>>> 0ec1f8df9 (*: update go version to 1.16 (#1698))
cd ${{ env.working-directory }}/tests/tiup/docker
sed -i "s/tidb:v4.0.7/tidb:v3.0.19/g" docker-compose.yml
GOPATH=${GITHUB_WORKSPACE}/go docker-compose up -d
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/upstream-switch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ jobs:
runs-on: ubuntu-18.04

steps:
<<<<<<< HEAD
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
=======
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Check out code
uses: actions/checkout@v2
>>>>>>> 0ec1f8df9 (*: update go version to 1.16 (#1698))

- name: Check out code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ See [Step by Step Contribute Example](step_by_step_contribute.md) for a more det

Developing DM requires:

* [Go 1.13+](http://golang.org/doc/code.html)
* [Go 1.16+](http://golang.org/doc/code.html)
* An internet connection to download the dependencies

Simply run `make` to build the program.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13-alpine as builder
FROM golang:1.16-alpine as builder
MAINTAINER siddontang

RUN apk add --no-cache git make
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ require (
gopkg.in/yaml.v2 v2.4.0
)

go 1.13
go 1.16
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMe
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/codahale/hdrhistogram v0.9.0 h1:9GjrtRI+mLEFPtTfR/AZhcxp+Ii8NZYWq5104FbZQY0=
github.com/codahale/hdrhistogram v0.9.0/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/colinmarc/hdfs/v2 v2.1.1/go.mod h1:M3x+k8UKKmxtFu++uAZ0OtDU8jR3jnaZIAc6yK4Ue0c=
github.com/coocood/badger v1.5.1-0.20200515070411-e02af0688441/go.mod h1:klY8SfH2lNZ/23/SIxwHoJw+T6wYGB12YPCF9MUoiu0=
Expand Down Expand Up @@ -271,7 +270,6 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu
github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ=
github.com/frankban/quicktest v1.11.1 h1:stwUsXhUGliQs9t0ZS39BWCltFdOHgABiIlihop8AD4=
github.com/frankban/quicktest v1.11.1/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsouza/fake-gcs-server v1.15.0/go.mod h1:HNxAJ/+FY/XSsxuwz8iIYdp2GtMmPbJ8WQjjGMxd6Qk=
github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw=
Expand Down Expand Up @@ -1094,7 +1092,6 @@ github.com/xitongsys/parquet-go v1.5.1/go.mod h1:xUxwM8ELydxh4edHGegYq1pA8NnMKDx
github.com/xitongsys/parquet-go v1.5.5-0.20201110004701-b09c49d6d457 h1:tBbuFCtyJNKT+BFAv6qjvTFpVdy97IYNaBwGUXifIUs=
github.com/xitongsys/parquet-go v1.5.5-0.20201110004701-b09c49d6d457/go.mod h1:pheqtXeHQFzxJk45lRQ0UIGIivKnLXvialZSFWs81A8=
github.com/xitongsys/parquet-go-source v0.0.0-20190524061010-2b72cbee77d5/go.mod h1:xxCx7Wpym/3QCo6JhujJX51dzSXrwmb0oH6FQb39SEA=
github.com/xitongsys/parquet-go-source v0.0.0-20200817004010-026bad9b25d0 h1:a742S4V5A15F93smuVxA60LQWsrCnN8bKeWDBARU1/k=
github.com/xitongsys/parquet-go-source v0.0.0-20200817004010-026bad9b25d0/go.mod h1:HYhIKsdns7xz80OgkbgJYrtQY7FjHWHKH6cvN7+czGE=
github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
github.com/xo/dburl v0.0.0-20191219122722-3cca8608d645/go.mod h1:A47W3pdWONaZmXuLZgfKLAVgUY0qvfTRM5vVDKS40S4=
Expand Down
2 changes: 1 addition & 1 deletion step_by_step_contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ git remote -v # Confirms that your remote makes sense

> **Note:**
>
> DM uses [`Go Modules`](https://github.com/golang/go/wiki/Modules) to manage dependencies. The version of Go should be **1.13** or above.
> DM uses [`Go Modules`](https://github.com/golang/go/wiki/Modules) to manage dependencies. The version of Go should be **1.16** or above.
You'll need `GOPATH` defined, and `PATH` modified to access your Go binaries. A
common setup is the following but you could always google a setup for your own
Expand Down
2 changes: 1 addition & 1 deletion tests/tiup/docker/control/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13
FROM golang:1.16

RUN apt-get -y -q update && \
apt-get -y -q install software-properties-common && \
Expand Down
2 changes: 1 addition & 1 deletion tests/tiup/docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13
FROM golang:1.16

RUN apt-get update && \
apt-get -y install \
Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pingcap/dm/tools

go 1.13
go 1.16

require (
github.com/gogo/protobuf v1.3.1
Expand Down

0 comments on commit 71c15fa

Please sign in to comment.