Skip to content

Commit 197aa6d

Browse files
Build min, previous, current and next Go version
1 parent bee009b commit 197aa6d

File tree

15 files changed

+46
-36
lines changed

15 files changed

+46
-36
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
name: CI
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
45

56
jobs:
67
build:
7-
88
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
version:
12+
- 1.16 # minimum
13+
- 1.17 # previous
14+
- 1.18 # current
15+
- 1.19 # next
916

1017
steps:
11-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1219

1320
- name: Set up Go
14-
uses: actions/setup-go@v1
21+
id: setup-go
22+
uses: actions/setup-go@v3
1523
with:
16-
go-version: 1.17
24+
go-version: ${{ matrix.version }}
1725

1826
- name: Build
1927
run: script/cibuild
2028

29+
# only upload binary artifact for current version
2130
- name: Upload gh-ost binary artifact
22-
uses: actions/upload-artifact@v1
31+
uses: actions/upload-artifact@v3
32+
if: ${{ contains(steps.setup-go.outputs.go-version, '1.18') }}
2333
with:
2434
name: gh-ost
2535
path: bin/gh-ost

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020

21-
- name: Initialize CodeQL
21+
- name: Initialize CodeQL
2222
uses: github/codeql-action/init@v1
2323

2424
- name: Perform CodeQL Analysis

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
name: lint
1414
runs-on: ubuntu-latest
1515
steps:
16+
- uses: actions/checkout@v3
1617
- uses: actions/setup-go@v3
1718
with:
18-
go-version: 1.17
19-
- uses: actions/checkout@v3
19+
go-version-file: go.mod
2020
- name: golangci-lint
2121
uses: golangci/golangci-lint-action@v3
2222
with:

.github/workflows/replica-tests.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
version: [mysql-5.7.25,mysql-8.0.16]
11+
version:
12+
- mysql-5.7.25
13+
- mysql-8.0.16
1214

1315
steps:
14-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1517

1618
- name: Set up Go
17-
uses: actions/setup-go@v1
19+
uses: actions/setup-go@v3
1820
with:
19-
go-version: 1.17
21+
go-version-file: go.mod
2022

2123
- name: migration tests
2224
env:
2325
TEST_MYSQL_VERSION: ${{ matrix.version }}
24-
run: script/cibuild-gh-ost-replica-tests
26+
run: script/cibuild-gh-ost-replica-tests

Dockerfile.packaging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17
1+
FROM golang:1.18
22

33
RUN apt-get update
44
RUN apt-get install -y ruby ruby-dev rubygems build-essential

Dockerfile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17
1+
FROM golang:1.18
22
LABEL maintainer="[email protected]"
33

44
RUN apt-get update

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Please see [Coding gh-ost](doc/coding-ghost.md) for a guide to getting started d
9595

9696
[Download latest release here](https://github.com/github/gh-ost/releases/latest)
9797

98-
`gh-ost` is a Go project; it is built with Go `1.15` and above. To build on your own, use either:
98+
`gh-ost` is a Go project; it is built with Go `1.16` and above. To build on your own, use either:
9999
- [script/build](https://github.com/github/gh-ost/blob/master/script/build) - this is the same build script used by CI hence the authoritative; artifact is `./bin/gh-ost` binary.
100100
- [build.sh](https://github.com/github/gh-ost/blob/master/build.sh) for building `tar.gz` artifacts in `/tmp/gh-ost`
101101

RELEASE_VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/command-line-flags.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@ Provide a command delimited list of replicas; `gh-ost` will throttle when any of
246246

247247
Provide an HTTP endpoint; `gh-ost` will issue `HEAD` requests on given URL and throttle whenever response status code is not `200`. The URL can be queried and updated dynamically via [interactive commands](interactive-commands.md). Empty URL disables the HTTP check.
248248

249+
### throttle-http-interval-millis
250+
251+
Defaults to 100. Configures the HTTP throttle check interval in milliseconds.
252+
253+
### throttle-http-timeout-millis
254+
255+
Defaults to 1000 (1 second). Configures the HTTP throttler check timeout in milliseconds.
256+
249257
### timestamp-old-table
250258

251259
Makes the _old_ table include a timestamp value. The _old_ table is what the original table is renamed to at the end of a successful migration. For example, if the table is `gh_ost_test`, then the _old_ table would normally be `_gh_ost_test_del`. With `--timestamp-old-table` it would be, for example, `_gh_ost_test_20170221103147_del`.

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module github.com/github/gh-ost
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/go-ini/ini v1.62.0
77
github.com/go-mysql-org/go-mysql v1.3.0
88
github.com/go-sql-driver/mysql v1.6.0
99
github.com/openark/golib v0.0.0-20210531070646-355f37940af8
1010
github.com/satori/go.uuid v1.2.0
11-
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
1211
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7
12+
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467
1313
golang.org/x/text v0.3.6
1414
)
1515

@@ -21,7 +21,6 @@ require (
2121
github.com/smartystreets/goconvey v1.6.4 // indirect
2222
go.uber.org/atomic v1.7.0 // indirect
2323
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
24-
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
2524
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
2625
gopkg.in/ini.v1 v1.62.0 // indirect
2726
)

0 commit comments

Comments
 (0)