Skip to content

Commit b1f4061

Browse files
authored
Merge branch 'master' into meiji163/parallel-repl
2 parents aa81bbc + 4502796 commit b1f4061

363 files changed

Lines changed: 172324 additions & 1500 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/replica-tests.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,12 @@ name: migration tests
33
on: [pull_request]
44

55
jobs:
6-
build:
7-
8-
runs-on: ubuntu-20.04
9-
strategy:
10-
fail-fast: false
11-
matrix:
12-
version: [mysql-5.7.25,mysql-8.0.16,PerconaServer-8.0.21]
13-
14-
steps:
15-
- uses: actions/checkout@v4
16-
17-
- name: Set up Go
18-
uses: actions/setup-go@v5
19-
with:
20-
go-version-file: go.mod
21-
22-
- name: migration tests
23-
env:
24-
TEST_MYSQL_VERSION: ${{ matrix.version }}
25-
run: script/cibuild-gh-ost-replica-tests
26-
276
docker-tests:
287
runs-on: ubuntu-22.04
298
strategy:
309
fail-fast: false
3110
matrix:
32-
image: ['mysql:8.4.3']
11+
image: ['mysql/mysql-server:5.7.41','mysql:8.0.41','mysql:8.4.3','percona/percona-server:8.0.41-32']
3312
env:
3413
TEST_MYSQL_IMAGE: ${{ matrix.image }}
3514

@@ -45,5 +24,3 @@ jobs:
4524
- name: Teardown environment
4625
if: always()
4726
run: script/docker-gh-ost-replica-tests down
48-
49-

doc/local-tests.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`gh-ost` is continuously tested in production via `--test-on-replica alter='engine=innodb'`. These tests check the GitHub workload and usage, but not necessarily the general case.
44

5-
Local tests are an additional layer of tests. They will eventually be part of continuous integration tests.
5+
Local tests are an additional layer of tests used for continuous integration tests and local development.
66

77
Local tests test explicit use cases, such as column renames, mix of time zones, special types and alters. Traits of a single test:
88

@@ -19,4 +19,18 @@ Tests are found under [localtests](https://github.com/github/gh-ost/tree/master/
1919

2020
New data-integrity, synchronization issues or otherwise concerns are expected to be tested by new test cases.
2121

22-
While this is merged work is still ongoing.
22+
## Run with docker compose
23+
24+
Local tests can be run locally with docker compose using the helper script [script/docker-gh-ost-replica-tests](https://github.com/github/gh-ost/tree/master/script/docker-gh-ost-replica-tests).
25+
26+
Example usage:
27+
```shell
28+
# create primary-replica containers with specified mysql image
29+
TEST_MYSQL_IMAGE="mysql-server:8.0.16" ./script/docker-gh-ost-replica-tests up
30+
31+
# run all tests
32+
./script/docker-gh-ost-replica-tests run
33+
34+
# cleanup containers
35+
./script/docker-gh-ost-replica-tests down
36+
```

go.mod

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23.0
44

55
require (
66
github.com/go-ini/ini v1.67.0
7-
github.com/go-mysql-org/go-mysql v1.7.0
7+
github.com/go-mysql-org/go-mysql v1.11.0
88
github.com/go-sql-driver/mysql v1.8.1
99
github.com/google/uuid v1.6.0
1010
github.com/hashicorp/go-version v1.7.0
@@ -21,9 +21,10 @@ require (
2121
dario.cat/mergo v1.0.0 // indirect
2222
filippo.io/edwards25519 v1.1.0 // indirect
2323
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
24+
github.com/Masterminds/semver v1.5.0 // indirect
2425
github.com/Microsoft/go-winio v0.6.2 // indirect
2526
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
26-
github.com/containerd/containerd v1.7.18 // indirect
27+
github.com/containerd/containerd v1.7.27 // indirect
2728
github.com/containerd/log v0.1.0 // indirect
2829
github.com/containerd/platforms v0.2.1 // indirect
2930
github.com/cpuguy83/dockercfg v0.3.2 // indirect
@@ -33,30 +34,32 @@ require (
3334
github.com/docker/go-connections v0.5.0 // indirect
3435
github.com/docker/go-units v0.5.0 // indirect
3536
github.com/felixge/httpsnoop v1.0.4 // indirect
36-
github.com/go-logr/logr v1.4.1 // indirect
37+
github.com/go-logr/logr v1.4.2 // indirect
3738
github.com/go-logr/stdr v1.2.2 // indirect
3839
github.com/go-ole/go-ole v1.2.6 // indirect
40+
github.com/goccy/go-json v0.10.2 // indirect
3941
github.com/gogo/protobuf v1.3.2 // indirect
40-
github.com/klauspost/compress v1.17.4 // indirect
41-
github.com/kr/text v0.2.0 // indirect
42+
github.com/klauspost/compress v1.17.8 // indirect
4243
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
4344
github.com/magiconair/properties v1.8.7 // indirect
4445
github.com/moby/docker-image-spec v1.3.1 // indirect
4546
github.com/moby/patternmatcher v0.6.0 // indirect
4647
github.com/moby/sys/sequential v0.5.0 // indirect
47-
github.com/moby/sys/user v0.1.0 // indirect
48+
github.com/moby/sys/user v0.3.0 // indirect
49+
github.com/moby/sys/userns v0.1.0 // indirect
4850
github.com/moby/term v0.5.0 // indirect
4951
github.com/morikuni/aec v1.0.0 // indirect
5052
github.com/opencontainers/go-digest v1.0.0 // indirect
5153
github.com/opencontainers/image-spec v1.1.0 // indirect
52-
github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect
54+
github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb // indirect
55+
github.com/pingcap/log v1.1.1-0.20230317032135-a0d097d16e22 // indirect
56+
github.com/pingcap/tidb/pkg/parser v0.0.0-20241118164214-4f047be191be // indirect
5357
github.com/pkg/errors v0.9.1 // indirect
5458
github.com/pmezard/go-difflib v1.0.0 // indirect
5559
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
5660
github.com/shirou/gopsutil/v3 v3.23.12 // indirect
5761
github.com/shoenig/go-m1cpu v0.1.6 // indirect
58-
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 // indirect
59-
github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726 // indirect
62+
github.com/shopspring/decimal v1.2.0 // indirect
6063
github.com/siddontang/go-log v0.0.0-20180807004314-8d05993dda07 // indirect
6164
github.com/sirupsen/logrus v1.9.3 // indirect
6265
github.com/tklauser/go-sysconf v0.3.12 // indirect
@@ -66,8 +69,12 @@ require (
6669
go.opentelemetry.io/otel v1.24.0 // indirect
6770
go.opentelemetry.io/otel/metric v1.24.0 // indirect
6871
go.opentelemetry.io/otel/trace v1.24.0 // indirect
69-
go.uber.org/atomic v1.7.0 // indirect
72+
go.uber.org/atomic v1.11.0 // indirect
73+
go.uber.org/multierr v1.11.0 // indirect
74+
go.uber.org/zap v1.27.0 // indirect
7075
golang.org/x/crypto v0.35.0 // indirect
7176
golang.org/x/sys v0.30.0 // indirect
77+
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
78+
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
7279
gopkg.in/yaml.v3 v3.0.1 // indirect
7380
)

0 commit comments

Comments
 (0)