Skip to content

Commit d45696d

Browse files
authored
Merge branch 'slack-22.0' into slack-22.0-pool-waiter-cap
2 parents eb53014 + b9b051f commit d45696d

107 files changed

Lines changed: 2543 additions & 736 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Build Bootstrap Images"
2+
description: "Build Vitess bootstrap Docker images locally using docker buildx bake"
3+
4+
inputs:
5+
bootstrap-version:
6+
description: "Bootstrap image version tag"
7+
required: false
8+
default: "ci"
9+
bootstrap-flavor:
10+
description: "Bootstrap image flavor (e.g. mysql84)"
11+
required: false
12+
default: "mysql84"
13+
gh-access-token:
14+
description: "GitHub access token for private dependencies"
15+
required: false
16+
default: ""
17+
18+
runs:
19+
using: "composite"
20+
steps:
21+
- name: Set up Docker Buildx
22+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
23+
24+
- name: Build bootstrap images
25+
uses: docker/bake-action@5be5f02ff8819ecd3092ea6b2e6261c31774f2b4 # v6.10.0
26+
with:
27+
files: docker/bootstrap/docker-bake.hcl
28+
load: true
29+
set: |
30+
*.cache-from=type=gha
31+
*.cache-to=type=gha,mode=max
32+
env:
33+
BOOTSTRAP_VERSION: ${{ inputs.bootstrap-version }}
34+
BOOTSTRAP_FLAVOR: ${{ inputs.bootstrap-flavor }}
35+
GH_ACCESS_TOKEN: ${{ inputs.gh-access-token }}

.github/workflows/codeql_analysis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,9 @@ jobs:
6262
sudo DEBIAN_FRONTEND="noninteractive" apt-get update
6363
# Install everything else we need, and configure
6464
sudo apt-get install -y make unzip g++ etcd-client etcd-server curl git wget
65-
65+
6666
sudo service etcd stop
67-
68-
# install JUnit report formatter
69-
go install github.com/vitessio/go-junit-report@HEAD
70-
67+
7168
- name: Building binaries
7269
timeout-minutes: 30
7370
run: |

.github/workflows/docker_ci.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: docker_ci
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
- "release-[0-9]+.[0-9]"
7+
tags: "**"
8+
pull_request:
9+
branches: "**"
10+
permissions: read-all
11+
12+
env:
13+
GOPRIVATE: github.com/slackhq/vitess-addons
14+
GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}"
15+
BOOTSTRAP_VERSION: "ci"
16+
BOOTSTRAP_FLAVOR: "mysql84"
17+
18+
jobs:
19+
build:
20+
name: ${{ matrix.name }}
21+
runs-on: ubuntu-24.04
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
include:
27+
- shard: java
28+
name: Java Docker Test
29+
- shard: docker_cluster
30+
name: Docker Test Cluster
31+
32+
steps:
33+
- name: Harden the runner (Audit all outbound calls)
34+
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
35+
with:
36+
egress-policy: audit
37+
38+
- name: Skip CI
39+
run: |
40+
if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then
41+
echo "skipping CI due to the 'Skip CI' label"
42+
exit 1
43+
fi
44+
45+
- name: Check out code
46+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
47+
with:
48+
persist-credentials: "false"
49+
50+
- name: Check for changes in relevant files
51+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
52+
id: changes
53+
with:
54+
token: ""
55+
filters: |
56+
end_to_end:
57+
- 'test/config.json'
58+
- 'go/**/*.go'
59+
- 'test.go'
60+
- 'Makefile'
61+
- 'build.env'
62+
- 'go.sum'
63+
- 'go.mod'
64+
- 'proto/*.proto'
65+
- 'tools/**'
66+
- 'config/**'
67+
- 'bootstrap.sh'
68+
- 'docker/**'
69+
- 'java/**'
70+
- '.github/workflows/docker_ci.yml'
71+
72+
- name: Setup GitHub access token
73+
if: steps.changes.outputs.end_to_end == 'true'
74+
run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/
75+
76+
- name: Build bootstrap images
77+
if: steps.changes.outputs.end_to_end == 'true'
78+
uses: ./.github/actions/build-bootstrap
79+
with:
80+
bootstrap-version: ${{ env.BOOTSTRAP_VERSION }}
81+
bootstrap-flavor: ${{ env.BOOTSTRAP_FLAVOR }}
82+
gh-access-token: ${{ env.GH_ACCESS_TOKEN }}
83+
84+
- name: Set up Go
85+
if: steps.changes.outputs.end_to_end == 'true'
86+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
87+
with:
88+
go-version-file: go.mod
89+
90+
- name: Tune the OS
91+
if: steps.changes.outputs.end_to_end == 'true'
92+
uses: ./.github/actions/tune-os
93+
94+
- name: Run docker tests - ${{ matrix.shard }}
95+
if: steps.changes.outputs.end_to_end == 'true'
96+
run: |
97+
go run test.go -docker=true -pull=false -flavor=${{ env.BOOTSTRAP_FLAVOR }} -bootstrap-version=${{ env.BOOTSTRAP_VERSION }} --follow -shard ${{ matrix.shard }}

.github/workflows/docker_test_cluster.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/java_docker_test.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/local_example.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ on:
88
pull_request:
99
branches: '**'
1010
permissions: read-all
11+
1112
env:
1213
GOPRIVATE: github.com/slackhq/vitess-addons
1314
GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}"
15+
BOOTSTRAP_VERSION: "ci"
16+
BOOTSTRAP_FLAVOR: "mysql84"
17+
1418
jobs:
1519

1620
build:
@@ -54,6 +58,12 @@ jobs:
5458
- 'examples/**'
5559
- '.github/workflows/local_example.yml'
5660
61+
- name: Build bootstrap images
62+
if: steps.changes.outputs.examples == 'true'
63+
uses: ./.github/actions/build-bootstrap
64+
with:
65+
gh-access-token: ${{ env.GH_ACCESS_TOKEN }}
66+
5767
- name: Set up Go
5868
if: steps.changes.outputs.examples == 'true'
5969
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
@@ -91,7 +101,7 @@ jobs:
91101
if [ "${{matrix.os}}" = "macos-latest" ]; then
92102
export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
93103
fi
94-
go run test.go -print-log -follow local_example
104+
go run test.go -print-log -follow -pull=false -flavor=${{ env.BOOTSTRAP_FLAVOR }} -bootstrap-version=${{ env.BOOTSTRAP_VERSION }} local_example
95105
96106
consul:
97107
name: Local example using consul on Ubuntu

.github/workflows/region_example.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
pull_request:
99
branches: '**'
1010
permissions: read-all
11+
12+
env:
13+
BOOTSTRAP_VERSION: "ci"
14+
BOOTSTRAP_FLAVOR: "mysql84"
15+
1116
jobs:
1217

1318
build:
@@ -54,6 +59,12 @@ jobs:
5459
- 'examples/**'
5560
- '.github/workflows/region_example.yml'
5661
62+
- name: Build bootstrap images
63+
if: steps.changes.outputs.examples == 'true'
64+
uses: ./.github/actions/build-bootstrap
65+
with:
66+
gh-access-token: ${{ env.GH_ACCESS_TOKEN }}
67+
5768
- name: Set up Go
5869
if: steps.changes.outputs.examples == 'true'
5970
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
@@ -91,4 +102,4 @@ jobs:
91102
if [ "${{matrix.os}}" = "macos-latest" ]; then
92103
export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
93104
fi
94-
go run test.go -print-log -follow region_example
105+
go run test.go -print-log -follow -pull=false -flavor=${{ env.BOOTSTRAP_FLAVOR }} -bootstrap-version=${{ env.BOOTSTRAP_VERSION }} region_example

0 commit comments

Comments
 (0)