Skip to content

Commit

Permalink
upgrade e2e image
Browse files Browse the repository at this point in the history
  • Loading branch information
KanShiori authored and xhebox committed Sep 16, 2022
1 parent 00a126c commit 18b81ed
Show file tree
Hide file tree
Showing 27 changed files with 738 additions and 302 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/chaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,12 @@ jobs:

pull:
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16.4
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: "set up golang"
uses: actions/setup-go@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}

go-version-file: 'go.mod'
- name: Creating kind cluster
run: |
SKIP_BUILD=y SKIP_IMAGE_BUILD=y SKIP_DOWN=y SKIP_TEST=y KUBE_WORKERS=0 ./hack/e2e.sh
Expand All @@ -38,7 +31,6 @@ jobs:
echo "info: create pingcap namespace for chaos configurations"
kubectl create ns pingcap
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}

- name: Run chaos mesh
uses: chaos-mesh/chaos-mesh-actions@master
env:
Expand All @@ -48,7 +40,6 @@ jobs:
run: |
SKIP_UP=y ./hack/e2e.sh -- --ginkgo.focus='Restarter'
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}

- name: Set up tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,17 @@ jobs:
- test
- e2e-examples
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16.4
id: go

# the GITHUB_SHA env is not the real commit hash but is the pre-merge commit ID for `pull_request` event,
# see https://github.saobby.my.eu.orgmunity/t/github-sha-isnt-the-value-expected/17903/2
# so we checkout the repo with `fetch-depth: 2` and let `codecov/codecov-action` to retrieve the real commit hash.
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: go/src/github.com/${{ github.repository }}
fetch-depth: 2

- name: "set up golang"
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: ${{ matrix.job }}
run: |
# workaround for https://github.com/actions/setup-go/issues/14
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
run:
timeout: 10m
go: '1.17'

linters:
enable:
Expand Down
2 changes: 1 addition & 1 deletion ci/e2e_eks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Pod
spec:
containers:
- name: main
image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master
image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master
command:
- runner.sh
- sleep
Expand Down
2 changes: 1 addition & 1 deletion ci/e2e_gke.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Pod
spec:
containers:
- name: main
image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master
image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master
command:
- runner.sh
- sleep
Expand Down
2 changes: 1 addition & 1 deletion ci/e2e_kind.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
spec:
containers:
- name: main
image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master
image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master
command:
- runner.sh
# Clean containers on TERM signal in root process to avoid cgroup leaking.
Expand Down
14 changes: 4 additions & 10 deletions ci/pull_e2e_kind.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ metadata:
spec:
containers:
- name: main
image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master
image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master
command:
- runner.sh
# Clean containers on TERM signal in root process to avoid cgroup leaking.
Expand All @@ -52,13 +52,7 @@ spec:
docker system prune -af || true
}
function setup_docker_mirror() {
cat > /etc/docker/daemon.json <<EOF
{
"registry-mirrors": [
"https://registry-mirror.pingcap.net"
]
}
EOF
sed -i "s/mirror.gcr.io/registry-mirror.pingcap.net/g" /etc/default/docker
service docker restart
}
setup_docker_mirror
Expand Down Expand Up @@ -277,7 +271,7 @@ try {
timeout (time: 2, unit: 'HOURS') {
// use fixed label, so we can reuse previous workers
// increase version in pod label when we update pod template
def buildPodLabel = "tidb-operator-build-v1-pingcap-docker-mirror"
def buildPodLabel = "tidb-operator-build-v2-pingcap-docker-mirror"
def resources = [
requests: [
cpu: "4",
Expand Down Expand Up @@ -369,7 +363,7 @@ try {
docker login -u \$USERNAME --password-stdin hub.pingcap.net <<< \$PASSWORD
echo "info: build and push images for e2e"
echo "test: show docker daemon config file"
cat /etc/docker/daemon.json
cat /etc/docker/daemon.json || true
E2E=y NO_BUILD=y DOCKER_REPO=hub.pingcap.net/tidb-operator-e2e IMAGE_TAG=${IMAGE_TAG} make docker-push e2e-docker-push
echo "info: download binaries for e2e"
E2E=y SKIP_BUILD=y SKIP_IMAGE_BUILD=y SKIP_UP=y SKIP_TEST=y SKIP_DOWN=y ./hack/e2e.sh
Expand Down
12 changes: 3 additions & 9 deletions ci/pull_e2e_release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ metadata:
spec:
containers:
- name: main
image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master
image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master
command:
- runner.sh
# Clean containers on TERM signal in root process to avoid cgroup leaking.
Expand All @@ -52,13 +52,7 @@ spec:
docker system prune -af || true
}
function setup_docker_mirror() {
cat > /etc/docker/daemon.json <<EOF
{
"registry-mirrors": [
"https://registry-mirror.pingcap.net"
]
}
EOF
sed -i "s/mirror.gcr.io/registry-mirror.pingcap.net/g" /etc/default/docker
service docker restart
}
setup_docker_mirror
Expand Down Expand Up @@ -240,7 +234,7 @@ try {
timeout (time: 2, unit: 'HOURS') {
// use fixed label, so we can reuse previous workers
// increase version in pod label when we update pod template
def buildPodLabel = "tidb-operator-build-v1-pingcap-docker-mirror"
def buildPodLabel = "tidb-operator-build-v2-pingcap-docker-mirror"
def resources = [
requests: [
cpu: "6",
Expand Down
2 changes: 1 addition & 1 deletion ci/vm.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Pod
spec:
containers:
- name: main
image: gcr.io/k8s-testimages/kubekins-e2e:v20200311-1e25827-master
image: hub-new.pingcap.net/tidb-operator/kubekins-e2e:v20210808-1eaeec7-master
command:
- runner.sh
- sleep
Expand Down
2 changes: 1 addition & 1 deletion cmd/backup-manager/app/util/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (bo *GenericOptions) GetTikvGCLifeTime(ctx context.Context, db *sql.DB) (st
}

func (bo *GenericOptions) SetTikvGCLifeTime(ctx context.Context, db *sql.DB, gcTime string) error {
sql := fmt.Sprintf("update %s set variable_value = ? where variable_name = ?", constants.TidbMetaTable)
sql := fmt.Sprintf("update %s set variable_value = ? where variable_name = ?", constants.TidbMetaTable) // nolint: gosec
_, err := db.ExecContext(ctx, sql, gcTime, constants.TikvGCVariable)
if err != nil {
return fmt.Errorf("set cluster %s %s failed, sql: %s, err: %v", bo, constants.TikvGCVariable, sql, err)
Expand Down
12 changes: 6 additions & 6 deletions docs/api-references/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9285,7 +9285,7 @@ int
<td>
<code>buffer-flush-interval</code></br>
<em>
time.Duration
invalid type
</em>
</td>
<td>
Expand Down Expand Up @@ -9381,7 +9381,7 @@ int
<td>
<code>sampling-refresh-interval</code></br>
<em>
time.Duration
invalid type
</em>
</td>
<td>
Expand Down Expand Up @@ -12487,7 +12487,7 @@ int
<td>
<code>batchSendDeadline</code></br>
<em>
time.Duration
invalid type
</em>
</td>
<td>
Expand All @@ -12509,7 +12509,7 @@ int
<td>
<code>minBackoff</code></br>
<em>
time.Duration
invalid type
</em>
</td>
<td>
Expand All @@ -12520,7 +12520,7 @@ time.Duration
<td>
<code>maxBackoff</code></br>
<em>
time.Duration
invalid type
</em>
</td>
<td>
Expand Down Expand Up @@ -17531,7 +17531,7 @@ Optional: Defaults to 200</p>
<td>
<code>max-batch-wait-time</code></br>
<em>
time.Duration
invalid type
</em>
</td>
<td>
Expand Down
Loading

0 comments on commit 18b81ed

Please sign in to comment.