Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
78b0028
[release-22.0] Bump to `v22.0.3-SNAPSHOT` after the `v22.0.2` release…
mattlord Nov 5, 2025
e88223d
[release-22.0] Improve Semi-Sync Monitor Behavior to Prevent Errant E…
vitess-bot[bot] Nov 18, 2025
50d8e96
[release-22.0] Bump js-yaml from 4.1.0 to 4.1.1 in /web/vtadmin (#189…
vitess-bot[bot] Nov 18, 2025
d7c5156
[release-22.0] Upgrade the Golang version to `go1.24.10` (#18897)
vitess-bot Nov 19, 2025
cf02e5f
[release-22.0] `vtbench`: add `--db-credentials-*` flags (#18913) (#1…
vitess-bot[bot] Nov 20, 2025
bff3725
[release-22.0] Properly Strip Keyspace Table Qualifiers in FK Constra…
vitess-bot[bot] Nov 22, 2025
a349b13
[release-22.0] Stop using Equinix Metal self hosted runners (#18942) …
vitess-bot[bot] Nov 24, 2025
2bb2897
[release-22.0] Drop dependency on `npm`, bump version of `glob`. (#18…
vitess-bot[bot] Nov 28, 2025
51d20de
[release-22.0] Don't hardcode the go version to use for upgrade/downg…
vitess-bot Nov 30, 2025
931a89c
[release-22.0] connpool: fix connection leak during idle connection r…
vitess-bot[bot] Dec 1, 2025
d634143
[release-22.0] Potential fix for code scanning alert no. 3944: Databa…
timvaillancourt Dec 3, 2025
4b4ff40
[release-22.0] vdiff: do not sort by table name in summary, it is not…
vitess-bot[bot] Dec 3, 2025
79ea2e6
[release-22.0] VDiff: Handle the case where a workflow's table has be…
vitess-bot[bot] Dec 4, 2025
cdb878f
[release-22.0] CI: Improve reliability of codecov workflow with large…
vitess-bot[bot] Dec 5, 2025
4fe6b22
[release-22.0] Change connection pool idle expiration logic (#19004) …
vitess-bot[bot] Dec 11, 2025
d5b5f08
[release-22.0] `ci`: use `etcd` v3.5.25, add retries (#19015) (#19021)
vitess-bot[bot] Dec 15, 2025
263ef1b
[release-22.0] Bump org.apache.logging.log4j:log4j-core from 2.24.1 t…
vitess-bot[bot] Dec 22, 2025
cf51305
[release-22.0] Skip flaky `TestRedial` test (#19106) (#19107)
vitess-bot[bot] Jan 7, 2026
80ad2df
[release-22.0] binlog_json: fix opaque value parsing to read variable…
vitess-bot[bot] Jan 7, 2026
bb4d0b1
[release-22.0] vschema revert: initialize as nil so that nil checks d…
vitess-bot[bot] Jan 10, 2026
c510d1d
[release-22.0] Fix `ReloadSchema` incorrectly using `DisableBinlogs` …
vitess-bot[bot] Jan 12, 2026
5873e74
[release-22.0] Fix cross shard/keyspace joins with derived tables con…
vitess-bot[bot] Jan 15, 2026
d765b52
[release-22.0] workflows: avoid accidental deletion to routing rules …
vitess-bot[bot] Jan 15, 2026
972daa9
Pin GitHub Actions and Docker images by hash (#19151)
mhamza15 Jan 15, 2026
16e68c3
[release-22.0] Fix column offset tracking for `UNION`s to be case ins…
vitess-bot[bot] Jan 16, 2026
ad94149
[release-22.0] VDiff: Prevent division by 0 when reconciling mismatch…
vitess-bot[bot] Jan 16, 2026
d5ffbdd
[release-22.0] CI: Look for expected log message rather than code in …
vitess-bot[bot] Jan 22, 2026
8cc26b8
[release-22.0] Update go-upgrade to update docker image digests (#191…
vitess-bot[bot] Jan 23, 2026
22c70bc
[release-22.0] Fix sporadic TestServingKeyspaces panic on context can…
vitess-bot[bot] Jan 24, 2026
dd9442c
[release-22.0] Fix major upgrade logic in go upgrade tool (#19211)
mhamza15 Jan 25, 2026
c925356
[release-22.0] CI: Use new Percona Server repo name (#19221)
mattlord Jan 26, 2026
57241c2
[release-22.0] Fix go upgrade workflow (#19216) (#19219)
vitess-bot[bot] Jan 26, 2026
9869e92
[release-22.0] Upgrade the Golang version to `go1.24.12` (#19222)
vitess-bot Jan 27, 2026
04ada26
[release-22.0] VReplication: Properly Handle Sequence Table Initializ…
vitess-bot[bot] Jan 27, 2026
bd45bd6
[release-22.0] `vtorc`: detect errant GTIDs for replicas not connecte…
vitess-bot[bot] Jan 27, 2026
c864604
[release-22.0] Add new `force` flag to `DemotePrimary` to force a dem…
vitess-bot[bot] Jan 28, 2026
bea1835
[release-22.0] vtorc: add `StaleTopoPrimary` analysis and recovery (#…
vitess-bot[bot] Jan 28, 2026
93ef59e
[release-22.0] switch end-to-end tests to gotestsum (#19182) (#19244)
vitess-bot[bot] Jan 30, 2026
1132e9f
[release-22.0] evalengine: make `JSON_EXTRACT` work with non-static a…
vitess-bot[bot] Feb 2, 2026
6d369fb
[release-22.0] Escape control bytes in JSON strings (#19270) (#19274)
vitess-bot[bot] Feb 4, 2026
2499435
[release-22.0] evalengine: Fix `NULL` document handling in JSON funct…
vitess-bot[bot] Feb 4, 2026
4ce74c5
[release-22.0] Code Freeze for `v22.0.3` (#19281)
mattlord Feb 4, 2026
53de5fd
[release-22.0] Release of `v22.0.3` (#19282)
mattlord Feb 4, 2026
8c204b9
[release-22.0] Bump to `v22.0.4-SNAPSHOT` after the `v22.0.3` release…
mattlord Feb 4, 2026
f17f9cc
[release-22.0] Generate race unit tests (#19078) (#19295)
vitess-bot[bot] Feb 5, 2026
c96c502
[release-22.0] Run tests with gotestsum (#19076) (#19292)
vitess-bot[bot] Feb 5, 2026
5f70f64
[release-22.0] Consolidate CI test workflows (#19259) (#19272)
vitess-bot[bot] Feb 5, 2026
4c6d4ea
[release-22.0] Fix go upgrade tool (#19290) (#19298)
vitess-bot[bot] Feb 5, 2026
24742c9
[release-22.0] Switch gotestsum output format (#19215) (#19302)
vitess-bot[bot] Feb 5, 2026
41c68e2
[release-22.0] Build bootstrap image locally in ci (#19255) (#19265)
vitess-bot[bot] Feb 5, 2026
25fef4d
[release-22.0] Build boostrap image for local/region example CI (#193…
vitess-bot[bot] Feb 5, 2026
1fc4799
[release-22.0] Don't add "Skip CI" label for Go upgrade PRs (#19307) …
vitess-bot[bot] Feb 6, 2026
3696abe
[release-22.0] Explicitly pass local image tags in example CI (#19320…
vitess-bot[bot] Feb 8, 2026
3a3f2ea
[release-22.0] Upgrade the Golang version to `go1.24.13` (#19305)
vitess-bot Feb 8, 2026
1837be9
[release-22.0] Add lite image build CI job (#19321) (#19329)
vitess-bot[bot] Feb 8, 2026
ade3859
[release-22.0] vtgate: fix handling of session variables on targeted …
vitess-bot[bot] Feb 9, 2026
9f36f93
[release-22.0] vtgate: defer implicit transaction start until after q…
vitess-bot[bot] Feb 10, 2026
1b2485e
[release-22.0] fix(backup): propagate file hashes to manifest after r…
vitess-bot[bot] Feb 10, 2026
7a8ceee
[release-22.0] Performance: use `IsSingleShard()` check in `pushDeriv…
vitess-bot[bot] Feb 10, 2026
387c58c
[release-22.0] try to fix setup mysql (#19371) (#19375)
vitess-bot[bot] Feb 13, 2026
a419493
[release-22.0] CI: Fix workflows that install xtrabackup (#19383) (#1…
vitess-bot[bot] Feb 17, 2026
8e01c0d
[release-22.0] fix streaming binary row corruption in prepared statem…
vitess-bot[bot] Feb 18, 2026
ce32eff
[release-22.0] sidecardb: make ALTER TABLE algorithm version-aware (#…
vitess-bot[bot] Feb 18, 2026
bb16a35
[release-22.0] CI: Deflake two flaky tests (#19364) (#19411)
vitess-bot[bot] Feb 18, 2026
0ea371f
[release-22.0] CI: Deflake Code Coverage workflow (#19388) (#19393)
vitess-bot[bot] Feb 19, 2026
433c2b9
[release-22.0] Bug fix: Add missing db_name filters to vreplication a…
mattlord Feb 20, 2026
d5a7039
[release-22.0] CI: Use larger runners for vreplication workflows (#19…
vitess-bot[bot] Feb 21, 2026
b86c701
[release-22.0] Address a few VDiff concerns (#19413) (#19447)
vitess-bot[bot] Feb 23, 2026
02f50cd
[release-22.0] Normalize the --on-ddl param for MoveTables (#19445) (…
vitess-bot[bot] Feb 23, 2026
b91ea32
[release-22.0] vtorc: Add a timeout to `DemotePrimary` RPC (#19432) (…
vitess-bot[bot] Feb 23, 2026
27d1f07
[release-22.0] vreplication: fix infinite retry loop when terminal er…
vitess-bot[bot] Feb 24, 2026
a1eafd4
[release-22.0] Restore: make loading compressor commands from `MANIFE…
vitess-bot[bot] Feb 25, 2026
1520b7a
[release-22.0] `backupengine`: disallow path traversals via backup `M…
vitess-bot[bot] Feb 25, 2026
9894049
[release-22.0] `filebackupstorage`: use `fileutil.SafePathJoin` for a…
vitess-bot[bot] Feb 25, 2026
45b59f7
[release-22.0] vtgate: Add bounds check in `visitUnion` for mismatche…
vitess-bot[bot] Feb 26, 2026
0438639
[release-22.0] `mysqlshellbackupengine`: use `fileutil.SafePathJoin(.…
vitess-bot[bot] Feb 26, 2026
5f1e8e0
[release-22.0] `vttablet`: harden `ExecuteHook` RPC and backup engine…
vitess-bot[bot] Feb 26, 2026
a2bfb2c
[release-22.0] docker: install mysql-shell from Oracle repo and fix s…
vitess-bot[bot] Feb 26, 2026
7ae0d1a
Add release summary for v22.0.4 (#19508)
mattlord Feb 27, 2026
fa17b71
[release-22.0] Code Freeze for `v22.0.4` (#19509)
mattlord Feb 27, 2026
5b0d3ad
[release-22.0] Release of `v22.0.4` (#19510)
mattlord Feb 27, 2026
1634bad
[release-22.0] Bump to `v22.0.5-SNAPSHOT` after the `v22.0.4` release…
mattlord Feb 27, 2026
992254b
[release-22.0] `vtorc`: improve logging in `DiscoverInstance`, remove…
vitess-bot[bot] Feb 27, 2026
dc6de33
[release-22.0] vtorc: add timeout helpers for remaining recovery topo…
vitess-bot[bot] Mar 4, 2026
e578cf4
[release-22.0] vtgate: Reject unqualified `*` after comma in `SELECT`…
vitess-bot[bot] Mar 5, 2026
c6d1d99
[release-22.0] Fix `DROP CONSTRAINT` to work the same way as MySQL (#…
vitess-bot[bot] Mar 7, 2026
afde3ab
[release-22.0] CI: Address our two flakiest tests (#19587) (#19594)
vitess-bot[bot] Mar 9, 2026
9dfea46
[release-22.0] `ci`: run code coverage CI only on go packages that ha…
vitess-bot[bot] Mar 9, 2026
5937c4d
[release-22.0] `vtorc`: support analysis ordering, improve semi-sync …
vitess-bot[bot] Mar 9, 2026
99d81aa
[release-22.0] planbuilder: fix panic when SELECT has duplicate subqu…
vitess-bot[bot] Mar 9, 2026
2007573
[release-22.0] Fix some linting issues (#19246) (#19247)
vitess-bot[bot] Mar 11, 2026
11110eb
[release-22.0] `EmergencyReparentShard`: require stop replication err…
vitess-bot[bot] Mar 11, 2026
6ad5e34
[release-22.0] `vtorc`: improvements to analysis ordering, handle sem…
vitess-bot[bot] Mar 11, 2026
d9e60d2
[release-22.0] vtgate: set ServerStatusAutocommit in handshake status…
vitess-bot[bot] Mar 16, 2026
8b5a876
[release-22.0] workflow: finish switch traffic after post-journal can…
vitess-bot[bot] Mar 20, 2026
3e94a98
[release-22.0] OnlineDDL: always close lock connection (#19586) (#19720)
vitess-bot[bot] Mar 27, 2026
ee17407
[release-22.0] `ci`: skip Code Coverage CI on backports (#19726) (#19…
vitess-bot[bot] Mar 27, 2026
59d6873
[release-22.0] VTGate: fix warming reads timeout context (#19674) (#1…
vitess-bot[bot] Mar 28, 2026
8e90f68
[release-22.0] tabletmanager: handle nil Cnf in MysqlHostMetrics to p…
vitess-bot[bot] Mar 29, 2026
686495c
[release-22.0] `ci`: only cache `action/setup-go` action on `main` (#…
vitess-bot[bot] Mar 31, 2026
94b51e0
[release-22.0] ci: use `bash -e {0}` in composite actions (#19707) (…
vitess-bot[bot] Mar 31, 2026
cd9c91d
[release-22.0] OnlineDDL: set `wait_timeout` on cutover connections (…
vitess-bot[bot] Mar 31, 2026
60f438b
[release-22.0] sqlparser: enforce bare `*` restriction in grammar (#1…
vitess-bot[bot] Mar 31, 2026
dd182a1
[release-22.0] Support Go 1.26 and later with Swiss maps always enabl…
arthurschreiber Mar 31, 2026
9c41039
[release-22.0] docker: use shared buildkit cache scope for bootstrap …
vitess-bot[bot] Apr 2, 2026
5233eea
[release-22.0] vttablet: handle applier metadata init failures in rel…
vitess-bot[bot] Apr 3, 2026
b59de26
[release-22.0] ci: add `setup-go` composite action (#19784) (#19803)
vitess-bot[bot] Apr 6, 2026
0c7a0ae
[release-22.0] Add ZooKeeper connection metrics to zk2topo (#19757) (…
vitess-bot[bot] Apr 7, 2026
b255825
[release-22.0] Restart IO threads on replicas after ERS failure (#198…
vitess-bot[bot] Apr 8, 2026
382646d
[release-22.0] go-upgrade: fix Go image digest rewrite matching (#198…
vitess-bot[bot] Apr 10, 2026
6700890
fix actions (#193)
mhamza15 Sep 3, 2025
234e15a
Merge remote-tracking branch 'origin/release-22.0-github' into releas…
andyedison May 26, 2026
edf67d9
[release-22.0] CI: deflakes, fork runner fallback, codecov / mileston…
arthurschreiber May 28, 2026
7c3f99c
Merge remote-tracking branch 'upstream/release-22.0' into release-22.0
andyedison Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 30 additions & 0 deletions .github/actions/build-bootstrap/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Build Bootstrap Images"
description: "Build Vitess bootstrap Docker images locally using docker buildx bake"

inputs:
bootstrap-version:
description: "Bootstrap image version tag"
required: false
default: "ci"
bootstrap-flavor:
description: "Bootstrap image flavor (e.g. mysql84)"
required: false
default: "mysql84"

runs:
using: "composite"
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0

- name: Build bootstrap images
uses: docker/bake-action@5be5f02ff8819ecd3092ea6b2e6261c31774f2b4 # v6.10.0
with:
files: docker/bootstrap/docker-bake.hcl
load: true
set: |
*.cache-from=type=gha,scope=bootstrap
*.cache-to=type=gha,scope=bootstrap,mode=max
env:
BOOTSTRAP_VERSION: ${{ inputs.bootstrap-version }}
BOOTSTRAP_FLAVOR: ${{ inputs.bootstrap-flavor }}
30 changes: 30 additions & 0 deletions .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Set up Go"
description: "Set up Go with shared module caching"
inputs:
cache:
description: "Whether to cache Go modules"
default: "true"
runs:
using: "composite"
steps:
- name: Set up Go
id: setup-go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
# Disable built-in caching; its key includes ImageOS which
# creates duplicate cache entries across runner types.
cache: false

- name: Cache Go modules
if: inputs.cache == 'true' && (github.base_ref == 'main' || (github.base_ref == '' && github.ref_name == 'main'))
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
# Same paths cached by actions/setup-go internally.
path: |
~/go/pkg/mod
~/.cache/go-build
# Cache by version/arch/hash. Construct hash using same method as actions/setup-go.
key: go-${{ steps.setup-go.outputs.go-version }}-${{ toLower(runner.os) }}-${{ toLower(runner.arch) }}-${{ hashFiles('go.sum') }}
restore-keys: |
go-${{ steps.setup-go.outputs.go-version }}-${{ toLower(runner.os) }}-${{ toLower(runner.arch) }}-
6 changes: 3 additions & 3 deletions .github/actions/setup-mysql/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: "composite"
steps:
- name: Setup MySQL
shell: bash
shell: bash -e {0}
run: |
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
Expand All @@ -24,7 +24,7 @@ runs:

# We have to install this old version of libaio1. See also:
# https://bugs.launchpad.net/ubuntu/+source/libaio/+bug/2067501
wget http://mirrors.kernel.org/ubuntu/pool/main/liba/libaio/libaio1_0.3.112-13build1_amd64.deb && \
wget http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.112-13build1_amd64.deb && \
sudo dpkg -i libaio1_0.3.112-13build1_amd64.deb && \
rm libaio1_0.3.112-13build1_amd64.deb

Expand All @@ -40,7 +40,7 @@ runs:
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config*
sudo apt-get update
# libtinfo5 is also needed for older MySQL 5.7 builds.
curl -L -O http://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
curl -L -O http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
sudo dpkg -i libtinfo5_6.3-2ubuntu0.1_amd64.deb
sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* libncurses6
elif [[ "${{ inputs.flavor }}" == "mysql-8.0" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/tune-os/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runs:
using: "composite"
steps:
- name: Tune the OS
shell: bash
shell: bash -e {0}
run: |
# Install eatmydata and ensure it's used for every operation
sudo apt-get update && sudo apt-get install -y eatmydata
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/assign_milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:

jobs:
build:
if: github.repository == 'vitessio/vitess'
name: Assign Milestone
runs-on: ubuntu-24.04

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check_make_vtadmin_authz_testgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
if: steps.changes.outputs.vtadmin_changes == 'true'
with:
go-version-file: go.mod
cache: ${{ (github.base_ref == 'main' || (github.base_ref == '' && github.ref_name == 'main')) && 'true' || 'false' }}

- name: Get dependencies
if: steps.changes.outputs.vtadmin_changes == 'true'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check_make_vtadmin_web_proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
if: steps.changes.outputs.proto_changes == 'true'
with:
go-version-file: go.mod
cache: ${{ (github.base_ref == 'main' || (github.base_ref == '' && github.ref_name == 'main')) && 'true' || 'false' }}

- name: Setup Node
if: steps.changes.outputs.proto_changes == 'true'
Expand Down
263 changes: 263 additions & 0 deletions .github/workflows/cluster_endtoend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
name: Cluster End-to-End Tests

on:
push:
branches:
- "main"
- "release-[0-9]+.[0-9]"
tags: "**"
pull_request:
branches: "**"

concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster End-to-End Tests')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}"

jobs:
generate-matrix:
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: "false"

- name: Generate shard matrix
id: set-matrix
run: |
# Shards to exclude from this workflow.
# Modify this list to add or remove shards from the cluster end-to-end tests.
# These are either:
# - Run in other dedicated workflows
# - Not cluster tests (unit tests, examples, etc.)
# - Special upgrade/downgrade tests
EXCLUDE_SHARDS='[
"",
"java",
"docker_cluster",
"5",
"28",
"onlineddl_flow"
]'

# Build matrix
matrix=$(jq -c -s --argjson exclude "$EXCLUDE_SHARDS" '
map(.Tests) | add | to_entries
| group_by(.value.Shard)
| map(select(.[0].value.Shard as $s | ($s != null) and ($exclude | index($s) | not)))
| map({
shard: .[0].value.Shard,
needs: ([.[].value.Needs // []] | add | unique // []),
buildTag: ([.[].value.BuildTag // null] | map(select(. != null)) | first // "")
})
' test/config.json test/config_partial_keyspace.json)

echo "matrix={\"include\":$matrix}" >> $GITHUB_OUTPUT

test:
needs: generate-matrix
if: needs.generate-matrix.outputs.matrix != ''
timeout-minutes: 60
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}

name: Run endtoend tests on Cluster (${{ matrix.shard }})
runs-on: ${{ github.repository == 'vitessio/vitess' && contains(matrix.needs, 'larger-runner') && 'gh-hosted-runners-16cores-1-24.04' || 'ubuntu-24.04' }}

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
with:
egress-policy: audit

- name: Skip CI
run: |
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'Skip CI') }}" == "true" ]]; then
echo "skipping CI due to the 'Skip CI' label"
exit 1
fi

- name: Check Memory
if: contains(matrix.needs, 'memory-check')
run: |
totalMem=$(free -g | awk 'NR==2 {print $2}')
echo "total memory $totalMem GB"
if [[ "$totalMem" -lt 15 ]]; then
echo "Less memory than required"
exit 1
fi

- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: "false"

- name: Check for changes in relevant files
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
token: ""
filters: |
end_to_end:
- 'test/config.json'
- 'test/config_partial_keyspace.json'
- 'go/**/*.go'
- 'go/vt/sidecardb/**/*.sql'
- 'go/test/endtoend/onlineddl/vrepl_suite/**'
- 'test.go'
- 'Makefile'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'proto/*.proto'
- 'tools/**'
- 'config/**'
- 'bootstrap.sh'
- '.github/workflows/cluster_endtoend.yml'

- name: Set up Go
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: go.mod
cache: ${{ (github.base_ref == 'main' || (github.base_ref == '' && github.ref_name == 'main')) && 'true' || 'false' }}

- name: Set up python
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0

- name: Tune the OS
if: steps.changes.outputs.end_to_end == 'true'
uses: ./.github/actions/tune-os

- name: Setup MySQL
if: steps.changes.outputs.end_to_end == 'true' && !contains(matrix.needs, 'xtrabackup')
uses: ./.github/actions/setup-mysql
with:
flavor: mysql-8.0

- name: Setup Percona Server and XtraBackup
if: steps.changes.outputs.end_to_end == 'true' && contains(matrix.needs, 'xtrabackup')
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y lsb-release gnupg2
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
sudo percona-release setup pdps8.0
sudo percona-release setup pxb-80
sudo percona-release enable ps-80 release
sudo apt-get -qq update
sudo apt-get -qq install -y percona-server-server percona-server-client
sudo service mysql stop
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
sudo apt-get -qq install -y percona-xtrabackup-80 lz4

- name: Get dependencies
if: steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 10
run: |
# Install mysql-shell for non-XtraBackup shards
if [[ "${{ contains(matrix.needs, 'xtrabackup') }}" != "true" ]]; then
sudo apt-get -qq install -y mysql-shell
fi

sudo apt-get -qq install -y make unzip g++ etcd-client etcd-server curl git wget xz-utils libncurses6
sudo service etcd stop
go mod download

- name: Install Minio
if: steps.changes.outputs.end_to_end == 'true' && contains(matrix.needs, 'minio')
run: |
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
sudo mv minio /usr/local/bin

- name: Install Consul and ZooKeeper
if: steps.changes.outputs.end_to_end == 'true' && contains(matrix.needs, 'consul')
run: make tools

- name: Setup launchable dependencies
if: |
github.event_name == 'pull_request' &&
github.event.pull_request.draft == false &&
steps.changes.outputs.end_to_end == 'true' &&
github.base_ref == 'main'
run: |
pip3 install --user launchable~=1.0 > /dev/null
launchable verify || true
launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source .

- name: Run cluster endtoend test
if: steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 45
run: |
export VTDATAROOT="/tmp/"
source build.env
set -exo pipefail

# Apply resource limits for heavy shards
if [[ "${{ contains(matrix.needs, 'limit-resources') }}" == "true" ]]; then
ulimit -n 65536
cat <<-EOF>>./config/mycnf/mysql84.cnf
innodb_buffer_pool_dump_at_shutdown=OFF
innodb_buffer_pool_in_core_file=OFF
innodb_buffer_pool_load_at_startup=OFF
innodb_buffer_pool_size=64M
innodb_doublewrite=OFF
innodb_flush_log_at_trx_commit=0
innodb_flush_method=O_DIRECT
innodb_numa_interleave=ON
innodb_adaptive_hash_index=OFF
sync_binlog=0
sync_relay_log=0
performance_schema=OFF
slow-query-log=OFF
EOF
fi

# Enable binlog compression for vreplication shards
if [[ "${{ contains(matrix.needs, 'binlog-compression') }}" == "true" ]]; then
cat <<-EOF>>./config/mycnf/mysql84.cnf
binlog-transaction-compression=ON
binlog-row-value-options=PARTIAL_JSON
EOF
fi

# Build test command with optional flags
EXTRA_FLAGS=""
if [[ "${{ matrix.buildTag }}" != "" ]]; then
EXTRA_FLAGS="$EXTRA_FLAGS -build-tag=${{ matrix.buildTag }}"
fi
if [[ "${{ matrix.shard }}" == *"partial_keyspace"* ]]; then
EXTRA_FLAGS="$EXTRA_FLAGS -partial-keyspace=true"
fi

go run test.go -docker=false -follow -shard "${{ matrix.shard }}" $EXTRA_FLAGS

- name: Record test results in launchable
if: |
github.event_name == 'pull_request' &&
github.event.pull_request.draft == false &&
steps.changes.outputs.end_to_end == 'true' &&
github.base_ref == 'main' &&
!cancelled()
run: |
launchable record tests --build "$GITHUB_RUN_ID" go-test . || true

- name: Test Summary
if: steps.changes.outputs.end_to_end == 'true' && failure()
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: "_test/junit/*.xml"
show: "fail"
Loading
Loading