mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Adds `utils/auto-bisect/` — a shell-based bisection framework that downloads pre-built CI binaries and runs a user-supplied test script to find the first bad commit. Key features: - Downloads public CI binaries from S3 by default; private CloudFront builds with `--private` (credentials via `CH_CI_BASIC_AUTH` env var, `CH_CI_USER`/`CH_CI_PASSWORD`, or `/etc/netrc`) - Three environment modes: `single` (one server), `replicateddb` (two nodes + Keeper, Replicated database), `sharedcatalog` (two nodes + Keeper, SharedCatalog) - Uses `git bisect --no-checkout` by default so the work tree is not modified during bisection - Walker mode (`--walker`) for linear commit-by-commit testing - Example test scripts in `tests/` Tested locally: `--env nothing`, `--env single`, and `--env replicateddb` all verified working.
26 lines
583 B
Bash
Executable File
26 lines
583 B
Bash
Executable File
#!/bin/bash
|
|
# do not install clickhouse, used for client bisecting on same CH version
|
|
set -e
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Usage: $0 <WORK_TREE>"
|
|
exit 1
|
|
fi
|
|
|
|
WORK_TREE="$1"
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
# Check if the script is located in a directory named 'env'
|
|
if [ "$(basename "$SCRIPT_DIR")" = "env" ]; then
|
|
SCRIPT_DIR="$(dirname "$SCRIPT_DIR")"
|
|
fi
|
|
|
|
CH_PATH=${CH_PATH:=$(command -v clickhouse || true)}
|
|
|
|
if [ -z "$CH_PATH" ] || [ ! -s "$CH_PATH" ]; then
|
|
echo "Can't find clickhouse binary at '$CH_PATH'"
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf $SCRIPT_DIR/data/ch
|