Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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.

121 changes: 121 additions & 0 deletions .github/workflows/end-to-end-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: end-to-end-test

on:
push:
branches:
- main
- release-**

pull_request:
branches:
- main
- release-**

permissions:
contents: read

jobs:
test:
name: ${{ matrix.name }}
runs-on: vitess-operator-runner
timeout-minutes: ${{ matrix.timeout_minutes || 25 }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.make_target }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

strategy:
fail-fast: false

matrix:
include:
- name: Upgrade Test
make_target: upgrade-test
timeout_minutes: 35

- name: Backup Restore Test
make_target: backup-restore-test

- name: Backup Schedule Cluster/Keyspace Scope Test
make_target: backup-schedule-keyspace-test

- name: Backup Schedule Test
make_target: backup-schedule-test

- name: Backup Schedule vtctldclient Method Test
make_target: backup-schedule-vtctldclient-test

- name: VTOrc and VTAdmin Test
make_target: vtorc-vtadmin-test

- name: Unmanaged Tablet Test
make_target: unmanaged-tablet-test

- name: HPA Test
make_target: hpa-test

steps:
# Ubuntu 24.04 restricts unprivileged user namespaces and ships tight
# inotify limits, both of which break mysqld inside kind.
- name: Prepare runner for kind
run: |
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0 || true
sudo sysctl -w kernel.unprivileged_userns_clone=1 || true
sudo sysctl -w user.max_user_namespaces=65536 || true
sudo sysctl -w fs.inotify.max_user_watches=524288
sudo sysctl -w fs.inotify.max_user_instances=512

- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Cache test binaries
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: tools/_bin
key: e2e-deps-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('tools/get-e2e-test-deps.sh', 'tools/install-kubectl.sh') }}

- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends mysql-client

- name: Install Chromium
if: matrix.make_target == 'vtorc-vtadmin-test'
run: |
curl --fail --location --silent --show-error \
--output /tmp/google-chrome.deb \
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt-get install -y --no-install-recommends /tmp/google-chrome.deb
sudo ln -sf /usr/bin/google-chrome-stable /usr/local/bin/chromium

# BuildKit can't start build containers once AppArmor is torn down, so
# build the image first; setupBuildContainerImage skips the rebuild.
- name: Build operator image
run: docker build --progress plain -f build/Dockerfile.release -t vitess-operator-pr:latest .

# AppArmor's docker-default profile kills mysqld inside vttablet pods.
- name: Disable AppArmor
run: |
sudo systemctl stop apparmor.service || true
sudo aa-teardown || true

- name: Run ${{ matrix.name }}
run: make ${{ matrix.make_target }}

- name: Dump cluster state on failure
if: failure()
run: |
export PATH="$PWD/tools/_bin:$PATH"
kubectl get pods -A -o wide || true
kubectl get events -A --sort-by=.lastTimestamp | tail -40 || true
kubectl describe pods -n example || true
kubectl logs -n default -l app=vitess-operator --tail=100 || true
kubectl get pods -n example -o name | while read -r pod; do
echo "=== ${pod} logs ==="
kubectl logs -n example "${pod}" --all-containers --tail=50 || true
kubectl logs -n example "${pod}" --all-containers --tail=50 --previous 2>/dev/null || true
done
docker ps -a || true
2 changes: 1 addition & 1 deletion .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make-generate-and-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upgrade-vitess-dependency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand All @@ -31,7 +31,7 @@ jobs:
go mod tidy

- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
commit-message: "upgrade vitess dependency to latest"
signoff: true
Expand Down
2 changes: 1 addition & 1 deletion deploy/crds/planetscale.com_vitessbackupschedules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
jobTimeoutMinute:
default: 10
format: int32
minimum: 0
minimum: -1
type: integer
name:
example: every-day
Expand Down
2 changes: 1 addition & 1 deletion deploy/crds/planetscale.com_vitessclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ spec:
jobTimeoutMinute:
default: 10
format: int32
minimum: 0
minimum: -1
type: integer
name:
example: every-day
Expand Down
Loading