Skip to content

Commit

Permalink
syncing with a similar change in upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
maksimov committed Oct 26, 2023
1 parent 0f9cdb2 commit 835589f
Show file tree
Hide file tree
Showing 30 changed files with 36 additions and 33 deletions.
2 changes: 1 addition & 1 deletion build.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
source ./tools/shell_functions.inc

go version >/dev/null 2>&1 || fail "Go is not installed or is not in \$PATH. See https://vitess.io/contributing/build-from-source for install instructions."
goversion_min 1.18.7 || fail "Go version reported: `go version`. Version 1.18.7+ required. See https://vitess.io/contributing/build-from-source for install instructions."
goversion_min 1.20.10 || fail "Go version reported: `go version`. Version 1.18.7+ required. See https://vitess.io/contributing/build-from-source for install instructions."

mkdir -p dist
mkdir -p bin
Expand Down
2 changes: 1 addition & 1 deletion docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# TODO(mberlin): Remove the symlink and this note once
# https://github.com/docker/hub-feedback/issues/292 is fixed.

ARG bootstrap_version=20
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql57"

FROM "${image}"
Expand Down
2 changes: 1 addition & 1 deletion docker/base/Dockerfile.mariadb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG bootstrap_version=20
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mariadb"

FROM "${image}"
Expand Down
2 changes: 1 addition & 1 deletion docker/base/Dockerfile.mariadb103
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG bootstrap_version=20
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mariadb103"

FROM "${image}"
Expand Down
2 changes: 1 addition & 1 deletion docker/base/Dockerfile.mysql80
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG bootstrap_version=20
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80"

FROM "${image}"
Expand Down
2 changes: 1 addition & 1 deletion docker/base/Dockerfile.percona57
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG bootstrap_version=20
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-percona57"

FROM "${image}"
Expand Down
2 changes: 1 addition & 1 deletion docker/base/Dockerfile.percona80
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG bootstrap_version=20
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-percona80"

FROM "${image}"
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mariadb103"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.mariadb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mariadb"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.mariadb103
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mariadb103"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.mysql57
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql57"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.percona57
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-percona57"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.percona80
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-percona80"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.testing
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql57"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.ubi7.mysql57
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql57"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.ubi7.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.ubi7.percona57
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-percona57"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.ubi7.percona80
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-percona80"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.ubi8.arm64.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile.ubi8.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/local/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-common"

FROM "${image}"
Expand Down
2 changes: 1 addition & 1 deletion docker/vttestserver/Dockerfile.mysql57
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql57"

FROM "${image}" AS builder
Expand Down
2 changes: 1 addition & 1 deletion docker/vttestserver/Dockerfile.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ensure images contain the right binaries.

# Use a temporary layer for the build stage.
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80"

FROM "${image}" AS builder
Expand Down
3 changes: 3 additions & 0 deletions go/bucketpool/bucketpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ func TestFuzz(t *testing.T) {
maxTestSize := 16384
for i := 0; i < 20000; i++ {
minSize := rand.Intn(maxTestSize)
if minSize == 0 {
minSize = 1
}
maxSize := rand.Intn(maxTestSize-minSize) + minSize
p := New(minSize, maxSize)
bufSize := rand.Intn(maxTestSize)
Expand Down
3 changes: 1 addition & 2 deletions go/test/endtoend/recovery/recovery_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ func RestoreTablet(t *testing.T, localCluster *cluster.LocalProcessCluster, tabl

if err != nil {
tm := time.Now().UTC()
tm.Format(time.RFC3339)
_, err := localCluster.VtctlProcess.ExecuteCommandWithOutput("CreateKeyspace", "--",
"--keyspace_type=SNAPSHOT", "--base_keyspace="+keyspaceName,
"--snapshot_time", restoreTime.Format(time.RFC3339), restoreKSName)
"--snapshot_time", tm.Format(time.RFC3339), restoreKSName)
require.Nil(t, err)
}

Expand Down
8 changes: 3 additions & 5 deletions go/test/fuzzing/vtctl_fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ func Fuzz(data []byte) int {
chunkSize := len(restOfArray) / numberOfCalls
command := 0
for i := 0; i < len(restOfArray); i = i + chunkSize {
from := i //lower
to := i + chunkSize //upper
from := i // lower
to := i + chunkSize // upper

// Index of command in getCommandType():
commandIndex := int(commandPart[command]) % 68
Expand All @@ -179,9 +179,7 @@ func Fuzz(data []byte) int {
args := strings.Split(string(restOfArray[from:to]), " ")

// Add params to the command
for i := range args {
commandSlice = append(commandSlice, args[i])
}
commandSlice = append(commandSlice, args...)

_ = vtctl.RunCommand(ctx, wrangler.New(logger, topo, tmc), commandSlice)
command++
Expand Down
3 changes: 3 additions & 0 deletions go/vt/orchestrator/logic/topology_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,9 @@ func recoverDeadPrimary(ctx context.Context, analysisEntry inst.ReplicationAnaly

// Read the tablet information from the database to find the shard and keyspace of the tablet
tablet, err := inst.ReadTablet(analysisEntry.AnalyzedInstanceKey)
if err != nil {
return false, nil, err
}

var candidateTabletAlias *topodatapb.TabletAlias
if candidateInstanceKey != nil {
Expand Down
2 changes: 1 addition & 1 deletion test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ For example:
// Flags
var (
flavor = flag.String("flavor", "mysql57", "comma-separated bootstrap flavor(s) to run against (when using Docker mode). Available flavors: all,"+flavors)
bootstrapVersion = flag.String("bootstrap-version", "10.2", "the version identifier to use for the docker images")
bootstrapVersion = flag.String("bootstrap-version", "15", "the version identifier to use for the docker images")
runCount = flag.Int("runs", 1, "run each test this many times")
retryMax = flag.Int("retry", 3, "max number of retries, to detect flaky tests")
logPass = flag.Bool("log-pass", false, "log test output even if it passes")
Expand Down
2 changes: 1 addition & 1 deletion test/templates/dockerfile.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG bootstrap_version=10.2
ARG bootstrap_version=15
ARG image="vitess/bootstrap:${bootstrap_version}-{{.Platform}}"

FROM "${image}"
Expand Down

0 comments on commit 835589f

Please sign in to comment.