Skip to content

Commit b1f4061

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

File tree

363 files changed

+172324
-1500
lines changed

Some content is hidden

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

363 files changed

+172324
-1500
lines changed

.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)