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.
37 lines
686 B
Bash
Executable File
37 lines
686 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
WORK_TREE="$1"
|
|
(
|
|
cd $WORK_TREE || exit 1
|
|
|
|
echo "$PWD"
|
|
|
|
cat << EOF > /tmp/query.sql
|
|
SELECT version();
|
|
|
|
DROP TABLE IF EXISTS t;
|
|
CREATE TABLE test_map_contains
|
|
(
|
|
ResourceAttributes Map(LowCardinality(String), String),
|
|
INDEX idx_res_attr_value mapValues(ResourceAttributes) TYPE bloom_filter(0.01) GRANULARITY 1,
|
|
)
|
|
ORDER BY tuple();
|
|
|
|
INSERT INTO test_map_contains VALUES
|
|
(
|
|
{
|
|
'rum.sessionId': '5f449ff91029b8041c73af2e884ea1bc',
|
|
},
|
|
);
|
|
|
|
SELECT
|
|
throwIf(count()==0)
|
|
FROM test_map_contains
|
|
WHERE mapContains(ResourceAttributes, 'rum.sessionId')
|
|
EOF
|
|
|
|
# CH_PATH is the path to downloaded binary
|
|
$CH_PATH client --queries-file /tmp/query.sql
|
|
)
|