Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into txthrottler-MakePrimary
Browse files Browse the repository at this point in the history
  • Loading branch information
timvaillancourt committed Aug 16, 2024
2 parents 755ee1f + f2d5d1c commit a76eec9
Show file tree
Hide file tree
Showing 220 changed files with 10,320 additions and 6,050 deletions.
44 changes: 21 additions & 23 deletions .github/workflows/upgrade_downgrade_test_query_serving_queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,59 +116,57 @@ jobs:
# install JUnit report formatter
go install github.com/vitessio/go-junit-report@HEAD
# Checkout to the last release of Vitess
- name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }})
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/checkout@v4
with:
ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }}

- name: Get dependencies for the last release
# Build current commit's binaries
- name: Get dependencies for this commit
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
go mod download
- name: Building last release's binaries
- name: Building the binaries for this commit
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 10
run: |
source build.env
NOVTADMINBUILD=1 make build
mkdir -p /tmp/vitess-build-other/
cp -R bin /tmp/vitess-build-other/
mkdir -p /tmp/vitess-build-current/
cp -R bin /tmp/vitess-build-current/
rm -Rf bin/*
# Checkout to this build's commit
- name: Check out commit's code
# Checkout to the last release of Vitess
- name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }})
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/checkout@v4
with:
ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }}

- name: Get dependencies for this commit
- name: Get dependencies for the last release
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
go mod download
- name: Building the binaries for this commit
- name: Building last release's binaries
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 10
run: |
source build.env
NOVTADMINBUILD=1 make build
mkdir -p /tmp/vitess-build-current/
cp -R bin /tmp/vitess-build-current/
mkdir -p /tmp/vitess-build-other/
cp -R bin /tmp/vitess-build-other/
rm -Rf bin/*
# Swap the binaries in the bin. Use vtgate version n-1 and keep vttablet at version n
- name: Use last release's VTGate
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
source build.env
cp -r /tmp/vitess-build-current/bin/* $PWD/bin/
rm -f $PWD/bin/vtgate
cp /tmp/vitess-build-other/bin/vtgate $PWD/bin/vtgate
vtgate --version
# Running a test with vtgate at version n-1 and vttablet at version n
- name: Run query serving tests (vtgate=N-1, vttablet=N)
# Running a test with vtgate at version n-1 and vttablet/vtctld at version n
- name: Run query serving tests (vtgate=N-1, vttablet=N, vtctld=N)
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
rm -rf /tmp/vtdataroot
Expand All @@ -177,8 +175,8 @@ jobs:
source build.env
eatmydata -- go run test.go -skip-build -keep-data=false -docker=false -print-log -follow -tag upgrade_downgrade_query_serving_queries
# Swap the binaries again. This time, vtgate will be at version n, and vttablet will be at version n-1
- name: Use current version VTGate, and other version VTTablet
# Swap the binaries again. This time, vtgate will be at version n, and vttablet/vtctld will be at version n-1
- name: Use current version VTGate, and other version VTTablet/VTctld
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
source build.env
Expand All @@ -197,8 +195,8 @@ jobs:
vtgate --version
vttablet --version
# Running a test with vtgate at version n and vttablet at version n-1
- name: Run query serving tests (vtgate=N, vttablet=N-1)
# Running a test with vtgate at version n and vttablet/vtctld at version n-1
- name: Run query serving tests (vtgate=N, vttablet=N-1, vtctld=N-1)
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
rm -rf /tmp/vtdataroot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,53 +117,51 @@ jobs:
# install JUnit report formatter
go install github.com/vitessio/go-junit-report@HEAD
# Checkout to the next release of Vitess
- name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }})
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/checkout@v4
with:
ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }}

- name: Get dependencies for the next release
# Build current commit's binaries
- name: Get dependencies for this commit
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
go mod download
- name: Building next release's binaries
- name: Building the binaries for this commit
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 10
run: |
source build.env
NOVTADMINBUILD=1 make build
mkdir -p /tmp/vitess-build-other/
cp -R bin /tmp/vitess-build-other/
mkdir -p /tmp/vitess-build-current/
cp -R bin /tmp/vitess-build-current/
rm -Rf bin/*
# Checkout to this build's commit
- name: Check out commit's code
# Checkout to the next release of Vitess
- name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }})
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/checkout@v4
with:
ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }}

- name: Get dependencies for this commit
- name: Get dependencies for the next release
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
go mod download
- name: Building the binaries for this commit
- name: Building next release's binaries
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 10
run: |
source build.env
NOVTADMINBUILD=1 make build
mkdir -p /tmp/vitess-build-current/
cp -R bin /tmp/vitess-build-current/
mkdir -p /tmp/vitess-build-other/
cp -R bin /tmp/vitess-build-other/
rm -Rf bin/*
# Swap the binaries in the bin. Use vtgate version n+1 and keep vttablet at version n
- name: Use next release's VTGate
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
source build.env
cp -r /tmp/vitess-build-current/bin/* $PWD/bin/
rm -f $PWD/bin/vtgate
cp /tmp/vitess-build-other/bin/vtgate $PWD/bin/vtgate
vtgate --version
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/vitess_tester_vtgate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
end_to_end:
- 'go/**/*.go'
- 'go/vt/sidecardb/**/*.sql'
- 'go/test/endtoend/onlineddl/vrepl_suite/**'
- 'go/test/endtoend/vtgate/vitess_tester/**'
- 'test.go'
- 'Makefile'
- 'build.env'
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
go install github.com/vitessio/go-junit-report@HEAD
# install vitess tester
go install github.com/vitessio/vitess-tester@eb953122baba163ed8ccaa6642458ee984f5d7e4
go install github.com/vitessio/vitess-tester@89dd933a9ea0e15f69ca58b9c8ea09a358762cca
- name: Setup launchable dependencies
if: steps.skip-workflow.outputs.is_draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main'
Expand Down Expand Up @@ -144,9 +144,9 @@ jobs:
# We go over all the directories in the given path.
# If there is a vschema file there, we use it, otherwise we let vitess-tester autogenerate it.
if [ -f $dir/vschema.json ]; then
vitess-tester --sharded --xunit --test-dir $dir --vschema "$dir"vschema.json
vitess-tester --xunit --vschema "$dir"vschema.json $dir/*.test
else
vitess-tester --sharded --xunit --test-dir $dir
vitess-tester --sharded --xunit $dir/*.test
fi
# Number the reports by changing their file names.
mv report.xml report"$i".xml
Expand Down
6 changes: 6 additions & 0 deletions changelog/21.0/21.0.0/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- **[Traffic Mirroring](#traffic-mirroring)**
- **[New VTGate Shutdown Behavior](#new-vtgate-shutdown-behavior)**
- **[Tablet Throttler: Multi-Metric support](#tablet-throttler)**
- **[Allow Cross Cell Promotion in PRS](#allow-cross-cell)**

## <a id="major-changes"/>Major Changes

Expand Down Expand Up @@ -96,3 +97,8 @@ Each metric has a factory threshold which can be overridden by the `UpdateThrott
The throttler also supports the catch-all `"all"` app name, and it is thus possible to assign metrics to _all_ apps. Explicit app to metric assignments will override the catch-all configuration.

Metrics are assigned a default _scope_, which could be `self` (isolated to the tablet) or `shard` (max, aka _worst_ value among shard tablets). It is further possible to require a different scope for each metric.

### <a id="allow-cross-cell"/>Allow Cross Cell Promotion in PRS
Up until now if the users wanted to promote a replica in a different cell than the current primary using `PlannedReparentShard`, they had to specify the new primary with the `--new-primary` flag.

We have now added a new flag `--allow-cross-cell-promotion` that lets `PlannedReparentShard` choose a primary in a different cell even if no new primary is provided explicitly.
48 changes: 24 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ go 1.22.5

require (
cloud.google.com/go/storage v1.43.0
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240716105424-66b64c4bb379
github.com/Azure/azure-pipeline-go v0.2.3
github.com/Azure/azure-storage-blob-go v0.15.0
github.com/HdrHistogram/hdrhistogram-go v0.9.0 // indirect
github.com/aquarapid/vaultlib v0.5.1
github.com/armon/go-metrics v0.4.1 // indirect
github.com/aws/aws-sdk-go v1.54.19
github.com/aws/aws-sdk-go v1.55.5
github.com/buger/jsonparser v1.1.1
github.com/cespare/xxhash/v2 v2.3.0
github.com/corpix/uarand v0.1.1 // indirect
Expand Down Expand Up @@ -40,7 +40,7 @@ require (
github.com/minio/minio-go v0.0.0-20190131015406-c8a261de75c1
github.com/montanaflynn/stats v0.7.1
github.com/olekukonko/tablewriter v0.0.5
github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e
github.com/opentracing-contrib/go-grpc v0.0.0-20240724223109-9dec25a38fa8
github.com/opentracing/opentracing-go v1.2.0
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect
Expand All @@ -58,15 +58,15 @@ require (
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/tchap/go-patricia v2.3.0+incompatible
github.com/tidwall/gjson v1.17.1
github.com/tidwall/gjson v1.17.3
github.com/tinylib/msgp v1.2.0 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82
github.com/z-division/go-zookeeper v1.0.0
go.etcd.io/etcd/api/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/client/v3 v3.5.14
go.etcd.io/etcd/api/v3 v3.5.15
go.etcd.io/etcd/client/pkg/v3 v3.5.15
go.etcd.io/etcd/client/v3 v3.5.15
go.uber.org/mock v0.2.0
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/mod v0.19.0 // indirect
Expand All @@ -77,13 +77,13 @@ require (
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0
golang.org/x/tools v0.23.0
google.golang.org/api v0.188.0
google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/api v0.189.0
google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/grpc v1.65.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
google.golang.org/grpc/examples v0.0.0-20210430044426-28078834f35b
google.golang.org/protobuf v1.34.2
gopkg.in/DataDog/dd-trace-go.v1 v1.65.1
gopkg.in/DataDog/dd-trace-go.v1 v1.66.0
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/ldap.v2 v2.5.1
sigs.k8s.io/yaml v1.4.0
Expand All @@ -104,21 +104,21 @@ require (
github.com/spf13/jwalterweatherman v1.1.0
github.com/xlab/treeprint v1.2.0
go.uber.org/goleak v1.3.0
golang.org/x/exp v0.0.0-20240707233637-46b078467d37
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/sync v0.7.0
gonum.org/v1/gonum v0.14.0
modernc.org/sqlite v1.30.2
modernc.org/sqlite v1.31.1
)

require (
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/auth v0.7.1 // indirect
cloud.google.com/go/auth v0.7.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/iam v1.1.11 // indirect
cloud.google.com/go/iam v1.1.12 // indirect
github.com/DataDog/appsec-internal-go v1.7.0 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.55.0 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.55.0 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.55.2 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.55.2 // indirect
github.com/DataDog/go-libddwaf/v3 v3.3.0 // indirect
github.com/DataDog/go-sqllexer v0.0.12 // indirect
github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect
Expand All @@ -137,9 +137,9 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.5 // indirect
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
Expand All @@ -152,7 +152,7 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-ieproxy v0.0.12 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
Expand Down Expand Up @@ -184,14 +184,14 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect
modernc.org/libc v1.55.1 // indirect
modernc.org/gc/v3 v3.0.0-20240722195230-4a140ff9c08e // indirect
modernc.org/libc v1.55.7 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.8.0 // indirect
modernc.org/strutil v1.2.0 // indirect
Expand Down
Loading

0 comments on commit a76eec9

Please sign in to comment.