Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2188452
[wip] testcontainers migration, testflows broken
Slach Mar 23, 2026
e1c77ed
Merge branch 'master' into testcontainers_migration
Slach Mar 24, 2026
a4c111b
remove docker-compose from testflows: rename dir to docker, delete co…
Slach Mar 24, 2026
ff54dfa
update go.mod
Slach Mar 24, 2026
a554856
dynamic ports, parallel suite execution, container cleanup
Slach Mar 24, 2026
cc6d12c
isolate parallel suites: per-process config dirs and storage path pre…
Slach Mar 24, 2026
535560b
wire up testcontainers for integration tests: pool factory, cleanup, …
Slach Mar 24, 2026
8680566
fix TestAlibabaOverS3, add _logs_ to .gitignore
Slach Mar 24, 2026
31bb589
remove docker compose from build.yaml
Slach Mar 24, 2026
61e29bc
add pullImageIfNeeded
Slach Mar 24, 2026
1b4f0c1
add CGO_ENABLED in integration test build to check tests is not have …
Slach Mar 24, 2026
e13b7cd
replace pool-based env with per-test container lifecycle
Slach Mar 25, 2026
d98932c
fix isAdvancedMode threshold: 22.0 -> 20.0 to match old compose behavior
Slach Mar 25, 2026
8cc5a26
Merge branch 'master' into testcontainers_migration
Slach Mar 25, 2026
14f5c63
fix actions versions
Slach Mar 25, 2026
e29f646
use run.sh for testflows in CI, add --debug/--no-colors/--log passthr…
Slach Mar 25, 2026
248e5ac
pull azure-cli image before docker run in TestAzure
Slach Mar 25, 2026
98c073f
add timing to testflows run.sh: per-suite and total elapsed time
Slach Mar 25, 2026
32dec57
Merge branch 'master' into testcontainers_migration
Slach Mar 25, 2026
679e1d3
skip make build in testflows run.sh when running in GitHub Actions
Slach Mar 25, 2026
7a3655f
fix connect(): replace log.Fatal with return error on port binding fa…
Slach Mar 25, 2026
b01e9f8
dump container state and logs when waitHealthy fails
Slach Mar 25, 2026
cdb05d3
increase ClickHouse healthcheck StartPeriod to 120s and wait timeout …
Slach Mar 26, 2026
7986fc3
set ClickHouse healthcheck StartPeriod to 10s
Slach Mar 26, 2026
802cf31
optimize testcontainers startup: parallel services, image pre-pull, s…
Slach Mar 26, 2026
47e4fe8
revert to pool-based env reuse: pre-create RUN_PARALLEL environments
Slach Mar 26, 2026
307b50e
fix testflows parallel execution: treat RUN_TESTS='*' as run-all
Slach Mar 26, 2026
c7cf1ca
use DROP DATABASE ON CLUSTER SYNC to avoid ZK DDL queue race
Slach Mar 26, 2026
85a26eb
fix TestRBAC: restart clickhouse container after SYSTEM SHUTDOWN
Slach Mar 26, 2026
06fbef0
fix restartClickHouse: wait for full shutdown and verify with SELECT 1
Slach Mar 26, 2026
81284f1
fix restartClickHouse timeout for slow CH startup, dump container log…
Slach Mar 26, 2026
45d22e4
fix TestRBAC: retry SHOW queries after container restart
Slach Mar 27, 2026
34d7a10
fix slow delete local: use bind mounts instead of named volumes
Slach Mar 27, 2026
974b1eb
fix permission denied on shared dir cleanup
Slach Mar 27, 2026
408b37e
fix TestLongListRemote flaky: retry cached measurement on IO jitter
Slach Mar 27, 2026
c91031a
update ClickHouse 26.1 -> 26.3, increase test timeout to 120m
Slach Mar 27, 2026
bf61b89
reduce container stop timeout to 1s matching master docker rm -f beha…
Slach Mar 27, 2026
671fed3
fix CH 26.3 test failures: named collections drop order, async blob c…
Slach Mar 27, 2026
d805e8e
fix testflows/run.sh: detect suite failures by exit code, not just lo…
Slach Mar 27, 2026
2cd5d18
parallelize env startup/shutdown, fix testflows failure detection to …
Slach Mar 27, 2026
23d9aad
add curl retry flags to yq/restic/kopia downloads in custom backup tests
Slach Mar 27, 2026
64a3903
trigger CI rebuild after cancelling hung GHA runs
Slach Mar 27, 2026
08835c0
retrigger CI
Slach Mar 27, 2026
6e5dd00
fix: revert to named volumes, fix CUR_DIR double path, restore CH Sta…
Slach Mar 27, 2026
f8d6000
Merge branch 'master' of github.com:Altinity/clickhouse-backup into t…
Slach Mar 27, 2026
907cc53
fix: replace sleep-based waits with operation polling in testAPIDelet…
Slach Mar 28, 2026
febcd9d
fix: use correct column name in system.parts query for TestSkipDisk
Slach Mar 28, 2026
a1a28a9
fix go.sum conflicts
Slach Mar 28, 2026
ea3c6ba
fix: nil pointer dereference in checkObjectStorageIsEmpty before connect
Slach Mar 28, 2026
fe8be7f
fix: use correct jq parsing for status endpoint JSONEachRow response …
Slach Mar 28, 2026
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
89 changes: 22 additions & 67 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

# - name: Cache golang
# id: cache-golang
# uses: actions/cache@v4
# uses: actions/cache@v5
# with:
# path: |
# ~/go/pkg/mod
Expand Down Expand Up @@ -97,6 +97,7 @@ jobs:
name: Testflows
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
golang-version:
- "1.25"
Expand All @@ -109,14 +110,14 @@ jobs:
- '24.8'
- '25.3'
- '25.8'
- '26.1'
- '26.3'
steps:
- name: Checkout project
uses: actions/checkout@v6

- name: Setup golang
id: setup-go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '^${{ matrix.golang-version }}'

Expand All @@ -132,7 +133,7 @@ jobs:
python3 -m venv ~/venv/qa

- name: Cache python
uses: actions/cache@v4
uses: actions/cache@v5
id: cache-python
with:
path: ~/venv/qa
Expand All @@ -154,30 +155,18 @@ jobs:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_BUCKET: ${{ secrets.QA_AWS_BUCKET }}
QA_GCS_CRED_JSON: ${{ secrets.QA_GCS_CRED_JSON }}
RUN_PARALLEL: 3
DEBUG: 1
NO_COLORS: 1
GOROOT: ${{ env.GOROOT_1_25_X64 }}
# don't change it to avoid not working CI/CD
RUN_TESTS: "*"
run: |
set -xe
export CLICKHOUSE_TESTS_DIR=$(pwd)/test/testflows/clickhouse_backup

docker compose -f ${CLICKHOUSE_TESTS_DIR}/docker-compose/docker-compose.yml pull

chmod +x $(pwd)/clickhouse-backup/clickhouse-backup*
source ~/venv/qa/bin/activate
~/venv/qa/bin/python3 ./test/testflows/clickhouse_backup/regression.py --debug --only="${RUN_TESTS:-*}" --no-colors --log ./test/testflows/raw.log
tfs --debug --no-colors transform compact ./test/testflows/raw.log ./test/testflows/compact.log
tfs --debug --no-colors transform nice ./test/testflows/raw.log ./test/testflows/nice.log.txt
tfs --debug --no-colors transform short ./test/testflows/raw.log ./test/testflows/short.log.txt
tfs --debug --no-colors report results -a "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/" ./test/testflows/raw.log - --confidential --copyright "Altinity LTD" --logo ./test/testflows/altinity.png | ~/venv/qa/bin/tfs --debug --no-colors document convert > ./test/testflows/report.html
sudo chmod -Rv +rx test/testflows/clickhouse_backup/_instances
- name: Format testflows coverage
env:
GOROOT: ${{ env.GOROOT_1_25_X64 }}
run: |
sudo chmod -Rv a+rw test/testflows/_coverage_/
ls -la test/testflows/_coverage_
go env
go tool covdata textfmt -i test/testflows/_coverage_/ -o test/testflows/_coverage_/coverage.out
./test/testflows/run.sh
- name: Report testflows coverage
uses: coverallsapp/github-action@v2
with:
Expand All @@ -195,6 +184,7 @@ jobs:
path: |
test/testflows/*.log
test/testflows/*.log.txt
test/testflows/_logs_/**/*.log
test/testflows/clickhouse_backup/_instances/**/*.log
test/testflows/*.html
retention-days: 7
Expand All @@ -204,6 +194,7 @@ jobs:
name: Test
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
golang-version:
- "1.25"
Expand All @@ -222,7 +213,7 @@ jobs:
- '24.8'
- '25.3'
- '25.8'
- '26.1'
- '26.3'
steps:
- name: Checkout project
uses: actions/checkout@v6
Expand All @@ -235,7 +226,7 @@ jobs:

# - name: Cache golang
# id: cache-golang
# uses: actions/cache@v4
# uses: actions/cache@v5
# with:
# path: |
# ~/go/pkg/mod
Expand All @@ -258,16 +249,16 @@ jobs:
RUN_PARALLEL: 4
GOROOT: ${{ env.GOROOT_1_25_X64 }}
CLICKHOUSE_VERSION: ${{ matrix.clickhouse }}
LOG_LEVEL: "info"
TEST_LOG_LEVEL: "debug"
# options for advanced debug CI/CD
# RUN_TESTS: "^TestSkipDisk$"
# LOG_LEVEL: "debug"
# TEST_LOG_LEVEL: "debug"
# GCS_DEBUG: "true"
# SFTP_DEBUG: "true"
# AZBLOB_DEBUG: "true"
# FTP_DEBUG: "true"
# S3_DEBUG: "true"
CGO_ENABLED: 0
CGO_ENABLED: 1
GCS_TESTS: ${{ needs.build.outputs.GCS_TESTS }}
KEEPER_TLS_ENABLED: 1
RUN_ADVANCED_TESTS: 1
Expand All @@ -287,61 +278,25 @@ jobs:
echo "GCS_TESTS=${GCS_TESTS}"
GCS_ENCRYPTION_KEY=$(openssl rand -base64 32)
export GCS_ENCRYPTION_KEY

chmod +x $(pwd)/clickhouse-backup/clickhouse-backup*

if [[ "${CLICKHOUSE_VERSION}" =~ 2[2-9]+ ]]; then
if [[ "${CLICKHOUSE_VERSION}" =~ ^2[1-9]+ || "${CLICKHOUSE_VERSION}" == "head" ]]; then
export CLICKHOUSE_IMAGE=clickhouse/clickhouse-server
else
export CLICKHOUSE_IMAGE=yandex/clickhouse-server
fi

if [[ "${CLICKHOUSE_VERSION}" == 2* ]]; then
export COMPOSE_FILE=docker-compose_advanced.yml
else
export COMPOSE_FILE=docker-compose.yml
fi

export CUR_DIR="$(pwd)/test/integration"
export CLICKHOUSE_BACKUP_BIN="$(pwd)/clickhouse-backup/clickhouse-backup-race"
docker compose -f "${CUR_DIR}/${COMPOSE_FILE}" --progress=quiet pull

pids=()
project_ids=()
for ((i = 0; i < RUN_PARALLEL; i++)); do
docker compose -f ${CUR_DIR}/${COMPOSE_FILE} --project-name project${i} --progress plain up -d &
pids+=($!)
project_ids+=("project${i}")
done


for index in "${!pids[@]}"; do
pid=${pids[index]}
project_id=${project_ids[index]}
if wait "$pid"; then
echo "$pid docker compose up successful"
else
echo "=== docker ${project_id} state ==="
docker compose -f ${CUR_DIR}/${COMPOSE_FILE} --project-name ${project_id} --progress plain ps -a
echo "=== docker ${project_id} logs ==="
docker compose -f ${CUR_DIR}/${COMPOSE_FILE} --project-name ${project_id} --progress plain logs
echo "$pid the docker compose up failed."
exit 1 # Exit with an error code if any command fails
fi
done

set +e
go test -parallel "${RUN_PARALLEL}" -timeout 90m -failfast -tags=integration -shuffle=$(date +%Y%m%d) -run "${RUN_TESTS:-.+}" -v "./test/integration/..."
go test -count=1 -parallel "${RUN_PARALLEL}" -race -timeout "${TEST_TIMEOUT:-120m}" -failfast -tags=integration -shuffle=$(date +%Y%m%d) -run "${RUN_TESTS:-.+}" -v "./test/integration/..."
TEST_FAILED=$?
set -e
if [[ "0" != "${TEST_FAILED}" ]]; then
for project_id in "${project_ids[@]}"; do
echo "=== docker ${project_id} state ==="
docker compose -f ${CUR_DIR}/${COMPOSE_FILE} --project-name ${project_id} --progress plain ps -a
echo "=== docker ${project_id} logs ==="
docker compose -f ${CUR_DIR}/${COMPOSE_FILE} --project-name ${project_id} --progress plain logs
done
exit 1
fi
fi

- name: Format integration coverage
env:
Expand Down
155 changes: 0 additions & 155 deletions Vagrantfile

This file was deleted.

Loading
Loading