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 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/* 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, }), } } 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"