From 1b3fac25c62dec19a8956833dff21d6902a41f21 Mon Sep 17 00:00:00 2001 From: Rashiq Date: Tue, 19 Sep 2023 15:12:00 +0100 Subject: [PATCH 1/4] Add `focal` build --- script/build-deploy-tarball | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/build-deploy-tarball b/script/build-deploy-tarball index dc28b43d5..b2b471f79 100755 --- a/script/build-deploy-tarball +++ b/script/build-deploy-tarball @@ -29,7 +29,7 @@ mkdir -p "$BUILD_ARTIFACT_DIR"/gh-ost cp ${tarball}.gz "$BUILD_ARTIFACT_DIR"/gh-ost/ ### HACK HACK HACK HACK ### -# blame @carlosmn, @mattr and @timvaillancourt- -# Allow builds on buster to also be used for stretch -stretch_tarball_name=$(echo $(basename "${tarball}") | sed s/-buster-/-stretch-/) -cp ${tarball}.gz "$BUILD_ARTIFACT_DIR/gh-ost/${stretch_tarball_name}.gz" +# blame @carlosmn, @mattr, @timvaillancourt and @rashiq +# Allow builds on buster to also be used for focal +focal_tarball_name=$(echo $(basename "${tarball}") | sed s/-stretch-/-focal-/) +cp ${tarball}.gz "$BUILD_ARTIFACT_DIR/gh-ost/${focal_tarball_name}.gz" From aadc6ab8a9eae31d0da94cb8099c889b0bdf30e7 Mon Sep 17 00:00:00 2001 From: meiji163 Date: Mon, 25 Sep 2023 12:29:56 -0700 Subject: [PATCH 2/4] upgrade codeQL action to v2 --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index abce58a3b..4fa20813a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v2 - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 From e664c1bb81657a99b58d2198ebfd9b22aba21fa5 Mon Sep 17 00:00:00 2001 From: meiji163 Date: Tue, 10 Oct 2023 09:03:28 -0700 Subject: [PATCH 3/4] Pin docker image to stretch (#1324) * pin stretch image * update stretch repo * Update Dockerfile.test --- Dockerfile.packaging | 7 ++++++- Dockerfile.test | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile.packaging b/Dockerfile.packaging index be321fa8d..96927413e 100644 --- a/Dockerfile.packaging +++ b/Dockerfile.packaging @@ -1,4 +1,9 @@ -FROM golang:1.17 +FROM golang:1.17-stretch + +# Update stretch repositories +RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \ + -e 's|security.debian.org|archive.debian.org/|g' \ + -e '/stretch-updates/d' /etc/apt/sources.list RUN apt-get update RUN apt-get install -y ruby ruby-dev rubygems build-essential diff --git a/Dockerfile.test b/Dockerfile.test index e9155763c..e031d6023 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -1,6 +1,11 @@ -FROM golang:1.17 +FROM golang:1.17-stretch LABEL maintainer="github@github.com" +#Update stretch repositories +RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \ + -e 's|security.debian.org|archive.debian.org/|g' \ + -e '/stretch-updates/d' /etc/apt/sources.list + RUN apt-get update RUN apt-get install -y lsb-release RUN rm -rf /var/lib/apt/lists/* From 03f7fc8d09b103be181d71e80c96102152bad58d Mon Sep 17 00:00:00 2001 From: meiji163 Date: Tue, 10 Oct 2023 15:58:53 -0700 Subject: [PATCH 4/4] parse binlog timestamp in UTC (#1322) --- go/binlog/gomysql_reader.go | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/go/binlog/gomysql_reader.go b/go/binlog/gomysql_reader.go index 8cf35eabe..79f258e3a 100644 --- a/go/binlog/gomysql_reader.go +++ b/go/binlog/gomysql_reader.go @@ -13,6 +13,8 @@ import ( "github.com/github/gh-ost/go/mysql" "github.com/github/gh-ost/go/sql" + "time" + gomysql "github.com/go-mysql-org/go-mysql/mysql" "github.com/go-mysql-org/go-mysql/replication" "golang.org/x/net/context" @@ -36,15 +38,16 @@ func NewGoMySQLReader(migrationContext *base.MigrationContext) *GoMySQLReader { currentCoordinates: mysql.BinlogCoordinates{}, currentCoordinatesMutex: &sync.Mutex{}, binlogSyncer: replication.NewBinlogSyncer(replication.BinlogSyncerConfig{ - ServerID: uint32(migrationContext.ReplicaServerId), - Flavor: gomysql.MySQLFlavor, - Host: connectionConfig.Key.Hostname, - Port: uint16(connectionConfig.Key.Port), - User: connectionConfig.User, - Password: connectionConfig.Password, - TLSConfig: connectionConfig.TLSConfig(), - UseDecimal: true, - MaxReconnectAttempts: migrationContext.BinlogSyncerMaxReconnectAttempts, + ServerID: uint32(migrationContext.ReplicaServerId), + Flavor: gomysql.MySQLFlavor, + Host: connectionConfig.Key.Hostname, + Port: uint16(connectionConfig.Key.Port), + User: connectionConfig.User, + Password: connectionConfig.Password, + TLSConfig: connectionConfig.TLSConfig(), + UseDecimal: true, + MaxReconnectAttempts: migrationContext.BinlogSyncerMaxReconnectAttempts, + TimestampStringLocation: time.UTC, }), } }