Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .buildkite/hooks/pre-exit

This file was deleted.

183 changes: 0 additions & 183 deletions .buildkite/pipeline.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: e2e-test
on:
push:
branches:
- main
- release-**
pull_request:
branches:
- main
- release-**

jobs:
e2e:
name: ${{ matrix.test.name }}
runs-on: vitess-ubuntu-shr-4cpu-16gb
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
test:
- name: "Upgrade Test"
target: upgrade-test
- name: "Backup Restore Test"
target: backup-restore-test
- name: "Backup Schedule Cluster/Keyspace Scope Test"
target: backup-schedule-keyspace-test
- name: "Backup Schedule Test"
target: backup-schedule-test
- name: "Backup Schedule vtctldclient Method Test"
target: backup-schedule-vtctldclient-test
- name: "VTOrc and VTAdmin Test"
target: vtorc-vtadmin-test
- name: "Unmanaged Tablet Test"
target: unmanaged-tablet-test
- name: "HPA Test"
target: hpa-test
env:
CI_JOB_ID: ${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.test.target }}
steps:
- name: Check out code
uses: actions/checkout@v6
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions/checkout is referenced by a mutable tag (@v6). For supply-chain safety and reproducibility, pin this action to a specific commit SHA (similar to how actions/setup-go is pinned) so workflow runs can't change behavior unexpectedly if the tag is moved.

Suggested change
uses: actions/checkout@v6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pinned for supply-chain safety

Copilot uses AI. Check for mistakes.

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod

- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y mysql-client chromium-browser
Comment thread
nickvanw marked this conversation as resolved.
Outdated

- name: Run ${{ matrix.test.name }}
run: make ${{ matrix.test.target }}
2 changes: 1 addition & 1 deletion docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The `upgrade_test.sh`, `backup_restore_test.sh`, `vtorc_vtadmin_test.sh` and `un
##### CI Failures

> **Note**
> It is likely that the buildkite tests will fail on the release PR initially because of the unavailability of the latest vitess and vitess-operator docker images. This however doesn't block the release. The tests should be restarted after the said images are built and available.
> It is likely that the end-to-end tests will fail on the release PR initially because of the unavailability of the latest vitess and vitess-operator docker images. This however doesn't block the release. The tests should be restarted after the said images are built and available.

-------------------

Expand Down
28 changes: 6 additions & 22 deletions test/endtoend/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# set -x
shopt -s expand_aliases
alias vtctldclient="vtctldclient --server=localhost:15999"
BUILDKITE_JOB_ID="${BUILDKITE_JOB_ID:-0}"
CI_JOB_ID="${CI_JOB_ID:-0}"

# Suppress warnings when using MariaDB Client
mysql_version="$(mysql --version 2>/dev/null)"
Expand Down Expand Up @@ -523,9 +523,9 @@ function assertSelect() {
function setupBuildContainerImage() {
echo "Building the container image"

# Clean up build output in CI
# Use plain progress output in CI so logs are line-buffered and readable.
local progress="auto"
if [[ "${BUILDKITE_JOB_ID}" != "0" ]]; then
if [[ -n "${CI:-}" ]]; then
progress="plain"
fi

Expand All @@ -535,25 +535,9 @@ function setupBuildContainerImage() {
function setupKindCluster() {
setupBuildContainerImage
createKindCluster
setupKubectlAccessForCI
createExampleNamespace
}

function setupKubectlAccessForCI() {
if [[ "${BUILDKITE_JOB_ID}" != "0" ]]; then
# The script is being run from buildkite, so we need to do stuff
# https://github.com/kubernetes-sigs/kind/issues/1846#issuecomment-691565834
# Since kind is running in a sibling container, communicating with it through kubectl is not trivial.
# To accomplish we need to add the current docker container in the same network as the kind container
# and change the kubectl configuration to use the port listed in the internal endpoint instead of the one
# that is exported to the localhost by kind.
local docker_container_name
docker_container_name="$(hostname -s)"
docker network connect kind "${docker_container_name}"
kind get kubeconfig --internal --name "kind-${BUILDKITE_JOB_ID}" > "${HOME}/.kube/config"
fi
}

# shellcheck disable=SC2120 # function has an optional argument
function setupPortForwarding() {
local with_vtadmin="${1:-}" # Pass `with_vtadmin` to also enable port forwarding to VTAdmin
Expand Down Expand Up @@ -590,14 +574,14 @@ function setupPortForwarding() {

function teardownKindCluster() {
echo "Deleting the Kind cluster. This also deletes the volume associated with it."
kind delete cluster --name "kind-${BUILDKITE_JOB_ID}"
kind delete cluster --name "kind-${CI_JOB_ID}"
}

function createKindCluster() {
echo "Creating Kind cluster"
kind create cluster --wait 30s --name "kind-${BUILDKITE_JOB_ID}" --image "${KIND_VERSION}"
kind create cluster --wait 30s --name "kind-${CI_JOB_ID}" --image "${KIND_VERSION}"
echo "Loading docker image into Kind cluster"
kind load docker-image vitess-operator-pr:latest --name "kind-${BUILDKITE_JOB_ID}"
kind load docker-image vitess-operator-pr:latest --name "kind-${CI_JOB_ID}"
}

function createExampleNamespace() {
Expand Down
Loading